Free cookie consent management tool by TermsFeed Policy Generator

source: branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/ControlExtensions.cs @ 4263

Last change on this file since 4263 was 4121, checked in by cneumuel, 14 years ago

Stabilization of Hive, Improvement HiveExperiment GUI (#1115)

File size: 435 bytes
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Windows.Forms;
6
7namespace HeuristicLab.Hive.Experiment.Views {
8  public static class ControlExtensions {
9    public static void InvokeIfRequired(this Control c, Action<Control> action) {
10      if (c.InvokeRequired) {
11        c.Invoke((Action)(() => action(c)));
12      } else {
13        action(c);
14      }
15    }
16  }
17}
Note: See TracBrowser for help on using the repository browser.