Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/04/14 19:40:22 (10 years ago)
Author:
abeham
Message:

#2120:

  • Parameters and Results are now ObservableDictionaries
  • PropertyChanged event handler replaces the Changed event handler
  • RunCollection listens to changed events to each run's parameters and results (8 additional event handlers per run)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Clients.OKB.Views/3.3/RunCreation/Views/OKBRunView.cs

    r11171 r11344  
    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.