- 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/AlgorithmClass.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("AlgorithmClass", "An OKB algorithm class.")] 31 public partial class AlgorithmClass : OKBItem,INamedOKBItem {28 public partial class AlgorithmClass : INamedOKBItem { 32 29 public AlgorithmClass() { 33 30 Name = "New Algorithm Class"; 34 PropertyChanged += new PropertyChangedEventHandler(OnPropertyChanged);35 31 } 36 32 … … 38 34 AlgorithmClass clone = new AlgorithmClass(); 39 35 cloner.RegisterClonedObject(this, clone); 36 clone.Id = Id; 40 37 clone.Name = Name; 41 38 clone.Description = Description; … … 48 45 } 49 46 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") 63 50 OnToStringChanged(); 64 51 }
Note: See TracChangeset
for help on using the changeset viewer.