Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/04/14 18:35:25 (10 years ago)
Author:
abeham
Message:

#2120: merged to stable

Location:
stable
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Clients.OKB.Views/3.3/RunCreation/Views/OKBRunView.cs

    r11170 r11522  
    2121
    2222using System;
     23using System.ComponentModel;
    2324using System.Windows.Forms;
    2425using HeuristicLab.Core.Views;
     
    4041
    4142    protected override void DeregisterContentEvents() {
    42       Content.StoredChanged -= new System.EventHandler(Content_StoredChanged);
     43      Content.PropertyChanged -= Content_PropertyChanged;
    4344      base.DeregisterContentEvents();
    4445    }
    4546    protected override void RegisterContentEvents() {
    4647      base.RegisterContentEvents();
    47       Content.StoredChanged += new System.EventHandler(Content_StoredChanged);
     48      Content.PropertyChanged += Content_PropertyChanged;
    4849    }
    4950
     
    5960
    6061    #region Content Events
    61     private void Content_StoredChanged(object sender, System.EventArgs e) {
    62       storeButton.Enabled = !Content.Stored;
     62    private void Content_PropertyChanged(object sender, PropertyChangedEventArgs e) {
     63      if (e.PropertyName == "Stored")
     64        storeButton.Enabled = !Content.Stored;
    6365    }
    6466    #endregion
     
    6870      try {
    6971        Content.Store();
    70       }
    71       catch (MissingClientRegistrationException) {
     72      } catch (MissingClientRegistrationException) {
    7273        MessageBox.Show("You have to register your client to be able to store OKB runs." + Environment.NewLine
    7374          + " Please click in the menu bar on Services -> Access -> Client Information and register your client. ", "Missing client registration", MessageBoxButtons.OK, MessageBoxIcon.Information);
    74       }
    75       catch (Exception ex) {
     75      } catch (Exception ex) {
    7676        ErrorHandling.ShowErrorDialog(this, "Store failed.", ex);
    7777      }
Note: See TracChangeset for help on using the changeset viewer.