Changeset 7933 for branches/ClientUserManagement/HeuristicLab.Clients.Access.Views/3.3/ClientViews/ClientInformationDialog.cs
- Timestamp:
- 05/30/12 16:37:17 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ClientUserManagement/HeuristicLab.Clients.Access.Views/3.3/ClientViews/ClientInformationDialog.cs
r7557 r7933 20 20 #endregion 21 21 22 using System; 23 using System.Threading.Tasks; 22 24 using System.Windows.Forms; 23 25 … … 28 30 } 29 31 30 protected override void OnLoad(System.EventArgs e) { 31 base.OnLoad(e); 32 private void okButton_Click(object sender, System.EventArgs e) { 33 Close(); 34 } 32 35 33 clientView.Content = ClientInformation.Instance.ClientInfo; 36 private void refreshButton_Click(object sender, System.EventArgs e) { 37 Refresh(); 38 } 39 40 private void registerClientButton_Click(object sender, EventArgs e) { 41 using (ClientRegistrationDialog regDialog = new ClientRegistrationDialog()) { 42 regDialog.ShowDialog(this); 43 Refresh(); 44 } 45 } 46 47 private void Refresh() { 48 clientView.StartProgressView(); 49 Task.Factory.StartNew(new Action(delegate { 50 ClientInformation.Instance.Refresh(); 51 clientView.Content = ClientInformation.Instance.ClientInfo; 52 clientView.FinishProgressView(); 53 EnableRegistration(); 54 })); 55 } 56 57 private void EnableRegistration() { 58 if (InvokeRequired) { 59 Invoke(new Action(EnableRegistration)); 60 } else { 61 registerClientButton.Visible = !ClientInformation.Instance.ClientExists; 62 infoLabel.Visible = !ClientInformation.Instance.ClientExists; 63 } 34 64 } 35 65 }
Note: See TracChangeset
for help on using the changeset viewer.