Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administration/3.4/Views/Common/UpdateControl.cs @ 6373

Last change on this file since 6373 was 6373, checked in by cneumuel, 13 years ago

#1233

  • moved ExperimentManager into separate plugin
  • moved Administration into separate plugin
File size: 757 bytes
Line 
1using System;
2using System.Threading.Tasks;
3using System.Windows.Forms;
4
5namespace HeuristicLab.Clients.Hive.Administration.Views.Common {
6  public partial class UpdateControl : UserControl {
7    public UpdateControl() {
8      InitializeComponent();
9    }
10
11    public Action UpdateAction { get; set; }
12
13    private void PrivUpdateAction() {
14      UpdateAction();
15      imgBoxProgress.Invoke(new MethodInvoker(() => imgBoxProgress.Visible = false));
16    }
17
18    private void btnRefresh_Click(object sender, EventArgs e) {
19      if (UpdateAction != null) {
20        imgBoxProgress.Visible = true;
21        Action action = new Action(PrivUpdateAction);
22        Task task = new Task(action);
23        task.Start();
24      }
25    }
26  }
27}
Note: See TracBrowser for help on using the repository browser.