Changeset 14533


Ignore:
Timestamp:
12/27/16 13:05:48 (3 years ago)
Author:
gkronber
Message:

#2638: proposed fix for slow enable/disable operations?

File:
1 edited

Legend:

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

    r14185 r14533  
    3434      this.closeReason = CloseReason.None;
    3535      this.readOnly = false;
     36
    3637      if (ViewAttribute.HasViewAttribute(this.GetType()))
    3738        this.Caption = ViewAttribute.GetViewName(this.GetType());
     
    4546      set {
    4647        if (InvokeRequired) {
    47           Action<string> action = delegate(string s) { this.Caption = s; };
     48          Action<string> action = delegate (string s) { this.Caption = s; };
    4849          Invoke(action, value);
    4950        } else {
     
    6162      set {
    6263        if (InvokeRequired) {
    63           Action<bool> action = delegate(bool b) { this.ReadOnly = b; };
     64          Action<bool> action = delegate (bool b) { this.ReadOnly = b; };
    6465          Invoke(action, value);
    6566        } else {
     
    9495
    9596    protected override void OnEnabledChanged(EventArgs e) {
     97      SuspendRepaint();
    9698      base.OnEnabledChanged(e);
    9799      if (Enabled) SetEnabledStateOfControls();
     100      ResumeRepaint(true);
    98101    }
    99102
Note: See TracChangeset for help on using the changeset viewer.