Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/19/10 05:25:00 (14 years ago)
Author:
swagner
Message:

Worked on OKB data model and services (#1174)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/OKB/HeuristicLab.Clients.OKB-3.3/ServiceClients/AlgorithmClass.cs

    r4426 r4433  
    2020#endregion
    2121
    22 using System;
    2322using System.ComponentModel;
    24 using HeuristicLab.Clients.Common;
    2523using HeuristicLab.Common;
    2624using HeuristicLab.Core;
    27 using HeuristicLab.PluginInfrastructure;
    2825
    2926namespace HeuristicLab.Clients.OKB {
    3027  [Item("AlgorithmClass", "An OKB algorithm class.")]
    31   public partial class AlgorithmClass : OKBItem, INamedOKBItem {
     28  public partial class AlgorithmClass : INamedOKBItem {
    3229    public AlgorithmClass() {
    3330      Name = "New Algorithm Class";
    34       PropertyChanged += new PropertyChangedEventHandler(OnPropertyChanged);
    3531    }
    3632
     
    3834      AlgorithmClass clone = new AlgorithmClass();
    3935      cloner.RegisterClonedObject(this, clone);
     36      clone.Id = Id;
    4037      clone.Name = Name;
    4138      clone.Description = Description;
     
    4845    }
    4946
    50     public override void Store() {
    51       using (AdminServiceClient adminService = ClientFactory.CreateClient<AdminServiceClient, IAdminService>()) {
    52         try {
    53           adminService.StoreAlgorithmClass(this);
    54         }
    55         catch (Exception ex) {
    56           ErrorHandling.ShowErrorDialog(ex);
    57         }
    58       }
    59     }
    60 
    61     private void OnPropertyChanged(object sender, PropertyChangedEventArgs e) {
    62       if (e.PropertyName.Equals("Name"))
     47    protected override void OnPropertyChanged(PropertyChangedEventArgs e) {
     48      base.OnPropertyChanged(e);
     49      if (e.PropertyName == "Name")
    6350        OnToStringChanged();
    6451    }
Note: See TracChangeset for help on using the changeset viewer.