Changeset 2740 for trunk/sources/HeuristicLab.Parameters.Views
- Timestamp:
- 02/03/10 04:43:06 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Parameters.Views/3.3
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Parameters.Views/3.3/HeuristicLab.Parameters.Views-3.3.csproj
r2714 r2740 51 51 </ItemGroup> 52 52 <ItemGroup> 53 <Compile Include="SubScopesItemParameterView.cs"> 54 <SubType>UserControl</SubType> 55 </Compile> 56 <Compile Include="SubScopesItemParameterView.Designer.cs"> 57 <DependentUpon>SubScopesItemParameterView.cs</DependentUpon> 58 </Compile> 59 <Compile Include="OperatorParameterView.cs"> 60 <SubType>UserControl</SubType> 61 </Compile> 62 <Compile Include="OperatorParameterView.Designer.cs"> 63 <DependentUpon>OperatorParameterView.cs</DependentUpon> 64 </Compile> 53 65 <Compile Include="HeuristicLabParametersViewsPlugin.cs" /> 54 66 <Compile Include="ItemParameterView.cs"> -
trunk/sources/HeuristicLab.Parameters.Views/3.3/ItemParameterView.Designer.cs
r2715 r2740 47 47 private void InitializeComponent() { 48 48 this.components = new System.ComponentModel.Container(); 49 this. valueGroupBox = new System.Windows.Forms.GroupBox();50 this. valuePanel = new System.Windows.Forms.Panel();49 this.localValueGroupBox = new System.Windows.Forms.GroupBox(); 50 this.localValuePanel = new System.Windows.Forms.Panel(); 51 51 this.viewHost = new HeuristicLab.Core.Views.ViewHost(); 52 this.clear ValueButton = new System.Windows.Forms.Button();53 this.set ValueButton = new System.Windows.Forms.Button();52 this.clearLocalValueButton = new System.Windows.Forms.Button(); 53 this.setLocalValueButton = new System.Windows.Forms.Button(); 54 54 this.actualNameTextBox = new System.Windows.Forms.TextBox(); 55 55 this.actualNameLabel = new System.Windows.Forms.Label(); 56 56 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 57 57 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 58 this. valueGroupBox.SuspendLayout();59 this. valuePanel.SuspendLayout();58 this.localValueGroupBox.SuspendLayout(); 59 this.localValuePanel.SuspendLayout(); 60 60 this.SuspendLayout(); 61 61 // … … 89 89 this.descriptionTextBox.TabIndex = 5; 90 90 // 91 // valueGroupBox92 // 93 this. valueGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)91 // localValueGroupBox 92 // 93 this.localValueGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 94 94 | System.Windows.Forms.AnchorStyles.Left) 95 95 | System.Windows.Forms.AnchorStyles.Right))); 96 this. valueGroupBox.Controls.Add(this.valuePanel);97 this. valueGroupBox.Controls.Add(this.clearValueButton);98 this. valueGroupBox.Controls.Add(this.setValueButton);99 this. valueGroupBox.Location = new System.Drawing.Point(0, 146);100 this. valueGroupBox.Name = "valueGroupBox";101 this. valueGroupBox.Size = new System.Drawing.Size(386, 169);102 this. valueGroupBox.TabIndex = 10;103 this. valueGroupBox.TabStop = false;104 this. valueGroupBox.Text = "&Value:";105 // 106 // valuePanel107 // 108 this. valuePanel.AllowDrop = true;109 this. valuePanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)96 this.localValueGroupBox.Controls.Add(this.localValuePanel); 97 this.localValueGroupBox.Controls.Add(this.clearLocalValueButton); 98 this.localValueGroupBox.Controls.Add(this.setLocalValueButton); 99 this.localValueGroupBox.Location = new System.Drawing.Point(0, 146); 100 this.localValueGroupBox.Name = "localValueGroupBox"; 101 this.localValueGroupBox.Size = new System.Drawing.Size(386, 169); 102 this.localValueGroupBox.TabIndex = 10; 103 this.localValueGroupBox.TabStop = false; 104 this.localValueGroupBox.Text = "Local &Value:"; 105 // 106 // localValuePanel 107 // 108 this.localValuePanel.AllowDrop = true; 109 this.localValuePanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 110 110 | System.Windows.Forms.AnchorStyles.Left) 111 111 | System.Windows.Forms.AnchorStyles.Right))); 112 this. valuePanel.Controls.Add(this.viewHost);113 this. valuePanel.Location = new System.Drawing.Point(6, 48);114 this. valuePanel.Name = "valuePanel";115 this. valuePanel.Size = new System.Drawing.Size(374, 115);116 this. valuePanel.TabIndex = 0;117 this. valuePanel.DragOver += new System.Windows.Forms.DragEventHandler(this.valuePanel_DragEnterOver);118 this. valuePanel.DragDrop += new System.Windows.Forms.DragEventHandler(this.valuePanel_DragDrop);119 this. valuePanel.DragEnter += new System.Windows.Forms.DragEventHandler(this.valuePanel_DragEnterOver);112 this.localValuePanel.Controls.Add(this.viewHost); 113 this.localValuePanel.Location = new System.Drawing.Point(6, 48); 114 this.localValuePanel.Name = "localValuePanel"; 115 this.localValuePanel.Size = new System.Drawing.Size(374, 115); 116 this.localValuePanel.TabIndex = 0; 117 this.localValuePanel.DragOver += new System.Windows.Forms.DragEventHandler(this.localValuePanel_DragEnterOver); 118 this.localValuePanel.DragDrop += new System.Windows.Forms.DragEventHandler(this.localValuePanel_DragDrop); 119 this.localValuePanel.DragEnter += new System.Windows.Forms.DragEventHandler(this.localValuePanel_DragEnterOver); 120 120 // 121 121 // viewHost 122 122 // 123 this.viewHost.Content = null; 123 124 this.viewHost.Dock = System.Windows.Forms.DockStyle.Fill; 124 125 this.viewHost.Location = new System.Drawing.Point(0, 0); 125 126 this.viewHost.Name = "viewHost"; 126 this.viewHost.Content = null;127 127 this.viewHost.Size = new System.Drawing.Size(374, 115); 128 128 this.viewHost.TabIndex = 0; 129 129 // 130 // clear ValueButton131 // 132 this.clear ValueButton.Enabled = false;133 this.clear ValueButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Remove;134 this.clear ValueButton.Location = new System.Drawing.Point(35, 19);135 this.clear ValueButton.Name = "clearValueButton";136 this.clear ValueButton.Size = new System.Drawing.Size(23, 23);137 this.clear ValueButton.TabIndex = 9;138 this.toolTip.SetToolTip(this.clear ValueButton, "Clear Value");139 this.clear ValueButton.UseVisualStyleBackColor = true;140 this.clear ValueButton.Click += new System.EventHandler(this.clearValueButton_Click);141 // 142 // set ValueButton143 // 144 this.set ValueButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Add;145 this.set ValueButton.Location = new System.Drawing.Point(6, 19);146 this.set ValueButton.Name = "setValueButton";147 this.set ValueButton.Size = new System.Drawing.Size(23, 23);148 this.set ValueButton.TabIndex = 8;149 this.toolTip.SetToolTip(this.set ValueButton, "Set Value");150 this.set ValueButton.UseVisualStyleBackColor = true;151 this.set ValueButton.Click += new System.EventHandler(this.setValueButton_Click);130 // clearLocalValueButton 131 // 132 this.clearLocalValueButton.Enabled = false; 133 this.clearLocalValueButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Remove; 134 this.clearLocalValueButton.Location = new System.Drawing.Point(35, 19); 135 this.clearLocalValueButton.Name = "clearLocalValueButton"; 136 this.clearLocalValueButton.Size = new System.Drawing.Size(23, 23); 137 this.clearLocalValueButton.TabIndex = 9; 138 this.toolTip.SetToolTip(this.clearLocalValueButton, "Clear Value"); 139 this.clearLocalValueButton.UseVisualStyleBackColor = true; 140 this.clearLocalValueButton.Click += new System.EventHandler(this.clearLocalValueButton_Click); 141 // 142 // setLocalValueButton 143 // 144 this.setLocalValueButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Add; 145 this.setLocalValueButton.Location = new System.Drawing.Point(6, 19); 146 this.setLocalValueButton.Name = "setLocalValueButton"; 147 this.setLocalValueButton.Size = new System.Drawing.Size(23, 23); 148 this.setLocalValueButton.TabIndex = 8; 149 this.toolTip.SetToolTip(this.setLocalValueButton, "Set Value"); 150 this.setLocalValueButton.UseVisualStyleBackColor = true; 151 this.setLocalValueButton.Click += new System.EventHandler(this.setLocalValueButton_Click); 152 152 // 153 153 // actualNameTextBox … … 174 174 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 175 175 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 176 this.Controls.Add(this. valueGroupBox);176 this.Controls.Add(this.localValueGroupBox); 177 177 this.Controls.Add(this.actualNameTextBox); 178 178 this.Controls.Add(this.actualNameLabel); … … 187 187 this.Controls.SetChildIndex(this.actualNameTextBox, 0); 188 188 this.Controls.SetChildIndex(this.nameLabel, 0); 189 this.Controls.SetChildIndex(this. valueGroupBox, 0);189 this.Controls.SetChildIndex(this.localValueGroupBox, 0); 190 190 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 191 this. valueGroupBox.ResumeLayout(false);192 this. valuePanel.ResumeLayout(false);191 this.localValueGroupBox.ResumeLayout(false); 192 this.localValuePanel.ResumeLayout(false); 193 193 this.ResumeLayout(false); 194 194 this.PerformLayout(); … … 198 198 #endregion 199 199 200 protected System.Windows.Forms.GroupBox valueGroupBox;200 protected System.Windows.Forms.GroupBox localValueGroupBox; 201 201 protected System.Windows.Forms.TextBox actualNameTextBox; 202 202 protected System.Windows.Forms.Label actualNameLabel; 203 protected System.Windows.Forms.Panel valuePanel;203 protected System.Windows.Forms.Panel localValuePanel; 204 204 protected HeuristicLab.Core.Views.ViewHost viewHost; 205 protected System.Windows.Forms.Button set ValueButton;205 protected System.Windows.Forms.Button setLocalValueButton; 206 206 protected System.Windows.Forms.ToolTip toolTip; 207 protected System.Windows.Forms.Button clear ValueButton;207 protected System.Windows.Forms.Button clearLocalValueButton; 208 208 } 209 209 } -
trunk/sources/HeuristicLab.Parameters.Views/3.3/ItemParameterView.cs
r2727 r2740 54 54 public ItemParameterView() { 55 55 InitializeComponent(); 56 Caption = " Parameter";56 Caption = "ItemParameter"; 57 57 } 58 58 /// <summary> … … 72 72 protected override void DeregisterContentEvents() { 73 73 Content.ActualNameChanged -= new EventHandler(Content_ActualNameChanged); 74 Content. ValueChanged -= new EventHandler(Content_ValueChanged);74 Content.LocalValueChanged -= new EventHandler(Content_LocalValueChanged); 75 75 base.DeregisterContentEvents(); 76 76 } … … 83 83 base.RegisterContentEvents(); 84 84 Content.ActualNameChanged += new EventHandler(Content_ActualNameChanged); 85 Content. ValueChanged += new EventHandler(Content_ValueChanged);85 Content.LocalValueChanged += new EventHandler(Content_LocalValueChanged); 86 86 } 87 87 … … 89 89 base.OnContentChanged(); 90 90 if (Content == null) { 91 Caption = " Parameter";91 Caption = "ItemParameter"; 92 92 actualNameTextBox.Text = "-"; 93 93 actualNameTextBox.Enabled = false; 94 set ValueButton.Enabled = false;95 clear ValueButton.Enabled = false;96 valueGroupBox.Enabled = false;94 setLocalValueButton.Enabled = false; 95 clearLocalValueButton.Enabled = false; 96 localValueGroupBox.Enabled = false; 97 97 viewHost.Content = null; 98 98 } else { 99 99 Caption = Content.Name + " (" + Content.GetType().Name + ")"; 100 100 actualNameTextBox.Text = Content.ActualName; 101 actualNameTextBox.Enabled = Content. Value == null;102 set ValueButton.Enabled = Content.Value == null;103 clear ValueButton.Enabled = Content.Value != null;104 valueGroupBox.Enabled = true;105 viewHost.Content = Content. Value;101 actualNameTextBox.Enabled = Content.LocalValue == null; 102 setLocalValueButton.Enabled = Content.LocalValue == null; 103 clearLocalValueButton.Enabled = Content.LocalValue != null; 104 localValueGroupBox.Enabled = true; 105 viewHost.Content = Content.LocalValue; 106 106 } 107 107 } … … 113 113 actualNameTextBox.Text = Content.ActualName; 114 114 } 115 protected virtual void Content_ ValueChanged(object sender, EventArgs e) {115 protected virtual void Content_LocalValueChanged(object sender, EventArgs e) { 116 116 if (InvokeRequired) 117 Invoke(new EventHandler(Content_ ValueChanged), sender, e);117 Invoke(new EventHandler(Content_LocalValueChanged), sender, e); 118 118 else { 119 actualNameTextBox.Enabled = Content. Value == null;120 set ValueButton.Enabled = Content.Value == null;121 clear ValueButton.Enabled = Content.Value != null;122 viewHost.Content = Content. Value;119 actualNameTextBox.Enabled = Content.LocalValue == null; 120 setLocalValueButton.Enabled = Content.LocalValue == null; 121 clearLocalValueButton.Enabled = Content.LocalValue != null; 122 viewHost.Content = Content.LocalValue; 123 123 } 124 124 } … … 127 127 Content.ActualName = actualNameTextBox.Text; 128 128 } 129 protected virtual void set ValueButton_Click(object sender, EventArgs e) {129 protected virtual void setLocalValueButton_Click(object sender, EventArgs e) { 130 130 if (typeSelectorDialog == null) { 131 131 typeSelectorDialog = new TypeSelectorDialog(); 132 typeSelectorDialog.Caption = "Select Value Type";132 typeSelectorDialog.Caption = "Select Local Value Type"; 133 133 } 134 134 typeSelectorDialog.TypeSelector.Configure(Content.DataType, false, false); 135 135 if (typeSelectorDialog.ShowDialog(this) == DialogResult.OK) 136 Content. Value = (T)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType();136 Content.LocalValue = (T)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType(); 137 137 } 138 protected virtual void clear ValueButton_Click(object sender, EventArgs e) {139 Content. Value = null;138 protected virtual void clearLocalValueButton_Click(object sender, EventArgs e) { 139 Content.LocalValue = null; 140 140 } 141 protected virtual void valuePanel_DragEnterOver(object sender, DragEventArgs e) {141 protected virtual void localValuePanel_DragEnterOver(object sender, DragEventArgs e) { 142 142 e.Effect = DragDropEffects.None; 143 143 Type type = e.Data.GetData("Type") as Type; … … 150 150 } 151 151 } 152 protected virtual void valuePanel_DragDrop(object sender, DragEventArgs e) {152 protected virtual void localValuePanel_DragDrop(object sender, DragEventArgs e) { 153 153 if (e.Effect != DragDropEffects.None) { 154 154 T item = e.Data.GetData("Value") as T; 155 155 if ((e.Effect & DragDropEffects.Copy) == DragDropEffects.Copy) item = (T)item.Clone(); 156 Content. Value = item;156 Content.LocalValue = item; 157 157 } 158 158 }
Note: See TracChangeset
for help on using the changeset viewer.