Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3417 for trunk


Ignore:
Timestamp:
04/19/10 21:09:25 (15 years ago)
Author:
mkommend
Message:

corrected bug in OnClosing of views (ticket #982)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/View.cs

    r3416 r3417  
    151151        Type controlType = c.GetType();
    152152        PropertyInfo controlPropertyInfo = controlType.GetProperty(propertyInfo.Name, propertyInfo.PropertyType);
    153         if (type.IsAssignableFrom(controlType) && controlPropertyInfo!= null) {
     153        if (type.IsAssignableFrom(controlType) && controlPropertyInfo != null) {
    154154          var thisValue = propertyInfo.GetValue(this, null);
    155155          controlPropertyInfo.SetValue(c, thisValue, null);
     
    183183    internal void OnClosingHelper(object sender, FormClosingEventArgs e) {
    184184      FormClosingEventArgs eventArgs = new FormClosingEventArgs(this.closeReason, e.Cancel);
    185       if (this.closeReason != CloseReason.None)
     185      if (this.closeReason != CloseReason.None) {
    186186        this.OnClosing(eventArgs);
    187       else
     187        if (eventArgs.Cancel != e.Cancel)
     188          e.Cancel = eventArgs.Cancel;
     189      } else
    188190        this.OnClosing(e);
    189 
    190       if (eventArgs.Cancel != e.Cancel)
    191         e.Cancel = eventArgs.Cancel;
    192191      this.closeReason = CloseReason.None;
    193192    }
Note: See TracChangeset for help on using the changeset viewer.