Changeset 15912 for branches/2913_MatlabScriptProblemInstanceProvider
- Timestamp:
- 04/19/18 13:43:53 (7 years ago)
- Location:
- branches/2913_MatlabScriptProblemInstanceProvider
- Files:
-
- 21 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2913_MatlabScriptProblemInstanceProvider/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/HeuristicLab.Problems.Instances.DataAnalysis.Views-3.3.csproj
r15185 r15912 123 123 <DependentUpon>RegressionImportDialog.cs</DependentUpon> 124 124 </Compile> 125 <Compile Include="Regression\Matlab\RegressionMatlabImportDialog.cs"> 126 <SubType>Form</SubType> 127 </Compile> 128 <Compile Include="Regression\Matlab\RegressionMatlabImportDialog.Designer.cs"> 129 <DependentUpon>RegressionMatlabImportDialog.cs</DependentUpon> 130 </Compile> 125 131 <Compile Include="TimeSeriesPrognosisImportDialog.cs"> 126 132 <SubType>Form</SubType> … … 215 221 <Private>False</Private> 216 222 </ProjectReference> 223 </ItemGroup> 224 <ItemGroup> 225 <EmbeddedResource Include="RegressionInstanceProviderView.resx"> 226 <DependentUpon>RegressionInstanceProviderView.cs</DependentUpon> 227 </EmbeddedResource> 228 <EmbeddedResource Include="Regression\Matlab\RegressionMatlabImportDialog.resx"> 229 <DependentUpon>RegressionMatlabImportDialog.cs</DependentUpon> 230 </EmbeddedResource> 217 231 </ItemGroup> 218 232 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> -
branches/2913_MatlabScriptProblemInstanceProvider/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/RegressionInstanceProviderView.cs
r15583 r15912 25 25 using HeuristicLab.MainForm; 26 26 using HeuristicLab.Problems.DataAnalysis; 27 using HeuristicLab.Problems.Instances.DataAnalysis.Regression.Matlab; 28 using HeuristicLab.Problems.Instances.DataAnalysis.Views.Regression.Matlab; 27 29 28 30 namespace HeuristicLab.Problems.Instances.DataAnalysis.Views { … … 41 43 42 44 protected override void importButton_Click(object sender, EventArgs e) { 45 if (Content is RegressionMatlabInstanceProvider) { 46 ImportMatlabData(); 47 } else { 48 ImportCSVData(); 49 } 50 } 51 52 private void ImportCSVData() { 43 53 var importTypeDialog = new RegressionImportDialog(); 44 54 if (importTypeDialog.ShowDialog() == DialogResult.OK) { … … 76 86 } 77 87 } 88 89 90 private void ImportMatlabData() { 91 var importTypeDialog = new RegressionMatlabImportDialog(); 92 if (importTypeDialog.ShowDialog() == DialogResult.OK) { 93 IRegressionProblemData instance = null; 94 95 Task.Factory.StartNew(() => { 96 var mainForm = (MainForm.WindowsForms.MainForm)MainFormManager.MainForm; 97 // lock active view and show progress bar 98 IContentView activeView = (IContentView)MainFormManager.MainForm.ActiveView; 99 100 try { 101 var progress = mainForm.AddOperationProgressToContent(activeView.Content, 102 "Loading problem instance."); 103 104 Content.ProgressChanged += 105 (o, args) => { progress.ProgressValue = args.ProgressPercentage / 100.0; }; 106 107 instance = (Content as RegressionMatlabInstanceProvider).ImportData(importTypeDialog.Path, importTypeDialog.ImportType, importTypeDialog.SelectedVariables); 108 } catch (Exception ex) { 109 ErrorWhileParsing(ex); 110 return; 111 } finally { 112 mainForm.RemoveOperationProgressFromContent(activeView.Content); 113 } 114 115 try { 116 GenericConsumer.Load(instance); 117 } catch (Exception ex) { 118 ErrorWhileLoading(ex, importTypeDialog.Path); 119 } finally { 120 Invoke((Action)(() => instancesComboBox.SelectedIndex = -1)); 121 } 122 }); 123 } 124 } 78 125 } 79 126 } -
branches/2913_MatlabScriptProblemInstanceProvider/HeuristicLab.Problems.Instances.DataAnalysis/3.3/HeuristicLab.Problems.Instances.DataAnalysis-3.3.csproj
r14790 r15912 114 114 <SpecificVersion>False</SpecificVersion> 115 115 <HintPath>..\..\bin\ALGLIB-3.7.0.dll</HintPath> 116 </Reference> 117 <Reference Include="Interop.MLApp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> 118 <SpecificVersion>False</SpecificVersion> 119 <EmbedInteropTypes>True</EmbedInteropTypes> 120 <HintPath>..\..\bin\Interop.MLApp.dll</HintPath> 116 121 </Reference> 117 122 <Reference Include="System" /> … … 157 162 <Compile Include="Regression\FeatureSelection\FeatureSelection.cs" /> 158 163 <Compile Include="Regression\FeatureSelection\FeatureSelectionInstanceProvider.cs" /> 164 <Compile Include="Regression\Matlab\Api\IMatlabConnector.cs" /> 165 <Compile Include="Regression\Matlab\Api\MatlabApiFactory.cs" /> 166 <Compile Include="Regression\Matlab\Api\MatlabConnector.cs" /> 167 <Compile Include="Regression\Matlab\RegressionMatlabImportType.cs" /> 168 <Compile Include="Regression\Matlab\RegressionMatlabInstanceProvider.cs" /> 169 <Compile Include="Regression\Matlab\Api\Types\IMLTimeseries.cs" /> 170 <Compile Include="Regression\Matlab\Api\Types\IMLValueVariable.cs" /> 171 <Compile Include="Regression\Matlab\Api\Types\IMLVariable.cs" /> 172 <Compile Include="Regression\Matlab\Api\Types\MLDatatype.cs" /> 173 <Compile Include="Regression\Matlab\Api\Types\MLDouble.cs" /> 174 <Compile Include="Regression\Matlab\Api\Types\MLDoubleArray.cs" /> 175 <Compile Include="Regression\Matlab\Api\Types\MLTimeseries.cs" /> 159 176 <Compile Include="Regression\MibaFriction\CF3.cs" /> 160 177 <Compile Include="Regression\MibaFriction\Wear1.cs" />
Note: See TracChangeset
for help on using the changeset viewer.