Changeset 18069 for branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/StructureTemplate/StructureTemplateView.cs
- Timestamp:
- 10/19/21 13:39:44 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/StructureTemplate/StructureTemplateView.cs
r18068 r18069 42 42 if (Content == null) return; 43 43 expressionInput.Text = Content.Template; 44 linearScalingCheckBox.Checked = Content.ApplyLinearScaling; 44 45 PaintTree(); 45 46 infoLabel.Text = ""; … … 47 48 48 49 private void ParseButtonClick(object sender, EventArgs e) { 49 if(!string.IsNullOrEmpty(expressionInput.Text)) { 50 try { 51 Content.Template = expressionInput.Text; 52 PaintTree(); 53 infoLabel.Text = "Template structure successfully parsed."; 54 infoLabel.ForeColor = Color.DarkGreen; 55 } catch (Exception ex) { 56 infoLabel.Text = ex.Message; 57 infoLabel.ForeColor = Color.DarkRed; 58 } 59 } 50 Parse(); 60 51 } 61 52 … … 79 70 } 80 71 } 72 73 private void ExpressionInputKeyUp(object sender, KeyEventArgs e) { 74 if (e.KeyCode == Keys.Enter) 75 Parse(); 76 } 77 78 private void Parse() { 79 if (!string.IsNullOrEmpty(expressionInput.Text)) { 80 try { 81 Content.Template = expressionInput.Text; 82 PaintTree(); 83 infoLabel.Text = "Template structure successfully parsed."; 84 infoLabel.ForeColor = Color.DarkGreen; 85 } catch (Exception ex) { 86 infoLabel.Text = ex.Message; 87 infoLabel.ForeColor = Color.DarkRed; 88 } 89 } 90 } 91 92 private void LinearScalingCheckBoxCheckStateChanged(object sender, EventArgs e) { 93 Content.ApplyLinearScaling = linearScalingCheckBox.Checked; 94 PaintTree(); 95 } 81 96 } 82 97 }
Note: See TracChangeset
for help on using the changeset viewer.