Changeset 7160 for branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views
- Timestamp:
- 12/09/11 12:56:21 (13 years ago)
- Location:
- branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/TimeSeriesPrognosisSolutionView.Designer.cs
r7099 r7160 45 45 /// </summary> 46 46 private void InitializeComponent() { 47 this.horizonTextBox = new System.Windows.Forms.TextBox(); 48 this.label1 = new System.Windows.Forms.Label(); 47 49 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); 48 50 this.splitContainer.Panel1.SuspendLayout(); … … 55 57 // splitContainer 56 58 // 59 this.splitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 60 | System.Windows.Forms.AnchorStyles.Left) 61 | System.Windows.Forms.AnchorStyles.Right))); 62 this.splitContainer.Dock = System.Windows.Forms.DockStyle.None; 63 this.splitContainer.Location = new System.Drawing.Point(3, 45); 64 this.splitContainer.Size = new System.Drawing.Size(526, 335); 57 65 // 58 66 // itemsGroupBox 59 67 // 68 this.itemsGroupBox.Controls.Add(this.horizonTextBox); 69 this.itemsGroupBox.Controls.Add(this.label1); 60 70 this.itemsGroupBox.Text = "Time Series Prognosis Solution"; 71 this.itemsGroupBox.Controls.SetChildIndex(this.label1, 0); 72 this.itemsGroupBox.Controls.SetChildIndex(this.horizonTextBox, 0); 73 this.itemsGroupBox.Controls.SetChildIndex(this.splitContainer, 0); 74 // 75 // itemsListView 76 // 77 this.itemsListView.Size = new System.Drawing.Size(244, 240); 78 // 79 // detailsGroupBox 80 // 81 this.detailsGroupBox.Size = new System.Drawing.Size(266, 248); 61 82 // 62 83 // addButton … … 67 88 // 68 89 this.toolTip.SetToolTip(this.removeButton, "Remove"); 90 // 91 // viewHost 92 // 93 this.viewHost.Size = new System.Drawing.Size(254, 223); 94 // 95 // horizonTextBox 96 // 97 this.horizonTextBox.Location = new System.Drawing.Point(66, 19); 98 this.horizonTextBox.Name = "horizonTextBox"; 99 this.horizonTextBox.Size = new System.Drawing.Size(100, 20); 100 this.horizonTextBox.TabIndex = 1; 101 this.horizonTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.horizonTextBox_Validating); 102 this.horizonTextBox.Validated += new System.EventHandler(this.horizonTextBox_Validated); 103 // 104 // label1 105 // 106 this.label1.AutoSize = true; 107 this.label1.Location = new System.Drawing.Point(6, 22); 108 this.label1.Name = "label1"; 109 this.label1.Size = new System.Drawing.Size(46, 13); 110 this.label1.TabIndex = 2; 111 this.label1.Text = "Horizon:"; 69 112 // 70 113 // TimeSeriesPrognosisSolutionView … … 78 121 this.splitContainer.ResumeLayout(false); 79 122 this.itemsGroupBox.ResumeLayout(false); 123 this.itemsGroupBox.PerformLayout(); 80 124 this.detailsGroupBox.ResumeLayout(false); 81 125 this.ResumeLayout(false); … … 84 128 85 129 #endregion 130 131 private System.Windows.Forms.TextBox horizonTextBox; 132 private System.Windows.Forms.Label label1; 133 86 134 } 87 135 } -
branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/TimeSeriesPrognosisSolutionView.cs
r7099 r7160 22 22 using System.Windows.Forms; 23 23 using HeuristicLab.Core; 24 using HeuristicLab.Data; 24 25 using HeuristicLab.MainForm; 25 26 … … 37 38 } 38 39 40 protected override void OnContentChanged() { 41 base.OnContentChanged(); 42 if (Content != null) { 43 horizonTextBox.Text = Content.Horizon.ToString(); 44 } 45 } 46 39 47 #region drag and drop 40 48 protected override void itemsListView_DragEnter(object sender, DragEventArgs e) { … … 50 58 } 51 59 #endregion 60 61 private void horizonTextBox_Validating(object sender, System.ComponentModel.CancelEventArgs e) { 62 int val; 63 if (int.TryParse(horizonTextBox.Text, out val)) { 64 e.Cancel = val <= 0 || val >= Content.ProblemData.TrainingPartition.End - Content.ProblemData.TrainingPartition.Start; 65 } else { 66 e.Cancel = true; 67 } 68 } 69 70 private void horizonTextBox_Validated(object sender, System.EventArgs e) { 71 int val; 72 int.TryParse(horizonTextBox.Text, out val); 73 Content.Horizon = val; 74 } 52 75 } 53 76 }
Note: See TracChangeset
for help on using the changeset viewer.