Changeset 8331 for branches/ScatterSearch (trunk integration)/HeuristicLab.Clients.Hive.Views/3.3/TreeView/HiveTaskItemTreeView.cs
- Timestamp:
- 07/26/12 09:51:13 (12 years ago)
- Location:
- branches/ScatterSearch (trunk integration)
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ScatterSearch (trunk integration)
- Property svn:ignore
-
old new 21 21 protoc.exe 22 22 _ReSharper.HeuristicLab 3.3 Tests 23 Google.ProtocolBuffers-2.4.1.473.dll
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/ScatterSearch (trunk integration)/HeuristicLab.Clients.Hive.Views/3.3/TreeView/HiveTaskItemTreeView.cs
r8086 r8331 20 20 #endregion 21 21 22 using System;23 22 using System.Collections.Generic; 24 23 using System.Windows.Forms; … … 42 41 } 43 42 44 #region Register Content Events 45 protected override void DeregisterContentEvents() { 46 // TODO: Deregister your event handlers on the Content here 47 base.DeregisterContentEvents(); 48 } 49 protected override void RegisterContentEvents() { 50 base.RegisterContentEvents(); 51 // TODO: Register your event handlers on the Content here 52 } 53 #endregion 54 55 protected override void OnContentChanged() { 56 base.OnContentChanged(); 57 if (Content == null) { 58 // TODO: Put code here when content is null 59 } else { 60 // TODO: Put code here when content has been changed and is not null 61 } 62 } 63 64 protected override void SetEnabledStateOfControls() { 65 base.SetEnabledStateOfControls(); 66 // TODO: Put code here to enable or disable controls based on whether the Content is/not null or the view is ReadOnly 67 } 68 69 #region Event Handlers 70 // TODO: Put event handlers here 71 #endregion 72 73 #region Child Control Events 74 protected override void addButton_Click(object sender, EventArgs e) { 43 protected override void AddItem() { 75 44 IOptimizer optimizer = CreateItem<IOptimizer>(); 76 45 if (optimizer != null) { … … 88 57 } 89 58 90 protected override void removeButton_Click(object sender, EventArgs e) { 91 base.removeButton_Click(sender, e); 92 93 if (treeView.SelectedNode != null) { 94 var selectedItem = (HiveTask)treeView.SelectedNode.Tag; 95 var parentItem = GetParentItem(selectedItem); 96 if (parentItem == null) { 97 Content.Remove((HiveTask)treeView.SelectedNode.Tag); 98 } else { 99 var experiment = parentItem.ItemTask.Item as Experiment; 100 if (experiment != null) { 101 experiment.Optimizers.Remove(((OptimizerTask)selectedItem.ItemTask).Item); 102 } 59 protected override void RemoveItem(HiveTask item) { 60 var parentItem = GetParentItem(item); 61 if (parentItem == null) { 62 Content.Remove(item); 63 } else { 64 var experiment = parentItem.ItemTask.Item as Experiment; 65 if (experiment != null) { 66 experiment.Optimizers.Remove(((OptimizerTask)item.ItemTask).Item); 103 67 } 104 68 } 105 69 } 106 #endregion107 70 108 71 protected override ICollection<IItemTreeNodeAction<HiveTask>> GetTreeNodeItemActions(HiveTask selectedItem) {
Note: See TracChangeset
for help on using the changeset viewer.