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/Algorithm.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("Algorithm", "An OKB algorithm.")]
    31   public partial class Algorithm : OKBItem, INamedOKBItem {
     28  public partial class Algorithm : INamedOKBItem {
    3229    public Algorithm() {
    3330      Name = "New Algorithm";
    34       PropertyChanged += new PropertyChangedEventHandler(OnPropertyChanged);
    3531    }
    3632
     
    3834      Algorithm clone = new Algorithm();
    3935      cloner.RegisterClonedObject(this, clone);
     36      clone.Id = Id;
    4037      clone.Name = Name;
    4138      clone.Description = Description;
     
    4744    }
    4845
    49     public override void Store() {
    50       using (AdminServiceClient adminService = ClientFactory.CreateClient<AdminServiceClient, IAdminService>()) {
    51         try {
    52           adminService.StoreAlgorithm(this);
    53         }
    54         catch (Exception ex) {
    55           ErrorHandling.ShowErrorDialog(ex);
    56         }
    57       }
    58     }
    59 
    60     private void OnPropertyChanged(object sender, PropertyChangedEventArgs e) {
    61       if (e.PropertyName.Equals("Name"))
     46    protected override void OnPropertyChanged(PropertyChangedEventArgs e) {
     47      base.OnPropertyChanged(e);
     48      if (e.PropertyName == "Name")
    6249        OnToStringChanged();
    6350    }
Note: See TracChangeset for help on using the changeset viewer.