- Timestamp:
- 07/18/14 13:44:53 (10 years ago)
- Location:
- branches/HiveStatistics/sources
- Files:
-
- 4 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources
- Property svn:ignore
-
old new 8 8 FxCopResults.txt 9 9 Google.ProtocolBuffers-0.9.1.dll 10 Google.ProtocolBuffers-2.4.1.473.dll 10 11 HeuristicLab 3.3.5.1.ReSharper.user 11 12 HeuristicLab 3.3.6.0.ReSharper.user 12 13 HeuristicLab.4.5.resharper.user 13 14 HeuristicLab.ExtLibs.6.0.ReSharper.user 15 HeuristicLab.Scripting.Development 14 16 HeuristicLab.resharper.user 15 17 ProtoGen.exe … … 17 19 _ReSharper.HeuristicLab 18 20 _ReSharper.HeuristicLab 3.3 21 _ReSharper.HeuristicLab 3.3 Tests 19 22 _ReSharper.HeuristicLab.ExtLibs 20 23 bin 21 24 protoc.exe 22 _ReSharper.HeuristicLab 3.3 Tests23 Google.ProtocolBuffers-2.4.1.473.dll
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.Views/3.3/HeuristicLab.Problems.Instances.Views-3.3.csproj
r11203 r11205 113 113 </ItemGroup> 114 114 <ItemGroup> 115 <Compile Include="ProblemInstanceConsumerViewGeneric.cs">116 <SubType>UserControl</SubType>117 </Compile>118 <Compile Include="ProblemInstanceConsumerViewGeneric.Designer.cs">119 <DependentUpon>ProblemInstanceConsumerViewGeneric.cs</DependentUpon>120 </Compile>121 115 <Compile Include="Plugin.cs" /> 122 <Compile Include="ProblemInstanceConsumerView.cs">123 <SubType>UserControl</SubType>124 </Compile>125 <Compile Include="ProblemInstanceConsumerView.Designer.cs">126 <DependentUpon>ProblemInstanceConsumerView.cs</DependentUpon>127 </Compile>128 116 <Compile Include="ProblemInstanceProviderView.cs"> 129 117 <SubType>UserControl</SubType> … … 199 187 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 200 188 <PropertyGroup> 201 <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)189 <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir) 202 190 set ProjectDir=$(ProjectDir) 203 191 set SolutionDir=$(SolutionDir) … … 206 194 call PreBuildEvent.cmd 207 195 </PreBuildEvent> 208 <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">196 <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' "> 209 197 export ProjectDir=$(ProjectDir) 210 198 export SolutionDir=$(SolutionDir) -
branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.Views/3.3/Plugin.cs.frame
r11203 r11205 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 23 23 24 24 namespace HeuristicLab.Problems.Instances.Views { 25 [Plugin("HeuristicLab.Problems.Instances.Views", "3.3. 7.$WCREV$")]25 [Plugin("HeuristicLab.Problems.Instances.Views", "3.3.10.$WCREV$")] 26 26 [PluginFile("HeuristicLab.Problems.Instances.Views-3.3.dll", PluginFileType.Assembly)] 27 27 [PluginDependency("HeuristicLab.Common", "3.3")] -
branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.Views/3.3/ProblemInstanceProviderView.Designer.cs
r11203 r11205 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.Views/3.3/ProblemInstanceProviderView.cs
r11203 r11205 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 21 21 22 22 using System.Windows.Forms; 23 using HeuristicLab.Core; 23 24 using HeuristicLab.MainForm; 24 25 using HeuristicLab.MainForm.WindowsForms; … … 35 36 36 37 public abstract IProblemInstanceConsumer Consumer { get; set; } 38 public abstract IProblemInstanceExporter Exporter { get; set; } 37 39 38 p ublicProblemInstanceProviderView() {40 protected ProblemInstanceProviderView() { 39 41 InitializeComponent(); 40 42 } 43 44 protected string GetProblemType() { 45 var item = Consumer as IItem; 46 return item != null ? item.ItemName : "problem"; 47 } 48 49 protected string GetProviderFormatInfo() { 50 return Content != null ? Content.Name : string.Empty; 51 } 52 53 protected abstract void SetTooltip(); 41 54 } 42 55 } -
branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.Views/3.3/ProblemInstanceProviderViewGeneric.Designer.cs
r11203 r11205 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 22 23 namespace HeuristicLab.Problems.Instances.Views { 23 partial class ProblemInstanceProviderView Generic<T> {24 partial class ProblemInstanceProviderView<T> { 24 25 /// <summary> 25 26 /// Required designer variable. … … 45 46 /// </summary> 46 47 private void InitializeComponent() { 47 this.components = new System.ComponentModel.Container();48 this.instanceLabel = new System.Windows.Forms.Label();49 48 this.instancesComboBox = new System.Windows.Forms.ComboBox(); 50 49 this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); 51 50 this.saveFileDialog = new System.Windows.Forms.SaveFileDialog(); 51 this.instanceLabel = new System.Windows.Forms.Label(); 52 this.splitContainer2 = new System.Windows.Forms.SplitContainer(); 53 this.exportButton = new System.Windows.Forms.Button(); 54 this.splitContainer1 = new System.Windows.Forms.SplitContainer(); 55 this.importButton = new System.Windows.Forms.Button(); 56 this.libraryInfoButton = new System.Windows.Forms.Button(); 57 ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); 58 this.splitContainer2.Panel1.SuspendLayout(); 59 this.splitContainer2.Panel2.SuspendLayout(); 60 this.splitContainer2.SuspendLayout(); 61 ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); 62 this.splitContainer1.Panel1.SuspendLayout(); 63 this.splitContainer1.Panel2.SuspendLayout(); 64 this.splitContainer1.SuspendLayout(); 52 65 this.SuspendLayout(); 53 //54 // instanceLabel55 //56 this.instanceLabel.AutoSize = true;57 this.instanceLabel.Location = new System.Drawing.Point(3, 4);58 this.instanceLabel.Name = "instanceLabel";59 this.instanceLabel.Size = new System.Drawing.Size(51, 13);60 this.instanceLabel.TabIndex = 4;61 this.instanceLabel.Text = "Instance:";62 66 // 63 67 // instancesComboBox … … 67 71 this.instancesComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 68 72 this.instancesComboBox.FormattingEnabled = true; 69 this.instancesComboBox.Location = new System.Drawing.Point(60, 1);73 this.instancesComboBox.Location = new System.Drawing.Point(60, 2); 70 74 this.instancesComboBox.Name = "instancesComboBox"; 71 this.instancesComboBox.Size = new System.Drawing.Size( 632, 21);75 this.instancesComboBox.Size = new System.Drawing.Size(540, 21); 72 76 this.instancesComboBox.TabIndex = 7; 77 this.instancesComboBox.SelectionChangeCommitted += new System.EventHandler(this.instancesComboBox_SelectionChangeCommitted); 73 78 this.instancesComboBox.DataSourceChanged += new System.EventHandler(this.instancesComboBox_DataSourceChanged); 74 this.instancesComboBox.SelectionChangeCommitted += new System.EventHandler(instancesComboBox_SelectionChangeCommitted);75 79 // 76 80 // openFileDialog … … 83 87 this.saveFileDialog.Title = "Save RegressionInstance..."; 84 88 // 89 // instanceLabel 90 // 91 this.instanceLabel.AutoSize = true; 92 this.instanceLabel.Location = new System.Drawing.Point(3, 5); 93 this.instanceLabel.Name = "instanceLabel"; 94 this.instanceLabel.Size = new System.Drawing.Size(51, 13); 95 this.instanceLabel.TabIndex = 4; 96 this.instanceLabel.Text = "Instance:"; 97 // 98 // splitContainer2 99 // 100 this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; 101 this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; 102 this.splitContainer2.IsSplitterFixed = true; 103 this.splitContainer2.Location = new System.Drawing.Point(0, 0); 104 this.splitContainer2.Name = "splitContainer2"; 105 // 106 // splitContainer2.Panel1 107 // 108 this.splitContainer2.Panel1.Controls.Add(this.exportButton); 109 // 110 // splitContainer2.Panel2 111 // 112 this.splitContainer2.Panel2.Controls.Add(this.instanceLabel); 113 this.splitContainer2.Panel2.Controls.Add(this.instancesComboBox); 114 this.splitContainer2.Size = new System.Drawing.Size(632, 23); 115 this.splitContainer2.SplitterDistance = 25; 116 this.splitContainer2.TabIndex = 21; 117 // 118 // exportButton 119 // 120 this.exportButton.Location = new System.Drawing.Point(1, 0); 121 this.exportButton.Name = "exportButton"; 122 this.exportButton.Size = new System.Drawing.Size(24, 24); 123 this.exportButton.TabIndex = 20; 124 this.exportButton.Text = "Export"; 125 this.exportButton.UseVisualStyleBackColor = true; 126 this.exportButton.Click += new System.EventHandler(exportButton_Click); 127 // 128 // splitContainer1 129 // 130 this.splitContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 131 | System.Windows.Forms.AnchorStyles.Right))); 132 this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; 133 this.splitContainer1.IsSplitterFixed = true; 134 this.splitContainer1.Location = new System.Drawing.Point(33, -1); 135 this.splitContainer1.Name = "splitContainer1"; 136 // 137 // splitContainer1.Panel1 138 // 139 this.splitContainer1.Panel1.Controls.Add(this.importButton); 140 // 141 // splitContainer1.Panel2 142 // 143 this.splitContainer1.Panel2.Controls.Add(this.splitContainer2); 144 this.splitContainer1.Size = new System.Drawing.Size(661, 23); 145 this.splitContainer1.SplitterDistance = 25; 146 this.splitContainer1.TabIndex = 21; 147 // 148 // importButton 149 // 150 this.importButton.Location = new System.Drawing.Point(0, 0); 151 this.importButton.Name = "importButton"; 152 this.importButton.Size = new System.Drawing.Size(24, 24); 153 this.importButton.TabIndex = 19; 154 this.importButton.Text = "Import"; 155 this.importButton.UseVisualStyleBackColor = true; 156 this.importButton.Click += new System.EventHandler(importButton_Click); 157 // 158 // libraryInfoButton 159 // 160 this.libraryInfoButton.Location = new System.Drawing.Point(3, -1); 161 this.libraryInfoButton.Name = "libraryInfoButton"; 162 this.libraryInfoButton.Size = new System.Drawing.Size(24, 24); 163 this.libraryInfoButton.TabIndex = 22; 164 this.libraryInfoButton.Text = "Info"; 165 this.libraryInfoButton.UseVisualStyleBackColor = true; 166 this.libraryInfoButton.Click += new System.EventHandler(this.libraryInfoButton_Click); 167 // 85 168 // ProblemInstanceProviderViewGeneric 86 169 // 87 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);88 170 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; 89 this.Controls.Add(this. instanceLabel);90 this.Controls.Add(this. instancesComboBox);171 this.Controls.Add(this.libraryInfoButton); 172 this.Controls.Add(this.splitContainer1); 91 173 this.Name = "ProblemInstanceProviderViewGeneric"; 92 this.Size = new System.Drawing.Size(694, 21); 174 this.splitContainer2.Panel1.ResumeLayout(false); 175 this.splitContainer2.Panel2.ResumeLayout(false); 176 this.splitContainer2.Panel2.PerformLayout(); 177 ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); 178 this.splitContainer2.ResumeLayout(false); 179 this.splitContainer1.Panel1.ResumeLayout(false); 180 this.splitContainer1.Panel2.ResumeLayout(false); 181 ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); 182 this.splitContainer1.ResumeLayout(false); 93 183 this.ResumeLayout(false); 94 this.PerformLayout();95 184 96 185 } … … 98 187 99 188 protected System.Windows.Forms.OpenFileDialog openFileDialog; 100 protected System.Windows.Forms.Label instanceLabel;101 189 protected System.Windows.Forms.ComboBox instancesComboBox; 102 190 protected System.Windows.Forms.SaveFileDialog saveFileDialog; 191 protected System.Windows.Forms.Label instanceLabel; 192 protected System.Windows.Forms.SplitContainer splitContainer2; 193 protected System.Windows.Forms.SplitContainer splitContainer1; 194 protected System.Windows.Forms.Button libraryInfoButton; 195 protected System.Windows.Forms.Button importButton; 196 protected System.Windows.Forms.Button exportButton; 103 197 } 104 198 } -
branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.Views/3.3/ProblemInstanceProviderViewGeneric.cs
r11203 r11205 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 21 21 22 22 using System; 23 using System.Diagnostics; 24 using System.IO; 23 25 using System.Linq; 26 using System.Threading.Tasks; 24 27 using System.Windows.Forms; 28 using HeuristicLab.Common.Resources; 25 29 using HeuristicLab.MainForm; 26 30 using HeuristicLab.MainForm.WindowsForms; … … 30 34 [View("ProblemInstanceProviderViewGeneric")] 31 35 [Content(typeof(IProblemInstanceProvider<>), IsDefaultView = true)] 32 public partial class ProblemInstanceProviderView Generic<T> : ProblemInstanceProviderView {36 public partial class ProblemInstanceProviderView<T> : ProblemInstanceProviderView { 33 37 34 38 public new IProblemInstanceProvider<T> Content { … … 37 41 } 38 42 39 private IProblemInstanceConsumer<T> GenericConsumer { get { return Consumer as IProblemInstanceConsumer<T>; } }40 41 pr ivateIProblemInstanceConsumer consumer;43 #region Importer & Exporter 44 protected IProblemInstanceConsumer<T> GenericConsumer { get { return Consumer as IProblemInstanceConsumer<T>; } } 45 protected IProblemInstanceConsumer consumer; 42 46 public override IProblemInstanceConsumer Consumer { 43 47 get { return consumer; } … … 45 49 consumer = value; 46 50 SetEnabledStateOfControls(); 51 SetTooltip(); 47 52 } 48 53 } 49 54 50 public ProblemInstanceProviderViewGeneric() { 55 protected IProblemInstanceExporter<T> GenericExporter { get { return Exporter as IProblemInstanceExporter<T>; } } 56 protected IProblemInstanceExporter exporter; 57 public override IProblemInstanceExporter Exporter { 58 get { return exporter; } 59 set { 60 exporter = value; 61 SetEnabledStateOfControls(); 62 } 63 } 64 #endregion 65 66 public ProblemInstanceProviderView() { 51 67 InitializeComponent(); 68 importButton.Text = String.Empty; 69 importButton.Image = VSImageLibrary.Open; 70 exportButton.Text = String.Empty; 71 exportButton.Image = VSImageLibrary.SaveAs; 72 libraryInfoButton.Text = String.Empty; 73 libraryInfoButton.Image = VSImageLibrary.Help; 52 74 } 53 75 … … 63 85 instancesComboBox.SelectedIndex = -1; 64 86 } 87 SetTooltip(); 65 88 } 66 89 … … 78 101 base.SetEnabledStateOfControls(); 79 102 instancesComboBox.Enabled = !ReadOnly && !Locked && Content != null && GenericConsumer != null; 103 libraryInfoButton.Enabled = Content != null && Content.WebLink != null; 104 importButton.Enabled = !ReadOnly && !Locked && Content != null && GenericConsumer != null && Content.CanImportData; 105 splitContainer1.Panel1Collapsed = !importButton.Enabled; 106 exportButton.Enabled = !ReadOnly && !Locked && Content != null && GenericExporter != null && Content.CanExportData; 107 splitContainer2.Panel1Collapsed = !exportButton.Enabled; 80 108 } 81 109 … … 87 115 } 88 116 89 private void instancesComboBox_SelectionChangeCommitted(object sender, System.EventArgs e) { 117 protected virtual void instancesComboBox_SelectionChangeCommitted(object sender, EventArgs e) { 118 toolTip.SetToolTip(instancesComboBox, String.Empty); 90 119 if (instancesComboBox.SelectedIndex >= 0) { 91 120 var descriptor = (IDataDescriptor)instancesComboBox.SelectedItem; 92 T instance = Content.LoadData(descriptor); 121 122 IContentView activeView = (IContentView)MainFormManager.MainForm.ActiveView; 123 var mainForm = (MainForm.WindowsForms.MainForm)MainFormManager.MainForm; 124 // lock active view and show progress bar 125 mainForm.AddOperationProgressToContent(activeView.Content, "Loading problem instance."); 126 127 Task.Factory.StartNew(() => { 128 T data; 129 try { 130 data = Content.LoadData(descriptor); 131 } catch (Exception ex) { 132 ErrorHandling.ShowErrorDialog(String.Format("Could not load the problem instance {0}", descriptor.Name), ex); 133 mainForm.RemoveOperationProgressFromContent(activeView.Content); 134 return; 135 } 136 try { 137 GenericConsumer.Load(data); 138 } catch (Exception ex) { 139 ErrorHandling.ShowErrorDialog(String.Format("This problem does not support loading the instance {0}", descriptor.Name), ex); 140 } finally { 141 mainForm.RemoveOperationProgressFromContent(activeView.Content); 142 } 143 }); 144 } 145 } 146 147 private void libraryInfoButton_Click(object sender, EventArgs e) { 148 Process.Start(Content.WebLink.ToString()); 149 } 150 151 protected virtual void importButton_Click(object sender, EventArgs e) { 152 openFileDialog.FileName = Content.Name + " instance"; 153 if (openFileDialog.ShowDialog() == DialogResult.OK) { 154 T instance = default(T); 155 try { 156 instance = Content.ImportData(openFileDialog.FileName); 157 } catch (Exception ex) { 158 MessageBox.Show(String.Format("There was an error parsing the file: {0}", Environment.NewLine + ex.Message), "Error while parsing", MessageBoxButtons.OK, MessageBoxIcon.Error); 159 return; 160 } 93 161 try { 94 162 GenericConsumer.Load(instance); 163 instancesComboBox.SelectedIndex = -1; 95 164 } catch (Exception ex) { 96 ErrorHandling.ShowErrorDialog(String.Format("This problem does not support loading the instance {0}", descriptor.Name), ex);165 MessageBox.Show(String.Format("This problem does not support loading the instance {0}: {1}", Path.GetFileName(openFileDialog.FileName), Environment.NewLine + ex.Message), "Cannot load instance"); 97 166 } 98 toolTip.SetToolTip(instancesComboBox, descriptor.Description); 99 } else toolTip.SetToolTip(instancesComboBox, String.Empty); 167 } 168 } 169 170 protected virtual void exportButton_Click(object sender, EventArgs e) { 171 if (saveFileDialog.ShowDialog(this) == DialogResult.OK) { 172 try { 173 Content.ExportData(GenericExporter.Export(), saveFileDialog.FileName); 174 } catch (Exception ex) { 175 ErrorHandling.ShowErrorDialog(this, ex); 176 } 177 } 178 } 179 180 protected override void SetTooltip() { 181 toolTip.SetToolTip(importButton, "Import a " + GetProblemType() + " from a file in the " + GetProviderFormatInfo() + " format."); 182 toolTip.SetToolTip(exportButton, "Export currently loaded " + GetProblemType() + " to a file in the " + GetProviderFormatInfo() + " format."); 183 if (Content != null && Content.WebLink != null) 184 toolTip.SetToolTip(libraryInfoButton, "Browse to " + Content.WebLink); 185 else toolTip.SetToolTip(libraryInfoButton, "Library does not have a web reference."); 100 186 } 101 187 } -
branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.Views/3.3/Properties/AssemblyInfo.cs.frame
r11203 r11205 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 31 31 [assembly: AssemblyCompany("")] 32 32 [assembly: AssemblyProduct("HeuristicLab")] 33 [assembly: AssemblyCopyright("(c) 2002-201 2HEAL")]33 [assembly: AssemblyCopyright("(c) 2002-2014 HEAL")] 34 34 [assembly: AssemblyTrademark("")] 35 35 [assembly: AssemblyCulture("")] … … 53 53 // by using the '*' as shown below: 54 54 [assembly: AssemblyVersion("3.3.0.0")] 55 [assembly: AssemblyFileVersion("3.3. 7.$WCREV$")]55 [assembly: AssemblyFileVersion("3.3.10.$WCREV$")]
Note: See TracChangeset
for help on using the changeset viewer.