Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/Common/UpdateControl.cs @ 6703

Last change on this file since 6703 was 6688, checked in by ascheibe, 13 years ago

#1233 some renaming to be more consistent with OKB

File size: 756 bytes
Line 
1using System;
2using System.Threading.Tasks;
3using System.Windows.Forms;
4
5namespace HeuristicLab.Clients.Hive.Administrator.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.