Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/09/11 12:56:21 (13 years ago)
Author:
gkronber
Message:

#1081 worked on multi-variate time series prognosis

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  
    4545    /// </summary>
    4646    private void InitializeComponent() {
     47      this.horizonTextBox = new System.Windows.Forms.TextBox();
     48      this.label1 = new System.Windows.Forms.Label();
    4749      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
    4850      this.splitContainer.Panel1.SuspendLayout();
     
    5557      // splitContainer
    5658      //
     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);
    5765      //
    5866      // itemsGroupBox
    5967      //
     68      this.itemsGroupBox.Controls.Add(this.horizonTextBox);
     69      this.itemsGroupBox.Controls.Add(this.label1);
    6070      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);
    6182      //
    6283      // addButton
     
    6788      //
    6889      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:";
    69112      //
    70113      // TimeSeriesPrognosisSolutionView
     
    78121      this.splitContainer.ResumeLayout(false);
    79122      this.itemsGroupBox.ResumeLayout(false);
     123      this.itemsGroupBox.PerformLayout();
    80124      this.detailsGroupBox.ResumeLayout(false);
    81125      this.ResumeLayout(false);
     
    84128
    85129    #endregion
     130
     131    private System.Windows.Forms.TextBox horizonTextBox;
     132    private System.Windows.Forms.Label label1;
     133
    86134  }
    87135}
  • branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/TimeSeriesPrognosisSolutionView.cs

    r7099 r7160  
    2222using System.Windows.Forms;
    2323using HeuristicLab.Core;
     24using HeuristicLab.Data;
    2425using HeuristicLab.MainForm;
    2526
     
    3738    }
    3839
     40    protected override void OnContentChanged() {
     41      base.OnContentChanged();
     42      if (Content != null) {
     43        horizonTextBox.Text = Content.Horizon.ToString();
     44      }
     45    }
     46
    3947    #region drag and drop
    4048    protected override void itemsListView_DragEnter(object sender, DragEventArgs e) {
     
    5058    }
    5159    #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    }
    5275  }
    5376}
Note: See TracChangeset for help on using the changeset viewer.