Changeset 18154 for branches/3136_Structural_GP
- Timestamp:
- 12/17/21 15:26:14 (3 years ago)
- Location:
- branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.csproj
r18146 r18154 334 334 <LastGenOutput>Resources.Designer.cs</LastGenOutput> 335 335 </EmbeddedResource> 336 <EmbeddedResource Include="StructureTemplate\StructureTemplateView.resx">337 <DependentUpon>StructureTemplateView.cs</DependentUpon>338 </EmbeddedResource>339 336 </ItemGroup> 340 337 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> -
branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/StructureTemplate/StructureTemplateView.Designer.cs
r18134 r18154 23 23 this.splitContainer = new System.Windows.Forms.SplitContainer(); 24 24 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 25 this.errorLabel = new System.Windows.Forms.Label(); 25 26 this.detailsGroupBox.SuspendLayout(); 26 27 this.templateStructureGroupBox.SuspendLayout(); … … 58 59 // templateStructureGroupBox 59 60 // 61 this.templateStructureGroupBox.Controls.Add(this.errorLabel); 60 62 this.templateStructureGroupBox.Controls.Add(this.linearScalingCheckBox); 61 63 this.templateStructureGroupBox.Controls.Add(this.infoLabel); … … 86 88 this.infoLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 87 89 this.infoLabel.BackColor = System.Drawing.Color.White; 88 this.infoLabel.Image = ((System.Drawing.Image)(resources.GetObject("infoLabel.Image")));90 this.infoLabel.Image = HeuristicLab.Common.Resources.VSImageLibrary.Information; 89 91 this.infoLabel.Location = new System.Drawing.Point(275, 22); 90 92 this.infoLabel.Name = "infoLabel"; … … 93 95 this.infoLabel.Text = " "; 94 96 this.toolTip.SetToolTip(this.infoLabel, "Double-click to open description."); 95 this.infoLabel.DoubleClick += new System.EventHandler(this. helpButton_DoubleClick);97 this.infoLabel.DoubleClick += new System.EventHandler(this.HelpButtonDoubleClick); 96 98 // 97 99 // treeChart … … 157 159 this.splitContainer.TabIndex = 10; 158 160 // 161 // errorLabel 162 // 163 this.errorLabel.AutoSize = true; 164 this.errorLabel.BackColor = System.Drawing.Color.White; 165 this.errorLabel.Location = new System.Drawing.Point(3, 74); 166 this.errorLabel.Name = "errorLabel"; 167 this.errorLabel.Size = new System.Drawing.Size(0, 13); 168 this.errorLabel.TabIndex = 9; 169 // 159 170 // StructureTemplateView 160 171 // … … 187 198 private System.ComponentModel.IContainer components; 188 199 private ToolTip toolTip; 200 private Label errorLabel; 189 201 } 190 202 } -
branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/StructureTemplate/StructureTemplateView.cs
r18151 r18154 25 25 public StructureTemplateView() { 26 26 InitializeComponent(); 27 infoLabel.Text = "";27 errorLabel.Text = ""; 28 28 this.Resize += StructureTemplateViewResize; 29 29 splitContainer.SplitterMoved += SplitContainerSplitterMoved; … … 50 50 } 51 51 52 protected override void SetEnabledStateOfControls() { 53 base.SetEnabledStateOfControls(); 54 parseButton.Enabled = Content != null && !Locked && !ReadOnly; 55 linearScalingCheckBox.Enabled = Content != null && !Locked && !ReadOnly; 56 expressionInput.Enabled = Content != null && !Locked && !ReadOnly; 57 } 58 52 59 protected override void OnContentChanged() { 53 60 base.OnContentChanged(); … … 56 63 linearScalingCheckBox.Checked = Content.ApplyLinearScaling; 57 64 PaintTree(); 58 infoLabel.Text = "";65 errorLabel.Text = ""; 59 66 } 60 67 … … 64 71 65 72 private void ExpressionInputTextChanged(object sender, EventArgs e) { 66 infoLabel.Text = "Unparsed changes! Press parse button to save changes.";67 infoLabel.ForeColor = Color.DarkOrange;73 errorLabel.Text = "Unparsed changes! Press parse button to save changes."; 74 errorLabel.ForeColor = Color.DarkOrange; 68 75 } 69 76 … … 93 100 Content.Template = expressionInput.Text; 94 101 PaintTree(); 95 infoLabel.Text = "Template structure successfully parsed.";96 infoLabel.ForeColor = Color.DarkGreen;102 errorLabel.Text = "Template structure successfully parsed."; 103 errorLabel.ForeColor = Color.DarkGreen; 97 104 } catch (AggregateException ex) { 98 infoLabel.Text = string.Join("\n", ex.InnerExceptions.Select(x => x.Message));99 infoLabel.ForeColor = Color.DarkRed;105 errorLabel.Text = string.Join("\n", ex.InnerExceptions.Select(x => x.Message)); 106 errorLabel.ForeColor = Color.DarkRed; 100 107 } catch (Exception ex) { 101 infoLabel.Text = ex.Message;102 infoLabel.ForeColor = Color.DarkRed;108 errorLabel.Text = ex.Message; 109 errorLabel.ForeColor = Color.DarkRed; 103 110 } 104 111 } … … 110 117 } 111 118 112 private void helpButton_DoubleClick(object sender, EventArgs e) {119 private void HelpButtonDoubleClick(object sender, EventArgs e) { 113 120 using (InfoBox dialog = new InfoBox("Help for structure template", 114 121 "HeuristicLab.Problems.DataAnalysis.Symbolic.Views.Resources.structureTemplateHelp.rtf",
Note: See TracChangeset
for help on using the changeset viewer.