Changeset 2788
- Timestamp:
- 02/12/10 15:37:36 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.GP/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.GP/3.3/FunctionLibraryEditor.Designer.cs
r2729 r2788 54 54 this.functionDetailsGroupBox = new System.Windows.Forms.GroupBox(); 55 55 this.functionDetailsPanel = new System.Windows.Forms.Panel(); 56 this.functionsComboBox = new System.Windows.Forms.ComboBox();57 56 this.initializationTabPage = new System.Windows.Forms.TabPage(); 58 57 this.initSplitContainer = new System.Windows.Forms.SplitContainer(); … … 144 143 | System.Windows.Forms.AnchorStyles.Right))); 145 144 this.functionsListView.Location = new System.Drawing.Point(6, 19); 145 this.functionsListView.MultiSelect = false; 146 146 this.functionsListView.Name = "functionsListView"; 147 147 this.functionsListView.Size = new System.Drawing.Size(218, 475); … … 150 150 this.functionsListView.View = System.Windows.Forms.View.List; 151 151 this.functionsListView.SelectedIndexChanged += new System.EventHandler(this.functionsListView_SelectedIndexChanged); 152 this.functionsListView.MouseUp += new System.Windows.Forms.MouseEventHandler(this.functionsListView_MouseUp); 152 153 this.functionsListView.KeyUp += new System.Windows.Forms.KeyEventHandler(this.functionsListView_KeyUp); 153 154 this.functionsListView.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.functionsListView_ItemDrag); … … 178 179 // 179 180 this.functionDetailsGroupBox.Controls.Add(this.functionDetailsPanel); 180 this.functionDetailsGroupBox.Controls.Add(this.functionsComboBox);181 181 this.functionDetailsGroupBox.Dock = System.Windows.Forms.DockStyle.Fill; 182 182 this.functionDetailsGroupBox.Location = new System.Drawing.Point(0, 0); … … 192 192 | System.Windows.Forms.AnchorStyles.Left) 193 193 | System.Windows.Forms.AnchorStyles.Right))); 194 this.functionDetailsPanel.Location = new System.Drawing.Point(6, 46);194 this.functionDetailsPanel.Location = new System.Drawing.Point(6, 19); 195 195 this.functionDetailsPanel.Name = "functionDetailsPanel"; 196 this.functionDetailsPanel.Size = new System.Drawing.Size(417, 477);196 this.functionDetailsPanel.Size = new System.Drawing.Size(417, 504); 197 197 this.functionDetailsPanel.TabIndex = 7; 198 //199 // functionsComboBox200 //201 this.functionsComboBox.FormattingEnabled = true;202 this.functionsComboBox.Location = new System.Drawing.Point(6, 19);203 this.functionsComboBox.Name = "functionsComboBox";204 this.functionsComboBox.Size = new System.Drawing.Size(178, 21);205 this.functionsComboBox.TabIndex = 0;206 this.functionsComboBox.SelectedIndexChanged += new System.EventHandler(this.functionsComboBox_SelectedIndexChanged);207 198 // 208 199 // initializationTabPage … … 385 376 private System.Windows.Forms.SplitContainer splitContainer; 386 377 private System.Windows.Forms.Panel functionDetailsPanel; 387 private System.Windows.Forms.ComboBox functionsComboBox;388 378 private System.Windows.Forms.GroupBox availableFunctionsGroupBox; 389 379 private System.Windows.Forms.GroupBox functionDetailsGroupBox; -
trunk/sources/HeuristicLab.GP/3.3/FunctionLibraryEditor.cs
r2729 r2788 57 57 initListView.Items.Clear(); 58 58 functionsListView.Clear(); 59 functionsComboBox.Items.Clear();60 59 foreach (IFunction fun in FunctionLibrary.Functions) { 61 60 functionsListView.Items.Add(CreateListViewItem(fun)); 62 functionsComboBox.Items.Add(fun);63 61 if (fun.Manipulator != null) { 64 62 mutationListView.Items.Add(CreateListViewItem(fun)); … … 134 132 data.SetData("DragSource", functionsListView); 135 133 DoDragDrop(data, DragDropEffects.Link); 136 }137 138 private void functionsComboBox_SelectedIndexChanged(object sender, EventArgs e) {139 if (functionsComboBox.SelectedItem != null) {140 IFunction selectedFun = (IFunction)functionsComboBox.SelectedItem;141 Control funView = (Control)selectedFun.CreateView();142 funView.Dock = DockStyle.Fill;143 functionDetailsPanel.Controls.Clear();144 functionDetailsPanel.Controls.Add(funView);145 }146 134 } 147 135 … … 320 308 } 321 309 #endregion 310 311 private void functionsListView_MouseUp(object sender, MouseEventArgs e) { 312 if (functionsListView.SelectedItems.Count > 0) { 313 IFunction selectedFun = (IFunction)functionsListView.SelectedItems[0].Tag; 314 Control funView = (Control)selectedFun.CreateView(); 315 funView.Dock = DockStyle.Fill; 316 functionDetailsPanel.Controls.Clear(); 317 functionDetailsPanel.Controls.Add(funView); 318 } 319 } 322 320 } 323 321 }
Note: See TracChangeset
for help on using the changeset viewer.