Index: /branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Core/ProblemView.Designer.cs
===================================================================
--- /branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Core/ProblemView.Designer.cs	(revision 1276)
+++ /branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Core/ProblemView.Designer.cs	(revision 1277)
@@ -54,5 +54,4 @@
       this.testSamplesStartTextBox = new System.Windows.Forms.TextBox();
       this.testLabel = new System.Windows.Forms.Label();
-      this.datasetView = new HeuristicLab.DataAnalysis.DatasetView();
       this.targetsListBox = new System.Windows.Forms.CheckedListBox();
       this.inputsListBox = new System.Windows.Forms.CheckedListBox();
@@ -62,9 +61,18 @@
       this.partitioningGroupBox = new System.Windows.Forms.GroupBox();
       this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
-      this.modelType = new System.Windows.Forms.ComboBox();
-      this.taskLabel = new System.Windows.Forms.Label();
+      this.classificationRadioButton = new System.Windows.Forms.RadioButton();
+      this.regressionRadioButton = new System.Windows.Forms.RadioButton();
+      this.timeSeriesRadioButton = new System.Windows.Forms.RadioButton();
+      this.minTimeOffsetLabel = new System.Windows.Forms.Label();
+      this.minTimeOffsetTextBox = new System.Windows.Forms.TextBox();
+      this.learningTaskGroupBox = new System.Windows.Forms.GroupBox();
+      this.autoregressiveLabel = new System.Windows.Forms.Label();
+      this.maxTimeOffsetLabel = new System.Windows.Forms.Label();
+      this.maxTimeOffsetTextBox = new System.Windows.Forms.TextBox();
+      this.datasetView = new HeuristicLab.DataAnalysis.DatasetView();
       this.targetsGroupBox.SuspendLayout();
       this.inputsGroupBox.SuspendLayout();
       this.partitioningGroupBox.SuspendLayout();
+      this.learningTaskGroupBox.SuspendLayout();
       this.SuspendLayout();
       // 
@@ -127,5 +135,5 @@
       // 
       this.validationLabel.AutoSize = true;
-      this.validationLabel.Location = new System.Drawing.Point(5, 48);
+      this.validationLabel.Location = new System.Drawing.Point(5, 46);
       this.validationLabel.Name = "validationLabel";
       this.validationLabel.Size = new System.Drawing.Size(97, 13);
@@ -159,17 +167,4 @@
       this.testLabel.TabIndex = 14;
       this.testLabel.Text = "Test samples:";
-      // 
-      // datasetView
-      // 
-      this.datasetView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-                  | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.datasetView.Caption = "Editor";
-      this.datasetView.Dataset = null;
-      this.datasetView.Filename = null;
-      this.datasetView.Location = new System.Drawing.Point(3, 32);
-      this.datasetView.Name = "datasetView";
-      this.datasetView.Size = new System.Drawing.Size(326, 176);
-      this.datasetView.TabIndex = 17;
       // 
       // targetsListBox
@@ -199,12 +194,11 @@
       // autoregressiveCheckBox
       // 
-      this.autoregressiveCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.autoregressiveCheckBox.Anchor = System.Windows.Forms.AnchorStyles.Top;
       this.autoregressiveCheckBox.AutoSize = true;
-      this.autoregressiveCheckBox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
-      this.autoregressiveCheckBox.Location = new System.Drawing.Point(215, 424);
+      this.autoregressiveCheckBox.Enabled = false;
+      this.autoregressiveCheckBox.Location = new System.Drawing.Point(131, 83);
       this.autoregressiveCheckBox.Name = "autoregressiveCheckBox";
-      this.autoregressiveCheckBox.Size = new System.Drawing.Size(102, 17);
+      this.autoregressiveCheckBox.Size = new System.Drawing.Size(15, 14);
       this.autoregressiveCheckBox.TabIndex = 22;
-      this.autoregressiveCheckBox.Text = "Auto regressive:";
       this.autoregressiveCheckBox.UseVisualStyleBackColor = true;
       this.autoregressiveCheckBox.CheckedChanged += new System.EventHandler(this.autoregressiveCheckBox_CheckedChanged);
@@ -214,5 +208,5 @@
       this.targetsGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
       this.targetsGroupBox.Controls.Add(this.targetsListBox);
-      this.targetsGroupBox.Location = new System.Drawing.Point(3, 320);
+      this.targetsGroupBox.Location = new System.Drawing.Point(29, 515);
       this.targetsGroupBox.Name = "targetsGroupBox";
       this.targetsGroupBox.Size = new System.Drawing.Size(167, 100);
@@ -225,5 +219,5 @@
       this.inputsGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
       this.inputsGroupBox.Controls.Add(this.inputsListBox);
-      this.inputsGroupBox.Location = new System.Drawing.Point(176, 320);
+      this.inputsGroupBox.Location = new System.Drawing.Point(202, 515);
       this.inputsGroupBox.Name = "inputsGroupBox";
       this.inputsGroupBox.Size = new System.Drawing.Size(153, 100);
@@ -244,5 +238,5 @@
       this.partitioningGroupBox.Controls.Add(this.testSamplesStartTextBox);
       this.partitioningGroupBox.Controls.Add(this.testLabel);
-      this.partitioningGroupBox.Location = new System.Drawing.Point(3, 214);
+      this.partitioningGroupBox.Location = new System.Drawing.Point(29, 409);
       this.partitioningGroupBox.Name = "partitioningGroupBox";
       this.partitioningGroupBox.Size = new System.Drawing.Size(326, 100);
@@ -258,23 +252,120 @@
       this.openFileDialog.Title = "Import data set from file";
       // 
-      // modelType
-      // 
-      this.modelType.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
-      this.modelType.FormattingEnabled = true;
-      this.modelType.Location = new System.Drawing.Point(88, 422);
-      this.modelType.Name = "modelType";
-      this.modelType.Size = new System.Drawing.Size(121, 21);
-      this.modelType.TabIndex = 26;
-      this.modelType.SelectedValueChanged += new System.EventHandler(this.modelType_SelectedValueChanged);
-      // 
-      // taskLabel
-      // 
-      this.taskLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
-      this.taskLabel.AutoSize = true;
-      this.taskLabel.Location = new System.Drawing.Point(8, 425);
-      this.taskLabel.Name = "taskLabel";
-      this.taskLabel.Size = new System.Drawing.Size(74, 13);
-      this.taskLabel.TabIndex = 27;
-      this.taskLabel.Text = "Learning task:";
+      // classificationRadioButton
+      // 
+      this.classificationRadioButton.AutoSize = true;
+      this.classificationRadioButton.Checked = true;
+      this.classificationRadioButton.Location = new System.Drawing.Point(6, 16);
+      this.classificationRadioButton.Name = "classificationRadioButton";
+      this.classificationRadioButton.Size = new System.Drawing.Size(86, 17);
+      this.classificationRadioButton.TabIndex = 28;
+      this.classificationRadioButton.TabStop = true;
+      this.classificationRadioButton.Text = "Classification";
+      this.classificationRadioButton.UseVisualStyleBackColor = true;
+      this.classificationRadioButton.CheckedChanged += new System.EventHandler(this.radioButton_CheckedChanged);
+      // 
+      // regressionRadioButton
+      // 
+      this.regressionRadioButton.AutoSize = true;
+      this.regressionRadioButton.Location = new System.Drawing.Point(6, 39);
+      this.regressionRadioButton.Name = "regressionRadioButton";
+      this.regressionRadioButton.Size = new System.Drawing.Size(78, 17);
+      this.regressionRadioButton.TabIndex = 29;
+      this.regressionRadioButton.Text = "Regression";
+      this.regressionRadioButton.UseVisualStyleBackColor = true;
+      this.regressionRadioButton.CheckedChanged += new System.EventHandler(this.radioButton_CheckedChanged);
+      // 
+      // timeSeriesRadioButton
+      // 
+      this.timeSeriesRadioButton.AutoSize = true;
+      this.timeSeriesRadioButton.Location = new System.Drawing.Point(6, 62);
+      this.timeSeriesRadioButton.Name = "timeSeriesRadioButton";
+      this.timeSeriesRadioButton.Size = new System.Drawing.Size(119, 17);
+      this.timeSeriesRadioButton.TabIndex = 30;
+      this.timeSeriesRadioButton.Text = "Time series forecast";
+      this.timeSeriesRadioButton.UseVisualStyleBackColor = true;
+      this.timeSeriesRadioButton.CheckedChanged += new System.EventHandler(this.radioButton_CheckedChanged);
+      // 
+      // minTimeOffsetLabel
+      // 
+      this.minTimeOffsetLabel.AutoSize = true;
+      this.minTimeOffsetLabel.Enabled = false;
+      this.minTimeOffsetLabel.Location = new System.Drawing.Point(38, 106);
+      this.minTimeOffsetLabel.Name = "minTimeOffsetLabel";
+      this.minTimeOffsetLabel.Size = new System.Drawing.Size(87, 13);
+      this.minTimeOffsetLabel.TabIndex = 31;
+      this.minTimeOffsetLabel.Text = "Min. Time Offset:";
+      // 
+      // minTimeOffsetTextBox
+      // 
+      this.minTimeOffsetTextBox.Enabled = false;
+      this.minTimeOffsetTextBox.Location = new System.Drawing.Point(131, 103);
+      this.minTimeOffsetTextBox.Name = "minTimeOffsetTextBox";
+      this.minTimeOffsetTextBox.Size = new System.Drawing.Size(96, 20);
+      this.minTimeOffsetTextBox.TabIndex = 32;
+      this.minTimeOffsetTextBox.Validated += new System.EventHandler(this.timeOffsetTextBox_Validated);
+      this.minTimeOffsetTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.timeOffsetTextBox_Validating);
+      // 
+      // learningTaskGroupBox
+      // 
+      this.learningTaskGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.learningTaskGroupBox.Controls.Add(this.autoregressiveLabel);
+      this.learningTaskGroupBox.Controls.Add(this.classificationRadioButton);
+      this.learningTaskGroupBox.Controls.Add(this.minTimeOffsetLabel);
+      this.learningTaskGroupBox.Controls.Add(this.minTimeOffsetTextBox);
+      this.learningTaskGroupBox.Controls.Add(this.maxTimeOffsetLabel);
+      this.learningTaskGroupBox.Controls.Add(this.regressionRadioButton);
+      this.learningTaskGroupBox.Controls.Add(this.maxTimeOffsetTextBox);
+      this.learningTaskGroupBox.Controls.Add(this.timeSeriesRadioButton);
+      this.learningTaskGroupBox.Controls.Add(this.autoregressiveCheckBox);
+      this.learningTaskGroupBox.Location = new System.Drawing.Point(29, 621);
+      this.learningTaskGroupBox.Name = "learningTaskGroupBox";
+      this.learningTaskGroupBox.Size = new System.Drawing.Size(326, 163);
+      this.learningTaskGroupBox.TabIndex = 35;
+      this.learningTaskGroupBox.TabStop = false;
+      this.learningTaskGroupBox.Text = "Learning task";
+      // 
+      // autoregressiveLabel
+      // 
+      this.autoregressiveLabel.AutoSize = true;
+      this.autoregressiveLabel.Enabled = false;
+      this.autoregressiveLabel.Location = new System.Drawing.Point(45, 83);
+      this.autoregressiveLabel.Name = "autoregressiveLabel";
+      this.autoregressiveLabel.Size = new System.Drawing.Size(80, 13);
+      this.autoregressiveLabel.TabIndex = 35;
+      this.autoregressiveLabel.Text = "Autoregressive:";
+      // 
+      // maxTimeOffsetLabel
+      // 
+      this.maxTimeOffsetLabel.AutoSize = true;
+      this.maxTimeOffsetLabel.Enabled = false;
+      this.maxTimeOffsetLabel.Location = new System.Drawing.Point(35, 132);
+      this.maxTimeOffsetLabel.Name = "maxTimeOffsetLabel";
+      this.maxTimeOffsetLabel.Size = new System.Drawing.Size(90, 13);
+      this.maxTimeOffsetLabel.TabIndex = 33;
+      this.maxTimeOffsetLabel.Text = "Max. Time Offset:";
+      // 
+      // maxTimeOffsetTextBox
+      // 
+      this.maxTimeOffsetTextBox.Enabled = false;
+      this.maxTimeOffsetTextBox.Location = new System.Drawing.Point(131, 129);
+      this.maxTimeOffsetTextBox.Name = "maxTimeOffsetTextBox";
+      this.maxTimeOffsetTextBox.Size = new System.Drawing.Size(96, 20);
+      this.maxTimeOffsetTextBox.TabIndex = 34;
+      this.maxTimeOffsetTextBox.Validated += new System.EventHandler(this.timeOffsetTextBox_Validated);
+      this.maxTimeOffsetTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.timeOffsetTextBox_Validating);
+      // 
+      // datasetView
+      // 
+      this.datasetView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                  | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.datasetView.Caption = "Editor";
+      this.datasetView.Dataset = null;
+      this.datasetView.Filename = null;
+      this.datasetView.Location = new System.Drawing.Point(3, 32);
+      this.datasetView.Name = "datasetView";
+      this.datasetView.Size = new System.Drawing.Size(395, 371);
+      this.datasetView.TabIndex = 17;
       // 
       // ProblemView
@@ -282,20 +373,19 @@
       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Controls.Add(this.taskLabel);
-      this.Controls.Add(this.modelType);
+      this.Controls.Add(this.learningTaskGroupBox);
       this.Controls.Add(this.partitioningGroupBox);
       this.Controls.Add(this.inputsGroupBox);
       this.Controls.Add(this.targetsGroupBox);
-      this.Controls.Add(this.autoregressiveCheckBox);
       this.Controls.Add(this.datasetView);
       this.Controls.Add(this.importButton);
       this.Name = "ProblemView";
-      this.Size = new System.Drawing.Size(337, 446);
+      this.Size = new System.Drawing.Size(406, 787);
       this.targetsGroupBox.ResumeLayout(false);
       this.inputsGroupBox.ResumeLayout(false);
       this.partitioningGroupBox.ResumeLayout(false);
       this.partitioningGroupBox.PerformLayout();
+      this.learningTaskGroupBox.ResumeLayout(false);
+      this.learningTaskGroupBox.PerformLayout();
       this.ResumeLayout(false);
-      this.PerformLayout();
 
     }
@@ -321,6 +411,13 @@
     private System.Windows.Forms.GroupBox partitioningGroupBox;
     private System.Windows.Forms.OpenFileDialog openFileDialog;
-    private System.Windows.Forms.ComboBox modelType;
-    private System.Windows.Forms.Label taskLabel;
+    private System.Windows.Forms.RadioButton classificationRadioButton;
+    private System.Windows.Forms.RadioButton regressionRadioButton;
+    private System.Windows.Forms.RadioButton timeSeriesRadioButton;
+    private System.Windows.Forms.Label minTimeOffsetLabel;
+    private System.Windows.Forms.TextBox minTimeOffsetTextBox;
+    private System.Windows.Forms.GroupBox learningTaskGroupBox;
+    private System.Windows.Forms.Label maxTimeOffsetLabel;
+    private System.Windows.Forms.TextBox maxTimeOffsetTextBox;
+    private System.Windows.Forms.Label autoregressiveLabel;
   }
 }
Index: /branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Core/ProblemView.cs
===================================================================
--- /branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Core/ProblemView.cs	(revision 1276)
+++ /branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Core/ProblemView.cs	(revision 1277)
@@ -39,7 +39,4 @@
       this.problem = problem;
       InitializeComponent();
-      foreach (LearningTask l in Enum.GetValues(typeof(LearningTask))) {
-        modelType.Items.Add(l);
-      }
       UpdateControls();
     }
@@ -54,10 +51,11 @@
       testSamplesStartTextBox.Text = problem.TestSamplesStart.ToString();
       testSamplesEndTextBox.Text = problem.TestSamplesEnd.ToString();
+      minTimeOffsetTextBox.Text = problem.MinTimeOffset.ToString();
+      maxTimeOffsetTextBox.Text = problem.MaxTimeOffset.ToString();
       autoregressiveCheckBox.Checked = problem.AutoRegressive;
-      for (int i = 0; i < modelType.Items.Count; i++) {
-        if ((LearningTask)modelType.Items[i] == problem.LearningTask) {
-          modelType.SelectedIndex = i;
-          break;
-        }
+      switch (problem.LearningTask) {
+        case LearningTask.Classification: classificationRadioButton.Checked = true; break;
+        case LearningTask.Regression: regressionRadioButton.Checked = true; break;
+        case LearningTask.TimeSeries: timeSeriesRadioButton.Checked = true; break;
       }
       targetsListBox.Items.Clear();
@@ -219,9 +217,28 @@
     }
 
-    private void modelType_SelectedValueChanged(object sender, EventArgs e) {
-      if ((LearningTask)modelType.SelectedItem == LearningTask.TimeSeries) autoregressiveCheckBox.Enabled = true;
-      else autoregressiveCheckBox.Enabled = false;
-      problem.LearningTask = (LearningTask)modelType.SelectedItem;
-    }
+    #region gui events
+    private void radioButton_CheckedChanged(object sender, EventArgs e) {
+      minTimeOffsetLabel.Enabled = timeSeriesRadioButton.Checked;
+      minTimeOffsetTextBox.Enabled = timeSeriesRadioButton.Checked;
+      maxTimeOffsetLabel.Enabled = timeSeriesRadioButton.Checked;
+      maxTimeOffsetTextBox.Enabled = timeSeriesRadioButton.Checked;
+      autoregressiveCheckBox.Enabled = timeSeriesRadioButton.Checked;
+      autoregressiveLabel.Enabled = timeSeriesRadioButton.Checked;
+      if (timeSeriesRadioButton.Checked) problem.LearningTask = LearningTask.TimeSeries;
+      else if (classificationRadioButton.Checked) problem.LearningTask = LearningTask.Classification;
+      else if (regressionRadioButton.Checked) problem.LearningTask = LearningTask.Regression;
+    }
+
+    private void timeOffsetTextBox_Validating(object sender, CancelEventArgs e) {
+      int min, max;
+      e.Cancel = !int.TryParse(minTimeOffsetTextBox.Text, out min);
+      e.Cancel = !int.TryParse(maxTimeOffsetTextBox.Text, out max);
+      e.Cancel = min > max;
+    }
+    private void timeOffsetTextBox_Validated(object sender, EventArgs e) {
+      problem.MinTimeOffset = int.Parse(minTimeOffsetTextBox.Text);
+      problem.MaxTimeOffset = int.Parse(maxTimeOffsetTextBox.Text);
+    }
+    #endregion
   }
 }
