- Timestamp:
- 09/24/13 11:49:28 (11 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3
- Files:
-
- 1 edited
- 2 copied
- 8 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/ClassificationInstanceProviderView.Designer.cs
r9999 r10000 21 21 22 22 namespace HeuristicLab.Problems.Instances.DataAnalysis.Views { 23 partial class ClassificationInstance ConsumerView {23 partial class ClassificationInstanceProviderView { 24 24 /// <summary> 25 25 /// Required designer variable. -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/ClassificationInstanceProviderView.cs
r9999 r10000 28 28 namespace HeuristicLab.Problems.Instances.DataAnalysis.Views { 29 29 [View("Classification InstanceProvider View")] 30 [Content(typeof(IProblemInstanceConsumer<IClassificationProblemData>), IsDefaultView = true)] 31 public partial class ClassificationInstanceConsumerView : DataAnalysisInstanceConsumerView<IClassificationProblemData> { 32 public new IProblemInstanceConsumer<IClassificationProblemData> Content { 33 get { return (IProblemInstanceConsumer<IClassificationProblemData>)base.Content; } 30 [Content(typeof(ClassificationInstanceProvider), IsDefaultView = true)] 31 public partial class ClassificationInstanceProviderView : DataAnalysisInstanceProviderView<IClassificationProblemData> { 32 33 public new ClassificationInstanceProvider Content { 34 get { return (ClassificationInstanceProvider)base.Content; } 34 35 set { base.Content = value; } 35 36 } 36 37 37 public ClassificationInstance ConsumerView() {38 public ClassificationInstanceProviderView() { 38 39 InitializeComponent(); 39 40 } 40 41 41 42 protected override void importButton_Click(object sender, EventArgs e) { 42 var provider = SelectedProvider as ClassificationInstanceProvider; 43 if (provider != null) { 44 ClassificationImportTypeDialog importTypeDialog = new ClassificationImportTypeDialog(); 45 if (importTypeDialog.ShowDialog() == DialogResult.OK) { 46 IClassificationProblemData instance = null; 47 try { 48 instance = provider.ImportData(importTypeDialog.Path, importTypeDialog.ImportType, importTypeDialog.CSVFormat); 49 } 50 catch (IOException ex) { 51 ErrorWhileParsing(ex); 52 return; 53 } 54 try { 55 GenericConsumer.Load(instance); 56 } 57 catch (IOException ex) { 58 ErrorWhileLoading(ex, importTypeDialog.Path); 59 } 60 } else { 43 var importTypeDialog = new ClassificationImportTypeDialog(); 44 if (importTypeDialog.ShowDialog() == DialogResult.OK) { 45 IClassificationProblemData instance = null; 46 try { 47 instance = Content.ImportData(importTypeDialog.Path, importTypeDialog.ImportType, importTypeDialog.CSVFormat); 48 } catch (IOException ex) { 49 ErrorWhileParsing(ex); 61 50 return; 62 51 } 63 } else { 64 base.importButton_Click(sender, e); 52 try { 53 GenericConsumer.Load(instance); 54 instancesComboBox.SelectedIndex = -1; 55 } catch (IOException ex) { 56 ErrorWhileLoading(ex, importTypeDialog.Path); 57 } 65 58 } 66 59 } -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/ClusteringInstanceProviderView.Designer.cs
r9999 r10000 21 21 22 22 namespace HeuristicLab.Problems.Instances.DataAnalysis.Views { 23 partial class Cl assificationInstanceConsumerView {23 partial class ClusteringInstanceProviderView { 24 24 /// <summary> 25 25 /// Required designer variable. -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/ClusteringInstanceProviderView.cs
r9999 r10000 27 27 28 28 namespace HeuristicLab.Problems.Instances.DataAnalysis.Views { 29 [View("Classification InstanceProvider View")] 30 [Content(typeof(IProblemInstanceConsumer<IClassificationProblemData>), IsDefaultView = true)] 31 public partial class ClassificationInstanceConsumerView : DataAnalysisInstanceConsumerView<IClassificationProblemData> { 32 public new IProblemInstanceConsumer<IClassificationProblemData> Content { 33 get { return (IProblemInstanceConsumer<IClassificationProblemData>)base.Content; } 29 [View("Clustering InstanceProvider View")] 30 [Content(typeof(ClusteringInstanceProvider), IsDefaultView = true)] 31 public partial class ClusteringInstanceProviderView : DataAnalysisInstanceProviderView<IClusteringProblemData> { 32 33 public new ClusteringInstanceProvider Content { 34 get { return (ClusteringInstanceProvider)base.Content; } 34 35 set { base.Content = value; } 35 36 } 36 37 37 public Cl assificationInstanceConsumerView() {38 public ClusteringInstanceProviderView() { 38 39 InitializeComponent(); 39 40 } 40 41 41 42 protected override void importButton_Click(object sender, EventArgs e) { 42 var provider = SelectedProvider as ClassificationInstanceProvider; 43 if (provider != null) { 44 ClassificationImportTypeDialog importTypeDialog = new ClassificationImportTypeDialog(); 45 if (importTypeDialog.ShowDialog() == DialogResult.OK) { 46 IClassificationProblemData instance = null; 47 try { 48 instance = provider.ImportData(importTypeDialog.Path, importTypeDialog.ImportType, importTypeDialog.CSVFormat); 49 } 50 catch (IOException ex) { 51 ErrorWhileParsing(ex); 52 return; 53 } 54 try { 55 GenericConsumer.Load(instance); 56 } 57 catch (IOException ex) { 58 ErrorWhileLoading(ex, importTypeDialog.Path); 59 } 60 } else { 43 var importTypeDialog = new DataAnalysisImportTypeDialog(); 44 if (importTypeDialog.ShowDialog() == DialogResult.OK) { 45 IClusteringProblemData instance = null; 46 try { 47 instance = Content.ImportData(importTypeDialog.Path, importTypeDialog.ImportType, importTypeDialog.CSVFormat); 48 } catch (IOException ex) { 49 ErrorWhileParsing(ex); 61 50 return; 62 51 } 63 } else { 64 base.importButton_Click(sender, e); 52 try { 53 GenericConsumer.Load(instance); 54 instancesComboBox.SelectedIndex = -1; 55 } catch (IOException ex) { 56 ErrorWhileLoading(ex, importTypeDialog.Path); 57 } 65 58 } 66 59 } -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/DataAnalysisInstanceProviderView.Designer.cs
r9999 r10000 21 21 22 22 namespace HeuristicLab.Problems.Instances.DataAnalysis.Views { 23 partial class DataAnalysisInstance ConsumerView<T> {23 partial class DataAnalysisInstanceProviderView<T> { 24 24 /// <summary> 25 25 /// Required designer variable. -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/DataAnalysisInstanceProviderView.cs
r9999 r10000 29 29 namespace HeuristicLab.Problems.Instances.DataAnalysis.Views { 30 30 [View("DataAnalysis InstanceProvider View")] 31 [Content(typeof(IProblemInstanceConsumer<IDataAnalysisProblemData>), IsDefaultView = true)] 32 [Content(typeof(IProblemInstanceConsumer<IClusteringProblemData>), IsDefaultView = true)] 33 public partial class DataAnalysisInstanceConsumerView<T> : ProblemInstanceConsumerViewGeneric<T> 31 public partial class DataAnalysisInstanceProviderView<T> : ProblemInstanceProviderViewGeneric<T> 34 32 where T : class, IDataAnalysisProblemData { 35 public new IProblemInstanceConsumer<T> Content {36 get { return (IProblemInstanceConsumer<T>)base.Content; }37 set { base.Content = value; }38 }39 33 40 public DataAnalysisInstance ConsumerView() {34 public DataAnalysisInstanceProviderView() { 41 35 InitializeComponent(); 42 36 } 43 37 44 38 protected override void importButton_Click(object sender, EventArgs e) { 45 var provider = SelectedProvideras DataAnalysisInstanceProvider<T, DataAnalysisImportType>;39 var provider = Content as DataAnalysisInstanceProvider<T, DataAnalysisImportType>; 46 40 if (provider != null) { 47 DataAnalysisImportTypeDialogimportTypeDialog = new DataAnalysisImportTypeDialog();41 var importTypeDialog = new DataAnalysisImportTypeDialog(); 48 42 if (importTypeDialog.ShowDialog() == DialogResult.OK) { 49 43 T instance = default(T); 50 44 try { 51 45 instance = provider.ImportData(importTypeDialog.Path, importTypeDialog.ImportType, importTypeDialog.CSVFormat); 52 } 53 catch (IOException ex) { 46 } catch (IOException ex) { 54 47 ErrorWhileParsing(ex); 55 48 return; … … 57 50 try { 58 51 GenericConsumer.Load(instance); 59 }60 catch (IOException ex) {52 instancesComboBox.SelectedIndex = -1; 53 } catch (IOException ex) { 61 54 ErrorWhileLoading(ex, importTypeDialog.Path); 62 55 } 63 } else {64 return;65 56 } 66 57 } else { -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/HeuristicLab.Problems.Instances.DataAnalysis.Views-3.3.csproj
r8885 r10000 92 92 <DependentUpon>ClassificationImportTypeDialog.cs</DependentUpon> 93 93 </Compile> 94 <Compile Include="ClassificationInstanceConsumerView.cs"> 95 <SubType>UserControl</SubType> 96 </Compile> 97 <Compile Include="ClassificationInstanceConsumerView.Designer.cs"> 98 <DependentUpon>ClassificationInstanceConsumerView.cs</DependentUpon> 94 <Compile Include="ClassificationInstanceProviderView.cs"> 95 <SubType>UserControl</SubType> 96 </Compile> 97 <Compile Include="ClassificationInstanceProviderView.Designer.cs"> 98 <DependentUpon>ClassificationInstanceProviderView.cs</DependentUpon> 99 </Compile> 100 <Compile Include="ClusteringInstanceProviderView.cs"> 101 <SubType>UserControl</SubType> 102 </Compile> 103 <Compile Include="ClusteringInstanceProviderView.Designer.cs"> 104 <DependentUpon>ClusteringInstanceProviderView.cs</DependentUpon> 99 105 </Compile> 100 106 <Compile Include="TimeSeriesPrognosisImportTypeDialog.cs"> … … 104 110 <DependentUpon>TimeSeriesPrognosisImportTypeDialog.cs</DependentUpon> 105 111 </Compile> 106 <Compile Include="TimeSeriesPrognosisInstance ConsumerView.cs">107 <SubType>UserControl</SubType> 108 </Compile> 109 <Compile Include="TimeSeriesPrognosisInstance ConsumerView.Designer.cs">110 <DependentUpon>TimeSeriesPrognosisInstance ConsumerView.cs</DependentUpon>112 <Compile Include="TimeSeriesPrognosisInstanceProviderView.cs"> 113 <SubType>UserControl</SubType> 114 </Compile> 115 <Compile Include="TimeSeriesPrognosisInstanceProviderView.Designer.cs"> 116 <DependentUpon>TimeSeriesPrognosisInstanceProviderView.cs</DependentUpon> 111 117 </Compile> 112 118 <Compile Include="DataAnalysisImportTypeDialog.cs"> … … 116 122 <DependentUpon>DataAnalysisImportTypeDialog.cs</DependentUpon> 117 123 </Compile> 118 <Compile Include="DataAnalysisInstance ConsumerView.cs">119 <SubType>UserControl</SubType> 120 </Compile> 121 <Compile Include="DataAnalysisInstance ConsumerView.Designer.cs">122 <DependentUpon>DataAnalysisInstance ConsumerView.cs</DependentUpon>124 <Compile Include="DataAnalysisInstanceProviderView.cs"> 125 <SubType>UserControl</SubType> 126 </Compile> 127 <Compile Include="DataAnalysisInstanceProviderView.Designer.cs"> 128 <DependentUpon>DataAnalysisInstanceProviderView.cs</DependentUpon> 123 129 </Compile> 124 130 <Compile Include="Plugin.cs" /> … … 129 135 <DependentUpon>RegressionImportTypeDialog.cs</DependentUpon> 130 136 </Compile> 131 <Compile Include="RegressionInstance ConsumerView.cs">132 <SubType>UserControl</SubType> 133 </Compile> 134 <Compile Include="RegressionInstance ConsumerView.Designer.cs">135 <DependentUpon>RegressionInstance ConsumerView.cs</DependentUpon>137 <Compile Include="RegressionInstanceProviderView.cs"> 138 <SubType>UserControl</SubType> 139 </Compile> 140 <Compile Include="RegressionInstanceProviderView.Designer.cs"> 141 <DependentUpon>RegressionInstanceProviderView.cs</DependentUpon> 136 142 </Compile> 137 143 <None Include="HeuristicLab.snk" /> -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/RegressionInstanceProviderView.Designer.cs
r9999 r10000 21 21 22 22 namespace HeuristicLab.Problems.Instances.DataAnalysis.Views { 23 partial class RegressionInstance ConsumerView {23 partial class RegressionInstanceProviderView { 24 24 /// <summary> 25 25 /// Required designer variable. -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/RegressionInstanceProviderView.cs
r9999 r10000 28 28 namespace HeuristicLab.Problems.Instances.DataAnalysis.Views { 29 29 [View("Regression InstanceProvider View")] 30 [Content(typeof(IProblemInstanceConsumer<IRegressionProblemData>), IsDefaultView = true)] 31 public partial class RegressionInstanceConsumerView : DataAnalysisInstanceConsumerView<IRegressionProblemData> { 32 public new IProblemInstanceConsumer<IRegressionProblemData> Content { 33 get { return (IProblemInstanceConsumer<IRegressionProblemData>)base.Content; } 30 [Content(typeof(RegressionInstanceProvider), IsDefaultView = true)] 31 public partial class RegressionInstanceProviderView : DataAnalysisInstanceProviderView<IRegressionProblemData> { 32 33 public new RegressionInstanceProvider Content { 34 get { return (RegressionInstanceProvider)base.Content; } 34 35 set { base.Content = value; } 35 36 } 36 37 37 public RegressionInstance ConsumerView() {38 public RegressionInstanceProviderView() { 38 39 InitializeComponent(); 39 40 } 40 41 41 42 protected override void importButton_Click(object sender, EventArgs e) { 42 var provider = SelectedProvider as RegressionInstanceProvider; 43 if (provider != null) { 44 RegressionImportTypeDialog importTypeDialog = new RegressionImportTypeDialog(); 45 if (importTypeDialog.ShowDialog() == DialogResult.OK) { 46 IRegressionProblemData instance = null; 47 try { 48 instance = provider.ImportData(importTypeDialog.Path, importTypeDialog.ImportType, importTypeDialog.CSVFormat); 49 } 50 catch (IOException ex) { 51 ErrorWhileParsing(ex); 52 return; 53 } 54 try { 55 GenericConsumer.Load(instance); 56 } 57 catch (IOException ex) { 58 ErrorWhileLoading(ex, importTypeDialog.Path); 59 } 60 } else { 43 var importTypeDialog = new RegressionImportTypeDialog(); 44 if (importTypeDialog.ShowDialog() == DialogResult.OK) { 45 IRegressionProblemData instance = null; 46 try { 47 instance = Content.ImportData(importTypeDialog.Path, importTypeDialog.ImportType, importTypeDialog.CSVFormat); 48 } catch (IOException ex) { 49 ErrorWhileParsing(ex); 61 50 return; 62 51 } 63 } else { 64 base.importButton_Click(sender, e); 52 try { 53 GenericConsumer.Load(instance); 54 instancesComboBox.SelectedIndex = -1; 55 } catch (IOException ex) { 56 ErrorWhileLoading(ex, importTypeDialog.Path); 57 } 65 58 } 66 59 } -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/TimeSeriesPrognosisInstanceProviderView.Designer.cs
r9999 r10000 21 21 22 22 namespace HeuristicLab.Problems.Instances.DataAnalysis.Views { 23 partial class TimeSeriesPrognosisInstance ConsumerView {23 partial class TimeSeriesPrognosisInstanceProviderView { 24 24 /// <summary> 25 25 /// Required designer variable. -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/TimeSeriesPrognosisInstanceProviderView.cs
r9999 r10000 28 28 namespace HeuristicLab.Problems.Instances.DataAnalysis.Views { 29 29 [View("TimeSeriesPrognosis InstanceProvider View")] 30 [Content(typeof(IProblemInstanceConsumer<ITimeSeriesPrognosisProblemData>), IsDefaultView = true)] 31 public partial class TimeSeriesPrognosisInstanceConsumerView : DataAnalysisInstanceConsumerView<ITimeSeriesPrognosisProblemData> { 32 public new IProblemInstanceConsumer<ITimeSeriesPrognosisProblemData> Content { 33 get { return (IProblemInstanceConsumer<ITimeSeriesPrognosisProblemData>)base.Content; } 30 [Content(typeof(TimeSeriesPrognosisInstanceProvider), IsDefaultView = true)] 31 public partial class TimeSeriesPrognosisInstanceProviderView : DataAnalysisInstanceProviderView<ITimeSeriesPrognosisProblemData> { 32 33 public new TimeSeriesPrognosisInstanceProvider Content { 34 get { return (TimeSeriesPrognosisInstanceProvider)base.Content; } 34 35 set { base.Content = value; } 35 36 } 36 37 37 public TimeSeriesPrognosisInstance ConsumerView() {38 public TimeSeriesPrognosisInstanceProviderView() { 38 39 InitializeComponent(); 39 40 } 40 41 41 42 protected override void importButton_Click(object sender, EventArgs e) { 42 var provider = SelectedProvider as TimeSeriesPrognosisInstanceProvider; 43 if (provider != null) { 44 TimeSeriesPrognosisImportTypeDialog importTypeDialog = new TimeSeriesPrognosisImportTypeDialog(); 45 if (importTypeDialog.ShowDialog() == DialogResult.OK) { 46 ITimeSeriesPrognosisProblemData instance = null; 47 try { 48 instance = provider.ImportData(importTypeDialog.Path, importTypeDialog.ImportType, importTypeDialog.CSVFormat); 49 } 50 catch (IOException ex) { 51 ErrorWhileParsing(ex); 52 return; 53 } 54 try { 55 GenericConsumer.Load(instance); 56 } 57 catch (IOException ex) { 58 ErrorWhileLoading(ex, importTypeDialog.Path); 59 } 60 } else { 43 var importTypeDialog = new TimeSeriesPrognosisImportTypeDialog(); 44 if (importTypeDialog.ShowDialog() == DialogResult.OK) { 45 ITimeSeriesPrognosisProblemData instance = null; 46 try { 47 instance = Content.ImportData(importTypeDialog.Path, importTypeDialog.ImportType, importTypeDialog.CSVFormat); 48 } catch (IOException ex) { 49 ErrorWhileParsing(ex); 61 50 return; 62 51 } 63 } else { 64 base.importButton_Click(sender, e); 52 try { 53 GenericConsumer.Load(instance); 54 instancesComboBox.SelectedIndex = -1; 55 } catch (IOException ex) { 56 ErrorWhileLoading(ex, importTypeDialog.Path); 57 } 65 58 } 66 59 }
Note: See TracChangeset
for help on using the changeset viewer.