Changeset 7684


Ignore:
Timestamp:
04/02/12 15:56:16 (10 years ago)
Author:
sforsten
Message:

#1784:

  • deleted RegressionProblemView
  • deleted of the import button in the DataAnalysisProblemView
  • small changes in the views of the Problems.Instances.Views project
Location:
branches/ProblemInstancesRegressionAndClassification
Files:
4 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Views/3.4/DataAnalysisProblemView.Designer.cs

    r7664 r7684  
    4646    private void InitializeComponent() {
    4747      this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
    48       this.ImportButton = new System.Windows.Forms.Button();
    4948      ((System.ComponentModel.ISupportInitialize)(this.problemInstanceSplitContainer)).BeginInit();
    5049      this.problemInstanceSplitContainer.Panel1.SuspendLayout();
     
    5655      // problemInstanceSplitContainer
    5756      //
    58       //
    59       // problemInstanceSplitContainer.Panel2
    60       //
    61       this.problemInstanceSplitContainer.Panel2.Controls.Add(this.ImportButton);
    62       //
    63       // parameterCollectionView
    64       //
    65       this.parameterCollectionView.Location = new System.Drawing.Point(6, 56);
    66       this.parameterCollectionView.Size = new System.Drawing.Size(501, 274);
    6757      //
    6858      // nameTextBox
     
    7666      this.openFileDialog.Title = "Import data...";
    7767      //
    78       // ImportButton
    79       //
    80       this.ImportButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    81                   | System.Windows.Forms.AnchorStyles.Right)));
    82       this.ImportButton.Location = new System.Drawing.Point(6, 27);
    83       this.ImportButton.Name = "ImportButton";
    84       this.ImportButton.Size = new System.Drawing.Size(501, 23);
    85       this.ImportButton.TabIndex = 14;
    86       this.ImportButton.Text = "Import from CSV file";
    87       this.ImportButton.UseVisualStyleBackColor = true;
    88       this.ImportButton.Click += new System.EventHandler(this.ImportButton_Click);
    89       //
    9068      // DataAnalysisProblemView
    9169      //
     
    9472      this.Name = "DataAnalysisProblemView";
    9573      this.problemInstanceSplitContainer.Panel1.ResumeLayout(false);
    96       this.problemInstanceSplitContainer.Panel1.PerformLayout();
    9774      this.problemInstanceSplitContainer.Panel2.ResumeLayout(false);
    9875      this.problemInstanceSplitContainer.Panel2.PerformLayout();
     
    10784
    10885    private System.Windows.Forms.OpenFileDialog openFileDialog;
    109     private System.Windows.Forms.Button ImportButton;
    11086  }
    11187}
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Views/3.4/DataAnalysisProblemView.cs

    r7610 r7684  
    2020#endregion
    2121
    22 using System;
    2322using System.Windows.Forms;
    2423using HeuristicLab.MainForm;
    2524using HeuristicLab.Optimization.Views;
    26 using HeuristicLab.PluginInfrastructure;
    2725
    2826namespace HeuristicLab.Problems.DataAnalysis.Views {
     
    3836      set { base.Content = value; }
    3937    }
    40 
    41     protected override void SetEnabledStateOfControls() {
    42       base.SetEnabledStateOfControls();
    43       ImportButton.Enabled = !Locked && !ReadOnly && Content != null;
    44     }
    45 
    46     private void ImportButton_Click(object sender, System.EventArgs e) {
    47       if (openFileDialog.ShowDialog(this) == DialogResult.OK) {
    48         try {
    49           Content.ImportProblemDataFromFile(openFileDialog.FileName);
    50         }
    51         catch (Exception ex) {
    52           ErrorHandling.ShowErrorDialog(this, ex);
    53         }
    54       }
    55     }
    5638  }
    5739}
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj

    r7664 r7684  
    174174    </Compile>
    175175    <Compile Include="Plugin.cs" />
    176     <Compile Include="Regression\RegressionProblemView.cs">
    177       <SubType>UserControl</SubType>
    178     </Compile>
    179     <Compile Include="Regression\RegressionProblemView.Designer.cs">
    180       <DependentUpon>RegressionProblemView.cs</DependentUpon>
    181     </Compile>
    182176    <Compile Include="Regression\RegressionSolutionErrorCharacteristicsCurveView.cs">
    183177      <SubType>UserControl</SubType>
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Properties

    • Property svn:ignore set to
      AssemblyInfo.cs
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Views/3.4/HeuristicLab.Problems.Instances.Views-3.4.csproj

    r7683 r7684  
    8585    </ProjectReference>
    8686  </ItemGroup>
    87   <ItemGroup>
    88     <EmbeddedResource Include="ProblemInstanceConsumerView.resx">
    89       <DependentUpon>ProblemInstanceConsumerView.cs</DependentUpon>
    90     </EmbeddedResource>
    91   </ItemGroup>
    9287  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    9388  <PropertyGroup>
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Views/3.4/ProblemInstanceConsumerView.cs

    r7683 r7684  
    3232namespace HeuristicLab.Problems.Instances.Views {
    3333  [View("ProblemInstanceConsumerView")]
    34   [Content(typeof(IProblemInstanceConsumer), IsDefaultView = true)]
     34  [Content(typeof(IProblemInstanceConsumer), IsDefaultView = false)]
    3535  public sealed partial class ProblemInstanceConsumerView : AsynchronousContentView {
    3636
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Views/3.4/ProblemInstanceProviderView.cs

    r7683 r7684  
    2626namespace HeuristicLab.Problems.Instances.Views {
    2727  [View("ProblemInstanceProviderView")]
    28   [Content(typeof(IProblemInstanceProvider), IsDefaultView = true)]
     28  [Content(typeof(IProblemInstanceProvider), IsDefaultView = false)]
    2929  public abstract partial class ProblemInstanceProviderView : AsynchronousContentView {
    3030
     
    3434    }
    3535
    36     public abstract IProblemInstanceConsumer Consumer { set; }
     36    public abstract IProblemInstanceConsumer Consumer { get; set; }
    3737
    38     public abstract IProblemInstanceExporter Exporter { set; }
     38    public abstract IProblemInstanceExporter Exporter { get; set; }
    3939
    4040    public ProblemInstanceProviderView() {
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Views/3.4/ProblemInstanceProviderViewGeneric.Designer.cs

    r7683 r7684  
    2121
    2222namespace HeuristicLab.Problems.Instances.Views {
    23   partial class ProblemInstanceProviderView<T> {
     23  partial class ProblemInstanceProviderViewGeneric<T> {
    2424    /// <summary>
    2525    /// Required designer variable.
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Views/3.4/ProblemInstanceProviderViewGeneric.cs

    r7683 r7684  
    3030
    3131namespace HeuristicLab.Problems.Instances.Views {
    32   [View("ProblemInstanceProviderView")]
     32  [View("ProblemInstanceProviderViewGeneric")]
    3333  [Content(typeof(IProblemInstanceProvider<>), IsDefaultView = true)]
    34   public partial class ProblemInstanceProviderView<T> : ProblemInstanceProviderView {
     34  public partial class ProblemInstanceProviderViewGeneric<T> : ProblemInstanceProviderView {
    3535
    3636    public new IProblemInstanceProvider<T> Content {
     
    3939    }
    4040
    41     private IProblemInstanceConsumer<T> consumer;
    42     public override IProblemInstanceConsumer Consumer { set { consumer = (IProblemInstanceConsumer<T>)value; } }
     41    private IProblemInstanceConsumer<T> GenericConsumer { get { return (IProblemInstanceConsumer<T>)Consumer; } }
     42    public IProblemInstanceConsumer consumer;
     43    public override IProblemInstanceConsumer Consumer {
     44      get { return consumer; }
     45      set {
     46        consumer = value;
     47        SetEnabledStateOfControls();
     48      }
     49    }
    4350
    44     private IProblemInstanceExporter<T> exporter;
    45     public override IProblemInstanceExporter Exporter { set { exporter = (IProblemInstanceExporter<T>)value; } }
     51    private IProblemInstanceExporter<T> GenericExporter { get { return (IProblemInstanceExporter<T>)Exporter; } }
     52    private IProblemInstanceExporter exporter;
     53    public override IProblemInstanceExporter Exporter {
     54      get { return exporter; }
     55      set {
     56        exporter = value;
     57        SetEnabledStateOfControls();
     58      }
     59    }
    4660
    47     public ProblemInstanceProviderView() {
     61    public ProblemInstanceProviderViewGeneric() {
    4862      InitializeComponent();
    4963      importButton.Text = String.Empty;
     
    7084    protected override void SetEnabledStateOfControls() {
    7185      base.SetEnabledStateOfControls();
    72       instancesComboBox.Enabled = !ReadOnly && !Locked && Content != null && consumer != null;
    73       loadButton.Enabled = !ReadOnly && !Locked && Content != null && consumer != null;
    74       exportButton.Enabled = !ReadOnly && !Locked && Content != null && exporter != null;
     86      instancesComboBox.Enabled = !ReadOnly && !Locked && Content != null && GenericConsumer != null;
     87      loadButton.Enabled = !ReadOnly && !Locked && Content != null && GenericConsumer != null;
     88      exportButton.Enabled = !ReadOnly && !Locked && Content != null && GenericExporter != null;
    7589      problemInstanceProviderSplitContainer.Panel2Collapsed = !exportButton.Enabled;
    7690    }
     
    8094      var instance = Content.LoadData(descriptor);
    8195      try {
    82         consumer.Load(instance);
     96        GenericConsumer.Load(instance);
    8397      }
    8498      catch (Exception ex) {
     
    99113        }
    100114        try {
    101           consumer.Load(instance);
     115          GenericConsumer.Load(instance);
    102116        }
    103117        catch (Exception ex) {
     
    110124      if (saveFileDialog.ShowDialog(this) == DialogResult.OK) {
    111125        try {
    112           Content.SaveData(exporter.Export(), saveFileDialog.FileName);
     126          Content.SaveData(GenericExporter.Export(), saveFileDialog.FileName);
    113127        }
    114128        catch (Exception ex) {
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Views/3.4/Properties

    • Property svn:ignore set to
      AssemblyInfo.cs
Note: See TracChangeset for help on using the changeset viewer.