- Timestamp:
- 09/19/10 05:25:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OKB/HeuristicLab.Clients.OKB-3.3/ServiceClients/Algorithm.cs
r4426 r4433 20 20 #endregion 21 21 22 using System;23 22 using System.ComponentModel; 24 using HeuristicLab.Clients.Common;25 23 using HeuristicLab.Common; 26 24 using HeuristicLab.Core; 27 using HeuristicLab.PluginInfrastructure;28 25 29 26 namespace HeuristicLab.Clients.OKB { 30 27 [Item("Algorithm", "An OKB algorithm.")] 31 public partial class Algorithm : OKBItem,INamedOKBItem {28 public partial class Algorithm : INamedOKBItem { 32 29 public Algorithm() { 33 30 Name = "New Algorithm"; 34 PropertyChanged += new PropertyChangedEventHandler(OnPropertyChanged);35 31 } 36 32 … … 38 34 Algorithm clone = new Algorithm(); 39 35 cloner.RegisterClonedObject(this, clone); 36 clone.Id = Id; 40 37 clone.Name = Name; 41 38 clone.Description = Description; … … 47 44 } 48 45 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") 62 49 OnToStringChanged(); 63 50 }
Note: See TracChangeset
for help on using the changeset viewer.