- Timestamp:
- 04/02/12 15:56:16 (12 years ago)
- 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 46 46 private void InitializeComponent() { 47 47 this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); 48 this.ImportButton = new System.Windows.Forms.Button();49 48 ((System.ComponentModel.ISupportInitialize)(this.problemInstanceSplitContainer)).BeginInit(); 50 49 this.problemInstanceSplitContainer.Panel1.SuspendLayout(); … … 56 55 // problemInstanceSplitContainer 57 56 // 58 //59 // problemInstanceSplitContainer.Panel260 //61 this.problemInstanceSplitContainer.Panel2.Controls.Add(this.ImportButton);62 //63 // parameterCollectionView64 //65 this.parameterCollectionView.Location = new System.Drawing.Point(6, 56);66 this.parameterCollectionView.Size = new System.Drawing.Size(501, 274);67 57 // 68 58 // nameTextBox … … 76 66 this.openFileDialog.Title = "Import data..."; 77 67 // 78 // ImportButton79 //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 //90 68 // DataAnalysisProblemView 91 69 // … … 94 72 this.Name = "DataAnalysisProblemView"; 95 73 this.problemInstanceSplitContainer.Panel1.ResumeLayout(false); 96 this.problemInstanceSplitContainer.Panel1.PerformLayout();97 74 this.problemInstanceSplitContainer.Panel2.ResumeLayout(false); 98 75 this.problemInstanceSplitContainer.Panel2.PerformLayout(); … … 107 84 108 85 private System.Windows.Forms.OpenFileDialog openFileDialog; 109 private System.Windows.Forms.Button ImportButton;110 86 } 111 87 } -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Views/3.4/DataAnalysisProblemView.cs
r7610 r7684 20 20 #endregion 21 21 22 using System;23 22 using System.Windows.Forms; 24 23 using HeuristicLab.MainForm; 25 24 using HeuristicLab.Optimization.Views; 26 using HeuristicLab.PluginInfrastructure;27 25 28 26 namespace HeuristicLab.Problems.DataAnalysis.Views { … … 38 36 set { base.Content = value; } 39 37 } 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 }56 38 } 57 39 } -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj
r7664 r7684 174 174 </Compile> 175 175 <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>182 176 <Compile Include="Regression\RegressionSolutionErrorCharacteristicsCurveView.cs"> 183 177 <SubType>UserControl</SubType> -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Properties
-
Property
svn:ignore
set to
AssemblyInfo.cs
-
Property
svn:ignore
set to
-
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Views/3.4/HeuristicLab.Problems.Instances.Views-3.4.csproj
r7683 r7684 85 85 </ProjectReference> 86 86 </ItemGroup> 87 <ItemGroup>88 <EmbeddedResource Include="ProblemInstanceConsumerView.resx">89 <DependentUpon>ProblemInstanceConsumerView.cs</DependentUpon>90 </EmbeddedResource>91 </ItemGroup>92 87 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 93 88 <PropertyGroup> -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Views/3.4/ProblemInstanceConsumerView.cs
r7683 r7684 32 32 namespace HeuristicLab.Problems.Instances.Views { 33 33 [View("ProblemInstanceConsumerView")] 34 [Content(typeof(IProblemInstanceConsumer), IsDefaultView = true)]34 [Content(typeof(IProblemInstanceConsumer), IsDefaultView = false)] 35 35 public sealed partial class ProblemInstanceConsumerView : AsynchronousContentView { 36 36 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Views/3.4/ProblemInstanceProviderView.cs
r7683 r7684 26 26 namespace HeuristicLab.Problems.Instances.Views { 27 27 [View("ProblemInstanceProviderView")] 28 [Content(typeof(IProblemInstanceProvider), IsDefaultView = true)]28 [Content(typeof(IProblemInstanceProvider), IsDefaultView = false)] 29 29 public abstract partial class ProblemInstanceProviderView : AsynchronousContentView { 30 30 … … 34 34 } 35 35 36 public abstract IProblemInstanceConsumer Consumer { set; }36 public abstract IProblemInstanceConsumer Consumer { get; set; } 37 37 38 public abstract IProblemInstanceExporter Exporter { set; }38 public abstract IProblemInstanceExporter Exporter { get; set; } 39 39 40 40 public ProblemInstanceProviderView() { -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Views/3.4/ProblemInstanceProviderViewGeneric.Designer.cs
r7683 r7684 21 21 22 22 namespace HeuristicLab.Problems.Instances.Views { 23 partial class ProblemInstanceProviderView <T> {23 partial class ProblemInstanceProviderViewGeneric<T> { 24 24 /// <summary> 25 25 /// Required designer variable. -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Views/3.4/ProblemInstanceProviderViewGeneric.cs
r7683 r7684 30 30 31 31 namespace HeuristicLab.Problems.Instances.Views { 32 [View("ProblemInstanceProviderView ")]32 [View("ProblemInstanceProviderViewGeneric")] 33 33 [Content(typeof(IProblemInstanceProvider<>), IsDefaultView = true)] 34 public partial class ProblemInstanceProviderView <T> : ProblemInstanceProviderView {34 public partial class ProblemInstanceProviderViewGeneric<T> : ProblemInstanceProviderView { 35 35 36 36 public new IProblemInstanceProvider<T> Content { … … 39 39 } 40 40 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 } 43 50 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 } 46 60 47 public ProblemInstanceProviderView () {61 public ProblemInstanceProviderViewGeneric() { 48 62 InitializeComponent(); 49 63 importButton.Text = String.Empty; … … 70 84 protected override void SetEnabledStateOfControls() { 71 85 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; 75 89 problemInstanceProviderSplitContainer.Panel2Collapsed = !exportButton.Enabled; 76 90 } … … 80 94 var instance = Content.LoadData(descriptor); 81 95 try { 82 consumer.Load(instance);96 GenericConsumer.Load(instance); 83 97 } 84 98 catch (Exception ex) { … … 99 113 } 100 114 try { 101 consumer.Load(instance);115 GenericConsumer.Load(instance); 102 116 } 103 117 catch (Exception ex) { … … 110 124 if (saveFileDialog.ShowDialog(this) == DialogResult.OK) { 111 125 try { 112 Content.SaveData( exporter.Export(), saveFileDialog.FileName);126 Content.SaveData(GenericExporter.Export(), saveFileDialog.FileName); 113 127 } 114 128 catch (Exception ex) { -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Views/3.4/Properties
-
Property
svn:ignore
set to
AssemblyInfo.cs
-
Property
svn:ignore
set to
Note: See TracChangeset
for help on using the changeset viewer.