- Timestamp:
- 07/25/10 00:29:17 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core.Views/3.3/ItemArrayView.Designer.cs
r3407 r4096 56 56 this.components = new System.ComponentModel.Container(); 57 57 this.splitContainer = new System.Windows.Forms.SplitContainer(); 58 this.addButton = new System.Windows.Forms.Button(); 58 59 this.moveUpButton = new System.Windows.Forms.Button(); 60 this.removeButton = new System.Windows.Forms.Button(); 59 61 this.moveDownButton = new System.Windows.Forms.Button(); 60 62 this.itemsListView = new System.Windows.Forms.ListView(); 61 this.listViewColumnHeader = new System.Windows.Forms.ColumnHeader();63 this.listViewColumnHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 62 64 this.imageList = new System.Windows.Forms.ImageList(this.components); 63 65 this.detailsGroupBox = new System.Windows.Forms.GroupBox(); … … 65 67 this.itemsGroupBox = new System.Windows.Forms.GroupBox(); 66 68 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 67 this.removeButton = new System.Windows.Forms.Button(); 68 this.addButton = new System.Windows.Forms.Button(); 69 this.showDetailsCheckBox = new System.Windows.Forms.CheckBox(); 69 70 this.splitContainer.Panel1.SuspendLayout(); 70 71 this.splitContainer.Panel2.SuspendLayout(); … … 83 84 // splitContainer.Panel1 84 85 // 86 this.splitContainer.Panel1.Controls.Add(this.showDetailsCheckBox); 85 87 this.splitContainer.Panel1.Controls.Add(this.addButton); 86 88 this.splitContainer.Panel1.Controls.Add(this.moveUpButton); … … 95 97 this.splitContainer.SplitterDistance = 200; 96 98 this.splitContainer.TabIndex = 0; 99 // 100 // addButton 101 // 102 this.addButton.Enabled = false; 103 this.addButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Add; 104 this.addButton.Location = new System.Drawing.Point(3, 3); 105 this.addButton.Name = "addButton"; 106 this.addButton.Size = new System.Drawing.Size(24, 24); 107 this.addButton.TabIndex = 0; 108 this.toolTip.SetToolTip(this.addButton, "Set"); 109 this.addButton.UseVisualStyleBackColor = true; 110 this.addButton.Click += new System.EventHandler(this.addButton_Click); 97 111 // 98 112 // moveUpButton … … 107 121 this.moveUpButton.UseVisualStyleBackColor = true; 108 122 this.moveUpButton.Click += new System.EventHandler(this.moveUpButton_Click); 123 // 124 // removeButton 125 // 126 this.removeButton.Enabled = false; 127 this.removeButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Remove; 128 this.removeButton.Location = new System.Drawing.Point(93, 3); 129 this.removeButton.Name = "removeButton"; 130 this.removeButton.Size = new System.Drawing.Size(24, 24); 131 this.removeButton.TabIndex = 3; 132 this.toolTip.SetToolTip(this.removeButton, "Clear"); 133 this.removeButton.UseVisualStyleBackColor = true; 134 this.removeButton.Click += new System.EventHandler(this.removeButton_Click); 109 135 // 110 136 // moveDownButton … … 135 161 this.itemsListView.Size = new System.Drawing.Size(194, 286); 136 162 this.itemsListView.SmallImageList = this.imageList; 137 this.itemsListView.TabIndex = 4;163 this.itemsListView.TabIndex = 5; 138 164 this.itemsListView.UseCompatibleStateImageBehavior = false; 139 165 this.itemsListView.View = System.Windows.Forms.View.Details; 166 this.itemsListView.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.itemsListView_ItemDrag); 140 167 this.itemsListView.SelectedIndexChanged += new System.EventHandler(this.itemsListView_SelectedIndexChanged); 141 this.itemsListView.DoubleClick += new System.EventHandler(this.itemsListView_DoubleClick);142 168 this.itemsListView.DragDrop += new System.Windows.Forms.DragEventHandler(this.itemsListView_DragDrop); 143 169 this.itemsListView.DragEnter += new System.Windows.Forms.DragEventHandler(this.itemsListView_DragEnterOver); 170 this.itemsListView.DragOver += new System.Windows.Forms.DragEventHandler(this.itemsListView_DragEnterOver); 171 this.itemsListView.DoubleClick += new System.EventHandler(this.itemsListView_DoubleClick); 144 172 this.itemsListView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.itemsListView_KeyDown); 145 this.itemsListView.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.itemsListView_ItemDrag);146 this.itemsListView.DragOver += new System.Windows.Forms.DragEventHandler(this.itemsListView_DragEnterOver);147 173 // 148 174 // imageList … … 170 196 | System.Windows.Forms.AnchorStyles.Left) 171 197 | System.Windows.Forms.AnchorStyles.Right))); 198 this.viewHost.Caption = "View"; 172 199 this.viewHost.Content = null; 173 200 this.viewHost.Location = new System.Drawing.Point(6, 19); 174 201 this.viewHost.Name = "viewHost"; 202 this.viewHost.ReadOnly = false; 175 203 this.viewHost.Size = new System.Drawing.Size(271, 269); 176 204 this.viewHost.TabIndex = 0; … … 188 216 this.itemsGroupBox.Text = "Items"; 189 217 // 190 // removeButton 191 // 192 this.removeButton.Enabled = false; 193 this.removeButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Remove; 194 this.removeButton.Location = new System.Drawing.Point(93, 3); 195 this.removeButton.Name = "removeButton"; 196 this.removeButton.Size = new System.Drawing.Size(24, 24); 197 this.removeButton.TabIndex = 3; 198 this.toolTip.SetToolTip(this.removeButton, "Clear"); 199 this.removeButton.UseVisualStyleBackColor = true; 200 this.removeButton.Click += new System.EventHandler(this.removeButton_Click); 201 // 202 // addButton 203 // 204 this.addButton.Enabled = false; 205 this.addButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Add; 206 this.addButton.Location = new System.Drawing.Point(3, 3); 207 this.addButton.Name = "addButton"; 208 this.addButton.Size = new System.Drawing.Size(24, 24); 209 this.addButton.TabIndex = 0; 210 this.toolTip.SetToolTip(this.addButton, "Set"); 211 this.addButton.UseVisualStyleBackColor = true; 212 this.addButton.Click += new System.EventHandler(this.addButton_Click); 218 // showDetailsCheckBox 219 // 220 this.showDetailsCheckBox.Appearance = System.Windows.Forms.Appearance.Button; 221 this.showDetailsCheckBox.Checked = true; 222 this.showDetailsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; 223 this.showDetailsCheckBox.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Properties; 224 this.showDetailsCheckBox.Location = new System.Drawing.Point(123, 3); 225 this.showDetailsCheckBox.Name = "showDetailsCheckBox"; 226 this.showDetailsCheckBox.Size = new System.Drawing.Size(24, 24); 227 this.showDetailsCheckBox.TabIndex = 4; 228 this.toolTip.SetToolTip(this.showDetailsCheckBox, "Show/Hide Details"); 229 this.showDetailsCheckBox.UseVisualStyleBackColor = true; 230 this.showDetailsCheckBox.CheckedChanged += new System.EventHandler(this.showDetailsCheckBox_CheckedChanged); 213 231 // 214 232 // ItemArrayView … … 241 259 protected Button removeButton; 242 260 protected Button addButton; 261 protected CheckBox showDetailsCheckBox; 243 262 } 244 263 } -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemArrayView.cs
r3904 r4096 202 202 AdjustListViewColumnSizes(); 203 203 204 if (itemsListView.SelectedItems.Count == 1) { 205 T item = itemsListView.SelectedItems[0].Tag as T; 206 detailsGroupBox.Enabled = true; 207 viewHost.Content = item; 208 } else { 209 viewHost.Content = null; 210 detailsGroupBox.Enabled = false; 204 if (showDetailsCheckBox.Checked) { 205 if (itemsListView.SelectedItems.Count == 1) { 206 T item = itemsListView.SelectedItems[0].Tag as T; 207 detailsGroupBox.Enabled = true; 208 viewHost.Content = item; 209 } else { 210 viewHost.Content = null; 211 detailsGroupBox.Enabled = false; 212 } 211 213 } 212 214 } … … 317 319 #endregion 318 320 321 #region CheckBox Events 322 protected virtual void showDetailsCheckBox_CheckedChanged(object sender, EventArgs e) { 323 if (showDetailsCheckBox.Checked) { 324 splitContainer.Panel2Collapsed = false; 325 detailsGroupBox.Enabled = itemsListView.SelectedItems.Count == 1; 326 viewHost.Content = itemsListView.SelectedItems.Count == 1 ? (T)itemsListView.SelectedItems[0].Tag : null; 327 } else { 328 splitContainer.Panel2Collapsed = true; 329 viewHost.Content = null; 330 viewHost.ClearCache(); 331 } 332 } 333 #endregion 334 319 335 #region Content Events 320 336 protected virtual void Content_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) { -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemCollectionView.Designer.cs
r4068 r4096 56 56 this.splitContainer = new System.Windows.Forms.SplitContainer(); 57 57 this.itemsListView = new System.Windows.Forms.ListView(); 58 this.columnHeader1 = new System.Windows.Forms.ColumnHeader();58 this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 59 59 this.imageList = new System.Windows.Forms.ImageList(this.components); 60 60 this.sortDescendingButton = new System.Windows.Forms.Button(); … … 66 66 this.itemsGroupBox = new System.Windows.Forms.GroupBox(); 67 67 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 68 this.showDetailsCheckBox = new System.Windows.Forms.CheckBox(); 68 69 this.splitContainer.Panel1.SuspendLayout(); 69 70 this.splitContainer.Panel2.SuspendLayout(); … … 82 83 // splitContainer.Panel1 83 84 // 85 this.splitContainer.Panel1.Controls.Add(this.showDetailsCheckBox); 84 86 this.splitContainer.Panel1.Controls.Add(this.itemsListView); 85 87 this.splitContainer.Panel1.Controls.Add(this.sortDescendingButton); … … 111 113 this.itemsListView.Size = new System.Drawing.Size(244, 327); 112 114 this.itemsListView.SmallImageList = this.imageList; 113 this.itemsListView.TabIndex = 4;115 this.itemsListView.TabIndex = 5; 114 116 this.itemsListView.UseCompatibleStateImageBehavior = false; 115 117 this.itemsListView.View = System.Windows.Forms.View.Details; 118 this.itemsListView.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.itemsListView_ItemDrag); 116 119 this.itemsListView.SelectedIndexChanged += new System.EventHandler(this.itemsListView_SelectedIndexChanged); 117 this.itemsListView.DoubleClick += new System.EventHandler(this.itemsListView_DoubleClick);118 120 this.itemsListView.DragDrop += new System.Windows.Forms.DragEventHandler(this.itemsListView_DragDrop); 119 121 this.itemsListView.DragEnter += new System.Windows.Forms.DragEventHandler(this.itemsListView_DragEnterOver); 122 this.itemsListView.DragOver += new System.Windows.Forms.DragEventHandler(this.itemsListView_DragEnterOver); 123 this.itemsListView.DoubleClick += new System.EventHandler(this.itemsListView_DoubleClick); 120 124 this.itemsListView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.itemsListView_KeyDown); 121 this.itemsListView.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.itemsListView_ItemDrag);122 this.itemsListView.DragOver += new System.Windows.Forms.DragEventHandler(this.itemsListView_DragEnterOver);123 125 // 124 126 // imageList … … 193 195 | System.Windows.Forms.AnchorStyles.Left) 194 196 | System.Windows.Forms.AnchorStyles.Right))); 197 this.viewHost.Caption = "View"; 195 198 this.viewHost.Content = null; 196 199 this.viewHost.Location = new System.Drawing.Point(6, 19); 197 200 this.viewHost.Name = "viewHost"; 201 this.viewHost.ReadOnly = false; 198 202 this.viewHost.Size = new System.Drawing.Size(254, 310); 199 203 this.viewHost.TabIndex = 0; 204 this.viewHost.ViewType = null; 200 205 // 201 206 // itemsGroupBox … … 209 214 this.itemsGroupBox.TabStop = false; 210 215 this.itemsGroupBox.Text = "Items"; 216 // 217 // showDetailsCheckBox 218 // 219 this.showDetailsCheckBox.Appearance = System.Windows.Forms.Appearance.Button; 220 this.showDetailsCheckBox.Checked = true; 221 this.showDetailsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; 222 this.showDetailsCheckBox.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Properties; 223 this.showDetailsCheckBox.Location = new System.Drawing.Point(123, 3); 224 this.showDetailsCheckBox.Name = "showDetailsCheckBox"; 225 this.showDetailsCheckBox.Size = new System.Drawing.Size(24, 24); 226 this.showDetailsCheckBox.TabIndex = 4; 227 this.toolTip.SetToolTip(this.showDetailsCheckBox, "Show/Hide Details"); 228 this.showDetailsCheckBox.UseVisualStyleBackColor = true; 229 this.showDetailsCheckBox.CheckedChanged += new System.EventHandler(this.showDetailsCheckBox_CheckedChanged); 211 230 // 212 231 // ItemCollectionView … … 239 258 protected Button sortAscendingButton; 240 259 protected Button sortDescendingButton; 260 protected CheckBox showDetailsCheckBox; 241 261 } 242 262 } -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemCollectionView.cs
r4068 r4096 158 158 removeButton.Enabled = (Content != null) && !Content.IsReadOnly && !ReadOnly && itemsListView.SelectedItems.Count > 0; 159 159 AdjustListViewColumnSizes(); 160 if (itemsListView.SelectedItems.Count == 1) { 161 T item = (T)itemsListView.SelectedItems[0].Tag; 162 detailsGroupBox.Enabled = true; 163 viewHost.Content = item; 164 } else { 165 viewHost.Content = null; 166 detailsGroupBox.Enabled = false; 160 if (showDetailsCheckBox.Checked) { 161 if (itemsListView.SelectedItems.Count == 1) { 162 T item = (T)itemsListView.SelectedItems[0].Tag; 163 detailsGroupBox.Enabled = true; 164 viewHost.Content = item; 165 } else { 166 viewHost.Content = null; 167 detailsGroupBox.Enabled = false; 168 } 167 169 } 168 170 } … … 242 244 #endregion 243 245 246 #region CheckBox Events 247 protected virtual void showDetailsCheckBox_CheckedChanged(object sender, EventArgs e) { 248 if (showDetailsCheckBox.Checked) { 249 splitContainer.Panel2Collapsed = false; 250 detailsGroupBox.Enabled = itemsListView.SelectedItems.Count == 1; 251 viewHost.Content = itemsListView.SelectedItems.Count == 1 ? (T)itemsListView.SelectedItems[0].Tag : null; 252 } else { 253 splitContainer.Panel2Collapsed = true; 254 viewHost.Content = null; 255 viewHost.ClearCache(); 256 } 257 } 258 #endregion 259 244 260 #region Content Events 245 261 protected virtual void Content_ItemsAdded(object sender, CollectionItemsChangedEventArgs<T> e) { -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemListView.Designer.cs
r4069 r4096 106 106 this.showDetailsCheckBox.Name = "showDetailsCheckBox"; 107 107 this.showDetailsCheckBox.Size = new System.Drawing.Size(24, 24); 108 this.showDetailsCheckBox.TabIndex = 5;108 this.showDetailsCheckBox.TabIndex = 4; 109 109 this.toolTip.SetToolTip(this.showDetailsCheckBox, "Show/Hide Details"); 110 110 this.showDetailsCheckBox.UseVisualStyleBackColor = true; … … 162 162 this.itemsListView.Size = new System.Drawing.Size(194, 286); 163 163 this.itemsListView.SmallImageList = this.imageList; 164 this.itemsListView.TabIndex = 4;164 this.itemsListView.TabIndex = 5; 165 165 this.itemsListView.UseCompatibleStateImageBehavior = false; 166 166 this.itemsListView.View = System.Windows.Forms.View.Details; -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemListView.cs
r4069 r4096 304 304 305 305 #region CheckBox Events 306 private class DummyContent : HeuristicLab.Common.IContent { } 307 protected void showDetailsCheckBox_CheckedChanged(object sender, EventArgs e) { 306 protected virtual void showDetailsCheckBox_CheckedChanged(object sender, EventArgs e) { 308 307 if (showDetailsCheckBox.Checked) { 309 308 splitContainer.Panel2Collapsed = false; … … 312 311 } else { 313 312 splitContainer.Panel2Collapsed = true; 314 viewHost.Content = new DummyContent(); 313 viewHost.Content = null; 314 viewHost.ClearCache(); 315 315 } 316 316 } -
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.Designer.cs
r4068 r4096 54 54 this.components = new System.ComponentModel.Container(); 55 55 this.splitContainer = new System.Windows.Forms.SplitContainer(); 56 this.showDetailsCheckBox = new System.Windows.Forms.CheckBox(); 57 this.clearButton = new System.Windows.Forms.Button(); 56 58 this.toolStrip = new System.Windows.Forms.ToolStrip(); 57 59 this.analyzeRunsToolStripDropDownButton = new System.Windows.Forms.ToolStripDropDownButton(); 58 60 this.itemsListView = new System.Windows.Forms.ListView(); 59 this.columnHeader1 = new System.Windows.Forms.ColumnHeader();61 this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 60 62 this.imageList = new System.Windows.Forms.ImageList(this.components); 61 63 this.removeButton = new System.Windows.Forms.Button(); … … 67 69 this.runPage = new System.Windows.Forms.TabPage(); 68 70 this.constraintPage = new System.Windows.Forms.TabPage(); 69 this.runCollectionConstraintCollectionView = new RunCollectionConstraintCollectionView(); 70 this.clearButton = new System.Windows.Forms.Button(); 71 this.runCollectionConstraintCollectionView = new HeuristicLab.Optimization.Views.RunCollectionConstraintCollectionView(); 71 72 this.splitContainer.Panel1.SuspendLayout(); 72 73 this.splitContainer.Panel2.SuspendLayout(); … … 89 90 // splitContainer.Panel1 90 91 // 92 this.splitContainer.Panel1.Controls.Add(this.showDetailsCheckBox); 91 93 this.splitContainer.Panel1.Controls.Add(this.clearButton); 92 94 this.splitContainer.Panel1.Controls.Add(this.toolStrip); … … 101 103 this.splitContainer.SplitterDistance = 250; 102 104 this.splitContainer.TabIndex = 0; 105 // 106 // showDetailsCheckBox 107 // 108 this.showDetailsCheckBox.Appearance = System.Windows.Forms.Appearance.Button; 109 this.showDetailsCheckBox.Checked = true; 110 this.showDetailsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; 111 this.showDetailsCheckBox.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Properties; 112 this.showDetailsCheckBox.Location = new System.Drawing.Point(87, 3); 113 this.showDetailsCheckBox.Name = "showDetailsCheckBox"; 114 this.showDetailsCheckBox.Size = new System.Drawing.Size(24, 24); 115 this.showDetailsCheckBox.TabIndex = 2; 116 this.toolTip.SetToolTip(this.showDetailsCheckBox, "Show/Hide Details"); 117 this.showDetailsCheckBox.UseVisualStyleBackColor = true; 118 this.showDetailsCheckBox.CheckedChanged += new System.EventHandler(this.showDetailsCheckBox_CheckedChanged); 119 // 120 // clearButton 121 // 122 this.clearButton.Enabled = false; 123 this.clearButton.Location = new System.Drawing.Point(33, 3); 124 this.clearButton.Name = "clearButton"; 125 this.clearButton.Size = new System.Drawing.Size(48, 24); 126 this.clearButton.TabIndex = 1; 127 this.clearButton.Text = "&Clear"; 128 this.toolTip.SetToolTip(this.clearButton, "Remove All Runs"); 129 this.clearButton.UseVisualStyleBackColor = true; 130 this.clearButton.Click += new System.EventHandler(this.clearButton_Click); 103 131 // 104 132 // toolStrip … … 111 139 this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 112 140 this.analyzeRunsToolStripDropDownButton}); 113 this.toolStrip.Location = new System.Drawing.Point( 30, 3);141 this.toolStrip.Location = new System.Drawing.Point(114, 3); 114 142 this.toolStrip.Name = "toolStrip"; 115 this.toolStrip.Size = new System.Drawing.Size(1 66, 24);116 this.toolStrip.TabIndex = 1;143 this.toolStrip.Size = new System.Drawing.Size(133, 24); 144 this.toolStrip.TabIndex = 3; 117 145 this.toolStrip.Text = "toolStrip1"; 118 146 // … … 141 169 this.itemsListView.Size = new System.Drawing.Size(244, 295); 142 170 this.itemsListView.SmallImageList = this.imageList; 143 this.itemsListView.TabIndex = 3;171 this.itemsListView.TabIndex = 4; 144 172 this.itemsListView.UseCompatibleStateImageBehavior = false; 145 173 this.itemsListView.View = System.Windows.Forms.View.Details; 174 this.itemsListView.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.itemsListView_ItemDrag); 146 175 this.itemsListView.SelectedIndexChanged += new System.EventHandler(this.itemsListView_SelectedIndexChanged); 147 this.itemsListView.DoubleClick += new System.EventHandler(this.itemsListView_DoubleClick);148 176 this.itemsListView.DragDrop += new System.Windows.Forms.DragEventHandler(this.itemsListView_DragDrop); 149 177 this.itemsListView.DragEnter += new System.Windows.Forms.DragEventHandler(this.itemsListView_DragEnterOver); 178 this.itemsListView.DragOver += new System.Windows.Forms.DragEventHandler(this.itemsListView_DragEnterOver); 179 this.itemsListView.DoubleClick += new System.EventHandler(this.itemsListView_DoubleClick); 150 180 this.itemsListView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.itemsListView_KeyDown); 151 this.itemsListView.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.itemsListView_ItemDrag);152 this.itemsListView.DragOver += new System.Windows.Forms.DragEventHandler(this.itemsListView_DragEnterOver);153 181 // 154 182 // imageList … … 188 216 | System.Windows.Forms.AnchorStyles.Left) 189 217 | System.Windows.Forms.AnchorStyles.Right))); 218 this.viewHost.Caption = "View"; 190 219 this.viewHost.Content = null; 191 220 this.viewHost.Location = new System.Drawing.Point(6, 19); … … 242 271 // runCollectionConstraintCollectionView 243 272 // 273 this.runCollectionConstraintCollectionView.Caption = "ConstraintCollection View"; 244 274 this.runCollectionConstraintCollectionView.Content = null; 245 275 this.runCollectionConstraintCollectionView.Dock = System.Windows.Forms.DockStyle.Fill; … … 249 279 this.runCollectionConstraintCollectionView.Size = new System.Drawing.Size(518, 351); 250 280 this.runCollectionConstraintCollectionView.TabIndex = 0; 251 //252 // clearButton253 //254 this.clearButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));255 this.clearButton.Enabled = false;256 this.clearButton.Location = new System.Drawing.Point(199, 3);257 this.clearButton.Name = "clearButton";258 this.clearButton.Size = new System.Drawing.Size(48, 24);259 this.clearButton.TabIndex = 2;260 this.clearButton.Text = "&Clear";261 this.toolTip.SetToolTip(this.clearButton, "Remove All Runs");262 this.clearButton.UseVisualStyleBackColor = true;263 this.clearButton.Click += new System.EventHandler(this.clearButton_Click);264 281 // 265 282 // RunCollectionView … … 301 318 protected RunCollectionConstraintCollectionView runCollectionConstraintCollectionView; 302 319 protected Button clearButton; 320 protected CheckBox showDetailsCheckBox; 303 321 } 304 322 } -
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.cs
r4068 r4096 187 187 removeButton.Enabled = itemsListView.SelectedItems.Count > 0 && (Content != null) && !Content.IsReadOnly && !ReadOnly; 188 188 AdjustListViewColumnSizes(); 189 if (itemsListView.SelectedItems.Count == 1) { 190 IRun item = (IRun)itemsListView.SelectedItems[0].Tag; 191 detailsGroupBox.Enabled = true; 192 viewHost.Content = item; 193 } else { 194 viewHost.Content = null; 195 detailsGroupBox.Enabled = false; 189 if (showDetailsCheckBox.Checked) { 190 if (itemsListView.SelectedItems.Count == 1) { 191 IRun item = (IRun)itemsListView.SelectedItems[0].Tag; 192 detailsGroupBox.Enabled = true; 193 viewHost.Content = item; 194 } else { 195 viewHost.Content = null; 196 detailsGroupBox.Enabled = false; 197 } 196 198 } 197 199 } … … 272 274 #endregion 273 275 276 #region CheckBox Events 277 protected virtual void showDetailsCheckBox_CheckedChanged(object sender, EventArgs e) { 278 if (showDetailsCheckBox.Checked) { 279 splitContainer.Panel2Collapsed = false; 280 detailsGroupBox.Enabled = itemsListView.SelectedItems.Count == 1; 281 viewHost.Content = itemsListView.SelectedItems.Count == 1 ? (IRun)itemsListView.SelectedItems[0].Tag : null; 282 } else { 283 splitContainer.Panel2Collapsed = true; 284 viewHost.Content = null; 285 viewHost.ClearCache(); 286 } 287 } 288 #endregion 289 274 290 #region Content Events 275 291 protected virtual void Content_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IRun> e) { … … 375 391 } 376 392 } 377 -
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunView.Designer.cs
r3766 r4096 46 46 private void InitializeComponent() { 47 47 this.components = new System.ComponentModel.Container(); 48 System.Windows.Forms.ListViewGroup listViewGroup 3= new System.Windows.Forms.ListViewGroup("Results", System.Windows.Forms.HorizontalAlignment.Left);49 System.Windows.Forms.ListViewGroup listViewGroup 4= new System.Windows.Forms.ListViewGroup("Parameters", System.Windows.Forms.HorizontalAlignment.Left);48 System.Windows.Forms.ListViewGroup listViewGroup1 = new System.Windows.Forms.ListViewGroup("Results", System.Windows.Forms.HorizontalAlignment.Left); 49 System.Windows.Forms.ListViewGroup listViewGroup2 = new System.Windows.Forms.ListViewGroup("Parameters", System.Windows.Forms.HorizontalAlignment.Left); 50 50 this.parametersResultsGroupBox = new System.Windows.Forms.GroupBox(); 51 51 this.splitContainer = new System.Windows.Forms.SplitContainer(); 52 52 this.listView = new System.Windows.Forms.ListView(); 53 this.nameColumnHeader = new System.Windows.Forms.ColumnHeader();54 this.valueColumnHeader = new System.Windows.Forms.ColumnHeader();53 this.nameColumnHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 54 this.valueColumnHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 55 55 this.imageList = new System.Windows.Forms.ImageList(this.components); 56 56 this.detailsGroupBox = new System.Windows.Forms.GroupBox(); … … 59 59 this.changeColorButton = new System.Windows.Forms.Button(); 60 60 this.colorLabel = new System.Windows.Forms.Label(); 61 this.colorPictureBox = new System.Windows.Forms.PictureBox();62 61 this.colorDialog = new System.Windows.Forms.ColorDialog(); 62 this.showDetailsCheckBox = new System.Windows.Forms.CheckBox(); 63 this.colorArea = new System.Windows.Forms.Label(); 63 64 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 64 65 this.parametersResultsGroupBox.SuspendLayout(); … … 67 68 this.splitContainer.SuspendLayout(); 68 69 this.detailsGroupBox.SuspendLayout(); 69 ((System.ComponentModel.ISupportInitialize)(this.colorPictureBox)).BeginInit();70 70 this.SuspendLayout(); 71 71 // … … 86 86 | System.Windows.Forms.AnchorStyles.Right))); 87 87 this.parametersResultsGroupBox.Controls.Add(this.splitContainer); 88 this.parametersResultsGroupBox.Location = new System.Drawing.Point(0, 79);88 this.parametersResultsGroupBox.Location = new System.Drawing.Point(0, 82); 89 89 this.parametersResultsGroupBox.Name = "parametersResultsGroupBox"; 90 this.parametersResultsGroupBox.Size = new System.Drawing.Size(495, 24 5);91 this.parametersResultsGroupBox.TabIndex = 4;90 this.parametersResultsGroupBox.Size = new System.Drawing.Size(495, 242); 91 this.parametersResultsGroupBox.TabIndex = 8; 92 92 this.parametersResultsGroupBox.TabStop = false; 93 93 this.parametersResultsGroupBox.Text = "Parameters && Results"; … … 106 106 // 107 107 this.splitContainer.Panel2.Controls.Add(this.detailsGroupBox); 108 this.splitContainer.Size = new System.Drawing.Size(489, 22 6);108 this.splitContainer.Size = new System.Drawing.Size(489, 223); 109 109 this.splitContainer.SplitterDistance = 177; 110 110 this.splitContainer.TabIndex = 0; … … 119 119 this.valueColumnHeader}); 120 120 this.listView.FullRowSelect = true; 121 listViewGroup 3.Header = "Results";122 listViewGroup 3.Name = "resultsGroup";123 listViewGroup 4.Header = "Parameters";124 listViewGroup 4.Name = "parametersGroup";121 listViewGroup1.Header = "Results"; 122 listViewGroup1.Name = "resultsGroup"; 123 listViewGroup2.Header = "Parameters"; 124 listViewGroup2.Name = "parametersGroup"; 125 125 this.listView.Groups.AddRange(new System.Windows.Forms.ListViewGroup[] { 126 listViewGroup 3,127 listViewGroup 4});126 listViewGroup1, 127 listViewGroup2}); 128 128 this.listView.HideSelection = false; 129 129 this.listView.Location = new System.Drawing.Point(3, 3); … … 131 131 this.listView.Name = "listView"; 132 132 this.listView.ShowItemToolTips = true; 133 this.listView.Size = new System.Drawing.Size(171, 2 20);133 this.listView.Size = new System.Drawing.Size(171, 217); 134 134 this.listView.SmallImageList = this.imageList; 135 135 this.listView.Sorting = System.Windows.Forms.SortOrder.Ascending; … … 137 137 this.listView.UseCompatibleStateImageBehavior = false; 138 138 this.listView.View = System.Windows.Forms.View.Details; 139 this.listView.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.listView_ItemDrag); 139 140 this.listView.SelectedIndexChanged += new System.EventHandler(this.listView_SelectedIndexChanged); 140 141 this.listView.DoubleClick += new System.EventHandler(this.listView_DoubleClick); 141 this.listView.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.listView_ItemDrag);142 142 // 143 143 // nameColumnHeader … … 163 163 this.detailsGroupBox.Location = new System.Drawing.Point(3, 3); 164 164 this.detailsGroupBox.Name = "detailsGroupBox"; 165 this.detailsGroupBox.Size = new System.Drawing.Size(302, 2 20);165 this.detailsGroupBox.Size = new System.Drawing.Size(302, 217); 166 166 this.detailsGroupBox.TabIndex = 0; 167 167 this.detailsGroupBox.TabStop = false; … … 173 173 | System.Windows.Forms.AnchorStyles.Left) 174 174 | System.Windows.Forms.AnchorStyles.Right))); 175 this.viewHost.Caption = "View"; 175 176 this.viewHost.Content = null; 176 177 this.viewHost.Location = new System.Drawing.Point(6, 19); 177 178 this.viewHost.Name = "viewHost"; 178 179 this.viewHost.ReadOnly = true; 179 this.viewHost.Size = new System.Drawing.Size(290, 19 5);180 this.viewHost.Size = new System.Drawing.Size(290, 192); 180 181 this.viewHost.TabIndex = 0; 181 182 this.viewHost.ViewType = null; … … 188 189 this.showAlgorithmButton.Name = "showAlgorithmButton"; 189 190 this.showAlgorithmButton.Size = new System.Drawing.Size(495, 23); 190 this.showAlgorithmButton.TabIndex = 5;191 this.showAlgorithmButton.TabIndex = 9; 191 192 this.showAlgorithmButton.Text = "&Show Algorithm"; 192 193 this.toolTip.SetToolTip(this.showAlgorithmButton, "Show the algorithm which produced these results"); … … 200 201 this.changeColorButton.Location = new System.Drawing.Point(94, 52); 201 202 this.changeColorButton.Name = "changeColorButton"; 202 this.changeColorButton.Size = new System.Drawing.Size(64, 2 1);203 this.changeColorButton.TabIndex = 21;204 this.changeColorButton.Text = " Change";203 this.changeColorButton.Size = new System.Drawing.Size(64, 24); 204 this.changeColorButton.TabIndex = 6; 205 this.changeColorButton.Text = "&Change..."; 205 206 this.changeColorButton.UseVisualStyleBackColor = true; 206 207 this.changeColorButton.Click += new System.EventHandler(this.changeColorButton_Click); … … 209 210 // 210 211 this.colorLabel.AutoSize = true; 211 this.colorLabel.Location = new System.Drawing.Point(3, 5 6);212 this.colorLabel.Location = new System.Drawing.Point(3, 58); 212 213 this.colorLabel.Name = "colorLabel"; 213 214 this.colorLabel.Size = new System.Drawing.Size(34, 13); 214 this.colorLabel.TabIndex = 22; 215 this.colorLabel.Text = "Color:"; 216 // 217 // colorPictureBox 218 // 219 this.colorPictureBox.Location = new System.Drawing.Point(73, 54); 220 this.colorPictureBox.Name = "colorPictureBox"; 221 this.colorPictureBox.Size = new System.Drawing.Size(17, 17); 222 this.colorPictureBox.TabIndex = 23; 223 this.colorPictureBox.TabStop = false; 215 this.colorLabel.TabIndex = 4; 216 this.colorLabel.Text = "C&olor:"; 217 // 218 // showDetailsCheckBox 219 // 220 this.showDetailsCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 221 this.showDetailsCheckBox.Appearance = System.Windows.Forms.Appearance.Button; 222 this.showDetailsCheckBox.Checked = true; 223 this.showDetailsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; 224 this.showDetailsCheckBox.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Properties; 225 this.showDetailsCheckBox.Location = new System.Drawing.Point(471, 52); 226 this.showDetailsCheckBox.Name = "showDetailsCheckBox"; 227 this.showDetailsCheckBox.Size = new System.Drawing.Size(24, 24); 228 this.showDetailsCheckBox.TabIndex = 7; 229 this.toolTip.SetToolTip(this.showDetailsCheckBox, "Show/Hide Details"); 230 this.showDetailsCheckBox.UseVisualStyleBackColor = true; 231 this.showDetailsCheckBox.CheckedChanged += new System.EventHandler(this.showDetailsCheckBox_CheckedChanged); 232 // 233 // colorArea 234 // 235 this.colorArea.BackColor = System.Drawing.Color.White; 236 this.colorArea.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 237 this.colorArea.Location = new System.Drawing.Point(72, 56); 238 this.colorArea.Name = "colorArea"; 239 this.colorArea.Size = new System.Drawing.Size(16, 16); 240 this.colorArea.TabIndex = 5; 224 241 // 225 242 // RunView … … 227 244 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 228 245 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 229 this.Controls.Add(this.colorPictureBox); 246 this.Controls.Add(this.colorArea); 247 this.Controls.Add(this.showDetailsCheckBox); 230 248 this.Controls.Add(this.colorLabel); 231 249 this.Controls.Add(this.changeColorButton); … … 242 260 this.Controls.SetChildIndex(this.changeColorButton, 0); 243 261 this.Controls.SetChildIndex(this.colorLabel, 0); 244 this.Controls.SetChildIndex(this.colorPictureBox, 0); 262 this.Controls.SetChildIndex(this.showDetailsCheckBox, 0); 263 this.Controls.SetChildIndex(this.colorArea, 0); 245 264 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 246 265 this.parametersResultsGroupBox.ResumeLayout(false); … … 249 268 this.splitContainer.ResumeLayout(false); 250 269 this.detailsGroupBox.ResumeLayout(false); 251 ((System.ComponentModel.ISupportInitialize)(this.colorPictureBox)).EndInit();252 270 this.ResumeLayout(false); 253 271 this.PerformLayout(); … … 268 286 private System.Windows.Forms.Label colorLabel; 269 287 private System.Windows.Forms.Button changeColorButton; 270 private System.Windows.Forms.PictureBox colorPictureBox;271 288 private System.Windows.Forms.ColorDialog colorDialog; 289 private System.Windows.Forms.CheckBox showDetailsCheckBox; 290 private System.Windows.Forms.Label colorArea; 272 291 273 292 } -
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunView.cs
r4068 r4096 21 21 22 22 using System; 23 using System.Drawing;24 23 using System.Windows.Forms; 25 24 using HeuristicLab.Common; … … 64 63 this.Invoke(new EventHandler(Content_Changed), sender, e); 65 64 else 66 UpdateColor PictureBox();65 UpdateColor(); 67 66 } 68 67 … … 71 70 viewHost.Content = null; 72 71 if (Content != null) 73 UpdateColor PictureBox();72 UpdateColor(); 74 73 FillListView(); 75 74 } … … 88 87 } 89 88 } 90 private void UpdateColor PictureBox() {89 private void UpdateColor() { 91 90 this.colorDialog.Color = this.Content.Color; 92 this.colorPictureBox.Image = this.GenerateImage(colorPictureBox.Width, colorPictureBox.Height, this.Content.Color); 93 } 94 private Image GenerateImage(int width, int height, Color fillColor) { 95 Image colorImage = new Bitmap(width, height); 96 using (Graphics gfx = Graphics.FromImage(colorImage)) { 97 using (SolidBrush brush = new SolidBrush(fillColor)) { 98 gfx.FillRectangle(brush, 0, 0, width, height); 99 } 100 } 101 return colorImage; 91 this.colorArea.BackColor = this.Content.Color; 102 92 } 103 93 … … 132 122 133 123 private void listView_SelectedIndexChanged(object sender, EventArgs e) { 134 if (listView.SelectedItems.Count == 1) 135 viewHost.Content = (IContent)listView.SelectedItems[0].Tag; 136 else 137 viewHost.Content = null; 124 if (showDetailsCheckBox.Checked) { 125 if (listView.SelectedItems.Count == 1) { 126 detailsGroupBox.Enabled = true; 127 viewHost.Content = listView.SelectedItems[0].Tag as IContent; 128 } else { 129 viewHost.Content = null; 130 detailsGroupBox.Enabled = false; 131 } 132 } 138 133 } 139 134 private void listView_DoubleClick(object sender, EventArgs e) { … … 159 154 } 160 155 } 156 private void showDetailsCheckBox_CheckedChanged(object sender, EventArgs e) { 157 if (showDetailsCheckBox.Checked) { 158 splitContainer.Panel2Collapsed = false; 159 detailsGroupBox.Enabled = listView.SelectedItems.Count == 1; 160 viewHost.Content = listView.SelectedItems.Count == 1 ? (IContent)listView.SelectedItems[0].Tag : null; 161 } else { 162 splitContainer.Panel2Collapsed = true; 163 viewHost.Content = null; 164 viewHost.ClearCache(); 165 } 166 } 161 167 private void showAlgorithmButton_Click(object sender, EventArgs e) { 162 168 if (!Locked) {
Note: See TracChangeset
for help on using the changeset viewer.