Free cookie consent management tool by TermsFeed Policy Generator

Changeset 15197


Ignore:
Timestamp:
07/11/17 13:02:11 (7 years ago)
Author:
gkronber
Message:

#2081: merged r15184 and r15185 from trunk to stable

Location:
stable
Files:
8 deleted
7 edited
8 copied

Legend:

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

    r14186 r15197  
    140140    }
    141141    private void importRegressionToolStripMenuItem_Click(object sender, EventArgs e) {
    142       Import(new RegressionCSVInstanceProvider(), new RegressionImportTypeDialog(),
    143         (dialog => ((RegressionImportTypeDialog)dialog).ImportType));
     142      Import(new RegressionCSVInstanceProvider(), new RegressionImportDialog(),
     143        (dialog => ((RegressionImportDialog)dialog).ImportType));
    144144    }
    145145    private void importClassificationToolStripMenuItem_Click(object sender, EventArgs e) {
    146       Import(new ClassificationCSVInstanceProvider(), new ClassificationImportTypeDialog(),
    147         (dialog => ((ClassificationImportTypeDialog)dialog).ImportType));
     146      Import(new ClassificationCSVInstanceProvider(), new ClassificationImportDialog(),
     147        (dialog => ((ClassificationImportDialog)dialog).ImportType));
    148148    }
    149149    private void importTimeSeriesToolStripMenuItem_Click(object sender, EventArgs e) {
    150       Import(new TimeSeriesPrognosisCSVInstanceProvider(), new TimeSeriesPrognosisImportTypeDialog(),
    151         (dialog => ((TimeSeriesPrognosisImportTypeDialog)dialog).ImportType));
    152     }
    153     private void Import<TProblemData, TImportType>(DataAnalysisInstanceProvider<TProblemData, TImportType> instanceProvider, DataAnalysisImportTypeDialog importTypeDialog,
    154       Func<DataAnalysisImportTypeDialog, TImportType> getImportType)
     150      Import(new TimeSeriesPrognosisCSVInstanceProvider(), new TimeSeriesPrognosisImportDialog(),
     151        (dialog => ((TimeSeriesPrognosisImportDialog)dialog).ImportType));
     152    }
     153    private void Import<TProblemData, TImportType>(DataAnalysisInstanceProvider<TProblemData, TImportType> instanceProvider, DataAnalysisImportDialog importDialog,
     154      Func<DataAnalysisImportDialog, TImportType> getImportType)
    155155      where TProblemData : class, IDataAnalysisProblemData
    156156      where TImportType : DataAnalysisImportType {
    157       if (importTypeDialog.ShowDialog() == DialogResult.OK) {
     157      if (importDialog.ShowDialog() == DialogResult.OK) {
    158158        Task.Run(() => {
    159159          TProblemData instance;
     
    167167            instanceProvider.ProgressChanged += (o, args) => { progress.ProgressValue = args.ProgressPercentage / 100.0; };
    168168
    169             instance = instanceProvider.ImportData(importTypeDialog.Path, getImportType(importTypeDialog), importTypeDialog.CSVFormat);
     169            instance = instanceProvider.ImportData(importDialog.Path, getImportType(importDialog), importDialog.CSVFormat);
    170170          } catch (IOException ex) {
    171171            MessageBox.Show(string.Format("There was an error parsing the file: {0}", Environment.NewLine + ex.Message), "Error while parsing", MessageBoxButtons.OK, MessageBoxIcon.Error);
     
    176176            Content.Import(instance);
    177177          } catch (IOException ex) {
    178             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");
     178            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");
    179179          } finally {
    180180            mainForm.RemoveOperationProgressFromContent(activeView.Content);
  • stable/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/ClassificationInstanceProviderView.cs

    r14186 r15197  
    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;
  • stable/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/ClusteringInstanceProviderView.cs

    r14186 r15197  
    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;
  • stable/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/DataAnalysisInstanceProviderView.cs

    r14186 r15197  
    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);
  • stable/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/HeuristicLab.Problems.Instances.DataAnalysis.Views-3.3.csproj

    r11920 r15197  
    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>
  • stable/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/RegressionInstanceProviderView.cs

    r15170 r15197  
    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;
  • stable/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/TimeSeriesPrognosisInstanceProviderView.cs

    r14186 r15197  
    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.