Changeset 8882 for trunk/sources/HeuristicLab.Problems.Scheduling.Views/3.3
- Timestamp:
- 11/08/12 13:31:18 (12 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.Scheduling.Views/3.3
- Files:
-
- 4 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.Scheduling.Views/3.3/HeuristicLab.Problems.Scheduling.Views-3.3.csproj
r8806 r8882 115 115 <Compile Include="Plugin.cs" /> 116 116 <Compile Include="Properties\AssemblyInfo.cs" /> 117 <Compile Include="SchedulingProblemImportDialog.cs">118 <SubType>Form</SubType>119 </Compile>120 <Compile Include="SchedulingProblemImportDialog.Designer.cs">121 <DependentUpon>SchedulingProblemImportDialog.cs</DependentUpon>122 </Compile>123 117 </ItemGroup> 124 118 <ItemGroup> … … 128 122 </ItemGroup> 129 123 <ItemGroup> 130 <EmbeddedResource Include="JobShopSchedulingProblemView.resx">131 <DependentUpon>JobShopSchedulingProblemView.cs</DependentUpon>132 </EmbeddedResource>133 <EmbeddedResource Include="SchedulingProblemImportDialog.resx">134 <DependentUpon>SchedulingProblemImportDialog.cs</DependentUpon>135 </EmbeddedResource>136 </ItemGroup>137 <ItemGroup>138 124 <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj"> 139 125 <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project> … … 176 162 <Private>False</Private> 177 163 </ProjectReference> 164 <ProjectReference Include="..\..\HeuristicLab.Optimization.Views\3.3\HeuristicLab.Optimization.Views-3.3.csproj"> 165 <Project>{662B4B15-8F4D-4AE5-B3EB-D91C215F5AF2}</Project> 166 <Name>HeuristicLab.Optimization.Views-3.3</Name> 167 <Private>False</Private> 168 </ProjectReference> 178 169 <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj"> 179 170 <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project> … … 185 176 <Name>HeuristicLab.PluginInfrastructure-3.3</Name> 186 177 <Private>False</Private> 178 </ProjectReference> 179 <ProjectReference Include="..\..\HeuristicLab.Problems.Instances\3.3\HeuristicLab.Problems.Instances-3.3.csproj"> 180 <Project>{3540E29E-4793-49E7-8EE2-FEA7F61C3994}</Project> 181 <Name>HeuristicLab.Problems.Instances-3.3</Name> 187 182 </ProjectReference> 188 183 <ProjectReference Include="..\..\HeuristicLab.Problems.Scheduling\3.3\HeuristicLab.Problems.Scheduling-3.3.csproj"> -
trunk/sources/HeuristicLab.Problems.Scheduling.Views/3.3/JobShopSchedulingProblemView.Designer.cs
r6406 r8882 25 25 /// </summary> 26 26 private void InitializeComponent() { 27 this.importButton = new System.Windows.Forms.Button(); 28 this.parameterCollectionView = new HeuristicLab.Core.Views.ParameterCollectionView(); 29 this.tabControl1 = new System.Windows.Forms.TabControl(); 30 this.tabPage1 = new System.Windows.Forms.TabPage(); 31 this.tabPage2 = new System.Windows.Forms.TabPage(); 32 this.ganttChart = new GanttChart(); 27 this.problemTabControl = new System.Windows.Forms.TabControl(); 28 this.problemTabPage = new System.Windows.Forms.TabPage(); 29 this.visualizationTabPage = new System.Windows.Forms.TabPage(); 30 this.ganttChart = new HeuristicLab.Encodings.ScheduleEncoding.Views.GanttChart(); 31 ((System.ComponentModel.ISupportInitialize)(this.problemInstanceSplitContainer)).BeginInit(); 32 this.problemInstanceSplitContainer.Panel1.SuspendLayout(); 33 this.problemInstanceSplitContainer.Panel2.SuspendLayout(); 34 this.problemInstanceSplitContainer.SuspendLayout(); 33 35 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 34 this. tabControl1.SuspendLayout();35 this. tabPage1.SuspendLayout();36 this. tabPage2.SuspendLayout();36 this.problemTabControl.SuspendLayout(); 37 this.problemTabPage.SuspendLayout(); 38 this.visualizationTabPage.SuspendLayout(); 37 39 this.SuspendLayout(); 40 // 41 // problemInstanceSplitContainer 42 // 43 this.problemInstanceSplitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left))); 44 this.problemInstanceSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill; 45 // 46 // problemInstanceSplitContainer.Panel2 47 // 48 this.problemInstanceSplitContainer.Panel2.Controls.Add(this.problemTabControl); 49 // 50 // ProblemInstanceConsumerViewHost 51 // 52 this.ProblemInstanceConsumerViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left))); 53 this.ProblemInstanceConsumerViewHost.Dock = System.Windows.Forms.DockStyle.Fill; 54 this.ProblemInstanceConsumerViewHost.Location = new System.Drawing.Point(0, 0); 55 this.ProblemInstanceConsumerViewHost.Size = new System.Drawing.Size(511, 26); 56 // 57 // parameterCollectionView 58 // 59 this.parameterCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left))); 60 this.parameterCollectionView.Dock = System.Windows.Forms.DockStyle.Fill; 61 this.parameterCollectionView.Location = new System.Drawing.Point(3, 3); 62 this.parameterCollectionView.Size = new System.Drawing.Size(491, 271); 38 63 // 39 64 // nameTextBox … … 41 66 this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft); 42 67 this.errorProvider.SetIconPadding(this.nameTextBox, 2); 43 this.nameTextBox.Size = new System.Drawing.Size( 650, 20);68 this.nameTextBox.Size = new System.Drawing.Size(439, 20); 44 69 // 45 70 // infoLabel 46 71 // 47 this.infoLabel.Location = new System.Drawing.Point( 714, 3);72 this.infoLabel.Location = new System.Drawing.Point(492, 3); 48 73 // 49 // importButton74 // problemTabControl 50 75 // 51 this.importButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 52 | System.Windows.Forms.AnchorStyles.Right))); 53 this.importButton.Location = new System.Drawing.Point(6, 26); 54 this.importButton.Name = "importButton"; 55 this.importButton.Size = new System.Drawing.Size(724, 23); 56 this.importButton.TabIndex = 3; 57 this.importButton.Text = "Import"; 58 this.importButton.UseVisualStyleBackColor = true; 59 this.importButton.Click += new System.EventHandler(this.importButton_Click); 76 this.problemTabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 77 | System.Windows.Forms.AnchorStyles.Left) 78 | System.Windows.Forms.AnchorStyles.Right))); 79 this.problemTabControl.Controls.Add(this.problemTabPage); 80 this.problemTabControl.Controls.Add(this.visualizationTabPage); 81 this.problemTabControl.Location = new System.Drawing.Point(3, 27); 82 this.problemTabControl.Name = "problemTabControl"; 83 this.problemTabControl.SelectedIndex = 0; 84 this.problemTabControl.Size = new System.Drawing.Size(505, 303); 85 this.problemTabControl.TabIndex = 5; 60 86 // 61 // p arameterCollectionView87 // problemTabPage 62 88 // 63 this.parameterCollectionView.AllowEditingOfHiddenParameters = true; 64 this.parameterCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 65 | System.Windows.Forms.AnchorStyles.Left) 66 | System.Windows.Forms.AnchorStyles.Right))); 67 this.parameterCollectionView.Caption = "ParameterCollection View"; 68 this.parameterCollectionView.Content = null; 69 this.parameterCollectionView.Location = new System.Drawing.Point(3, 0); 70 this.parameterCollectionView.Name = "parameterCollectionView"; 71 this.parameterCollectionView.ReadOnly = false; 72 this.parameterCollectionView.Size = new System.Drawing.Size(713, 387); 73 this.parameterCollectionView.TabIndex = 4; 89 this.problemTabPage.Controls.Add(this.parameterCollectionView); 90 this.problemTabPage.Location = new System.Drawing.Point(4, 22); 91 this.problemTabPage.Name = "problemTabPage"; 92 this.problemTabPage.Padding = new System.Windows.Forms.Padding(3); 93 this.problemTabPage.Size = new System.Drawing.Size(497, 277); 94 this.problemTabPage.TabIndex = 0; 95 this.problemTabPage.Text = "Problem"; 96 this.problemTabPage.UseVisualStyleBackColor = true; 74 97 // 75 // tabControl198 // visualizationTabPage 76 99 // 77 this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 78 | System.Windows.Forms.AnchorStyles.Left) 79 | System.Windows.Forms.AnchorStyles.Right))); 80 this.tabControl1.Controls.Add(this.tabPage1); 81 this.tabControl1.Controls.Add(this.tabPage2); 82 this.tabControl1.Location = new System.Drawing.Point(6, 56); 83 this.tabControl1.Name = "tabControl1"; 84 this.tabControl1.SelectedIndex = 0; 85 this.tabControl1.Size = new System.Drawing.Size(724, 413); 86 this.tabControl1.TabIndex = 5; 87 // 88 // tabPage1 89 // 90 this.tabPage1.Controls.Add(this.parameterCollectionView); 91 this.tabPage1.Location = new System.Drawing.Point(4, 22); 92 this.tabPage1.Name = "tabPage1"; 93 this.tabPage1.Padding = new System.Windows.Forms.Padding(3); 94 this.tabPage1.Size = new System.Drawing.Size(716, 387); 95 this.tabPage1.TabIndex = 0; 96 this.tabPage1.Text = "Problem"; 97 this.tabPage1.UseVisualStyleBackColor = true; 98 // 99 // tabPage2 100 // 101 this.tabPage2.Controls.Add(this.ganttChart); 102 this.tabPage2.Location = new System.Drawing.Point(4, 22); 103 this.tabPage2.Name = "tabPage2"; 104 this.tabPage2.Padding = new System.Windows.Forms.Padding(3); 105 this.tabPage2.Size = new System.Drawing.Size(716, 387); 106 this.tabPage2.TabIndex = 1; 107 this.tabPage2.Text = "Visualization"; 108 this.tabPage2.UseVisualStyleBackColor = true; 100 this.visualizationTabPage.Controls.Add(this.ganttChart); 101 this.visualizationTabPage.Location = new System.Drawing.Point(4, 22); 102 this.visualizationTabPage.Name = "visualizationTabPage"; 103 this.visualizationTabPage.Padding = new System.Windows.Forms.Padding(3); 104 this.visualizationTabPage.Size = new System.Drawing.Size(497, 277); 105 this.visualizationTabPage.TabIndex = 1; 106 this.visualizationTabPage.Text = "Visualization"; 107 this.visualizationTabPage.UseVisualStyleBackColor = true; 109 108 // 110 109 // ganttChart 111 110 // 112 this.ganttChart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 113 | System.Windows.Forms.AnchorStyles.Left) 114 | System.Windows.Forms.AnchorStyles.Right))); 115 this.ganttChart.Location = new System.Drawing.Point(0, 3); 111 this.ganttChart.Dock = System.Windows.Forms.DockStyle.Fill; 112 this.ganttChart.Location = new System.Drawing.Point(3, 3); 116 113 this.ganttChart.Name = "ganttChart"; 117 this.ganttChart.Size = new System.Drawing.Size( 716, 384);114 this.ganttChart.Size = new System.Drawing.Size(491, 271); 118 115 this.ganttChart.TabIndex = 0; 119 116 // … … 122 119 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 123 120 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 124 this.Controls.Add(this.tabControl1);125 this.Controls.Add(this.importButton);126 121 this.Name = "JobShopSchedulingProblemView"; 127 this.Size = new System.Drawing.Size(733, 472); 128 this.Controls.SetChildIndex(this.importButton, 0); 129 this.Controls.SetChildIndex(this.nameLabel, 0); 130 this.Controls.SetChildIndex(this.nameTextBox, 0); 131 this.Controls.SetChildIndex(this.infoLabel, 0); 132 this.Controls.SetChildIndex(this.tabControl1, 0); 122 this.problemInstanceSplitContainer.Panel1.ResumeLayout(false); 123 this.problemInstanceSplitContainer.Panel2.ResumeLayout(false); 124 this.problemInstanceSplitContainer.Panel2.PerformLayout(); 125 ((System.ComponentModel.ISupportInitialize)(this.problemInstanceSplitContainer)).EndInit(); 126 this.problemInstanceSplitContainer.ResumeLayout(false); 133 127 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 134 this. tabControl1.ResumeLayout(false);135 this. tabPage1.ResumeLayout(false);136 this. tabPage2.ResumeLayout(false);128 this.problemTabControl.ResumeLayout(false); 129 this.problemTabPage.ResumeLayout(false); 130 this.visualizationTabPage.ResumeLayout(false); 137 131 this.ResumeLayout(false); 138 this.PerformLayout();139 132 140 133 } … … 142 135 #endregion 143 136 144 private System.Windows.Forms.Button importButton; 145 private Core.Views.ParameterCollectionView parameterCollectionView; 146 private System.Windows.Forms.TabControl tabControl1; 147 private System.Windows.Forms.TabPage tabPage1; 148 private System.Windows.Forms.TabPage tabPage2; 137 private System.Windows.Forms.TabControl problemTabControl; 138 private System.Windows.Forms.TabPage problemTabPage; 139 private System.Windows.Forms.TabPage visualizationTabPage; 149 140 private GanttChart ganttChart; 150 141 } -
trunk/sources/HeuristicLab.Problems.Scheduling.Views/3.3/JobShopSchedulingProblemView.cs
r8603 r8882 20 20 #endregion 21 21 22 using System;23 22 using System.Windows.Forms; 24 using HeuristicLab.Core;25 using HeuristicLab.Core.Views;26 using HeuristicLab.Encodings.ScheduleEncoding;27 23 using HeuristicLab.MainForm; 28 using HeuristicLab. PluginInfrastructure;24 using HeuristicLab.Optimization.Views; 29 25 30 26 namespace HeuristicLab.Problems.Scheduling.Views { 31 27 [View("JobShop Scheduling Problem View")] 32 28 [Content(typeof(JobShopSchedulingProblem), true)] 33 public partial class JobShopSchedulingProblemView : NamedItemView { 34 public JobShopSchedulingProblemView() { 35 InitializeComponent(); 36 } 37 private SchedulingProblemImportDialog spImportDialog; 29 public partial class JobShopSchedulingProblemView : ProblemView { 38 30 39 31 public new JobShopSchedulingProblem Content { … … 42 34 } 43 35 36 public JobShopSchedulingProblemView() { 37 InitializeComponent(); 38 Controls.Remove(parameterCollectionView); 39 parameterCollectionView.Dock = DockStyle.Fill; 40 problemTabPage.Controls.Add(parameterCollectionView); 41 } 42 44 43 protected override void OnContentChanged() { 45 44 base.OnContentChanged(); 46 45 if (Content == null) { 47 parameterCollectionView.Content = null;48 46 ganttChart.Reset(); 49 47 } else { 50 parameterCollectionView.Content = ((IParameterizedNamedItem)Content).Parameters;51 48 FillGanttChart(Content); 52 49 } … … 54 51 55 52 private void FillGanttChart(JobShopSchedulingProblem content) { 56 //Add Jobs as Categories57 53 ganttChart.Reset(); 58 54 int jobCount = 0; 59 Random random = new Random(1); 60 foreach (Job j in content.JobData) { 55 foreach (var j in content.JobData) { 61 56 double lastEndTime = 0; 62 foreach ( Taskt in content.JobData[jobCount].Tasks) {57 foreach (var t in content.JobData[jobCount].Tasks) { 63 58 int categoryNr = t.JobNr; 64 59 string categoryName = "Job" + categoryNr; … … 74 69 } 75 70 } 76 77 protected override void SetEnabledStateOfControls() {78 base.SetEnabledStateOfControls();79 parameterCollectionView.Enabled = Content != null;80 importButton.Enabled = Content != null && !ReadOnly;81 }82 83 private void importButton_Click(object sender, EventArgs e) {84 if (spImportDialog == null) spImportDialog = new SchedulingProblemImportDialog();85 86 if (spImportDialog.ShowDialog(this) == DialogResult.OK) {87 try {88 switch (spImportDialog.Format) {89 case SPFormat.ORLib:90 Content.ImportFromORLibrary(spImportDialog.SPFileName);91 break;92 }93 94 95 if (!string.IsNullOrEmpty(spImportDialog.OptimalScheduleFileName))96 Content.ImportJSMSolution(spImportDialog.OptimalScheduleFileName);97 OnContentChanged();98 }99 catch (Exception ex) {100 ErrorHandling.ShowErrorDialog(this, ex);101 }102 }103 }104 71 } 105 72 } -
trunk/sources/HeuristicLab.Problems.Scheduling.Views/3.3/Plugin.cs.frame
r8603 r8882 32 32 [PluginDependency("HeuristicLab.MainForm", "3.3")] 33 33 [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")] 34 [PluginDependency("HeuristicLab.Optimization", "3.3")] 35 [PluginDependency("HeuristicLab.Optimization.Views", "3.3")] 34 36 [PluginDependency("HeuristicLab.Problems.Scheduling", "3.3")] 35 37 public class HeuristicLabProblemsSchedulingViewsPlugin : PluginBase {
Note: See TracChangeset
for help on using the changeset viewer.