Changeset 2676
- Timestamp:
- 01/25/10 02:34:23 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 1 added
- 54 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/CreateParameterDialog.Designer.cs ¶
r2655 r2676 87 87 this.nameLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 88 88 this.nameLabel.AutoSize = true; 89 this.nameLabel.Location = new System.Drawing.Point( 12, 289);89 this.nameLabel.Location = new System.Drawing.Point(9, 289); 90 90 this.nameLabel.Name = "nameLabel"; 91 91 this.nameLabel.Size = new System.Drawing.Size(38, 13); … … 97 97 this.nameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) 98 98 | System.Windows.Forms.AnchorStyles.Right))); 99 this.nameTextBox.Location = new System.Drawing.Point( 81, 286);99 this.nameTextBox.Location = new System.Drawing.Point(78, 286); 100 100 this.nameTextBox.Name = "nameTextBox"; 101 this.nameTextBox.Size = new System.Drawing.Size(4 49, 20);101 this.nameTextBox.Size = new System.Drawing.Size(452, 20); 102 102 this.nameTextBox.TabIndex = 2; 103 103 // … … 106 106 this.descriptionLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 107 107 this.descriptionLabel.AutoSize = true; 108 this.descriptionLabel.Location = new System.Drawing.Point( 12, 315);108 this.descriptionLabel.Location = new System.Drawing.Point(9, 315); 109 109 this.descriptionLabel.Name = "descriptionLabel"; 110 110 this.descriptionLabel.Size = new System.Drawing.Size(63, 13); … … 116 116 this.descriptionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) 117 117 | System.Windows.Forms.AnchorStyles.Right))); 118 this.descriptionTextBox.Location = new System.Drawing.Point( 81, 312);118 this.descriptionTextBox.Location = new System.Drawing.Point(78, 312); 119 119 this.descriptionTextBox.Multiline = true; 120 120 this.descriptionTextBox.Name = "descriptionTextBox"; 121 121 this.descriptionTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; 122 this.descriptionTextBox.Size = new System.Drawing.Size(4 49, 103);122 this.descriptionTextBox.Size = new System.Drawing.Size(452, 103); 123 123 this.descriptionTextBox.TabIndex = 4; 124 124 // … … 127 127 this.dataTypeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 128 128 this.dataTypeLabel.AutoSize = true; 129 this.dataTypeLabel.Location = new System.Drawing.Point( 12, 426);129 this.dataTypeLabel.Location = new System.Drawing.Point(9, 426); 130 130 this.dataTypeLabel.Name = "dataTypeLabel"; 131 131 this.dataTypeLabel.Size = new System.Drawing.Size(60, 13); … … 138 138 | System.Windows.Forms.AnchorStyles.Right))); 139 139 this.dataTypeTextBox.Enabled = false; 140 this.dataTypeTextBox.Location = new System.Drawing.Point( 81, 423);140 this.dataTypeTextBox.Location = new System.Drawing.Point(78, 423); 141 141 this.dataTypeTextBox.Name = "dataTypeTextBox"; 142 142 this.dataTypeTextBox.ReadOnly = true; 143 this.dataTypeTextBox.Size = new System.Drawing.Size(42 0, 20);143 this.dataTypeTextBox.Size = new System.Drawing.Size(423, 20); 144 144 this.dataTypeTextBox.TabIndex = 6; 145 145 // … … 148 148 this.setDataTypeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 149 149 this.setDataTypeButton.Enabled = false; 150 this.setDataTypeButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Add; 150 151 this.setDataTypeButton.Location = new System.Drawing.Point(507, 421); 151 152 this.setDataTypeButton.Name = "setDataTypeButton"; … … 154 155 this.toolTip.SetToolTip(this.setDataTypeButton, "Set Data Type"); 155 156 this.setDataTypeButton.UseVisualStyleBackColor = true; 156 this.setDataTypeButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Add;157 157 this.setDataTypeButton.Click += new System.EventHandler(this.setDataTypeButton_Click); 158 158 // … … 201 201 #endregion 202 202 203 pr ivateSystem.Windows.Forms.Button cancelButton;204 pr ivateSystem.Windows.Forms.Button okButton;205 pr ivateSystem.Windows.Forms.Label nameLabel;206 pr ivateSystem.Windows.Forms.TextBox nameTextBox;207 pr ivateSystem.Windows.Forms.Label descriptionLabel;208 pr ivateSystem.Windows.Forms.TextBox descriptionTextBox;209 pr ivateTypeSelector parameterTypeSelector;210 pr ivateSystem.Windows.Forms.Label dataTypeLabel;211 pr ivateSystem.Windows.Forms.TextBox dataTypeTextBox;212 pr ivateSystem.Windows.Forms.Button setDataTypeButton;213 pr ivateSystem.Windows.Forms.ToolTip toolTip;203 protected System.Windows.Forms.Button cancelButton; 204 protected System.Windows.Forms.Button okButton; 205 protected System.Windows.Forms.Label nameLabel; 206 protected System.Windows.Forms.TextBox nameTextBox; 207 protected System.Windows.Forms.Label descriptionLabel; 208 protected System.Windows.Forms.TextBox descriptionTextBox; 209 protected TypeSelector parameterTypeSelector; 210 protected System.Windows.Forms.Label dataTypeLabel; 211 protected System.Windows.Forms.TextBox dataTypeTextBox; 212 protected System.Windows.Forms.Button setDataTypeButton; 213 protected System.Windows.Forms.ToolTip toolTip; 214 214 } 215 215 } -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/CreateParameterDialog.cs ¶
r2655 r2676 33 33 namespace HeuristicLab.Core.Views { 34 34 public partial class CreateParameterDialog : Form { 35 TypeSelectorDialog typeSelectorDialog;35 protected TypeSelectorDialog typeSelectorDialog; 36 36 37 37 public IParameter Parameter { … … 58 58 } 59 59 60 pr ivatevoid setDataTypeButton_Click(object sender, EventArgs e) {60 protected virtual void setDataTypeButton_Click(object sender, EventArgs e) { 61 61 if (typeSelectorDialog == null) { 62 62 typeSelectorDialog = new TypeSelectorDialog(); … … 72 72 } 73 73 74 pr ivatevoid CreateParameterDialog_Load(object sender, EventArgs e) {74 protected virtual void CreateParameterDialog_Load(object sender, EventArgs e) { 75 75 parameterTypeSelector.Configure(typeof(IParameter), false, true); 76 76 } 77 77 78 pr ivatevoid parameterTypeSelector_SelectedTypeChanged(object sender, EventArgs e) {78 protected virtual void parameterTypeSelector_SelectedTypeChanged(object sender, EventArgs e) { 79 79 dataTypeTextBox.Text = "-"; 80 80 dataTypeTextBox.Tag = null; -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/EngineView.Designer.cs ¶
r2664 r2676 63 63 // 64 64 this.executionTimeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 65 this.executionTimeTextBox.Location = new System.Drawing.Point(6 61, 620);65 this.executionTimeTextBox.Location = new System.Drawing.Point(655, 620); 66 66 this.executionTimeTextBox.Name = "executionTimeTextBox"; 67 67 this.executionTimeTextBox.ReadOnly = true; … … 73 73 this.executionTimeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 74 74 this.executionTimeLabel.AutoSize = true; 75 this.executionTimeLabel.Location = new System.Drawing.Point(5 72, 623);75 this.executionTimeLabel.Location = new System.Drawing.Point(566, 623); 76 76 this.executionTimeLabel.Name = "executionTimeLabel"; 77 77 this.executionTimeLabel.Size = new System.Drawing.Size(83, 13); … … 100 100 // operatorGraphView 101 101 // 102 this.operatorGraphView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 103 | System.Windows.Forms.AnchorStyles.Left) 104 | System.Windows.Forms.AnchorStyles.Right))); 102 105 this.operatorGraphView.Caption = "Operator Graph"; 103 this.operatorGraphView.Dock = System.Windows.Forms.DockStyle.Fill;104 106 this.operatorGraphView.Item = null; 105 this.operatorGraphView.Location = new System.Drawing.Point( 0, 0);107 this.operatorGraphView.Location = new System.Drawing.Point(3, 3); 106 108 this.operatorGraphView.Name = "operatorGraphView"; 109 this.operatorGraphView.Object = null; 107 110 this.operatorGraphView.OperatorGraph = null; 108 this.operatorGraphView.Size = new System.Drawing.Size( 401, 611);111 this.operatorGraphView.Size = new System.Drawing.Size(395, 605); 109 112 this.operatorGraphView.TabIndex = 0; 110 113 // 111 114 // scopeView 112 115 // 116 this.scopeView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 117 | System.Windows.Forms.AnchorStyles.Left) 118 | System.Windows.Forms.AnchorStyles.Right))); 113 119 this.scopeView.Caption = "Scope"; 114 this.scopeView.Dock = System.Windows.Forms.DockStyle.Fill;115 120 this.scopeView.Item = null; 116 this.scopeView.Location = new System.Drawing.Point( 0, 0);121 this.scopeView.Location = new System.Drawing.Point(3, 3); 117 122 this.scopeView.Name = "scopeView"; 123 this.scopeView.Object = null; 118 124 this.scopeView.Scope = null; 119 this.scopeView.Size = new System.Drawing.Size(39 7, 611);125 this.scopeView.Size = new System.Drawing.Size(391, 605); 120 126 this.scopeView.TabIndex = 0; 121 127 // … … 124 130 this.resetButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 125 131 this.resetButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Restart; 126 this.resetButton.Location = new System.Drawing.Point( 58, 617);132 this.resetButton.Location = new System.Drawing.Point(63, 617); 127 133 this.resetButton.Name = "resetButton"; 128 134 this.resetButton.Size = new System.Drawing.Size(23, 23); … … 137 143 this.stopButton.Enabled = false; 138 144 this.stopButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Stop; 139 this.stopButton.Location = new System.Drawing.Point( 29, 617);145 this.stopButton.Location = new System.Drawing.Point(34, 617); 140 146 this.stopButton.Name = "stopButton"; 141 147 this.stopButton.Size = new System.Drawing.Size(23, 23); … … 149 155 this.startButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 150 156 this.startButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Play; 151 this.startButton.Location = new System.Drawing.Point( 0, 617);157 this.startButton.Location = new System.Drawing.Point(5, 617); 152 158 this.startButton.Name = "startButton"; 153 159 this.startButton.Size = new System.Drawing.Size(23, 23); … … 157 163 this.startButton.Click += new System.EventHandler(this.startButton_Click); 158 164 // 159 // Engine BaseView165 // EngineView 160 166 // 161 167 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 162 168 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 163 169 this.Controls.Add(this.executionTimeTextBox); 170 this.Controls.Add(this.stopButton); 164 171 this.Controls.Add(this.executionTimeLabel); 165 172 this.Controls.Add(this.splitContainer); 166 173 this.Controls.Add(this.resetButton); 167 this.Controls.Add(this.stopButton);168 174 this.Controls.Add(this.startButton); 169 this.Name = "Engine BaseView";175 this.Name = "EngineView"; 170 176 this.Size = new System.Drawing.Size(802, 640); 171 177 this.splitContainer.Panel1.ResumeLayout(false); … … 187 193 protected HeuristicLab.Core.Views.OperatorGraphView operatorGraphView; 188 194 protected HeuristicLab.Core.Views.ScopeView scopeView; 189 pr ivateSystem.Windows.Forms.ToolTip toolTip;195 protected System.Windows.Forms.ToolTip toolTip; 190 196 191 197 } -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/EngineView.cs ¶
r2664 r2676 111 111 112 112 #region Engine Events 113 pr ivatevoid Engine_OperatorGraphChanged(object sender, EventArgs e) {113 protected virtual void Engine_OperatorGraphChanged(object sender, EventArgs e) { 114 114 if (InvokeRequired) 115 115 Invoke(new EventHandler(Engine_OperatorGraphChanged), sender, e); … … 117 117 operatorGraphView.OperatorGraph = Engine.OperatorGraph; 118 118 } 119 pr ivatevoid Engine_Initialized(object sender, EventArgs e) {119 protected virtual void Engine_Initialized(object sender, EventArgs e) { 120 120 if (InvokeRequired) 121 121 Invoke(new EventHandler(Engine_Initialized), sender, e); … … 129 129 } 130 130 } 131 pr ivatevoid Engine_Started(object sender, EventArgs e) {131 protected virtual void Engine_Started(object sender, EventArgs e) { 132 132 executionTimeCounter = 0; 133 133 if (InvokeRequired) … … 142 142 } 143 143 } 144 pr ivatevoid Engine_Stopped(object sender, EventArgs e) {144 protected virtual void Engine_Stopped(object sender, EventArgs e) { 145 145 if (InvokeRequired) 146 146 Invoke(new EventHandler(Engine_Stopped), sender, e); … … 154 154 } 155 155 } 156 pr ivatevoid Engine_ExecutionTimeChanged(object sender, EventArgs e) {156 protected virtual void Engine_ExecutionTimeChanged(object sender, EventArgs e) { 157 157 executionTimeCounter++; 158 158 if ((executionTimeCounter == 100) || !Engine.Running) { … … 161 161 } 162 162 } 163 pr ivatevoid Engine_ExceptionOccurred(object sender, EventArgs<Exception> e) {163 protected virtual void Engine_ExceptionOccurred(object sender, EventArgs<Exception> e) { 164 164 if (InvokeRequired) 165 165 Invoke(new EventHandler<EventArgs<Exception>>(Engine_ExceptionOccurred), sender, e); … … 170 170 171 171 #region Button events 172 pr ivatevoid startButton_Click(object sender, EventArgs e) {172 protected virtual void startButton_Click(object sender, EventArgs e) { 173 173 Engine.Start(); 174 174 } 175 pr ivatevoid stopButton_Click(object sender, EventArgs e) {175 protected virtual void stopButton_Click(object sender, EventArgs e) { 176 176 Engine.Stop(); 177 177 } 178 pr ivatevoid resetButton_Click(object sender, EventArgs e) {178 protected virtual void resetButton_Click(object sender, EventArgs e) { 179 179 Engine.Initialize(); 180 180 } … … 182 182 183 183 #region Helpers 184 pr ivatevoid UpdateExecutionTimeTextBox() {184 protected virtual void UpdateExecutionTimeTextBox() { 185 185 if (InvokeRequired) 186 186 Invoke(new Action(UpdateExecutionTimeTextBox)); -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/ItemCollectionView.Designer.cs ¶
r2655 r2676 52 52 private void InitializeComponent() { 53 53 this.components = new System.ComponentModel.Container(); 54 this.splitContainer 1= new System.Windows.Forms.SplitContainer();54 this.splitContainer = new System.Windows.Forms.SplitContainer(); 55 55 this.itemsListView = new System.Windows.Forms.ListView(); 56 56 this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); … … 64 64 this.itemsGroupBox = new System.Windows.Forms.GroupBox(); 65 65 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 66 this.splitContainer 1.Panel1.SuspendLayout();67 this.splitContainer 1.Panel2.SuspendLayout();68 this.splitContainer 1.SuspendLayout();66 this.splitContainer.Panel1.SuspendLayout(); 67 this.splitContainer.Panel2.SuspendLayout(); 68 this.splitContainer.SuspendLayout(); 69 69 this.detailsGroupBox.SuspendLayout(); 70 70 this.itemsGroupBox.SuspendLayout(); 71 71 this.SuspendLayout(); 72 72 // 73 // splitContainer 174 // 75 this.splitContainer 1.Dock = System.Windows.Forms.DockStyle.Fill;76 this.splitContainer 1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;77 this.splitContainer 1.Location = new System.Drawing.Point(3, 16);78 this.splitContainer 1.Name = "splitContainer1";79 // 80 // splitContainer 1.Panel181 // 82 this.splitContainer 1.Panel1.Controls.Add(this.itemsListView);83 this.splitContainer 1.Panel1.Controls.Add(this.sortDescendingButton);84 this.splitContainer 1.Panel1.Controls.Add(this.sortAscendingButton);85 this.splitContainer 1.Panel1.Controls.Add(this.removeButton);86 this.splitContainer 1.Panel1.Controls.Add(this.addButton);87 this.splitContainer 1.Panel1MinSize = 100;88 // 89 // splitContainer 1.Panel290 // 91 this.splitContainer 1.Panel2.Controls.Add(this.detailsGroupBox);92 this.splitContainer 1.Size = new System.Drawing.Size(526, 364);93 this.splitContainer 1.SplitterDistance = 250;94 this.splitContainer 1.TabIndex = 0;73 // splitContainer 74 // 75 this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill; 76 this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; 77 this.splitContainer.Location = new System.Drawing.Point(3, 16); 78 this.splitContainer.Name = "splitContainer"; 79 // 80 // splitContainer.Panel1 81 // 82 this.splitContainer.Panel1.Controls.Add(this.itemsListView); 83 this.splitContainer.Panel1.Controls.Add(this.sortDescendingButton); 84 this.splitContainer.Panel1.Controls.Add(this.sortAscendingButton); 85 this.splitContainer.Panel1.Controls.Add(this.removeButton); 86 this.splitContainer.Panel1.Controls.Add(this.addButton); 87 this.splitContainer.Panel1MinSize = 100; 88 // 89 // splitContainer.Panel2 90 // 91 this.splitContainer.Panel2.Controls.Add(this.detailsGroupBox); 92 this.splitContainer.Size = new System.Drawing.Size(526, 364); 93 this.splitContainer.SplitterDistance = 250; 94 this.splitContainer.TabIndex = 0; 95 95 // 96 96 // itemsListView … … 107 107 this.itemsListView.Name = "itemsListView"; 108 108 this.itemsListView.ShowItemToolTips = true; 109 this.itemsListView.Size = new System.Drawing.Size(244, 32 9);109 this.itemsListView.Size = new System.Drawing.Size(244, 328); 110 110 this.itemsListView.SmallImageList = this.imageList; 111 111 this.itemsListView.TabIndex = 4; … … 189 189 // viewHost 190 190 // 191 this.viewHost.Dock = System.Windows.Forms.DockStyle.Fill; 192 this.viewHost.Location = new System.Drawing.Point(3, 16); 191 this.viewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 192 | System.Windows.Forms.AnchorStyles.Left) 193 | System.Windows.Forms.AnchorStyles.Right))); 194 this.viewHost.Location = new System.Drawing.Point(6, 19); 193 195 this.viewHost.Name = "viewHost"; 194 196 this.viewHost.Object = null; 195 this.viewHost.Size = new System.Drawing.Size(2 60, 316);197 this.viewHost.Size = new System.Drawing.Size(254, 310); 196 198 this.viewHost.TabIndex = 0; 197 199 // 198 200 // itemsGroupBox 199 201 // 200 this.itemsGroupBox.Controls.Add(this.splitContainer 1);202 this.itemsGroupBox.Controls.Add(this.splitContainer); 201 203 this.itemsGroupBox.Dock = System.Windows.Forms.DockStyle.Fill; 202 204 this.itemsGroupBox.Location = new System.Drawing.Point(0, 0); … … 213 215 this.Name = "ItemCollectionView"; 214 216 this.Size = new System.Drawing.Size(532, 383); 215 this.splitContainer 1.Panel1.ResumeLayout(false);216 this.splitContainer 1.Panel2.ResumeLayout(false);217 this.splitContainer 1.ResumeLayout(false);217 this.splitContainer.Panel1.ResumeLayout(false); 218 this.splitContainer.Panel2.ResumeLayout(false); 219 this.splitContainer.ResumeLayout(false); 218 220 this.detailsGroupBox.ResumeLayout(false); 219 221 this.itemsGroupBox.ResumeLayout(false); … … 224 226 #endregion 225 227 226 protected System.Windows.Forms.SplitContainer splitContainer 1;228 protected System.Windows.Forms.SplitContainer splitContainer; 227 229 protected System.Windows.Forms.ColumnHeader columnHeader1; 228 230 protected GroupBox itemsGroupBox; … … 233 235 protected ToolTip toolTip; 234 236 protected ImageList imageList; 235 pr ivateViewHost viewHost;237 protected ViewHost viewHost; 236 238 protected Button sortAscendingButton; 237 239 protected Button sortDescendingButton; -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/ItemCollectionView.cs ¶
r2664 r2676 140 140 } 141 141 } 142 pr ivatevoid itemsListView_SizeChanged(object sender, EventArgs e) {142 protected virtual void itemsListView_SizeChanged(object sender, EventArgs e) { 143 143 if (itemsListView.Columns.Count > 0) 144 144 itemsListView.Columns[0].Width = Math.Max(0, itemsListView.Width - 25); … … 197 197 ItemCollection.Add(item); 198 198 } 199 protected v oid sortAscendingButton_Click(object sender, EventArgs e) {199 protected virtual void sortAscendingButton_Click(object sender, EventArgs e) { 200 200 SortItemsListView(SortOrder.Ascending); 201 201 } 202 protected v oid sortDescendingButton_Click(object sender, EventArgs e) {202 protected virtual void sortDescendingButton_Click(object sender, EventArgs e) { 203 203 SortItemsListView(SortOrder.Descending); 204 204 } … … 213 213 214 214 #region ItemCollection Events 215 pr ivatevoid ItemCollection_ItemsAdded(object sender, CollectionItemsChangedEventArgs<T> e) {215 protected virtual void ItemCollection_ItemsAdded(object sender, CollectionItemsChangedEventArgs<T> e) { 216 216 if (InvokeRequired) 217 217 Invoke(new CollectionItemsChangedEventHandler<T>(ItemCollection_ItemsAdded), sender, e); … … 220 220 AddListViewItem(CreateListViewItem(item)); 221 221 } 222 pr ivatevoid ItemCollection_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<T> e) {222 protected virtual void ItemCollection_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<T> e) { 223 223 if (InvokeRequired) 224 224 Invoke(new CollectionItemsChangedEventHandler<T>(ItemCollection_ItemsRemoved), sender, e); … … 232 232 } 233 233 } 234 pr ivatevoid ItemCollection_CollectionReset(object sender, CollectionItemsChangedEventArgs<T> e) {234 protected virtual void ItemCollection_CollectionReset(object sender, CollectionItemsChangedEventArgs<T> e) { 235 235 if (InvokeRequired) 236 236 Invoke(new CollectionItemsChangedEventHandler<T>(ItemCollection_CollectionReset), sender, e); … … 249 249 250 250 #region Item Events 251 pr ivatevoid Item_Changed(object sender, ChangedEventArgs e) {251 protected virtual void Item_Changed(object sender, ChangedEventArgs e) { 252 252 if (InvokeRequired) 253 253 Invoke(new ChangedEventHandler(Item_Changed), sender, e); … … 261 261 262 262 #region Helpers 263 pr ivatevoid SortItemsListView(SortOrder sortOrder) {263 protected virtual void SortItemsListView(SortOrder sortOrder) { 264 264 itemsListView.Sorting = sortOrder; 265 265 itemsListView.Sort(); -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/ItemListView.Designer.cs ¶
r2655 r2676 51 51 private void InitializeComponent() { 52 52 this.components = new System.ComponentModel.Container(); 53 this.splitContainer 1= new System.Windows.Forms.SplitContainer();53 this.splitContainer = new System.Windows.Forms.SplitContainer(); 54 54 this.removeButton = new System.Windows.Forms.Button(); 55 55 this.moveUpButton = new System.Windows.Forms.Button(); 56 56 this.moveDownButton = new System.Windows.Forms.Button(); 57 57 this.itemsListView = new System.Windows.Forms.ListView(); 58 this. columnHeader1= new System.Windows.Forms.ColumnHeader();58 this.listViewColumnHeader = new System.Windows.Forms.ColumnHeader(); 59 59 this.imageList = new System.Windows.Forms.ImageList(this.components); 60 60 this.addButton = new System.Windows.Forms.Button(); … … 63 63 this.itemsGroupBox = new System.Windows.Forms.GroupBox(); 64 64 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 65 this.splitContainer 1.Panel1.SuspendLayout();66 this.splitContainer 1.Panel2.SuspendLayout();67 this.splitContainer 1.SuspendLayout();65 this.splitContainer.Panel1.SuspendLayout(); 66 this.splitContainer.Panel2.SuspendLayout(); 67 this.splitContainer.SuspendLayout(); 68 68 this.detailsGroupBox.SuspendLayout(); 69 69 this.itemsGroupBox.SuspendLayout(); 70 70 this.SuspendLayout(); 71 71 // 72 // splitContainer 173 // 74 this.splitContainer 1.Dock = System.Windows.Forms.DockStyle.Fill;75 this.splitContainer 1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;76 this.splitContainer 1.Location = new System.Drawing.Point(3, 16);77 this.splitContainer 1.Name = "splitContainer1";78 // 79 // splitContainer 1.Panel180 // 81 this.splitContainer 1.Panel1.Controls.Add(this.removeButton);82 this.splitContainer 1.Panel1.Controls.Add(this.moveUpButton);83 this.splitContainer 1.Panel1.Controls.Add(this.moveDownButton);84 this.splitContainer 1.Panel1.Controls.Add(this.itemsListView);85 this.splitContainer 1.Panel1.Controls.Add(this.addButton);86 // 87 // splitContainer 1.Panel288 // 89 this.splitContainer 1.Panel2.Controls.Add(this.detailsGroupBox);90 this.splitContainer 1.Size = new System.Drawing.Size(493, 323);91 this.splitContainer 1.SplitterDistance = 200;92 this.splitContainer 1.TabIndex = 0;72 // splitContainer 73 // 74 this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill; 75 this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; 76 this.splitContainer.Location = new System.Drawing.Point(3, 16); 77 this.splitContainer.Name = "splitContainer"; 78 // 79 // splitContainer.Panel1 80 // 81 this.splitContainer.Panel1.Controls.Add(this.removeButton); 82 this.splitContainer.Panel1.Controls.Add(this.moveUpButton); 83 this.splitContainer.Panel1.Controls.Add(this.moveDownButton); 84 this.splitContainer.Panel1.Controls.Add(this.itemsListView); 85 this.splitContainer.Panel1.Controls.Add(this.addButton); 86 // 87 // splitContainer.Panel2 88 // 89 this.splitContainer.Panel2.Controls.Add(this.detailsGroupBox); 90 this.splitContainer.Size = new System.Drawing.Size(493, 323); 91 this.splitContainer.SplitterDistance = 200; 92 this.splitContainer.TabIndex = 0; 93 93 // 94 94 // removeButton … … 135 135 | System.Windows.Forms.AnchorStyles.Right))); 136 136 this.itemsListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { 137 this. columnHeader1});137 this.listViewColumnHeader}); 138 138 this.itemsListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; 139 139 this.itemsListView.HideSelection = false; … … 141 141 this.itemsListView.Name = "itemsListView"; 142 142 this.itemsListView.ShowItemToolTips = true; 143 this.itemsListView.Size = new System.Drawing.Size(194, 28 8);143 this.itemsListView.Size = new System.Drawing.Size(194, 287); 144 144 this.itemsListView.SmallImageList = this.imageList; 145 145 this.itemsListView.TabIndex = 4; … … 187 187 // viewHost 188 188 // 189 this.viewHost.Dock = System.Windows.Forms.DockStyle.Fill; 190 this.viewHost.Location = new System.Drawing.Point(3, 16); 189 this.viewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 190 | System.Windows.Forms.AnchorStyles.Left) 191 | System.Windows.Forms.AnchorStyles.Right))); 192 this.viewHost.Location = new System.Drawing.Point(6, 19); 191 193 this.viewHost.Name = "viewHost"; 192 194 this.viewHost.Object = null; 193 this.viewHost.Size = new System.Drawing.Size(27 7, 275);195 this.viewHost.Size = new System.Drawing.Size(271, 269); 194 196 this.viewHost.TabIndex = 0; 195 197 // 196 198 // itemsGroupBox 197 199 // 198 this.itemsGroupBox.Controls.Add(this.splitContainer 1);200 this.itemsGroupBox.Controls.Add(this.splitContainer); 199 201 this.itemsGroupBox.Dock = System.Windows.Forms.DockStyle.Fill; 200 202 this.itemsGroupBox.Location = new System.Drawing.Point(0, 0); … … 211 213 this.Name = "ItemListView"; 212 214 this.Size = new System.Drawing.Size(499, 342); 213 this.splitContainer 1.Panel1.ResumeLayout(false);214 this.splitContainer 1.Panel2.ResumeLayout(false);215 this.splitContainer 1.ResumeLayout(false);215 this.splitContainer.Panel1.ResumeLayout(false); 216 this.splitContainer.Panel2.ResumeLayout(false); 217 this.splitContainer.ResumeLayout(false); 216 218 this.detailsGroupBox.ResumeLayout(false); 217 219 this.itemsGroupBox.ResumeLayout(false); … … 222 224 #endregion 223 225 224 pr ivate System.Windows.Forms.SplitContainer splitContainer1;225 pr ivate System.Windows.Forms.ColumnHeader columnHeader1;226 protected System.Windows.Forms.SplitContainer splitContainer; 227 protected System.Windows.Forms.ColumnHeader listViewColumnHeader; 226 228 protected GroupBox itemsGroupBox; 227 229 protected ListView itemsListView; … … 231 233 protected Button moveUpButton; 232 234 protected Button moveDownButton; 233 pr ivateToolTip toolTip;234 pr ivateImageList imageList;235 protected ToolTip toolTip; 236 protected ImageList imageList; 235 237 protected ViewHost viewHost; 236 238 } -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/ItemListView.cs ¶
r2664 r2676 168 168 169 169 #region ListView Events 170 pr ivatevoid itemsListView_SizeChanged(object sender, EventArgs e) {170 protected virtual void itemsListView_SizeChanged(object sender, EventArgs e) { 171 171 if (itemsListView.Columns.Count > 0) 172 172 itemsListView.Columns[0].Width = Math.Max(0, itemsListView.Width - 25); … … 261 261 262 262 #region NamedItemCollection Events 263 pr ivatevoid ItemList_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) {263 protected virtual void ItemList_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) { 264 264 if (InvokeRequired) 265 265 Invoke(new CollectionItemsChangedEventHandler<IndexedItem<T>>(ItemList_ItemsAdded), sender, e); … … 268 268 InsertListViewItem(item.Index, CreateListViewItem(item.Value)); 269 269 } 270 pr ivatevoid ItemList_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) {270 protected virtual void ItemList_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) { 271 271 if (InvokeRequired) 272 272 Invoke(new CollectionItemsChangedEventHandler<IndexedItem<T>>(ItemList_ItemsRemoved), sender, e); … … 279 279 } 280 280 } 281 pr ivatevoid ItemList_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) {281 protected virtual void ItemList_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) { 282 282 if (InvokeRequired) 283 283 Invoke(new CollectionItemsChangedEventHandler<IndexedItem<T>>(ItemList_ItemsReplaced), sender, e); … … 299 299 } 300 300 } 301 pr ivatevoid ItemList_ItemsMoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) {301 protected virtual void ItemList_ItemsMoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) { 302 302 if (InvokeRequired) 303 303 Invoke(new CollectionItemsChangedEventHandler<IndexedItem<T>>(ItemList_ItemsMoved), sender, e); … … 310 310 } 311 311 } 312 pr ivatevoid ItemList_CollectionReset(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) {312 protected virtual void ItemList_CollectionReset(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) { 313 313 if (InvokeRequired) 314 314 Invoke(new CollectionItemsChangedEventHandler<IndexedItem<T>>(ItemList_CollectionReset), sender, e); … … 327 327 328 328 #region Item Events 329 pr ivatevoid Item_Changed(object sender, ChangedEventArgs e) {329 protected virtual void Item_Changed(object sender, ChangedEventArgs e) { 330 330 if (InvokeRequired) 331 331 Invoke(new ChangedEventHandler(Item_Changed), sender, e); -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/ItemParameterView.Designer.cs ¶
r2664 r2676 50 50 this.valuePanel = new System.Windows.Forms.Panel(); 51 51 this.viewHost = new HeuristicLab.Core.Views.ViewHost(); 52 this.clearValueButton = new System.Windows.Forms.Button(); 53 this.setValueButton = new System.Windows.Forms.Button(); 52 54 this.actualNameTextBox = new System.Windows.Forms.TextBox(); 53 55 this.actualNameLabel = new System.Windows.Forms.Label(); 54 this.setValueButton = new System.Windows.Forms.Button();55 this.clearValueButton = new System.Windows.Forms.Button();56 56 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 57 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 57 58 this.valueGroupBox.SuspendLayout(); 58 59 this.valuePanel.SuspendLayout(); … … 72 73 // nameTextBox 73 74 // 75 this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft); 76 this.errorProvider.SetIconPadding(this.nameTextBox, 2); 77 this.nameTextBox.Location = new System.Drawing.Point(80, 0); 74 78 this.nameTextBox.Size = new System.Drawing.Size(306, 20); 75 79 // … … 103 107 // 104 108 this.valuePanel.AllowDrop = true; 109 this.valuePanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 110 | System.Windows.Forms.AnchorStyles.Left) 111 | System.Windows.Forms.AnchorStyles.Right))); 105 112 this.valuePanel.Controls.Add(this.viewHost); 106 this.valuePanel.Location = new System.Drawing.Point( 3, 48);113 this.valuePanel.Location = new System.Drawing.Point(6, 48); 107 114 this.valuePanel.Name = "valuePanel"; 108 this.valuePanel.Size = new System.Drawing.Size(3 80, 118);115 this.valuePanel.Size = new System.Drawing.Size(374, 115); 109 116 this.valuePanel.TabIndex = 0; 110 117 this.valuePanel.DragOver += new System.Windows.Forms.DragEventHandler(this.valuePanel_DragEnterOver); … … 118 125 this.viewHost.Name = "viewHost"; 119 126 this.viewHost.Object = null; 120 this.viewHost.Size = new System.Drawing.Size(3 80, 118);127 this.viewHost.Size = new System.Drawing.Size(374, 115); 121 128 this.viewHost.TabIndex = 0; 122 //123 // actualNameTextBox124 //125 this.actualNameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)126 | System.Windows.Forms.AnchorStyles.Right)));127 this.actualNameTextBox.Location = new System.Drawing.Point(80, 26);128 this.actualNameTextBox.Name = "actualNameTextBox";129 this.actualNameTextBox.Size = new System.Drawing.Size(306, 20);130 this.actualNameTextBox.TabIndex = 3;131 this.actualNameTextBox.Validated += new System.EventHandler(this.actualNameTextBox_Validated);132 //133 // actualNameLabel134 //135 this.actualNameLabel.AutoSize = true;136 this.actualNameLabel.Location = new System.Drawing.Point(3, 29);137 this.actualNameLabel.Name = "actualNameLabel";138 this.actualNameLabel.Size = new System.Drawing.Size(71, 13);139 this.actualNameLabel.TabIndex = 2;140 this.actualNameLabel.Text = "&Actual Name:";141 //142 // setValueButton143 //144 this.setValueButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Add;145 this.setValueButton.Location = new System.Drawing.Point(6, 19);146 this.setValueButton.Name = "setValueButton";147 this.setValueButton.Size = new System.Drawing.Size(23, 23);148 this.setValueButton.TabIndex = 8;149 this.toolTip.SetToolTip(this.setValueButton, "Set Value");150 this.setValueButton.UseVisualStyleBackColor = true;151 this.setValueButton.Click += new System.EventHandler(this.setValueButton_Click);152 129 // 153 130 // clearValueButton … … 163 140 this.clearValueButton.Click += new System.EventHandler(this.clearValueButton_Click); 164 141 // 165 // ParameterView 142 // setValueButton 143 // 144 this.setValueButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Add; 145 this.setValueButton.Location = new System.Drawing.Point(6, 19); 146 this.setValueButton.Name = "setValueButton"; 147 this.setValueButton.Size = new System.Drawing.Size(23, 23); 148 this.setValueButton.TabIndex = 8; 149 this.toolTip.SetToolTip(this.setValueButton, "Set Value"); 150 this.setValueButton.UseVisualStyleBackColor = true; 151 this.setValueButton.Click += new System.EventHandler(this.setValueButton_Click); 152 // 153 // actualNameTextBox 154 // 155 this.actualNameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 156 | System.Windows.Forms.AnchorStyles.Right))); 157 this.actualNameTextBox.Location = new System.Drawing.Point(80, 26); 158 this.actualNameTextBox.Name = "actualNameTextBox"; 159 this.actualNameTextBox.Size = new System.Drawing.Size(306, 20); 160 this.actualNameTextBox.TabIndex = 3; 161 this.actualNameTextBox.Validated += new System.EventHandler(this.actualNameTextBox_Validated); 162 // 163 // actualNameLabel 164 // 165 this.actualNameLabel.AutoSize = true; 166 this.actualNameLabel.Location = new System.Drawing.Point(3, 29); 167 this.actualNameLabel.Name = "actualNameLabel"; 168 this.actualNameLabel.Size = new System.Drawing.Size(71, 13); 169 this.actualNameLabel.TabIndex = 2; 170 this.actualNameLabel.Text = "&Actual Name:"; 171 // 172 // ItemParameterView 166 173 // 167 174 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 168 175 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 169 176 this.Controls.Add(this.valueGroupBox); 177 this.Controls.Add(this.actualNameTextBox); 170 178 this.Controls.Add(this.actualNameLabel); 171 this.Controls.Add(this.actualNameTextBox); 172 this.Name = "ParameterView"; 179 this.Name = "ItemParameterView"; 173 180 this.Size = new System.Drawing.Size(386, 315); 174 this.Controls.SetChildIndex(this.dataTypeLabel, 0);175 this.Controls.SetChildIndex(this.dataTypeTextBox, 0);176 181 this.Controls.SetChildIndex(this.descriptionTextBox, 0); 177 182 this.Controls.SetChildIndex(this.descriptionLabel, 0); 183 this.Controls.SetChildIndex(this.dataTypeTextBox, 0); 184 this.Controls.SetChildIndex(this.actualNameLabel, 0); 185 this.Controls.SetChildIndex(this.dataTypeLabel, 0); 186 this.Controls.SetChildIndex(this.nameTextBox, 0); 178 187 this.Controls.SetChildIndex(this.actualNameTextBox, 0); 179 this.Controls.SetChildIndex(this. actualNameLabel, 0);188 this.Controls.SetChildIndex(this.nameLabel, 0); 180 189 this.Controls.SetChildIndex(this.valueGroupBox, 0); 181 this.Controls.SetChildIndex(this.nameLabel, 0); 182 this.Controls.SetChildIndex(this.nameTextBox, 0); 190 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 183 191 this.valueGroupBox.ResumeLayout(false); 184 192 this.valuePanel.ResumeLayout(false); … … 190 198 #endregion 191 199 192 pr ivateSystem.Windows.Forms.GroupBox valueGroupBox;193 pr ivateSystem.Windows.Forms.TextBox actualNameTextBox;194 pr ivateSystem.Windows.Forms.Label actualNameLabel;195 pr ivateSystem.Windows.Forms.Panel valuePanel;196 pr ivateViewHost viewHost;197 pr ivateSystem.Windows.Forms.Button setValueButton;198 pr ivateSystem.Windows.Forms.ToolTip toolTip;199 pr ivateSystem.Windows.Forms.Button clearValueButton;200 protected System.Windows.Forms.GroupBox valueGroupBox; 201 protected System.Windows.Forms.TextBox actualNameTextBox; 202 protected System.Windows.Forms.Label actualNameLabel; 203 protected System.Windows.Forms.Panel valuePanel; 204 protected ViewHost viewHost; 205 protected System.Windows.Forms.Button setValueButton; 206 protected System.Windows.Forms.ToolTip toolTip; 207 protected System.Windows.Forms.Button clearValueButton; 200 208 } 201 209 } -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/ItemParameterView.cs ¶
r2664 r2676 35 35 [Content(typeof(ItemParameter), true)] 36 36 public partial class ItemParameterView : ParameterView { 37 pr ivateTypeSelectorDialog typeSelectorDialog;37 protected TypeSelectorDialog typeSelectorDialog; 38 38 39 39 /// <summary> … … 105 105 } 106 106 107 pr ivatevoid Parameter_ActualNameChanged(object sender, EventArgs e) {107 protected virtual void Parameter_ActualNameChanged(object sender, EventArgs e) { 108 108 if (InvokeRequired) 109 109 Invoke(new EventHandler(Parameter_ActualNameChanged), sender, e); … … 111 111 actualNameTextBox.Text = Parameter.ActualName; 112 112 } 113 pr ivatevoid Parameter_ValueChanged(object sender, EventArgs e) {113 protected virtual void Parameter_ValueChanged(object sender, EventArgs e) { 114 114 if (InvokeRequired) 115 115 Invoke(new EventHandler(Parameter_ValueChanged), sender, e); … … 122 122 } 123 123 124 pr ivatevoid actualNameTextBox_Validated(object sender, EventArgs e) {124 protected virtual void actualNameTextBox_Validated(object sender, EventArgs e) { 125 125 Parameter.ActualName = actualNameTextBox.Text; 126 126 } 127 pr ivatevoid setValueButton_Click(object sender, EventArgs e) {127 protected virtual void setValueButton_Click(object sender, EventArgs e) { 128 128 if (typeSelectorDialog == null) { 129 129 typeSelectorDialog = new TypeSelectorDialog(); … … 134 134 Parameter.Value = (IItem)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType(); 135 135 } 136 pr ivatevoid clearValueButton_Click(object sender, EventArgs e) {136 protected virtual void clearValueButton_Click(object sender, EventArgs e) { 137 137 Parameter.Value = null; 138 138 } 139 pr ivatevoid valuePanel_DragEnterOver(object sender, DragEventArgs e) {139 protected virtual void valuePanel_DragEnterOver(object sender, DragEventArgs e) { 140 140 e.Effect = DragDropEffects.None; 141 141 Type type = e.Data.GetData("Type") as Type; … … 146 146 } 147 147 } 148 pr ivatevoid valuePanel_DragDrop(object sender, DragEventArgs e) {148 protected virtual void valuePanel_DragDrop(object sender, DragEventArgs e) { 149 149 if (e.Effect != DragDropEffects.None) { 150 150 IItem item = e.Data.GetData("Value") as IItem; -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/NamedItemCollectionView.cs ¶
r2655 r2676 89 89 90 90 #region NamedItemCollection Events 91 pr ivatevoid NamedItemCollection_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<T> e) {91 protected virtual void NamedItemCollection_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<T> e) { 92 92 if (InvokeRequired) 93 93 Invoke(new CollectionItemsChangedEventHandler<T>(NamedItemCollection_ItemsReplaced), sender, e); … … 102 102 103 103 #region Helpers 104 protected string GetUniqueName(string originalName) {104 protected virtual string GetUniqueName(string originalName) { 105 105 if (!NamedItemCollection.ContainsKey(originalName)) 106 106 return originalName; -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/NamedItemView.Designer.cs ¶
r2664 r2676 45 45 /// </summary> 46 46 private void InitializeComponent() { 47 this.components = new System.ComponentModel.Container(); 47 48 this.nameLabel = new System.Windows.Forms.Label(); 48 49 this.nameTextBox = new System.Windows.Forms.TextBox(); 49 50 this.descriptionLabel = new System.Windows.Forms.Label(); 50 51 this.descriptionTextBox = new System.Windows.Forms.TextBox(); 52 this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components); 53 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 51 54 this.SuspendLayout(); 52 55 // … … 68 71 this.nameTextBox.Size = new System.Drawing.Size(279, 20); 69 72 this.nameTextBox.TabIndex = 1; 73 this.nameTextBox.Validated += new System.EventHandler(this.nameTextBox_Validated); 74 this.nameTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.nameTextBox_KeyDown); 70 75 this.nameTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.nameTextBox_Validating); 71 76 // … … 88 93 this.descriptionTextBox.Name = "descriptionTextBox"; 89 94 this.descriptionTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; 90 this.descriptionTextBox.Size = new System.Drawing.Size(279, 62);95 this.descriptionTextBox.Size = new System.Drawing.Size(279, 86); 91 96 this.descriptionTextBox.TabIndex = 3; 92 97 this.descriptionTextBox.Validated += new System.EventHandler(this.descriptionTextBox_Validated); 93 98 // 94 // NamedItemBaseView 99 // errorProvider 100 // 101 this.errorProvider.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.NeverBlink; 102 this.errorProvider.ContainerControl = this; 103 // 104 // NamedItemView 95 105 // 96 106 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); … … 100 110 this.Controls.Add(this.descriptionLabel); 101 111 this.Controls.Add(this.nameLabel); 102 this.Name = "NamedItemBaseView"; 103 this.Size = new System.Drawing.Size(351, 88); 112 this.Name = "NamedItemView"; 113 this.Size = new System.Drawing.Size(351, 112); 114 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 104 115 this.ResumeLayout(false); 105 116 this.PerformLayout(); … … 113 124 protected System.Windows.Forms.Label descriptionLabel; 114 125 protected System.Windows.Forms.TextBox descriptionTextBox; 126 protected System.Windows.Forms.ErrorProvider errorProvider; 115 127 } 116 128 } -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/NamedItemView.cs ¶
r2669 r2676 35 35 [Content(typeof(NamedItem), true)] 36 36 public partial class NamedItemView : ItemView { 37 public NamedItem NamedItem Base{37 public NamedItem NamedItem { 38 38 get { return (NamedItem)Item; } 39 39 set { base.Item = value; } … … 43 43 InitializeComponent(); 44 44 Caption = "NamedItem"; 45 errorProvider.SetIconAlignment(nameTextBox, ErrorIconAlignment.MiddleLeft); 46 errorProvider.SetIconPadding(nameTextBox, 2); 45 47 } 46 public NamedItemView(NamedItem namedItem Base)48 public NamedItemView(NamedItem namedItem) 47 49 : this() { 48 NamedItem Base = namedItemBase;50 NamedItem = namedItem; 49 51 } 50 52 51 53 protected override void DeregisterObjectEvents() { 52 NamedItem Base.NameChanged -= new EventHandler(NamedItemBase_NameChanged);53 NamedItem Base.DescriptionChanged -= new EventHandler(NamedItemBase_DescriptionChanged);54 NamedItem.NameChanged -= new EventHandler(NamedItem_NameChanged); 55 NamedItem.DescriptionChanged -= new EventHandler(NamedItem_DescriptionChanged); 54 56 base.DeregisterObjectEvents(); 55 57 } 56 58 protected override void RegisterObjectEvents() { 57 59 base.RegisterObjectEvents(); 58 NamedItem Base.NameChanged += new EventHandler(NamedItemBase_NameChanged);59 NamedItem Base.DescriptionChanged += new EventHandler(NamedItemBase_DescriptionChanged);60 NamedItem.NameChanged += new EventHandler(NamedItem_NameChanged); 61 NamedItem.DescriptionChanged += new EventHandler(NamedItem_DescriptionChanged); 60 62 } 61 63 62 64 protected override void OnObjectChanged() { 63 65 base.OnObjectChanged(); 64 if (NamedItem Base== null) {66 if (NamedItem == null) { 65 67 Caption = "NamedItem"; 66 68 nameTextBox.Text = "-"; … … 71 73 descriptionTextBox.Enabled = false; 72 74 } else { 73 Caption = NamedItem Base.Name + " (" + NamedItemBase.GetType().Name + ")";74 nameTextBox.Text = NamedItem Base.Name;75 nameTextBox.ReadOnly = !NamedItem Base.CanChangeName;75 Caption = NamedItem.Name + " (" + NamedItem.GetType().Name + ")"; 76 nameTextBox.Text = NamedItem.Name; 77 nameTextBox.ReadOnly = !NamedItem.CanChangeName; 76 78 nameTextBox.Enabled = true; 77 descriptionTextBox.Text = NamedItem Base.Description;78 descriptionTextBox.ReadOnly = !NamedItem Base.CanChangeDescription;79 descriptionTextBox.Text = NamedItem.Description; 80 descriptionTextBox.ReadOnly = !NamedItem.CanChangeDescription; 79 81 descriptionTextBox.Enabled = true; 80 82 } 81 83 } 82 84 83 protected virtual void NamedItem Base_NameChanged(object sender, EventArgs e) {85 protected virtual void NamedItem_NameChanged(object sender, EventArgs e) { 84 86 if (InvokeRequired) 85 Invoke(new EventHandler(NamedItem Base_NameChanged), sender, e);87 Invoke(new EventHandler(NamedItem_NameChanged), sender, e); 86 88 else 87 nameTextBox.Text = NamedItem Base.Name;89 nameTextBox.Text = NamedItem.Name; 88 90 } 89 protected virtual void NamedItem Base_DescriptionChanged(object sender, EventArgs e) {91 protected virtual void NamedItem_DescriptionChanged(object sender, EventArgs e) { 90 92 if (InvokeRequired) 91 Invoke(new EventHandler(NamedItem Base_DescriptionChanged), sender, e);93 Invoke(new EventHandler(NamedItem_DescriptionChanged), sender, e); 92 94 else 93 descriptionTextBox.Text = NamedItem Base.Description;95 descriptionTextBox.Text = NamedItem.Description; 94 96 } 95 97 96 98 protected virtual void nameTextBox_Validating(object sender, CancelEventArgs e) { 97 if (NamedItemBase.CanChangeName) { 98 string oldName = NamedItemBase.Name; 99 NamedItemBase.Name = nameTextBox.Text; 99 if (NamedItem.CanChangeName) { 100 NamedItem.Name = nameTextBox.Text; 100 101 101 102 // check if variable name was set successfully 102 e.Cancel = e.Cancel || !NamedItemBase.Name.Equals(nameTextBox.Text); 103 if (e.Cancel) { 104 MessageBox.Show(this, "\"" + nameTextBox.Text + "\" is not a valid name.", "Invalid Value", MessageBoxButtons.OK, MessageBoxIcon.Error); 105 nameTextBox.Text = oldName; 103 if (!NamedItem.Name.Equals(nameTextBox.Text)) { 104 e.Cancel = true; 105 errorProvider.SetError(nameTextBox, "Invalid Name"); 106 106 nameTextBox.SelectAll(); 107 nameTextBox.Focus();108 107 } 109 108 } 110 109 } 110 protected virtual void nameTextBox_Validated(object sender, EventArgs e) { 111 errorProvider.SetError(nameTextBox, string.Empty); 112 } 113 protected virtual void nameTextBox_KeyDown(object sender, KeyEventArgs e) { 114 if ((e.KeyCode == Keys.Enter) || (e.KeyCode == Keys.Return)) 115 nameLabel.Focus(); // set focus on label to validate data 116 if (e.KeyCode == Keys.Escape) { 117 nameTextBox.Text = NamedItem.Name; 118 nameLabel.Focus(); // set focus on label to validate data 119 } 120 } 111 121 protected virtual void descriptionTextBox_Validated(object sender, EventArgs e) { 112 if (NamedItem Base.CanChangeDescription)113 NamedItem Base.Description = descriptionTextBox.Text;122 if (NamedItem.CanChangeDescription) 123 NamedItem.Description = descriptionTextBox.Text; 114 124 } 115 125 } -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/ObjectView.cs ¶
r2664 r2676 28 28 using System.Xml; 29 29 using System.Windows.Forms; 30 using HeuristicLab.MainForm; 30 31 using HeuristicLab.MainForm.WindowsForms; 31 32 … … 44 45 public object Object { 45 46 get { return obj; } 46 protected set { 47 set { 48 if ((value != null) && (!MainFormManager.ViewCanViewObject(this, value))) 49 throw new ArgumentException(string.Format("View \"{0}\" cannot view object \"{1}\".", this.GetType().Name, value.GetType().Name)); 47 50 if (InvokeRequired) { 48 51 Invoke(new Action<object>(delegate(object o) { Object = o; }), value); -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/OperatorCollectionView.cs ¶
r2655 r2676 14 14 [Content(typeof(IObservableCollection<IOperator>), true)] 15 15 public partial class OperatorCollectionView : ItemCollectionView<IOperator> { 16 pr ivateTypeSelectorDialog typeSelectorDialog;16 protected TypeSelectorDialog typeSelectorDialog; 17 17 18 18 /// <summary> -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/OperatorGraphView.Designer.cs ¶
r2655 r2676 78 78 // operatorsView 79 79 // 80 this.operatorsView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 81 | System.Windows.Forms.AnchorStyles.Left) 82 | System.Windows.Forms.AnchorStyles.Right))); 80 83 this.operatorsView.Caption = "Operator Set"; 81 this.operatorsView.Dock = System.Windows.Forms.DockStyle.Fill;82 84 this.operatorsView.ItemCollection = null; 83 85 this.operatorsView.ItemSet = null; 84 this.operatorsView.Location = new System.Drawing.Point( 0, 0);86 this.operatorsView.Location = new System.Drawing.Point(3, 3); 85 87 this.operatorsView.Name = "operatorsView"; 86 this.operatorsView.Size = new System.Drawing.Size(608, 316); 88 this.operatorsView.Object = null; 89 this.operatorsView.Size = new System.Drawing.Size(602, 309); 87 90 this.operatorsView.TabIndex = 0; 88 91 this.operatorsView.Load += new System.EventHandler(this.operatorsView_Load); … … 90 93 // graphView 91 94 // 95 this.graphView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 96 | System.Windows.Forms.AnchorStyles.Left) 97 | System.Windows.Forms.AnchorStyles.Right))); 92 98 this.graphView.Caption = "Operator"; 93 this.graphView.Dock = System.Windows.Forms.DockStyle.Fill;94 99 this.graphView.Item = null; 95 this.graphView.Location = new System.Drawing.Point( 3, 16);100 this.graphView.Location = new System.Drawing.Point(6, 19); 96 101 this.graphView.Name = "graphView"; 102 this.graphView.Object = null; 97 103 this.graphView.Operator = null; 98 this.graphView.Size = new System.Drawing.Size( 602, 194);104 this.graphView.Size = new System.Drawing.Size(590, 183); 99 105 this.graphView.TabIndex = 0; 100 106 // … … 114 120 this.splitContainer.Panel2.Controls.Add(this.graphGroupBox); 115 121 this.splitContainer.Size = new System.Drawing.Size(608, 533); 116 this.splitContainer.SplitterDistance = 31 6;122 this.splitContainer.SplitterDistance = 315; 117 123 this.splitContainer.TabIndex = 3; 118 124 // 119 125 // graphGroupBox 120 126 // 127 this.graphGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 128 | System.Windows.Forms.AnchorStyles.Left) 129 | System.Windows.Forms.AnchorStyles.Right))); 121 130 this.graphGroupBox.Controls.Add(this.graphView); 122 this.graphGroupBox.Dock = System.Windows.Forms.DockStyle.Fill; 123 this.graphGroupBox.Location = new System.Drawing.Point(0, 0); 131 this.graphGroupBox.Location = new System.Drawing.Point(3, 3); 124 132 this.graphGroupBox.Name = "graphGroupBox"; 125 this.graphGroupBox.Size = new System.Drawing.Size(60 8, 213);133 this.graphGroupBox.Size = new System.Drawing.Size(602, 208); 126 134 this.graphGroupBox.TabIndex = 0; 127 135 this.graphGroupBox.TabStop = false; … … 146 154 #endregion 147 155 148 pr ivateSystem.Windows.Forms.ContextMenuStrip operatorsContextMenuStrip;149 pr ivateSystem.Windows.Forms.ToolStripMenuItem initialOperatorToolStripMenuItem;150 pr ivateOperatorSetView operatorsView;151 pr ivateOperatorTreeView graphView;152 pr ivateSystem.Windows.Forms.SplitContainer splitContainer;153 pr ivateSystem.Windows.Forms.GroupBox graphGroupBox;156 protected System.Windows.Forms.ContextMenuStrip operatorsContextMenuStrip; 157 protected System.Windows.Forms.ToolStripMenuItem initialOperatorToolStripMenuItem; 158 protected OperatorSetView operatorsView; 159 protected OperatorTreeView graphView; 160 protected System.Windows.Forms.SplitContainer splitContainer; 161 protected System.Windows.Forms.GroupBox graphGroupBox; 154 162 } 155 163 } -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/OperatorGraphView.cs ¶
r2664 r2676 110 110 } 111 111 112 pr ivatevoid MarkInitialOperator() {112 protected virtual void MarkInitialOperator() { 113 113 foreach (ListViewItem item in operatorsView.ItemsListView.Items) { 114 114 if ((OperatorGraph.InitialOperator != null) && (((IOperator)item.Tag) == OperatorGraph.InitialOperator)) … … 120 120 121 121 #region Context Menu Events 122 private void operatorsContextMenuStrip_Opening(object sender, CancelEventArgs e) { 122 protected virtual void operatorsView_Load(object sender, EventArgs e) { 123 operatorsView.ItemsListView.ContextMenuStrip = operatorsContextMenuStrip; 124 } 125 protected virtual void operatorsContextMenuStrip_Opening(object sender, CancelEventArgs e) { 123 126 initialOperatorToolStripMenuItem.Enabled = false; 124 127 initialOperatorToolStripMenuItem.Checked = false; … … 131 134 } 132 135 } 133 pr ivatevoid initialOperatorToolStripMenuItem_Click(object sender, EventArgs e) {136 protected virtual void initialOperatorToolStripMenuItem_Click(object sender, EventArgs e) { 134 137 if (initialOperatorToolStripMenuItem.Checked) 135 138 OperatorGraph.InitialOperator = (IOperator)initialOperatorToolStripMenuItem.Tag; … … 140 143 141 144 #region OperatorGraph Events 142 pr ivatevoid OperatorGraph_InitialOperatorChanged(object sender, EventArgs e) {145 protected virtual void OperatorGraph_InitialOperatorChanged(object sender, EventArgs e) { 143 146 if (InvokeRequired) 144 147 Invoke(new EventHandler(OperatorGraph_InitialOperatorChanged), sender, e); … … 149 152 } 150 153 #endregion 151 152 private void operatorsView_Load(object sender, EventArgs e) {153 operatorsView.ItemsListView.ContextMenuStrip = operatorsContextMenuStrip;154 }155 154 } 156 155 } -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/OperatorListView.cs ¶
r2655 r2676 14 14 [Content(typeof(IObservableList<IOperator>), true)] 15 15 public partial class OperatorListView : ItemListView<IOperator> { 16 TypeSelectorDialog typeSelectorDialog;16 protected TypeSelectorDialog typeSelectorDialog; 17 17 18 18 /// <summary> -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/OperatorSetView.cs ¶
r2655 r2676 14 14 [Content(typeof(IObservableSet<IOperator>), true)] 15 15 public partial class OperatorSetView : ItemSetView<IOperator> { 16 TypeSelectorDialog typeSelectorDialog;16 protected TypeSelectorDialog typeSelectorDialog; 17 17 18 18 /// <summary> -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/OperatorTreeView.Designer.cs ¶
r2655 r2676 92 92 this.viewToolStripMenuItem}); 93 93 this.graphContextMenuStrip.Name = "graphContextMenuStrip"; 94 this.graphContextMenuStrip.Size = new System.Drawing.Size(1 53, 70);94 this.graphContextMenuStrip.Size = new System.Drawing.Size(132, 48); 95 95 this.graphContextMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(this.graphContextMenuStrip_Opening); 96 96 // … … 99 99 this.breakpointToolStripMenuItem.CheckOnClick = true; 100 100 this.breakpointToolStripMenuItem.Name = "breakpointToolStripMenuItem"; 101 this.breakpointToolStripMenuItem.Size = new System.Drawing.Size(1 52, 22);101 this.breakpointToolStripMenuItem.Size = new System.Drawing.Size(131, 22); 102 102 this.breakpointToolStripMenuItem.Text = "&Breakpoint"; 103 103 this.breakpointToolStripMenuItem.ToolTipText = "Halt engine execution after executing the operator"; … … 107 107 // 108 108 this.viewToolStripMenuItem.Name = "viewToolStripMenuItem"; 109 this.viewToolStripMenuItem.Size = new System.Drawing.Size(1 52, 22);109 this.viewToolStripMenuItem.Size = new System.Drawing.Size(131, 22); 110 110 this.viewToolStripMenuItem.Text = "&View..."; 111 111 this.viewToolStripMenuItem.ToolTipText = "View operator"; -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/OperatorTreeView.cs ¶
r2664 r2676 37 37 /// </summary> 38 38 [Content(typeof(IOperator), false)] 39 public partial class OperatorTreeView : ItemView {39 public sealed partial class OperatorTreeView : ItemView { 40 40 private Dictionary<IOperatorParameter, List<TreeNode>> operatorParameterNodeTable; 41 41 private Dictionary<IOperator, List<TreeNode>> operatorNodeTable; -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/OperatorsSidebar.Designer.cs ¶
r2655 r2676 72 72 #endregion 73 73 74 private TypeSelector typeSelector; 75 76 74 protected TypeSelector typeSelector; 77 75 } 78 76 } -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/OperatorsSidebar.cs ¶
r2655 r2676 37 37 } 38 38 39 pr ivatevoid OperatorsSidebar_Load(object sender, EventArgs e) {39 protected virtual void OperatorsSidebar_Load(object sender, EventArgs e) { 40 40 typeSelector.Configure(typeof(IOperator), false, false); 41 41 } -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/ParameterCollectionView.cs ¶
r2655 r2676 14 14 [Content(typeof(IObservableKeyedCollection<string, IParameter>), true)] 15 15 public partial class ParameterCollectionView : NamedItemCollectionView<IParameter> { 16 CreateParameterDialog createParameterDialog;16 protected CreateParameterDialog createParameterDialog; 17 17 /// <summary> 18 18 /// Initializes a new instance of <see cref="VariablesScopeView"/> with caption "Variables Scope View". -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/ParameterView.Designer.cs ¶
r2664 r2676 47 47 this.dataTypeLabel = new System.Windows.Forms.Label(); 48 48 this.dataTypeTextBox = new System.Windows.Forms.TextBox(); 49 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 49 50 this.SuspendLayout(); 50 51 // 51 52 // nameTextBox 52 53 // 53 this.nameTextBox.Location = new System.Drawing.Point(80, 0); 54 this.nameTextBox.Size = new System.Drawing.Size(313, 20); 54 this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft); 55 this.errorProvider.SetIconPadding(this.nameTextBox, 2); 56 this.nameTextBox.Location = new System.Drawing.Point(72, 0); 57 this.nameTextBox.Size = new System.Drawing.Size(321, 20); 58 // 59 // nameLabel 60 // 61 this.nameLabel.Location = new System.Drawing.Point(3, 3); 62 // 63 // descriptionLabel 64 // 65 this.descriptionLabel.Location = new System.Drawing.Point(3, 29); 55 66 // 56 67 // descriptionTextBox … … 58 69 this.descriptionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 59 70 | System.Windows.Forms.AnchorStyles.Right))); 60 this.descriptionTextBox.Location = new System.Drawing.Point( 80, 26);61 this.descriptionTextBox.Size = new System.Drawing.Size(3 13, 62);71 this.descriptionTextBox.Location = new System.Drawing.Point(72, 26); 72 this.descriptionTextBox.Size = new System.Drawing.Size(321, 62); 62 73 // 63 74 // dataTypeLabel … … 74 85 this.dataTypeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 75 86 | System.Windows.Forms.AnchorStyles.Right))); 76 this.dataTypeTextBox.Location = new System.Drawing.Point( 80, 94);87 this.dataTypeTextBox.Location = new System.Drawing.Point(72, 94); 77 88 this.dataTypeTextBox.Name = "dataTypeTextBox"; 78 89 this.dataTypeTextBox.ReadOnly = true; 79 this.dataTypeTextBox.Size = new System.Drawing.Size(3 13, 20);90 this.dataTypeTextBox.Size = new System.Drawing.Size(321, 20); 80 91 this.dataTypeTextBox.TabIndex = 5; 81 92 // 82 // Parameter BaseView93 // ParameterView 83 94 // 84 95 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 85 96 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 97 this.Controls.Add(this.dataTypeLabel); 86 98 this.Controls.Add(this.dataTypeTextBox); 87 this. Controls.Add(this.dataTypeLabel);88 this. Name = "ParameterBaseView";89 this. Size = new System.Drawing.Size(393, 117);99 this.Name = "ParameterView"; 100 this.Size = new System.Drawing.Size(393, 124); 101 this.Controls.SetChildIndex(this.dataTypeTextBox, 0); 90 102 this.Controls.SetChildIndex(this.descriptionTextBox, 0); 91 this.Controls.SetChildIndex(this.dataTypeLabel, 0);92 this.Controls.SetChildIndex(this.dataTypeTextBox, 0);93 103 this.Controls.SetChildIndex(this.descriptionLabel, 0); 94 104 this.Controls.SetChildIndex(this.nameLabel, 0); 95 105 this.Controls.SetChildIndex(this.nameTextBox, 0); 106 this.Controls.SetChildIndex(this.dataTypeLabel, 0); 107 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 96 108 this.ResumeLayout(false); 97 109 this.PerformLayout(); -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/ScopeView.Designer.cs ¶
r2655 r2676 61 61 // scopesTreeView 62 62 // 63 this.scopesTreeView.Dock = System.Windows.Forms.DockStyle.Fill; 63 this.scopesTreeView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 64 | System.Windows.Forms.AnchorStyles.Left) 65 | System.Windows.Forms.AnchorStyles.Right))); 64 66 this.scopesTreeView.HideSelection = false; 65 this.scopesTreeView.Location = new System.Drawing.Point( 3, 16);67 this.scopesTreeView.Location = new System.Drawing.Point(6, 19); 66 68 this.scopesTreeView.Name = "scopesTreeView"; 67 69 this.scopesTreeView.ShowNodeToolTips = true; 68 this.scopesTreeView.Size = new System.Drawing.Size(3 94, 181);70 this.scopesTreeView.Size = new System.Drawing.Size(382, 169); 69 71 this.scopesTreeView.TabIndex = 0; 70 72 this.scopesTreeView.AfterCollapse += new System.Windows.Forms.TreeViewEventHandler(this.scopesTreeView_AfterCollapse); … … 93 95 // scopesGroupBox 94 96 // 97 this.scopesGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 98 | System.Windows.Forms.AnchorStyles.Left) 99 | System.Windows.Forms.AnchorStyles.Right))); 95 100 this.scopesGroupBox.Controls.Add(this.scopesTreeView); 96 this.scopesGroupBox.Dock = System.Windows.Forms.DockStyle.Fill; 97 this.scopesGroupBox.Location = new System.Drawing.Point(0, 0); 101 this.scopesGroupBox.Location = new System.Drawing.Point(3, 3); 98 102 this.scopesGroupBox.Name = "scopesGroupBox"; 99 this.scopesGroupBox.Size = new System.Drawing.Size( 400, 200);103 this.scopesGroupBox.Size = new System.Drawing.Size(394, 194); 100 104 this.scopesGroupBox.TabIndex = 0; 101 105 this.scopesGroupBox.TabStop = false; … … 104 108 // variableCollectionView 105 109 // 110 this.variableCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 111 | System.Windows.Forms.AnchorStyles.Left) 112 | System.Windows.Forms.AnchorStyles.Right))); 106 113 this.variableCollectionView.Caption = "VariableCollection"; 107 this.variableCollectionView.Dock = System.Windows.Forms.DockStyle.Fill;108 114 this.variableCollectionView.ItemCollection = null; 109 this.variableCollectionView.Location = new System.Drawing.Point( 0, 0);115 this.variableCollectionView.Location = new System.Drawing.Point(3, 3); 110 116 this.variableCollectionView.Name = "variableCollectionView"; 111 117 this.variableCollectionView.NamedItemCollection = null; 112 this.variableCollectionView.Size = new System.Drawing.Size(400, 196); 118 this.variableCollectionView.Object = null; 119 this.variableCollectionView.Size = new System.Drawing.Size(394, 190); 113 120 this.variableCollectionView.TabIndex = 0; 114 121 // -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/ScopeView.cs ¶
r2664 r2676 37 37 /// </summary> 38 38 [Content(typeof(Scope), true)] 39 public partial class ScopeView : ItemView {39 public sealed partial class ScopeView : ItemView { 40 40 private Dictionary<Scope, TreeNode> scopeNodeTable; 41 41 private Dictionary<ScopeList, Scope> subScopesScopeTable; -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/TypeSelector.Designer.cs ¶
r2655 r2676 48 48 this.typesTreeView = new System.Windows.Forms.TreeView(); 49 49 this.imageList = new System.Windows.Forms.ImageList(this.components); 50 this. groupBox = new System.Windows.Forms.GroupBox();50 this.typesGroupBox = new System.Windows.Forms.GroupBox(); 51 51 this.splitContainer = new System.Windows.Forms.SplitContainer(); 52 52 this.descriptionTextBox = new System.Windows.Forms.TextBox(); 53 this. groupBox.SuspendLayout();53 this.typesGroupBox.SuspendLayout(); 54 54 this.splitContainer.Panel1.SuspendLayout(); 55 55 this.splitContainer.Panel2.SuspendLayout(); … … 59 59 // typesTreeView 60 60 // 61 this.typesTreeView.Dock = System.Windows.Forms.DockStyle.Fill; 61 this.typesTreeView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 62 | System.Windows.Forms.AnchorStyles.Left) 63 | System.Windows.Forms.AnchorStyles.Right))); 62 64 this.typesTreeView.HideSelection = false; 63 65 this.typesTreeView.ImageIndex = 0; 64 66 this.typesTreeView.ImageList = this.imageList; 65 this.typesTreeView.Location = new System.Drawing.Point( 0, 0);67 this.typesTreeView.Location = new System.Drawing.Point(3, 3); 66 68 this.typesTreeView.Name = "typesTreeView"; 67 69 this.typesTreeView.SelectedImageIndex = 0; 68 70 this.typesTreeView.ShowNodeToolTips = true; 69 this.typesTreeView.Size = new System.Drawing.Size(29 7, 199);71 this.typesTreeView.Size = new System.Drawing.Size(291, 192); 70 72 this.typesTreeView.TabIndex = 0; 71 73 this.typesTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.typesTreeView_AfterSelect); … … 78 80 this.imageList.TransparentColor = System.Drawing.Color.Transparent; 79 81 // 80 // groupBox82 // typesGroupBox 81 83 // 82 this. groupBox.Controls.Add(this.splitContainer);83 this. groupBox.Dock = System.Windows.Forms.DockStyle.Fill;84 this. groupBox.Location = new System.Drawing.Point(0, 0);85 this. groupBox.Name = "groupBox";86 this. groupBox.Size = new System.Drawing.Size(303, 306);87 this. groupBox.TabIndex = 0;88 this. groupBox.TabStop = false;89 this. groupBox.Text = "&Available Types";84 this.typesGroupBox.Controls.Add(this.splitContainer); 85 this.typesGroupBox.Dock = System.Windows.Forms.DockStyle.Fill; 86 this.typesGroupBox.Location = new System.Drawing.Point(0, 0); 87 this.typesGroupBox.Name = "typesGroupBox"; 88 this.typesGroupBox.Size = new System.Drawing.Size(303, 306); 89 this.typesGroupBox.TabIndex = 0; 90 this.typesGroupBox.TabStop = false; 91 this.typesGroupBox.Text = "&Available Types"; 90 92 // 91 93 // splitContainer … … 104 106 this.splitContainer.Panel2.Controls.Add(this.descriptionTextBox); 105 107 this.splitContainer.Size = new System.Drawing.Size(297, 287); 106 this.splitContainer.SplitterDistance = 19 9;108 this.splitContainer.SplitterDistance = 198; 107 109 this.splitContainer.TabIndex = 2; 108 110 // 109 111 // descriptionTextBox 110 112 // 111 this.descriptionTextBox.Dock = System.Windows.Forms.DockStyle.Fill; 113 this.descriptionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 114 | System.Windows.Forms.AnchorStyles.Left) 115 | System.Windows.Forms.AnchorStyles.Right))); 112 116 this.descriptionTextBox.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 113 this.descriptionTextBox.Location = new System.Drawing.Point( 0, 0);117 this.descriptionTextBox.Location = new System.Drawing.Point(3, 3); 114 118 this.descriptionTextBox.Multiline = true; 115 119 this.descriptionTextBox.Name = "descriptionTextBox"; 116 120 this.descriptionTextBox.ReadOnly = true; 117 121 this.descriptionTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; 118 this.descriptionTextBox.Size = new System.Drawing.Size(29 7, 84);122 this.descriptionTextBox.Size = new System.Drawing.Size(291, 79); 119 123 this.descriptionTextBox.TabIndex = 0; 120 124 // … … 123 127 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 124 128 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 125 this.Controls.Add(this. groupBox);129 this.Controls.Add(this.typesGroupBox); 126 130 this.Name = "TypeSelector"; 127 131 this.Size = new System.Drawing.Size(303, 306); 128 this. groupBox.ResumeLayout(false);132 this.typesGroupBox.ResumeLayout(false); 129 133 this.splitContainer.Panel1.ResumeLayout(false); 130 134 this.splitContainer.Panel2.ResumeLayout(false); … … 137 141 #endregion 138 142 139 private System.Windows.Forms.GroupBox groupBox; 140 private System.Windows.Forms.TextBox descriptionTextBox; 141 private System.Windows.Forms.ImageList imageList; 142 private System.Windows.Forms.TreeView typesTreeView; 143 private System.Windows.Forms.SplitContainer splitContainer; 144 145 143 protected System.Windows.Forms.GroupBox typesGroupBox; 144 protected System.Windows.Forms.TextBox descriptionTextBox; 145 protected System.Windows.Forms.ImageList imageList; 146 protected System.Windows.Forms.TreeView typesTreeView; 147 protected System.Windows.Forms.SplitContainer splitContainer; 146 148 147 149 } -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/TypeSelector.cs ¶
r2655 r2676 33 33 namespace HeuristicLab.Core.Views { 34 34 public partial class TypeSelector : UserControl { 35 pr ivateType baseType;35 protected Type baseType; 36 36 public Type BaseType { 37 37 get { return baseType; } 38 38 } 39 pr ivatebool showNotInstantiableTypes;39 protected bool showNotInstantiableTypes; 40 40 public bool ShowNotInstantiableTypes { 41 41 get { return showNotInstantiableTypes; } 42 42 } 43 pr ivatebool showGenericTypes;43 protected bool showGenericTypes; 44 44 public bool ShowGenericTypes { 45 45 get { return showGenericTypes; } 46 46 } 47 47 public string Caption { 48 get { return groupBox.Text; }48 get { return typesGroupBox.Text; } 49 49 set { 50 50 if (InvokeRequired) 51 51 Invoke(new Action<string>(delegate(string s) { Caption = s; }), value); 52 52 else 53 groupBox.Text = value;53 typesGroupBox.Text = value; 54 54 } 55 55 } … … 57 57 get { return typesTreeView; } 58 58 } 59 pr ivateType selectedType;59 protected Type selectedType; 60 60 public Type SelectedType { 61 61 get { return selectedType; } … … 73 73 } 74 74 75 public v oid Configure(Type baseType, bool showNotInstantiableTypes, bool showGenericTypes) {75 public virtual void Configure(Type baseType, bool showNotInstantiableTypes, bool showGenericTypes) { 76 76 if (baseType == null) throw new ArgumentNullException(); 77 77 if (InvokeRequired) … … 150 150 } 151 151 152 public object CreateInstanceOfSelectedType(params object[] args) {152 public virtual object CreateInstanceOfSelectedType(params object[] args) { 153 153 if (SelectedType != null) { 154 154 try { … … 165 165 } 166 166 167 pr ivatevoid UpdateDescription() {167 protected virtual void UpdateDescription() { 168 168 descriptionTextBox.Text = string.Empty; 169 169 … … 186 186 } 187 187 188 pr ivatevoid typesTreeView_AfterSelect(object sender, TreeViewEventArgs e) {188 protected virtual void typesTreeView_AfterSelect(object sender, TreeViewEventArgs e) { 189 189 if (typesTreeView.SelectedNode != null) { 190 190 SelectedType = typesTreeView.SelectedNode.Tag as Type; … … 193 193 } 194 194 195 pr ivatevoid typesTreeView_ItemDrag(object sender, ItemDragEventArgs e) {195 protected virtual void typesTreeView_ItemDrag(object sender, ItemDragEventArgs e) { 196 196 TreeNode node = (TreeNode)e.Item; 197 197 Type type = node.Tag as Type; -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/TypeSelectorDialog.Designer.cs ¶
r2655 r2676 75 75 | System.Windows.Forms.AnchorStyles.Left) 76 76 | System.Windows.Forms.AnchorStyles.Right))); 77 this.typeSelector.Caption = "&Available Types"; 77 78 this.typeSelector.Location = new System.Drawing.Point(12, 12); 78 79 this.typeSelector.Name = "typeSelector"; … … 80 81 this.typeSelector.TabIndex = 3; 81 82 this.typeSelector.SelectedTypeChanged += new System.EventHandler(this.typeSelector_SelectedTypeChanged); 82 this.typeSelector.TypesTreeView.DoubleClick += new System.EventHandler(TypesTreeView_DoubleClick);83 83 // 84 84 // TypeSelectorDialog … … 99 99 this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 100 100 this.Text = "Select Type"; 101 this.Load += new System.EventHandler(this.TypeSelectorDialog_Load); 101 102 this.ResumeLayout(false); 102 103 … … 105 106 #endregion 106 107 107 pr ivateSystem.Windows.Forms.Button okButton;108 pr ivateSystem.Windows.Forms.Button cancelButton;109 pr ivateTypeSelector typeSelector;108 protected System.Windows.Forms.Button okButton; 109 protected System.Windows.Forms.Button cancelButton; 110 protected TypeSelector typeSelector; 110 111 } 111 112 } -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/TypeSelectorDialog.cs ¶
r2655 r2676 60 60 } 61 61 62 private void typeSelector_SelectedTypeChanged(object sender, EventArgs e) { 62 63 protected virtual void TypeSelectorDialog_Load(object sender, EventArgs e) { 64 this.typeSelector.TypesTreeView.DoubleClick += new System.EventHandler(TypesTreeView_DoubleClick); 65 } 66 protected virtual void typeSelector_SelectedTypeChanged(object sender, EventArgs e) { 63 67 okButton.Enabled = typeSelector.SelectedType != null; 64 68 } 65 pr ivatevoid TypesTreeView_DoubleClick(object sender, System.EventArgs e) {69 protected virtual void TypesTreeView_DoubleClick(object sender, System.EventArgs e) { 66 70 if (typeSelector.SelectedType != null) { 67 71 DialogResult = DialogResult.OK; -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/VariableView.Designer.cs ¶
r2655 r2676 55 55 this.setValueButton = new System.Windows.Forms.Button(); 56 56 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 57 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 57 58 this.valueGroupBox.SuspendLayout(); 58 59 this.valuePanel.SuspendLayout(); … … 61 62 // nameTextBox 62 63 // 63 this.nameTextBox.Size = new System.Drawing.Size(285, 20); 64 this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft); 65 this.errorProvider.SetIconPadding(this.nameTextBox, 2); 66 this.nameTextBox.Size = new System.Drawing.Size(287, 20); 64 67 // 65 68 // descriptionTextBox … … 67 70 this.descriptionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 68 71 | System.Windows.Forms.AnchorStyles.Right))); 69 this.descriptionTextBox.Size = new System.Drawing.Size(28 5, 62);72 this.descriptionTextBox.Size = new System.Drawing.Size(287, 62); 70 73 // 71 74 // dataTypeLabel 72 75 // 73 76 this.dataTypeLabel.AutoSize = true; 74 this.dataTypeLabel.Location = new System.Drawing.Point(3, 9 8);77 this.dataTypeLabel.Location = new System.Drawing.Point(3, 97); 75 78 this.dataTypeLabel.Name = "dataTypeLabel"; 76 79 this.dataTypeLabel.Size = new System.Drawing.Size(60, 13); … … 85 88 this.dataTypeTextBox.Name = "dataTypeTextBox"; 86 89 this.dataTypeTextBox.ReadOnly = true; 87 this.dataTypeTextBox.Size = new System.Drawing.Size(28 5, 20);90 this.dataTypeTextBox.Size = new System.Drawing.Size(287, 20); 88 91 this.dataTypeTextBox.TabIndex = 5; 89 92 // … … 109 112 | System.Windows.Forms.AnchorStyles.Right))); 110 113 this.valuePanel.Controls.Add(this.viewHost); 111 this.valuePanel.Location = new System.Drawing.Point( 3, 48);114 this.valuePanel.Location = new System.Drawing.Point(6, 48); 112 115 this.valuePanel.Name = "valuePanel"; 113 this.valuePanel.Size = new System.Drawing.Size(3 53, 103);116 this.valuePanel.Size = new System.Drawing.Size(347, 100); 114 117 this.valuePanel.TabIndex = 2; 115 118 this.valuePanel.DragOver += new System.Windows.Forms.DragEventHandler(this.valuePanel_DragEnterOver); … … 123 126 this.viewHost.Name = "viewHost"; 124 127 this.viewHost.Object = null; 125 this.viewHost.Size = new System.Drawing.Size(3 53, 103);128 this.viewHost.Size = new System.Drawing.Size(347, 100); 126 129 this.viewHost.TabIndex = 0; 127 130 // … … 153 156 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 154 157 this.Controls.Add(this.valueGroupBox); 158 this.Controls.Add(this.dataTypeLabel); 155 159 this.Controls.Add(this.dataTypeTextBox); 156 this.Controls.Add(this.dataTypeLabel);157 160 this.Name = "VariableView"; 158 161 this.Size = new System.Drawing.Size(359, 274); 162 this.Controls.SetChildIndex(this.descriptionLabel, 0); 163 this.Controls.SetChildIndex(this.dataTypeTextBox, 0); 159 164 this.Controls.SetChildIndex(this.dataTypeLabel, 0); 160 this.Controls.SetChildIndex(this.dataTypeTextBox, 0); 165 this.Controls.SetChildIndex(this.descriptionTextBox, 0); 166 this.Controls.SetChildIndex(this.nameTextBox, 0); 167 this.Controls.SetChildIndex(this.nameLabel, 0); 161 168 this.Controls.SetChildIndex(this.valueGroupBox, 0); 162 this.Controls.SetChildIndex(this.descriptionTextBox, 0); 163 this.Controls.SetChildIndex(this.nameLabel, 0); 164 this.Controls.SetChildIndex(this.descriptionLabel, 0); 165 this.Controls.SetChildIndex(this.nameTextBox, 0); 169 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 166 170 this.valueGroupBox.ResumeLayout(false); 167 171 this.valuePanel.ResumeLayout(false); … … 173 177 #endregion 174 178 175 pr ivateSystem.Windows.Forms.Label dataTypeLabel;176 pr ivateSystem.Windows.Forms.TextBox dataTypeTextBox;177 pr ivateSystem.Windows.Forms.GroupBox valueGroupBox;178 pr ivateViewHost viewHost;179 pr ivateSystem.Windows.Forms.Button clearValueButton;180 pr ivateSystem.Windows.Forms.ToolTip toolTip;181 pr ivateSystem.Windows.Forms.Button setValueButton;182 pr ivateSystem.Windows.Forms.Panel valuePanel;179 protected System.Windows.Forms.Label dataTypeLabel; 180 protected System.Windows.Forms.TextBox dataTypeTextBox; 181 protected System.Windows.Forms.GroupBox valueGroupBox; 182 protected ViewHost viewHost; 183 protected System.Windows.Forms.Button clearValueButton; 184 protected System.Windows.Forms.ToolTip toolTip; 185 protected System.Windows.Forms.Button setValueButton; 186 protected System.Windows.Forms.Panel valuePanel; 183 187 } 184 188 } -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/VariableView.cs ¶
r2664 r2676 35 35 [Content(typeof(Variable), true)] 36 36 public partial class VariableView : NamedItemView { 37 pr ivateTypeSelectorDialog typeSelectorDialog;37 protected TypeSelectorDialog typeSelectorDialog; 38 38 39 39 /// <summary> … … 103 103 } 104 104 105 pr ivatevoid Variable_ValueChanged(object sender, EventArgs e) {105 protected virtual void Variable_ValueChanged(object sender, EventArgs e) { 106 106 if (InvokeRequired) 107 107 Invoke(new EventHandler(Variable_ValueChanged), sender, e); … … 115 115 } 116 116 117 pr ivatevoid setValueButton_Click(object sender, EventArgs e) {117 protected virtual void setValueButton_Click(object sender, EventArgs e) { 118 118 if (typeSelectorDialog == null) { 119 119 typeSelectorDialog = new TypeSelectorDialog(); … … 125 125 } 126 126 } 127 pr ivatevoid clearValueButton_Click(object sender, EventArgs e) {127 protected virtual void clearValueButton_Click(object sender, EventArgs e) { 128 128 Variable.Value = null; 129 129 } 130 pr ivatevoid valuePanel_DragEnterOver(object sender, DragEventArgs e) {130 protected virtual void valuePanel_DragEnterOver(object sender, DragEventArgs e) { 131 131 e.Effect = DragDropEffects.None; 132 132 Type type = e.Data.GetData("Type") as Type; … … 137 137 } 138 138 } 139 pr ivatevoid valuePanel_DragDrop(object sender, DragEventArgs e) {139 protected virtual void valuePanel_DragDrop(object sender, DragEventArgs e) { 140 140 if (e.Effect != DragDropEffects.None) { 141 141 IItem item = e.Data.GetData("Value") as IItem; -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/ViewHost.Designer.cs ¶
r2665 r2676 63 63 // messageLabel 64 64 // 65 this.messageLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 66 | System.Windows.Forms.AnchorStyles.Right))); 67 this.messageLabel.Location = new System.Drawing.Point(3, 24); 65 this.messageLabel.Dock = System.Windows.Forms.DockStyle.Fill; 66 this.messageLabel.Location = new System.Drawing.Point(0, 0); 68 67 this.messageLabel.Name = "messageLabel"; 69 this.messageLabel.Size = new System.Drawing.Size(22 1, 20);68 this.messageLabel.Size = new System.Drawing.Size(227, 184); 70 69 this.messageLabel.TabIndex = 0; 71 70 this.messageLabel.Text = "No view available."; 72 this.messageLabel.TextAlign = System.Drawing.ContentAlignment. TopCenter;71 this.messageLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; 73 72 // 74 73 // viewLabel … … 87 86 this.viewComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 88 87 this.viewComboBox.FormattingEnabled = true; 89 this.viewComboBox.Location = new System.Drawing.Point(4 4, 0);88 this.viewComboBox.Location = new System.Drawing.Point(42, 0); 90 89 this.viewComboBox.Name = "viewComboBox"; 91 this.viewComboBox.Size = new System.Drawing.Size(18 3, 21);90 this.viewComboBox.Size = new System.Drawing.Size(185, 21); 92 91 this.viewComboBox.TabIndex = 1; 93 92 this.viewComboBox.SelectedIndexChanged += new System.EventHandler(this.viewComboBox_SelectedIndexChanged); … … 97 96 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 98 97 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 99 this.Controls.Add(this.messageLabel);100 98 this.Controls.Add(this.viewComboBox); 101 99 this.Controls.Add(this.viewLabel); 102 100 this.Controls.Add(this.viewPanel); 101 this.Controls.Add(this.messageLabel); 103 102 this.Name = "ViewHost"; 104 103 this.Size = new System.Drawing.Size(227, 184); … … 110 109 #endregion 111 110 112 pr ivateSystem.Windows.Forms.Panel viewPanel;113 pr ivateSystem.Windows.Forms.Label viewLabel;114 pr ivateSystem.Windows.Forms.ComboBox viewComboBox;115 pr ivateSystem.Windows.Forms.Label messageLabel;111 protected System.Windows.Forms.Panel viewPanel; 112 protected System.Windows.Forms.Label viewLabel; 113 protected System.Windows.Forms.ComboBox viewComboBox; 114 protected System.Windows.Forms.Label messageLabel; 116 115 117 116 } -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/ViewHost.cs ¶
r2665 r2676 48 48 } 49 49 50 pr ivatevoid Initialize() {50 protected virtual void Initialize() { 51 51 viewLabel.Visible = false; 52 52 viewComboBox.Items.Clear(); … … 84 84 } 85 85 86 pr ivatevoid viewComboBox_SelectedIndexChanged(object sender, EventArgs e) {86 protected virtual void viewComboBox_SelectedIndexChanged(object sender, EventArgs e) { 87 87 if (viewComboBox.SelectedItem != viewPanel.Tag) { 88 88 if (viewPanel.Controls.Count > 0) viewPanel.Controls[0].Dispose(); -
TabularUnified trunk/sources/HeuristicLab.Core/3.3/NamedItemCollection.cs ¶
r2669 r2676 91 91 #region NOTE 92 92 // NOTE: OnItemsReplaced is not overridden as ItemsReplaced is only fired 93 // by ObservableKeyedCollection Basewhen the key of an item has changed. The items stays93 // by ObservableKeyedCollection when the key of an item has changed. The items stays 94 94 // in the collection and therefore the NameChanging, NameChanged and Changed event handler 95 95 // do not have to be removed and added again. -
TabularUnified trunk/sources/HeuristicLab.Data.Views/3.3/BoolDataView.Designer.cs ¶
r2665 r2676 51 51 // 52 52 this.valueCheckBox.AutoSize = true; 53 this.valueCheckBox.Location = new System.Drawing.Point(3, 3); 53 this.valueCheckBox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; 54 this.valueCheckBox.Location = new System.Drawing.Point(3, 0); 54 55 this.valueCheckBox.Name = "valueCheckBox"; 55 this.valueCheckBox.Size = new System.Drawing.Size( 15, 14);56 this.valueCheckBox.Size = new System.Drawing.Size(56, 17); 56 57 this.valueCheckBox.TabIndex = 0; 58 this.valueCheckBox.Text = "&Value:"; 57 59 this.valueCheckBox.UseVisualStyleBackColor = true; 58 60 this.valueCheckBox.CheckedChanged += new System.EventHandler(this.valueCheckBox_CheckedChanged); … … 64 66 this.Controls.Add(this.valueCheckBox); 65 67 this.Name = "BoolDataView"; 66 this.Size = new System.Drawing.Size( 30, 32);68 this.Size = new System.Drawing.Size(71, 27); 67 69 this.ResumeLayout(false); 68 70 this.PerformLayout(); -
TabularUnified trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleArrayDataView.Designer.cs ¶
r2669 r2676 45 45 /// </summary> 46 46 private void InitializeComponent() { 47 this.components = new System.ComponentModel.Container(); 47 48 this.sizeLabel = new System.Windows.Forms.Label(); 48 49 this.sizeTextBox = new System.Windows.Forms.TextBox(); 49 50 this.dataGridView = new System.Windows.Forms.DataGridView(); 51 this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components); 50 52 ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit(); 53 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 51 54 this.SuspendLayout(); 52 55 // … … 54 57 // 55 58 this.sizeLabel.AutoSize = true; 56 this.sizeLabel.Location = new System.Drawing.Point(3, 6);59 this.sizeLabel.Location = new System.Drawing.Point(3, 3); 57 60 this.sizeLabel.Name = "sizeLabel"; 58 61 this.sizeLabel.Size = new System.Drawing.Size(30, 13); … … 64 67 this.sizeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 65 68 | System.Windows.Forms.AnchorStyles.Right))); 66 this.sizeTextBox.Location = new System.Drawing.Point( 39, 3);69 this.sizeTextBox.Location = new System.Drawing.Point(50, 0); 67 70 this.sizeTextBox.Name = "sizeTextBox"; 68 this.sizeTextBox.Size = new System.Drawing.Size(3 82, 20);71 this.sizeTextBox.Size = new System.Drawing.Size(374, 20); 69 72 this.sizeTextBox.TabIndex = 1; 70 73 this.sizeTextBox.Validated += new System.EventHandler(this.sizeTextBox_Validated); … … 82 85 this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; 83 86 this.dataGridView.ColumnHeadersVisible = false; 84 this.dataGridView.Location = new System.Drawing.Point( 3, 29);87 this.dataGridView.Location = new System.Drawing.Point(0, 26); 85 88 this.dataGridView.Name = "dataGridView"; 86 this.dataGridView.Size = new System.Drawing.Size(4 18, 372);89 this.dataGridView.Size = new System.Drawing.Size(424, 378); 87 90 this.dataGridView.TabIndex = 2; 88 this.dataGridView.Cell Validated += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CellValidated);91 this.dataGridView.CellParsing += new System.Windows.Forms.DataGridViewCellParsingEventHandler(this.dataGridView_CellParsing); 89 92 this.dataGridView.CellValidating += new System.Windows.Forms.DataGridViewCellValidatingEventHandler(this.dataGridView_CellValidating); 93 this.dataGridView.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CellEndEdit); 94 // 95 // errorProvider 96 // 97 this.errorProvider.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.NeverBlink; 98 this.errorProvider.ContainerControl = this; 90 99 // 91 100 // StringConvertibleArrayDataView … … 99 108 this.Size = new System.Drawing.Size(424, 404); 100 109 ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit(); 110 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 101 111 this.ResumeLayout(false); 102 112 this.PerformLayout(); … … 109 119 private System.Windows.Forms.TextBox sizeTextBox; 110 120 private System.Windows.Forms.DataGridView dataGridView; 121 private System.Windows.Forms.ErrorProvider errorProvider; 111 122 112 123 } -
TabularUnified trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleArrayDataView.cs ¶
r2669 r2676 43 43 InitializeComponent(); 44 44 Caption = "StringConvertibleArrayDataView View"; 45 errorProvider.SetIconAlignment(sizeTextBox, ErrorIconAlignment.MiddleLeft); 46 errorProvider.SetIconPadding(sizeTextBox, 2); 45 47 } 46 48 public StringConvertibleArrayDataView(IStringConvertibleArrayData stringConvertibleArrayData) … … 51 53 protected override void DeregisterObjectEvents() { 52 54 StringConvertibleArrayData.ItemChanged -= new EventHandler<EventArgs<int>>(StringConvertibleArrayData_ItemChanged); 53 StringConvertibleArrayData. Changed -= new ChangedEventHandler(StringConvertibleArrayData_Changed);55 StringConvertibleArrayData.Reset -= new EventHandler(StringConvertibleArrayData_Reset); 54 56 base.DeregisterObjectEvents(); 55 57 } … … 59 61 base.RegisterObjectEvents(); 60 62 StringConvertibleArrayData.ItemChanged += new EventHandler<EventArgs<int>>(StringConvertibleArrayData_ItemChanged); 61 StringConvertibleArrayData. Changed += new ChangedEventHandler(StringConvertibleArrayData_Changed);63 StringConvertibleArrayData.Reset += new EventHandler(StringConvertibleArrayData_Reset); 62 64 } 63 65 … … 80 82 sizeTextBox.Enabled = true; 81 83 dataGridView.Rows.Clear(); 82 if (StringConvertibleArrayData.Length > 0) { 83 dataGridView.ColumnCount = 1; 84 dataGridView.Rows.Add(StringConvertibleArrayData.Length); 85 } 84 dataGridView.ColumnCount = 1; 85 dataGridView.RowCount = StringConvertibleArrayData.Length; 86 86 for (int i = 0; i < StringConvertibleArrayData.Length; i++) 87 87 dataGridView.Rows[i].Cells[0].Value = StringConvertibleArrayData.GetValue(i); … … 95 95 dataGridView.Rows[e.Value].Cells[0].Value = StringConvertibleArrayData.GetValue(e.Value); 96 96 } 97 private void StringConvertibleArrayData_ Changed(object sender, ChangedEventArgs e) {97 private void StringConvertibleArrayData_Reset(object sender, EventArgs e) { 98 98 if (InvokeRequired) 99 Invoke(new ChangedEventHandler(StringConvertibleArrayData_Changed), sender, e);99 Invoke(new EventHandler(StringConvertibleArrayData_Reset), sender, e); 100 100 else 101 101 UpdateContent(); … … 104 104 private void sizeTextBox_Validating(object sender, CancelEventArgs e) { 105 105 int i = 0; 106 e.Cancel = e.Cancel || !int.TryParse(sizeTextBox.Text, out i); 107 e.Cancel = e.Cancel || (i < 0); 108 if (e.Cancel) { 109 MessageBox.Show(this, "\"" + sizeTextBox.Text + "\" is not a valid array length.", "Invalid Array Length", MessageBoxButtons.OK, MessageBoxIcon.Error); 106 if (!int.TryParse(sizeTextBox.Text, out i) || (i < 0)) { 107 e.Cancel = true; 108 errorProvider.SetError(sizeTextBox, "Invalid Array Length"); 110 109 sizeTextBox.SelectAll(); 111 sizeTextBox.Focus();112 110 } 113 111 } 114 112 private void sizeTextBox_Validated(object sender, EventArgs e) { 115 113 StringConvertibleArrayData.Length = int.Parse(sizeTextBox.Text); 114 errorProvider.SetError(sizeTextBox, string.Empty); 116 115 } 117 116 private void sizeTextBox_KeyDown(object sender, KeyEventArgs e) { 118 117 if (e.KeyCode == Keys.Enter || e.KeyCode == Keys.Return) 119 sizeLabel.Focus(); 118 sizeLabel.Focus(); // set focus on label to validate data 119 if (e.KeyCode == Keys.Escape) { 120 sizeTextBox.Text = StringConvertibleArrayData.Length.ToString(); 121 sizeLabel.Focus(); // set focus on label to validate data 122 } 120 123 } 121 124 private void dataGridView_CellValidating(object sender, DataGridViewCellValidatingEventArgs e) { 122 e.Cancel = e.Cancel || !StringConvertibleArrayData.SetValue(e.FormattedValue.ToString(), e.RowIndex); 123 if (e.Cancel) 124 MessageBox.Show(this, "\"" + e.FormattedValue.ToString() + "\" is not a valid value.", "Invalid Value", MessageBoxButtons.OK, MessageBoxIcon.Error); 125 if (!StringConvertibleArrayData.Validate(e.FormattedValue.ToString())) { 126 e.Cancel = true; 127 dataGridView.Rows[e.RowIndex].ErrorText = "Invalid Value"; 128 } 125 129 } 126 private void dataGridView_CellValidated(object sender, DataGridViewCellEventArgs e) { 127 dataGridView.Rows[e.RowIndex].Cells[0].Value = StringConvertibleArrayData.GetValue(e.RowIndex); 130 private void dataGridView_CellParsing(object sender, DataGridViewCellParsingEventArgs e) { 131 string value = e.Value.ToString(); 132 e.ParsingApplied = StringConvertibleArrayData.SetValue(value, e.RowIndex); 133 if (e.ParsingApplied) e.Value = StringConvertibleArrayData.GetValue(e.RowIndex); 134 } 135 private void dataGridView_CellEndEdit(object sender, DataGridViewCellEventArgs e) { 136 dataGridView.Rows[e.RowIndex].ErrorText = string.Empty; 128 137 } 129 138 } -
TabularUnified trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleDataView.Designer.cs ¶
r2665 r2676 45 45 /// </summary> 46 46 private void InitializeComponent() { 47 this.components = new System.ComponentModel.Container(); 47 48 this.valueTextBox = new System.Windows.Forms.TextBox(); 49 this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components); 50 this.valueLabel = new System.Windows.Forms.Label(); 51 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 48 52 this.SuspendLayout(); 49 53 // … … 52 56 this.valueTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 53 57 | System.Windows.Forms.AnchorStyles.Right))); 54 this.valueTextBox.Location = new System.Drawing.Point( 3, 0);58 this.valueTextBox.Location = new System.Drawing.Point(56, 0); 55 59 this.valueTextBox.Name = "valueTextBox"; 56 this.valueTextBox.Size = new System.Drawing.Size( 244, 20);57 this.valueTextBox.TabIndex = 0;60 this.valueTextBox.Size = new System.Drawing.Size(194, 20); 61 this.valueTextBox.TabIndex = 1; 58 62 this.valueTextBox.Validated += new System.EventHandler(this.valueTextBox_Validated); 63 this.valueTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.valueTextBox_KeyDown); 59 64 this.valueTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.valueTextBox_Validating); 65 // 66 // errorProvider 67 // 68 this.errorProvider.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.NeverBlink; 69 this.errorProvider.ContainerControl = this; 70 // 71 // valueLabel 72 // 73 this.valueLabel.AutoSize = true; 74 this.valueLabel.Location = new System.Drawing.Point(3, 3); 75 this.valueLabel.Name = "valueLabel"; 76 this.valueLabel.Size = new System.Drawing.Size(37, 13); 77 this.valueLabel.TabIndex = 0; 78 this.valueLabel.Text = "&Value:"; 60 79 // 61 80 // StringConvertibleDataView … … 63 82 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 64 83 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 84 this.Controls.Add(this.valueLabel); 65 85 this.Controls.Add(this.valueTextBox); 66 86 this.Name = "StringConvertibleDataView"; 67 this.Size = new System.Drawing.Size(250, 34); 87 this.Size = new System.Drawing.Size(250, 38); 88 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 68 89 this.ResumeLayout(false); 69 90 this.PerformLayout(); … … 74 95 75 96 private System.Windows.Forms.TextBox valueTextBox; 97 private System.Windows.Forms.ErrorProvider errorProvider; 98 private System.Windows.Forms.Label valueLabel; 76 99 } 77 100 } -
TabularUnified trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleDataView.cs ¶
r2669 r2676 42 42 InitializeComponent(); 43 43 Caption = "StringConvertibleData View"; 44 errorProvider.SetIconAlignment(valueTextBox, ErrorIconAlignment.MiddleLeft); 45 errorProvider.SetIconPadding(valueTextBox, 2); 44 46 } 45 47 public StringConvertibleDataView(IStringConvertibleData stringConvertibleData) … … 78 80 } 79 81 82 private void valueTextBox_KeyDown(object sender, KeyEventArgs e) { 83 if ((e.KeyCode == Keys.Enter) || (e.KeyCode == Keys.Return)) 84 valueLabel.Focus(); // set focus on label to validate data 85 if (e.KeyCode == Keys.Escape) { 86 valueTextBox.Text = StringConvertibleData.GetValue(); 87 valueLabel.Focus(); // set focus on label to validate data 88 } 89 } 80 90 private void valueTextBox_Validating(object sender, CancelEventArgs e) { 81 e.Cancel = e.Cancel || !StringConvertibleData.SetValue(valueTextBox.Text);82 if (e.Cancel) {83 MessageBox.Show(this, "\"" + valueTextBox.Text + "\" is not a valid value.", "Invalid Value", MessageBoxButtons.OK, MessageBoxIcon.Error);91 if (!StringConvertibleData.Validate(valueTextBox.Text)) { 92 e.Cancel = true; 93 errorProvider.SetError(valueTextBox, "Invalid Value"); 84 94 valueTextBox.SelectAll(); 85 valueTextBox.Focus();86 95 } 87 96 } 88 97 private void valueTextBox_Validated(object sender, EventArgs e) { 89 valueTextBox.Text = StringConvertibleData.GetValue(); 98 StringConvertibleData.SetValue(valueTextBox.Text); 99 errorProvider.SetError(valueTextBox, string.Empty); 90 100 } 91 101 } -
TabularUnified trunk/sources/HeuristicLab.Data/3.3/BoolData.cs ¶
r2669 r2676 41 41 } 42 42 43 #region IStringConvertibleData Members 44 bool IStringConvertibleData.Validate(string value) { 45 bool b; 46 return bool.TryParse(value, out b); 47 } 43 48 string IStringConvertibleData.GetValue() { 44 49 return Value.ToString(); … … 53 58 } 54 59 } 60 #endregion 55 61 } 56 62 } -
TabularUnified trunk/sources/HeuristicLab.Data/3.3/DateTimeData.cs ¶
r2669 r2676 45 45 } 46 46 47 #region IStringConvertibleData Members 48 bool IStringConvertibleData.Validate(string value) { 49 DateTime d; 50 return DateTime.TryParse(value, out d); 51 } 47 52 string IStringConvertibleData.GetValue() { 48 53 return Value.ToString("o"); // round-trip format … … 57 62 } 58 63 } 64 #endregion 59 65 } 60 66 } -
TabularUnified trunk/sources/HeuristicLab.Data/3.3/DoubleData.cs ¶
r2669 r2676 45 45 } 46 46 47 #region IStringConvertibleData Members 48 bool IStringConvertibleData.Validate(string value) { 49 double d; 50 return double.TryParse(value, out d); 51 } 47 52 string IStringConvertibleData.GetValue() { 48 53 return Value.ToString("r"); // round-trip format … … 57 62 } 58 63 } 64 #endregion 59 65 } 60 66 } -
TabularUnified trunk/sources/HeuristicLab.Data/3.3/HeuristicLab.Data-3.3.csproj ¶
r2669 r2676 103 103 <SubType>Code</SubType> 104 104 </Compile> 105 <Compile Include="BoolArrayData.cs" /> 105 106 <Compile Include="IStringConvertibleArrayData.cs" /> 106 107 <Compile Include="ValueTypeArrayData.cs" /> -
TabularUnified trunk/sources/HeuristicLab.Data/3.3/IStringConvertibleArrayData.cs ¶
r2669 r2676 31 31 int Length { get; set; } 32 32 33 bool Validate(string value); 33 34 string GetValue(int index); 34 35 bool SetValue(string value, int index); 35 36 36 event ChangedEventHandler Changed;37 37 event EventHandler<EventArgs<int>> ItemChanged; 38 event EventHandler Reset; 38 39 } 39 40 } -
TabularUnified trunk/sources/HeuristicLab.Data/3.3/IStringConvertibleData.cs ¶
r2669 r2676 28 28 namespace HeuristicLab.Data { 29 29 public interface IStringConvertibleData { 30 bool Validate(string value); 30 31 string GetValue(); 31 32 bool SetValue(string value); -
TabularUnified trunk/sources/HeuristicLab.Data/3.3/IntArrayData.cs ¶
r2669 r2676 24 24 using System.Text; 25 25 using System.Xml; 26 using HeuristicLab.Common; 26 27 using HeuristicLab.Core; 27 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 34 35 public IntArrayData() : base() { } 35 36 public IntArrayData(int length) : base(length) { } 36 public IntArrayData(IntArrayData elements) : base(elements) { }37 37 public IntArrayData(int[] elements) : base(elements) { } 38 protected IntArrayData(IntArrayData elements) : base(elements) { } 38 39 39 40 public override IDeepCloneable Clone(Cloner cloner) { … … 43 44 } 44 45 46 #region IStringConvertibleArrayData Members 45 47 int IStringConvertibleArrayData.Length { 46 48 get { return Length; } 47 49 set { Length = value; } 50 } 51 bool IStringConvertibleArrayData.Validate(string value) { 52 int i; 53 return int.TryParse(value, out i); 48 54 } 49 55 string IStringConvertibleArrayData.GetValue(int index) { … … 59 65 } 60 66 } 67 event EventHandler<EventArgs<int>> IStringConvertibleArrayData.ItemChanged { 68 add { base.ItemChanged += value; } 69 remove { base.ItemChanged -= value; } 70 } 71 event EventHandler IStringConvertibleArrayData.Reset { 72 add { base.Reset += value; } 73 remove { base.Reset -= value; } 74 } 75 #endregion 61 76 } 62 77 } -
TabularUnified trunk/sources/HeuristicLab.Data/3.3/IntData.cs ¶
r2669 r2676 41 41 } 42 42 43 #region IStringConvertibleData Members 44 bool IStringConvertibleData.Validate(string value) { 45 int i; 46 return int.TryParse(value, out i); 47 } 43 48 string IStringConvertibleData.GetValue() { 44 49 return Value.ToString(); … … 53 58 } 54 59 } 60 #endregion 55 61 } 56 62 } -
TabularUnified trunk/sources/HeuristicLab.Data/3.3/StringData.cs ¶
r2669 r2676 63 63 } 64 64 65 #region IStringConvertibleData Members 66 bool IStringConvertibleData.Validate(string value) { 67 return true; 68 } 65 69 string IStringConvertibleData.GetValue() { 66 70 return Value; … … 70 74 return true; 71 75 } 76 #endregion 72 77 } 73 78 } -
TabularUnified trunk/sources/HeuristicLab.Data/3.3/TimeSpanData.cs ¶
r2669 r2676 41 41 } 42 42 43 #region IStringConvertibleData Members 44 bool IStringConvertibleData.Validate(string value) { 45 TimeSpan t; 46 return TimeSpan.TryParse(value, out t); 47 } 43 48 string IStringConvertibleData.GetValue() { 44 49 return Value.ToString(); … … 53 58 } 54 59 } 60 #endregion 55 61 } 56 62 } -
TabularUnified trunk/sources/HeuristicLab.Data/3.3/ValueTypeArrayData.cs ¶
r2669 r2676 41 41 Array.Copy(array, newArray, Math.Min(value, array.Length)); 42 42 array = newArray; 43 On Changed();43 OnReset(); 44 44 } 45 45 } … … 60 60 array = new T[length]; 61 61 } 62 public ValueTypeArrayData(ValueTypeArrayData<T> elements) {63 if (elements == null) throw new ArgumentNullException();64 array = (T[])elements.array.Clone();65 }66 62 public ValueTypeArrayData(T[] elements) { 67 63 if (elements == null) throw new ArgumentNullException(); 68 64 array = (T[])elements.Clone(); 65 } 66 protected ValueTypeArrayData(ValueTypeArrayData<T> elements) { 67 if (elements == null) throw new ArgumentNullException(); 68 array = (T[])elements.array.Clone(); 69 69 } 70 70 … … 91 91 } 92 92 93 p ublicevent EventHandler<EventArgs<int>> ItemChanged;94 pr otected virtualvoid OnItemChanged(int index) {93 protected event EventHandler<EventArgs<int>> ItemChanged; 94 private void OnItemChanged(int index) { 95 95 if (ItemChanged != null) 96 96 ItemChanged(this, new EventArgs<int>(index)); 97 97 OnChanged(); 98 98 } 99 protected event EventHandler Reset; 100 private void OnReset() { 101 if (Reset != null) 102 Reset(this, EventArgs.Empty); 103 OnChanged(); 104 } 99 105 } 100 106 } -
TabularUnified trunk/sources/HeuristicLab.Operators.Views/3.3/OperatorView.Designer.cs ¶
r2664 r2676 46 46 private void InitializeComponent() { 47 47 this.parameterCollectionView = new HeuristicLab.Core.Views.ParameterCollectionView(); 48 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 48 49 this.SuspendLayout(); 49 50 // 50 51 // nameTextBox 51 52 // 53 this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft); 54 this.errorProvider.SetIconPadding(this.nameTextBox, 2); 52 55 this.nameTextBox.Size = new System.Drawing.Size(418, 20); 53 56 // … … 56 59 this.descriptionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 57 60 | System.Windows.Forms.AnchorStyles.Right))); 58 this.descriptionTextBox.Size = new System.Drawing.Size(418, 90);61 this.descriptionTextBox.Size = new System.Drawing.Size(418, 87); 59 62 // 60 63 // parameterCollectionView … … 65 68 this.parameterCollectionView.Caption = "ParameterCollection"; 66 69 this.parameterCollectionView.ItemCollection = null; 67 this.parameterCollectionView.Location = new System.Drawing.Point(0, 1 22);70 this.parameterCollectionView.Location = new System.Drawing.Point(0, 119); 68 71 this.parameterCollectionView.Name = "parameterCollectionView"; 69 72 this.parameterCollectionView.NamedItemCollection = null; 70 this.parameterCollectionView.Size = new System.Drawing.Size(490, 231); 73 this.parameterCollectionView.Object = null; 74 this.parameterCollectionView.Size = new System.Drawing.Size(490, 234); 71 75 this.parameterCollectionView.TabIndex = 4; 72 76 // 73 // Operator BaseView77 // OperatorView 74 78 // 75 79 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 76 80 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 77 81 this.Controls.Add(this.parameterCollectionView); 78 this.Name = "Operator BaseView";82 this.Name = "OperatorView"; 79 83 this.Size = new System.Drawing.Size(490, 353); 80 this.Controls.SetChildIndex(this. parameterCollectionView, 0);84 this.Controls.SetChildIndex(this.nameTextBox, 0); 81 85 this.Controls.SetChildIndex(this.nameLabel, 0); 82 86 this.Controls.SetChildIndex(this.descriptionLabel, 0); 83 this.Controls.SetChildIndex(this.nameTextBox, 0);84 87 this.Controls.SetChildIndex(this.descriptionTextBox, 0); 88 this.Controls.SetChildIndex(this.parameterCollectionView, 0); 89 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 85 90 this.ResumeLayout(false); 86 91 this.PerformLayout(); -
TabularUnified trunk/sources/HeuristicLab.Operators.Views/3.3/OperatorView.cs ¶
r2664 r2676 37 37 [Content(typeof(Operator), true)] 38 38 public partial class OperatorView : NamedItemView { 39 public Operator Operator Base{39 public Operator Operator { 40 40 get { return (Operator)base.Item; } 41 41 set { base.Item = value; } … … 52 52 /// </summary> 53 53 /// <param name="item">The item that should be displayed.</param> 54 public OperatorView(Operator op eratorBase)54 public OperatorView(Operator op) 55 55 : this() { 56 Operator Base = operatorBase;56 Operator = op; 57 57 } 58 58 59 59 protected override void OnObjectChanged() { 60 60 base.OnObjectChanged(); 61 if (Operator Base== null) {61 if (Operator == null) { 62 62 parameterCollectionView.NamedItemCollection = null; 63 63 } else { 64 parameterCollectionView.NamedItemCollection = ((IOperator)Operator Base).Parameters;64 parameterCollectionView.NamedItemCollection = ((IOperator)Operator).Parameters; 65 65 } 66 66 }
Note: See TracChangeset
for help on using the changeset viewer.