1 | using System.Windows.Forms;
|
---|
2 | using HeuristicLab.Core.Views;
|
---|
3 | using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
|
---|
4 | using HeuristicLab.MainForm;
|
---|
5 | using HeuristicLab.MainForm.WindowsForms;
|
---|
6 |
|
---|
7 | namespace HeuristicLab.Problems.GaussianProcessTuning {
|
---|
8 | [View("Gaussian Process Configuration Tree View")]
|
---|
9 | [Content(typeof(Solution), IsDefaultView = false)]
|
---|
10 | public sealed partial class SolutionProgramView : NamedItemView {
|
---|
11 | private Panel panel;
|
---|
12 | private GraphicalSymbolicExpressionTreeView graphTreeView;
|
---|
13 | public new Solution Content {
|
---|
14 | get { return (Solution)base.Content; }
|
---|
15 | set { base.Content = value; }
|
---|
16 | }
|
---|
17 |
|
---|
18 | public SolutionProgramView() {
|
---|
19 | InitializeComponent();
|
---|
20 | this.graphTreeView = new GraphicalSymbolicExpressionTreeView();
|
---|
21 | graphTreeView.Dock = DockStyle.Fill;
|
---|
22 | panel.Controls.Add(graphTreeView);
|
---|
23 | }
|
---|
24 |
|
---|
25 | protected override void OnContentChanged() {
|
---|
26 | base.OnContentChanged();
|
---|
27 | if (Content == null) {
|
---|
28 | graphTreeView.Content = null;
|
---|
29 | } else {
|
---|
30 | graphTreeView.Content = Content.Tree;
|
---|
31 | }
|
---|
32 | }
|
---|
33 |
|
---|
34 | private void InitializeComponent() {
|
---|
35 | this.panel = new System.Windows.Forms.Panel();
|
---|
36 | ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
|
---|
37 | this.SuspendLayout();
|
---|
38 | //
|
---|
39 | // nameTextBox
|
---|
40 | //
|
---|
41 | this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
|
---|
42 | this.errorProvider.SetIconPadding(this.nameTextBox, 2);
|
---|
43 | //
|
---|
44 | // panel
|
---|
45 | //
|
---|
46 | this.panel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
---|
47 | | System.Windows.Forms.AnchorStyles.Left)
|
---|
48 | | System.Windows.Forms.AnchorStyles.Right)));
|
---|
49 | this.panel.Location = new System.Drawing.Point(3, 26);
|
---|
50 | this.panel.Name = "panel";
|
---|
51 | this.panel.Size = new System.Drawing.Size(345, 190);
|
---|
52 | this.panel.TabIndex = 3;
|
---|
53 | //
|
---|
54 | // SolutionProgramView
|
---|
55 | //
|
---|
56 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
---|
57 | this.Controls.Add(this.panel);
|
---|
58 | this.Name = "SolutionProgramView";
|
---|
59 | this.Size = new System.Drawing.Size(351, 219);
|
---|
60 | this.Controls.SetChildIndex(this.panel, 0);
|
---|
61 | this.Controls.SetChildIndex(this.nameLabel, 0);
|
---|
62 | this.Controls.SetChildIndex(this.nameTextBox, 0);
|
---|
63 | this.Controls.SetChildIndex(this.infoLabel, 0);
|
---|
64 | ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
|
---|
65 | this.ResumeLayout(false);
|
---|
66 | this.PerformLayout();
|
---|
67 |
|
---|
68 | }
|
---|
69 |
|
---|
70 |
|
---|
71 |
|
---|
72 |
|
---|
73 | }
|
---|
74 | }
|
---|