Free cookie consent management tool by TermsFeed Policy Generator

Changeset 15185


Ignore:
Timestamp:
07/10/17 18:59:54 (7 years ago)
Author:
gkronber
Message:

#2801: renamed classes for import dialogs

Location:
trunk/sources
Files:
7 edited
8 moved

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessingView.cs

    r15110 r15185  
    151151    }
    152152    private void importRegressionToolStripMenuItem_Click(object sender, EventArgs e) {
    153       Import(new RegressionCSVInstanceProvider(), new RegressionImportTypeDialog(),
    154         (dialog => ((RegressionImportTypeDialog)dialog).ImportType));
     153      Import(new RegressionCSVInstanceProvider(), new RegressionImportDialog(),
     154        (dialog => ((RegressionImportDialog)dialog).ImportType));
    155155    }
    156156    private void importClassificationToolStripMenuItem_Click(object sender, EventArgs e) {
    157       Import(new ClassificationCSVInstanceProvider(), new ClassificationImportTypeDialog(),
    158         (dialog => ((ClassificationImportTypeDialog)dialog).ImportType));
     157      Import(new ClassificationCSVInstanceProvider(), new ClassificationImportDialog(),
     158        (dialog => ((ClassificationImportDialog)dialog).ImportType));
    159159    }
    160160    private void importTimeSeriesToolStripMenuItem_Click(object sender, EventArgs e) {
    161       Import(new TimeSeriesPrognosisCSVInstanceProvider(), new TimeSeriesPrognosisImportTypeDialog(),
    162         (dialog => ((TimeSeriesPrognosisImportTypeDialog)dialog).ImportType));
    163     }
    164     private void Import<TProblemData, TImportType>(DataAnalysisInstanceProvider<TProblemData, TImportType> instanceProvider, DataAnalysisImportTypeDialog importTypeDialog,
    165       Func<DataAnalysisImportTypeDialog, TImportType> getImportType)
     161      Import(new TimeSeriesPrognosisCSVInstanceProvider(), new TimeSeriesPrognosisImportDialog(),
     162        (dialog => ((TimeSeriesPrognosisImportDialog)dialog).ImportType));
     163    }
     164    private void Import<TProblemData, TImportType>(DataAnalysisInstanceProvider<TProblemData, TImportType> instanceProvider, DataAnalysisImportDialog importDialog,
     165      Func<DataAnalysisImportDialog, TImportType> getImportType)
    166166      where TProblemData : class, IDataAnalysisProblemData
    167167      where TImportType : DataAnalysisImportType {
    168       if (importTypeDialog.ShowDialog() == DialogResult.OK) {
     168      if (importDialog.ShowDialog() == DialogResult.OK) {
    169169        Task.Run(() => {
    170170          TProblemData instance;
     
    178178            instanceProvider.ProgressChanged += (o, args) => { progress.ProgressValue = args.ProgressPercentage / 100.0; };
    179179
    180             instance = instanceProvider.ImportData(importTypeDialog.Path, getImportType(importTypeDialog), importTypeDialog.CSVFormat);
     180            instance = instanceProvider.ImportData(importDialog.Path, getImportType(importDialog), importDialog.CSVFormat);
    181181          } catch (IOException ex) {
    182182            MessageBox.Show(string.Format("There was an error parsing the file: {0}", Environment.NewLine + ex.Message), "Error while parsing", MessageBoxButtons.OK, MessageBoxIcon.Error);
     
    187187            Content.Import(instance);
    188188          } catch (IOException ex) {
    189             MessageBox.Show(string.Format("This problem does not support loading the instance {0}: {1}", Path.GetFileName(importTypeDialog.Path), Environment.NewLine + ex.Message), "Cannot load instance");
     189            MessageBox.Show(string.Format("This problem does not support loading the instance {0}: {1}", Path.GetFileName(importDialog.Path), Environment.NewLine + ex.Message), "Cannot load instance");
    190190          } finally {
    191191            mainForm.RemoveOperationProgressFromContent(activeView.Content);
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/ClassificationImportDialog.Designer.cs

    r15184 r15185  
    2121
    2222namespace HeuristicLab.Problems.Instances.DataAnalysis.Views {
    23   partial class ClassificationImportTypeDialog {
     23  partial class ClassificationImportDialog {
    2424    /// <summary>
    2525    /// Required designer variable.
     
    4545    /// </summary>
    4646    private void InitializeComponent() {
    47       System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ClassificationImportTypeDialog));
     47      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ClassificationImportDialog));
    4848      this.TargetVariableComboBox = new System.Windows.Forms.ComboBox();
    4949      this.TargetVariableLabel = new System.Windows.Forms.Label();
     
    174174      this.UniformDistributClassValuesInfoLabel.DoubleClick += new System.EventHandler(this.ControlToolTip_DoubleClick);
    175175      //
    176       // ClassificationImportTypeDialog
     176      // ClassificationImportDialog
    177177      //
    178178      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    179179      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    180180      this.ClientSize = new System.Drawing.Size(471, 517);
    181       this.Name = "ClassificationImportTypeDialog";
     181      this.Name = "ClassificationImportDialog";
    182182      this.Text = "Classification CSV Import";
    183183      ((System.ComponentModel.ISupportInitialize)(this.TrainingTestTrackBar)).EndInit();
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/ClassificationImportDialog.cs

    r15184 r15185  
    2727namespace HeuristicLab.Problems.Instances.DataAnalysis.Views {
    2828
    29   public partial class ClassificationImportTypeDialog : DataAnalysisImportTypeDialog {
     29  public partial class ClassificationImportDialog : DataAnalysisImportDialog {
    3030    public new ClassificationImportType ImportType {
    3131      get {
     
    3939    }
    4040
    41     public ClassificationImportTypeDialog() {
     41    public ClassificationImportDialog() {
    4242      InitializeComponent();
    4343    }
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/ClassificationInstanceProviderView.cs

    r14185 r15185  
    4141
    4242    protected override void importButton_Click(object sender, EventArgs e) {
    43       var importTypeDialog = new ClassificationImportTypeDialog();
     43      var importTypeDialog = new ClassificationImportDialog();
    4444      if (importTypeDialog.ShowDialog() == DialogResult.OK) {
    4545        IClassificationProblemData instance = null;
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/ClusteringInstanceProviderView.cs

    r14185 r15185  
    4141
    4242    protected override void importButton_Click(object sender, EventArgs e) {
    43       var importTypeDialog = new DataAnalysisImportTypeDialog();
     43      var importTypeDialog = new DataAnalysisImportDialog();
    4444      if (importTypeDialog.ShowDialog() == DialogResult.OK) {
    4545        IClusteringProblemData instance = null;
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/DataAnalysisImportDialog.Designer.cs

    r15184 r15185  
    2121
    2222namespace HeuristicLab.Problems.Instances.DataAnalysis.Views {
    23   partial class DataAnalysisImportTypeDialog {
     23  partial class DataAnalysisImportDialog {
    2424    /// <summary>
    2525    /// Required designer variable.
     
    419419      this.PreviewDatasetMatrix.TabIndex = 0;
    420420      //
    421       // DataAnalysisImportTypeDialog
     421      // DataAnalysisImportDialog
    422422      //
    423423      this.AcceptButton = this.OkButton;
     
    434434      this.MaximizeBox = false;
    435435      this.MinimizeBox = false;
    436       this.Name = "DataAnalysisImportTypeDialog";
     436      this.Name = "DataAnalysisImportDialog";
    437437      this.ShowIcon = false;
    438438      this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/DataAnalysisImportDialog.cs

    r15184 r15185  
    3131
    3232namespace HeuristicLab.Problems.Instances.DataAnalysis.Views {
    33   public partial class DataAnalysisImportTypeDialog : Form {
     33  public partial class DataAnalysisImportDialog : Form {
    3434
    3535    private static readonly List<KeyValuePair<DateTimeFormatInfo, string>> dateTimeFormats =
     
    8888    }
    8989
    90     public DataAnalysisImportTypeDialog() {
     90    public DataAnalysisImportDialog() {
    9191      InitializeComponent();
    9292
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/DataAnalysisInstanceProviderView.cs

    r14185 r15185  
    3939      var provider = Content as DataAnalysisInstanceProvider<T, DataAnalysisImportType>;
    4040      if (provider != null) {
    41         var importTypeDialog = new DataAnalysisImportTypeDialog();
     41        var importTypeDialog = new DataAnalysisImportDialog();
    4242        if (importTypeDialog.ShowDialog() == DialogResult.OK) {
    4343          T instance = default(T);
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/HeuristicLab.Problems.Instances.DataAnalysis.Views-3.3.csproj

    r14125 r15185  
    9393  </ItemGroup>
    9494  <ItemGroup>
    95     <Compile Include="ClassificationImportTypeDialog.cs">
    96       <SubType>Form</SubType>
    97     </Compile>
    98     <Compile Include="ClassificationImportTypeDialog.Designer.cs">
    99       <DependentUpon>ClassificationImportTypeDialog.cs</DependentUpon>
     95    <Compile Include="ClassificationImportDialog.cs">
     96      <SubType>Form</SubType>
     97    </Compile>
     98    <Compile Include="ClassificationImportDialog.Designer.cs">
     99      <DependentUpon>ClassificationImportDialog.cs</DependentUpon>
    100100    </Compile>
    101101    <Compile Include="ClassificationInstanceProviderView.cs">
     
    111111      <DependentUpon>ClusteringInstanceProviderView.cs</DependentUpon>
    112112    </Compile>
    113     <Compile Include="TimeSeriesPrognosisImportTypeDialog.cs">
    114       <SubType>Form</SubType>
    115     </Compile>
    116     <Compile Include="TimeSeriesPrognosisImportTypeDialog.Designer.cs">
    117       <DependentUpon>TimeSeriesPrognosisImportTypeDialog.cs</DependentUpon>
     113    <Compile Include="DataAnalysisImportDialog.cs">
     114      <SubType>Form</SubType>
     115    </Compile>
     116    <Compile Include="DataAnalysisImportDialog.Designer.cs">
     117      <DependentUpon>DataAnalysisImportDialog.cs</DependentUpon>
     118    </Compile>
     119    <Compile Include="RegressionImportDialog.cs">
     120      <SubType>Form</SubType>
     121    </Compile>
     122    <Compile Include="RegressionImportDialog.Designer.cs">
     123      <DependentUpon>RegressionImportDialog.cs</DependentUpon>
     124    </Compile>
     125    <Compile Include="TimeSeriesPrognosisImportDialog.cs">
     126      <SubType>Form</SubType>
     127    </Compile>
     128    <Compile Include="TimeSeriesPrognosisImportDialog.Designer.cs">
     129      <DependentUpon>TimeSeriesPrognosisImportDialog.cs</DependentUpon>
    118130    </Compile>
    119131    <Compile Include="TimeSeriesPrognosisInstanceProviderView.cs">
     
    123135      <DependentUpon>TimeSeriesPrognosisInstanceProviderView.cs</DependentUpon>
    124136    </Compile>
    125     <Compile Include="DataAnalysisImportTypeDialog.cs">
    126       <SubType>Form</SubType>
    127     </Compile>
    128     <Compile Include="DataAnalysisImportTypeDialog.Designer.cs">
    129       <DependentUpon>DataAnalysisImportTypeDialog.cs</DependentUpon>
    130     </Compile>
    131137    <Compile Include="DataAnalysisInstanceProviderView.cs">
    132138      <SubType>UserControl</SubType>
     
    136142    </Compile>
    137143    <Compile Include="Plugin.cs" />
    138     <Compile Include="RegressionImportTypeDialog.cs">
    139       <SubType>Form</SubType>
    140     </Compile>
    141     <Compile Include="RegressionImportTypeDialog.Designer.cs">
    142       <DependentUpon>RegressionImportTypeDialog.cs</DependentUpon>
    143     </Compile>
    144144    <Compile Include="RegressionInstanceProviderView.cs">
    145145      <SubType>UserControl</SubType>
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/RegressionImportDialog.Designer.cs

    r15184 r15185  
    2121
    2222namespace HeuristicLab.Problems.Instances.DataAnalysis.Views {
    23   partial class RegressionImportTypeDialog {
     23  partial class RegressionImportDialog {
    2424    /// <summary>
    2525    /// Required designer variable.
     
    5757      this.OkButton.Location = new System.Drawing.Point(303, 421);
    5858      //
    59       // CancelationButton
     59      // CancellationButton
    6060      //
    61       this.CancelationButton.Location = new System.Drawing.Point(384, 421);
     61      this.CancellationButton.Location = new System.Drawing.Point(384, 421);
    6262      //
    6363      // ProblemDataSettingsGroupBox
     
    110110      this.ToolTip.SetToolTip(this.TargetVariableInfoLabel, (string)this.TargetVariableInfoLabel.Tag);
    111111      //
    112       // RegressionImportTypeDialog
     112      // RegressionImportDialog
    113113      //
    114114      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    115115      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    116116      this.ClientSize = new System.Drawing.Size(471, 456);
    117       this.Name = "RegressionImportTypeDialog";
     117      this.Name = "RegressionImportDialog";
    118118      this.Text = "Regression CSV Import";
    119119      ((System.ComponentModel.ISupportInitialize)(this.TrainingTestTrackBar)).EndInit();
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/RegressionImportDialog.cs

    r15184 r15185  
    2525
    2626namespace HeuristicLab.Problems.Instances.DataAnalysis.Views {
    27   public partial class RegressionImportTypeDialog : DataAnalysisImportTypeDialog {
     27  public partial class RegressionImportDialog : DataAnalysisImportDialog {
    2828    public new RegressionImportType ImportType {
    2929      get {
     
    3636    }
    3737
    38     public RegressionImportTypeDialog() {
     38    public RegressionImportDialog() {
    3939      InitializeComponent();
    4040    }
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/RegressionInstanceProviderView.cs

    r14298 r15185  
    4242
    4343    protected override void importButton_Click(object sender, EventArgs e) {
    44       var importTypeDialog = new RegressionImportTypeDialog();
     44      var importTypeDialog = new RegressionImportDialog();
    4545      if (importTypeDialog.ShowDialog() == DialogResult.OK) {
    4646        IRegressionProblemData instance = null;
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/TimeSeriesPrognosisImportDialog.Designer.cs

    r15184 r15185  
    2121
    2222namespace HeuristicLab.Problems.Instances.DataAnalysis.Views {
    23   partial class TimeSeriesPrognosisImportTypeDialog {
     23  partial class TimeSeriesPrognosisImportDialog {
    2424    /// <summary>
    2525    /// Required designer variable.
     
    4545    /// </summary>
    4646    private void InitializeComponent() {
    47       System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TimeSeriesPrognosisImportTypeDialog));
     47      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TimeSeriesPrognosisImportDialog));
    4848      this.TargetVariableComboBox = new System.Windows.Forms.ComboBox();
    4949      this.TargetVariableLabel = new System.Windows.Forms.Label();
     
    132132      this.ToolTip.SetToolTip(this.TargetVariableInfoLabel, (string)this.TargetVariableInfoLabel.Tag);
    133133      //
    134       // TimeSeriesPrognosisImportTypeDialog
     134      // TimeSeriesPrognosisImportDialog
    135135      //
    136136      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    137137      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    138138      this.ClientSize = new System.Drawing.Size(471, 457);
    139       this.Name = "TimeSeriesPrognosisImportTypeDialog";
     139      this.Name = "TimeSeriesPrognosisImportDialog";
    140140      this.Text = "TimeSeries Prognosis CSV Import";
    141141      ((System.ComponentModel.ISupportInitialize)(this.TrainingTestTrackBar)).EndInit();
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/TimeSeriesPrognosisImportDialog.cs

    r15184 r15185  
    2525
    2626namespace HeuristicLab.Problems.Instances.DataAnalysis.Views {
    27   public partial class TimeSeriesPrognosisImportTypeDialog : DataAnalysisImportTypeDialog {
     27  public partial class TimeSeriesPrognosisImportDialog : DataAnalysisImportDialog {
    2828    public new TimeSeriesPrognosisImportType ImportType {
    2929      get {
     
    3737    }
    3838
    39     public TimeSeriesPrognosisImportTypeDialog() {
     39    public TimeSeriesPrognosisImportDialog() {
    4040      InitializeComponent();
    4141    }
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/TimeSeriesPrognosisInstanceProviderView.cs

    r14185 r15185  
    4141
    4242    protected override void importButton_Click(object sender, EventArgs e) {
    43       var importTypeDialog = new TimeSeriesPrognosisImportTypeDialog();
     43      var importTypeDialog = new TimeSeriesPrognosisImportDialog();
    4444      if (importTypeDialog.ShowDialog() == DialogResult.OK) {
    4545        ITimeSeriesPrognosisProblemData instance = null;
Note: See TracChangeset for help on using the changeset viewer.