Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/18/10 04:33:20 (14 years ago)
Author:
mkommend
Message:

fixed cross threading issues in ViewHost (ticket #972)

File:
1 edited

Legend:

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

    r3354 r3398  
    5858    public virtual bool ReadOnly {
    5959      get { return this.readOnly; }
    60        set {
     60      set {
    6161        if (InvokeRequired) {
    6262          Action<bool> action = delegate(bool b) { this.ReadOnly = b; };
     
    208208
    209209    public void SuspendRepaint() {
    210       ((Control)this).SuspendRepaint();
     210      if (InvokeRequired)
     211        Invoke((MethodInvoker)SuspendRepaint);
     212      else
     213        ((Control)this).SuspendRepaint();
    211214    }
    212215    public void ResumeRepaint(bool refresh) {
     216      if (InvokeRequired)
     217        Invoke((Action<bool>)ResumeRepaint,refresh);
     218      else
    213219      ((Control)this).ResumeRepaint(refresh);
    214220    }
Note: See TracChangeset for help on using the changeset viewer.