Changeset 4096 for trunk/sources/HeuristicLab.Core.Views/3.3
- Timestamp:
- 07/25/10 00:29:17 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Core.Views/3.3
- Files:
-
- 6 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 }
Note: See TracChangeset
for help on using the changeset viewer.