- Timestamp:
- 04/12/16 13:28:23 (9 years ago)
- Location:
- branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/KnowledgeCenterViewBase.cs
r13722 r13752 50 50 RegisterContentProblemEvents(); 51 51 RegisterContentProblemInstancesEvents(); 52 RegisterContentProblemCharacteristicsEvents(); 52 53 RegisterContentSolutionSeedingPoolEvents(); 53 54 RegisterContentSuggestedInstancesEvents(); … … 70 71 } 71 72 73 private void RegisterContentProblemCharacteristicsEvents() { 74 Content.ProblemCharacteristics.ItemsAdded += ContentOnProblemCharacteristicsChanged; 75 Content.ProblemCharacteristics.ItemsReplaced += ContentOnProblemCharacteristicsChanged; 76 Content.ProblemCharacteristics.ItemsRemoved += ContentOnProblemCharacteristicsChanged; 77 Content.ProblemCharacteristics.CheckedItemsChanged += ContentOnProblemCharacteristicsChanged; 78 Content.ProblemCharacteristics.CollectionReset += ContentOnProblemCharacteristicsChanged; 79 } 80 72 81 private void RegisterContentSolutionSeedingPoolEvents() { 73 82 Content.SolutionSeedingPool.CheckedItemsChanged += ContentOnSolutionSeedingPoolChanged; … … 92 101 DeregisterContentProblemEvents(); 93 102 DeregisterContentProblemInstancesEvents(); 103 DeregisterContentProblemCharacteristicsEvents(); 94 104 DeregisterContentSolutionSeedingPoolEvents(); 95 105 DeregisterContentSuggestedInstancesEvents(); … … 110 120 Content.ProblemInstances.CollectionReset -= ContentOnProblemInstancesChanged; 111 121 Content.ProblemInstances.ItemChanged -= ContentOnProblemInstancesChanged; 122 } 123 124 private void DeregisterContentProblemCharacteristicsEvents() { 125 Content.ProblemCharacteristics.ItemsAdded -= ContentOnProblemCharacteristicsChanged; 126 Content.ProblemCharacteristics.ItemsReplaced -= ContentOnProblemCharacteristicsChanged; 127 Content.ProblemCharacteristics.ItemsRemoved -= ContentOnProblemCharacteristicsChanged; 128 Content.ProblemCharacteristics.CheckedItemsChanged -= ContentOnProblemCharacteristicsChanged; 129 Content.ProblemCharacteristics.CollectionReset -= ContentOnProblemCharacteristicsChanged; 112 130 } 113 131 … … 136 154 protected virtual void OnProblemSolutionsChanged() { } 137 155 protected virtual void OnProblemInstancesChanged() { } 156 protected virtual void OnProblemCharacteristicsChanged() { } 138 157 protected virtual void OnSolutionSeedingPoolChanged() { } 139 158 protected virtual void OnSuggestedInstancesChanged() { } … … 175 194 } 176 195 196 private void ContentOnProblemCharacteristicsChanged(object sender, EventArgs e) { 197 if (InvokeRequired) Invoke((Action)OnProblemCharacteristicsChanged); 198 else OnProblemCharacteristicsChanged(); 199 } 200 177 201 private void ContentOnSolutionSeedingPoolChanged(object sender, EventArgs e) { 178 202 if (InvokeRequired) Invoke((Action)OnSolutionSeedingPoolChanged); -
branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/UnderstandingProblemInstanceView.Designer.cs
r13751 r13752 52 52 this.problemInstancesTabControl = new HeuristicLab.MainForm.WindowsForms.DragOverTabControl(); 53 53 this.mapTabPage = new System.Windows.Forms.TabPage(); 54 this.instancesTabPage = new System.Windows.Forms.TabPage();55 this.problemInstancesView = new HeuristicLab.MainForm.WindowsForms.ViewHost();56 54 this.mapSplitContainer = new System.Windows.Forms.SplitContainer(); 55 this.showCharacteristicsCheckBox = new System.Windows.Forms.CheckBox(); 57 56 this.invPropCheckBox = new System.Windows.Forms.CheckBox(); 58 57 this.sizeLabel = new System.Windows.Forms.Label(); … … 61 60 this.sizeComboBox = new System.Windows.Forms.ComboBox(); 62 61 this.projectionComboBox = new System.Windows.Forms.ComboBox(); 63 this.showCharacteristicsCheckBox = new System.Windows.Forms.CheckBox(); 62 this.instancesTabPage = new System.Windows.Forms.TabPage(); 63 this.problemInstancesView = new HeuristicLab.MainForm.WindowsForms.ViewHost(); 64 64 this.problemInstancesTabControl.SuspendLayout(); 65 65 this.mapTabPage.SuspendLayout(); 66 this.instancesTabPage.SuspendLayout();67 66 ((System.ComponentModel.ISupportInitialize)(this.mapSplitContainer)).BeginInit(); 68 67 this.mapSplitContainer.Panel1.SuspendLayout(); 69 68 this.mapSplitContainer.SuspendLayout(); 70 69 ((System.ComponentModel.ISupportInitialize)(this.instanceMapChart)).BeginInit(); 70 this.instancesTabPage.SuspendLayout(); 71 71 this.SuspendLayout(); 72 72 // … … 96 96 this.mapTabPage.UseVisualStyleBackColor = true; 97 97 // 98 // instancesTabPage99 //100 this.instancesTabPage.Controls.Add(this.problemInstancesView);101 this.instancesTabPage.Location = new System.Drawing.Point(4, 22);102 this.instancesTabPage.Name = "instancesTabPage";103 this.instancesTabPage.Padding = new System.Windows.Forms.Padding(3);104 this.instancesTabPage.Size = new System.Drawing.Size(992, 734);105 this.instancesTabPage.TabIndex = 0;106 this.instancesTabPage.Text = "Instances";107 this.instancesTabPage.UseVisualStyleBackColor = true;108 //109 // problemInstancesView110 //111 this.problemInstancesView.Caption = "View";112 this.problemInstancesView.Content = null;113 this.problemInstancesView.Dock = System.Windows.Forms.DockStyle.Fill;114 this.problemInstancesView.Enabled = false;115 this.problemInstancesView.Location = new System.Drawing.Point(3, 3);116 this.problemInstancesView.Name = "problemInstancesView";117 this.problemInstancesView.ReadOnly = false;118 this.problemInstancesView.Size = new System.Drawing.Size(986, 728);119 this.problemInstancesView.TabIndex = 0;120 this.problemInstancesView.ViewsLabelVisible = true;121 this.problemInstancesView.ViewType = null;122 //123 98 // mapSplitContainer 124 99 // … … 138 113 this.mapSplitContainer.Panel1.Controls.Add(this.projectionComboBox); 139 114 this.mapSplitContainer.Panel1.Padding = new System.Windows.Forms.Padding(0, 3, 0, 0); 115 this.mapSplitContainer.Panel2Collapsed = true; 140 116 this.mapSplitContainer.Size = new System.Drawing.Size(986, 728); 141 117 this.mapSplitContainer.SplitterDistance = 847; 142 118 this.mapSplitContainer.TabIndex = 12; 119 // 120 // showCharacteristicsCheckBox 121 // 122 this.showCharacteristicsCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 123 this.showCharacteristicsCheckBox.Appearance = System.Windows.Forms.Appearance.Button; 124 this.showCharacteristicsCheckBox.Location = new System.Drawing.Point(957, 4); 125 this.showCharacteristicsCheckBox.Name = "showCharacteristicsCheckBox"; 126 this.showCharacteristicsCheckBox.Size = new System.Drawing.Size(26, 23); 127 this.showCharacteristicsCheckBox.TabIndex = 18; 128 this.showCharacteristicsCheckBox.Text = "Detail"; 129 this.showCharacteristicsCheckBox.UseVisualStyleBackColor = true; 130 this.showCharacteristicsCheckBox.CheckedChanged += new System.EventHandler(this.showCharacteristicsCheckBox_CheckedChanged); 143 131 // 144 132 // invPropCheckBox … … 153 141 this.invPropCheckBox.Text = "inverse proportional"; 154 142 this.invPropCheckBox.UseVisualStyleBackColor = true; 143 this.invPropCheckBox.CheckedChanged += new System.EventHandler(this.InvPropCheckBoxOnCheckedChanged); 155 144 // 156 145 // sizeLabel … … 203 192 this.instanceMapChart.Series.Add(series1); 204 193 this.instanceMapChart.Series.Add(series2); 205 this.instanceMapChart.Size = new System.Drawing.Size( 841, 692);194 this.instanceMapChart.Size = new System.Drawing.Size(980, 692); 206 195 this.instanceMapChart.TabIndex = 12; 207 196 // … … 214 203 this.sizeComboBox.Size = new System.Drawing.Size(273, 21); 215 204 this.sizeComboBox.TabIndex = 13; 205 this.sizeComboBox.SelectedIndexChanged += new System.EventHandler(this.SizeComboBoxOnSelectedIndexChanged); 216 206 // 217 207 // projectionComboBox … … 223 213 this.projectionComboBox.Size = new System.Drawing.Size(158, 21); 224 214 this.projectionComboBox.TabIndex = 14; 225 // 226 // showCharacteristicsCheckBox 227 // 228 this.showCharacteristicsCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 229 this.showCharacteristicsCheckBox.Appearance = System.Windows.Forms.Appearance.Button; 230 this.showCharacteristicsCheckBox.Location = new System.Drawing.Point(818, 4); 231 this.showCharacteristicsCheckBox.Name = "showCharacteristicsCheckBox"; 232 this.showCharacteristicsCheckBox.Size = new System.Drawing.Size(26, 23); 233 this.showCharacteristicsCheckBox.TabIndex = 18; 234 this.showCharacteristicsCheckBox.Text = "Detail"; 235 this.showCharacteristicsCheckBox.UseVisualStyleBackColor = true; 215 this.projectionComboBox.SelectedIndexChanged += new System.EventHandler(this.ProjectionComboBoxOnSelectedIndexChanged); 216 // 217 // instancesTabPage 218 // 219 this.instancesTabPage.Controls.Add(this.problemInstancesView); 220 this.instancesTabPage.Location = new System.Drawing.Point(4, 22); 221 this.instancesTabPage.Name = "instancesTabPage"; 222 this.instancesTabPage.Padding = new System.Windows.Forms.Padding(3); 223 this.instancesTabPage.Size = new System.Drawing.Size(992, 734); 224 this.instancesTabPage.TabIndex = 0; 225 this.instancesTabPage.Text = "Instances"; 226 this.instancesTabPage.UseVisualStyleBackColor = true; 227 // 228 // problemInstancesView 229 // 230 this.problemInstancesView.Caption = "View"; 231 this.problemInstancesView.Content = null; 232 this.problemInstancesView.Dock = System.Windows.Forms.DockStyle.Fill; 233 this.problemInstancesView.Enabled = false; 234 this.problemInstancesView.Location = new System.Drawing.Point(3, 3); 235 this.problemInstancesView.Name = "problemInstancesView"; 236 this.problemInstancesView.ReadOnly = false; 237 this.problemInstancesView.Size = new System.Drawing.Size(986, 728); 238 this.problemInstancesView.TabIndex = 0; 239 this.problemInstancesView.ViewsLabelVisible = true; 240 this.problemInstancesView.ViewType = null; 236 241 // 237 242 // UnderstandingProblemInstanceView … … 244 249 this.problemInstancesTabControl.ResumeLayout(false); 245 250 this.mapTabPage.ResumeLayout(false); 246 this.instancesTabPage.ResumeLayout(false);247 251 this.mapSplitContainer.Panel1.ResumeLayout(false); 248 252 this.mapSplitContainer.Panel1.PerformLayout(); … … 250 254 this.mapSplitContainer.ResumeLayout(false); 251 255 ((System.ComponentModel.ISupportInitialize)(this.instanceMapChart)).EndInit(); 256 this.instancesTabPage.ResumeLayout(false); 252 257 this.ResumeLayout(false); 253 258 -
branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/UnderstandingProblemInstanceView.cs
r13751 r13752 20 20 #endregion 21 21 22 using HeuristicLab.Common.Resources; 22 23 using HeuristicLab.Core; 24 using HeuristicLab.Core.Views; 25 using HeuristicLab.Data; 23 26 using HeuristicLab.MainForm; 24 27 using HeuristicLab.OptimizationExpertSystem.Common; … … 27 30 using System.Linq; 28 31 using System.Text.RegularExpressions; 32 using System.Windows.Forms; 29 33 using System.Windows.Forms.DataVisualization.Charting; 30 34 … … 34 38 public sealed partial class UnderstandingProblemInstanceView : KnowledgeCenterViewBase { 35 39 private bool SuppressEvents { get; set; } 36 40 private readonly CheckedItemListView<StringValue> characteristicsView; 41 37 42 public UnderstandingProblemInstanceView() { 38 43 InitializeComponent(); 44 showCharacteristicsCheckBox.Text = string.Empty; 45 showCharacteristicsCheckBox.Image = VSImageLibrary.Properties; 46 characteristicsView = new CheckedItemListView<StringValue>() { 47 Dock = DockStyle.Fill 48 }; 49 mapSplitContainer.Panel2.Controls.Add(characteristicsView); 39 50 } 40 51 … … 43 54 if (Content == null) { 44 55 problemInstancesView.Content = null; 56 characteristicsView.Content = null; 45 57 instanceMapChart.Series["InstancesSeries"].Points.Clear(); 46 58 instanceMapChart.Series["CurrentInstanceSeries"].Points.Clear(); 47 59 } else { 48 60 problemInstancesView.Content = Content.ProblemInstances; 61 characteristicsView.Content = Content.ProblemCharacteristics; 49 62 UpdateProjectionComboBox(); 50 63 UpdateSizeComboBox(); … … 175 188 UpdateProjection(); 176 189 } 190 191 private void showCharacteristicsCheckBox_CheckedChanged(object sender, EventArgs e) { 192 mapSplitContainer.Panel2Collapsed = !showCharacteristicsCheckBox.Checked; 193 } 177 194 #endregion 178 195 }
Note: See TracChangeset
for help on using the changeset viewer.