Changeset 4011
- Timestamp:
- 07/07/10 14:36:22 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 8 added
- 2 deleted
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab 3.3.sln
r3920 r4011 6 6 ConfigMerger.exe = ConfigMerger.exe 7 7 ..\documentation\License\gpl-3.0.txt = ..\documentation\License\gpl-3.0.txt 8 HeuristicLab 3.31.vsmdi = HeuristicLab 3.31.vsmdi 8 9 LocalTestRun.testrunconfig = LocalTestRun.testrunconfig 9 10 PreBuildEvent.cmd = PreBuildEvent.cmd … … 307 308 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.VehicleRouting.Views-3.3", "HeuristicLab.Problems.VehicleRouting.Views\3.3\HeuristicLab.Problems.VehicleRouting.Views-3.3.csproj", "{D1386FE7-682D-4E18-8C4F-CFD423FA5DD0}" 308 309 EndProject 310 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.MainForm.WindowsForms-3.3.Tests", "HeuristicLab.MainForm.WindowsForms\3.3\Tests\HeuristicLab.MainForm.WindowsForms-3.3.Tests.csproj", "{9F3D601F-E39A-42BE-AEF7-2BF5AD2942D9}" 311 EndProject 309 312 Global 313 GlobalSection(TestCaseManagementSettings) = postSolution 314 CategoryFile = HeuristicLab 3.31.vsmdi 315 EndGlobalSection 310 316 GlobalSection(SolutionConfigurationPlatforms) = preSolution 311 317 Debug|Any CPU = Debug|Any CPU … … 2049 2055 {D1386FE7-682D-4E18-8C4F-CFD423FA5DD0}.Silverlight2|x64.Build.0 = Release|x64 2050 2056 {D1386FE7-682D-4E18-8C4F-CFD423FA5DD0}.Silverlight2|x86.ActiveCfg = Release|x64 2057 {9F3D601F-E39A-42BE-AEF7-2BF5AD2942D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 2058 {9F3D601F-E39A-42BE-AEF7-2BF5AD2942D9}.Debug|Any CPU.Build.0 = Debug|Any CPU 2059 {9F3D601F-E39A-42BE-AEF7-2BF5AD2942D9}.Debug|x64.ActiveCfg = Debug|x64 2060 {9F3D601F-E39A-42BE-AEF7-2BF5AD2942D9}.Debug|x86.ActiveCfg = Debug|x86 2061 {9F3D601F-E39A-42BE-AEF7-2BF5AD2942D9}.Release|Any CPU.ActiveCfg = Release|Any CPU 2062 {9F3D601F-E39A-42BE-AEF7-2BF5AD2942D9}.Release|Any CPU.Build.0 = Release|Any CPU 2063 {9F3D601F-E39A-42BE-AEF7-2BF5AD2942D9}.Release|x64.ActiveCfg = Release|x64 2064 {9F3D601F-E39A-42BE-AEF7-2BF5AD2942D9}.Release|x64.Build.0 = Release|x64 2065 {9F3D601F-E39A-42BE-AEF7-2BF5AD2942D9}.Release|x86.ActiveCfg = Release|x86 2066 {9F3D601F-E39A-42BE-AEF7-2BF5AD2942D9}.Services|Any CPU.ActiveCfg = Release|Any CPU 2067 {9F3D601F-E39A-42BE-AEF7-2BF5AD2942D9}.Services|Any CPU.Build.0 = Release|Any CPU 2068 {9F3D601F-E39A-42BE-AEF7-2BF5AD2942D9}.Services|x64.ActiveCfg = Release|Any CPU 2069 {9F3D601F-E39A-42BE-AEF7-2BF5AD2942D9}.Services|x86.ActiveCfg = Release|Any CPU 2070 {9F3D601F-E39A-42BE-AEF7-2BF5AD2942D9}.Silverlight2|Any CPU.ActiveCfg = Release|Any CPU 2071 {9F3D601F-E39A-42BE-AEF7-2BF5AD2942D9}.Silverlight2|Any CPU.Build.0 = Release|Any CPU 2072 {9F3D601F-E39A-42BE-AEF7-2BF5AD2942D9}.Silverlight2|x64.ActiveCfg = Release|Any CPU 2073 {9F3D601F-E39A-42BE-AEF7-2BF5AD2942D9}.Silverlight2|x86.ActiveCfg = Release|Any CPU 2051 2074 EndGlobalSection 2052 2075 GlobalSection(SolutionProperties) = preSolution -
trunk/sources/HeuristicLab.Data.Views/3.3/BoolValueView.cs
r3904 r4011 78 78 79 79 private void valueCheckBox_CheckedChanged(object sender, EventArgs e) { 80 if ( !Content.ReadOnly) Content.Value = valueCheckBox.Checked;80 if (Content != null && !Content.ReadOnly) Content.Value = valueCheckBox.Checked; 81 81 } 82 82 } -
trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs
r3936 r4011 135 135 private void UpdateRowHeaders() { 136 136 int firstDisplayedRowIndex = dataGridView.FirstDisplayedScrollingRowIndex; 137 if (firstDisplayedRowIndex == -1)137 if (firstDisplayedRowIndex == -1) 138 138 firstDisplayedRowIndex = 0; 139 139 int lastDisplaydRowIndex = firstDisplayedRowIndex + dataGridView.DisplayedRowCount(true); … … 241 241 } 242 242 private void dataGridView_CellValueNeeded(object sender, DataGridViewCellValueEventArgs e) { 243 if ( e.RowIndex < Content.Rows && e.ColumnIndex < Content.Columns) {243 if (Content != null && e.RowIndex < Content.Rows && e.ColumnIndex < Content.Columns) { 244 244 int rowIndex = virtualRowIndizes[e.RowIndex]; 245 245 e.Value = Content.GetValue(rowIndex, e.ColumnIndex); -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/HeuristicLab.MainForm.WindowsForms-3.3.csproj
r3832 r4011 164 164 <DependentUpon>ViewHost.cs</DependentUpon> 165 165 </Compile> 166 <Compile Include="ViewHostPanel.cs">167 <SubType>Component</SubType>168 </Compile>169 <Compile Include="ViewHostPanel.Designer.cs">170 <DependentUpon>ViewHostPanel.cs</DependentUpon>171 </Compile>172 166 </ItemGroup> 173 167 <ItemGroup> -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/HeuristicLabMainFormWindowsFormsPlugin.cs.frame
r3702 r4011 32 32 [PluginDependency("HeuristicLab.MainForm", "3.3")] 33 33 [PluginDependency("HeuristicLab.WinFormsUI", "2.3.1")] 34 public class HeuristicLabMainForm TestPlugin : PluginBase {34 public class HeuristicLabMainFormPlugin : PluginBase { 35 35 } 36 36 } -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ViewHost.Designer.cs
r3658 r4011 46 46 private void InitializeComponent() { 47 47 this.components = new System.ComponentModel.Container(); 48 this.viewPanel = new HeuristicLab.MainForm.WindowsForms.ViewHostPanel();49 48 this.messageLabel = new System.Windows.Forms.Label(); 50 49 this.viewsLabel = new System.Windows.Forms.Label(); … … 52 51 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 53 52 this.SuspendLayout(); 54 //55 // viewPanel56 //57 this.viewPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)58 | System.Windows.Forms.AnchorStyles.Left)59 | System.Windows.Forms.AnchorStyles.Right)));60 this.viewPanel.Location = new System.Drawing.Point(0, 0);61 this.viewPanel.Name = "viewPanel";62 this.viewPanel.Size = new System.Drawing.Size(205, 184);63 this.viewPanel.TabIndex = 1;64 this.viewPanel.Resize += new System.EventHandler(this.viewPanel_Resize);65 53 // 66 54 // messageLabel … … 80 68 this.viewsLabel.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Windows; 81 69 this.viewsLabel.Location = new System.Drawing.Point(211, 0); 70 this.viewsLabel.Margin = new System.Windows.Forms.Padding(3); 82 71 this.viewsLabel.Name = "viewsLabel"; 83 72 this.viewsLabel.Size = new System.Drawing.Size(16, 16); … … 100 89 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 101 90 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 102 this.Controls.Add(this.viewPanel);103 91 this.Controls.Add(this.viewsLabel); 104 92 this.Controls.Add(this.messageLabel); … … 106 94 this.Size = new System.Drawing.Size(227, 184); 107 95 this.ResumeLayout(false); 108 109 96 } 110 97 111 98 #endregion 112 113 private ViewHostPanel viewPanel;114 99 private System.Windows.Forms.Label viewsLabel; 115 100 private System.Windows.Forms.Label messageLabel; -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ViewHost.cs
r3924 r4011 33 33 InitializeComponent(); 34 34 cachedViews = new Dictionary<Type, IContentView>(); 35 viewType = null;36 35 startDragAndDrop = false; 37 36 viewContextMenuStrip.IgnoredViewTypes = new List<Type>() { typeof(ViewHost) }; 37 38 viewType = null; 38 39 activeView = null; 39 40 Content = null; 40 OnContentChanged();41 }42 43 private bool viewShown; 41 messageLabel.Visible = false; 42 viewsLabel.Visible = false; 43 } 44 44 45 private Dictionary<Type, IContentView> cachedViews; 45 46 public IEnumerable<IContentView> Views { … … 57 58 if (view != null) 58 59 view.OnHidden(EventArgs.Empty); 60 if (ActiveViewControl != null) 61 ActiveViewControl.Visible = false; 59 62 } 60 63 activeView = value; 61 64 if (activeView != null) { 62 ViewType = activeView.GetType();65 viewType = activeView.GetType(); 63 66 RegisterActiveViewEvents(); 64 67 View view = activeView as View; 65 68 if (view != null) 66 69 view.OnShown(new ViewShownEventArgs(view, false)); 70 if (ActiveViewControl != null) { 71 ActiveViewControl.Visible = true; 72 ActiveViewControl.BringToFront(); 73 } 67 74 } 68 ActiveViewChanged(); 69 } 70 } 71 } 75 OnActiveViewChanged(); 76 } 77 } 78 } 79 80 private Control ActiveViewControl { 81 get { return ActiveView as Control; } 82 } 83 72 84 private Type viewType; 73 85 public Type ViewType { … … 75 87 set { 76 88 if (viewType != value) { 77 if (value != null && !ViewCanShowContent(value, Content))89 if (value != null && Content != null && !ViewCanShowContent(value, Content)) 78 90 throw new ArgumentException(string.Format("View \"{0}\" cannot display content \"{1}\".", 79 91 value, Content.GetType())); … … 96 108 protected override void OnContentChanged() { 97 109 viewContextMenuStrip.Item = Content; 98 99 if (Content != null) { 100 if (viewContextMenuStrip.Items.Count == 0) { 101 messageLabel.Visible = true; 102 viewsLabel.Visible = false; 103 viewPanel.Visible = false; 104 } else { 105 messageLabel.Visible = false; 106 viewsLabel.Visible = true; 107 viewPanel.Visible = true; 108 } 109 110 //remove cached views which cannot show the content 111 foreach (Type type in cachedViews.Keys.ToList()) { 112 if (!ViewCanShowContent(type, Content)) { 113 Control c = cachedViews[type] as Control; 114 if (c != null) { 115 this.Controls.Remove(c); 116 c.Dispose(); 117 } 118 cachedViews.Remove(type); 119 } 120 } 121 122 //change ViewType if view of ViewType can not show content or is null 123 if (Content != null && !ViewCanShowContent(viewType, Content)) { 110 124 Type defaultViewType = MainFormManager.GetDefaultViewType(Content.GetType()); 111 if (ViewType == null || !ViewCanShowContent(viewType, Content)) { 112 cachedViews.Clear(); 113 if (defaultViewType == null) { 114 if (viewContextMenuStrip.Items.Count > 0) // create first available view if default view is not available 115 ViewType = (Type)viewContextMenuStrip.Items[0].Tag; 116 } else ViewType = defaultViewType; 117 } else { 118 foreach (Type type in cachedViews.Keys.ToList()) { 119 if (!ViewCanShowContent(type, Content)) { 120 Control c = cachedViews[type] as Control; 121 if (c != null) 122 c.Dispose(); 123 cachedViews.Remove(type); 124 } 125 } 126 } 127 UpdateActiveMenuItem(); 128 foreach (IContentView view in cachedViews.Values) 129 view.Content = this.Content; 125 if (defaultViewType != null) 126 ViewType = defaultViewType; 127 else if (viewContextMenuStrip.Items.Count > 0) // create first available view if no default view is available 128 ViewType = (Type)viewContextMenuStrip.Items[0].Tag; 129 else 130 ViewType = null; 131 } 132 133 foreach (IContentView view in cachedViews.Values) 134 view.Content = this.Content; 135 136 if (Content != null && viewType != null) 137 ActiveView = cachedViews[viewType]; 138 else 139 ActiveView = null; 140 141 if (Content != null && viewContextMenuStrip.Items.Count > 0) { 142 messageLabel.Visible = false; 143 viewsLabel.Visible = true; 144 } else if (Content != null) { 145 messageLabel.Visible = true; 146 viewsLabel.Visible = false; 130 147 } else { 131 148 messageLabel.Visible = false; 132 149 viewsLabel.Visible = false; 133 viewPanel.Visible = false;134 150 } 135 151 } 136 152 137 153 private void OnViewTypeChanged() { 138 for (int i = viewPanel.Controls.Count - 1; i > 0; i--) 139 viewPanel.Controls[i].Dispose(); 140 viewPanel.Controls.Clear(); 141 142 if (viewType == null || Content == null) 143 return; 144 if (!ViewCanShowContent(viewType, Content)) 145 throw new InvalidOperationException(string.Format("View \"{0}\" cannot display content \"{1}\".", 146 viewType, Content.GetType())); 147 if (viewPanel.Height <= 10 || viewPanel.Width <= 10) { 148 viewShown = false; 149 return; 150 } 151 152 viewShown = true; 153 UpdateActiveMenuItem(); 154 IContentView view; 155 if (cachedViews.ContainsKey(ViewType)) 156 view = cachedViews[ViewType]; 157 else { 158 view = MainFormManager.CreateView(viewType); 159 view.ReadOnly = this.ReadOnly; 160 view.Locked = this.Locked; 161 view.Content = Content; 162 cachedViews.Add(viewType, view); 163 } 164 this.ActiveView = view; 165 Control control = (Control)view; 166 control.Dock = DockStyle.Fill; 167 viewPanel.Controls.Add(control); 168 viewPanel.Visible = true; 169 } 170 171 private void viewPanel_Resize(object sender, EventArgs e) { 172 if (!viewShown) 173 this.OnViewTypeChanged(); 154 if (viewType != null) { 155 if (!ViewCanShowContent(viewType, Content)) 156 throw new InvalidOperationException(string.Format("View \"{0}\" cannot display content \"{1}\".", 157 viewType, Content.GetType())); 158 IContentView view; 159 if (!cachedViews.ContainsKey(ViewType)) { 160 view = MainFormManager.CreateView(viewType); 161 view.ReadOnly = this.ReadOnly; 162 view.Locked = this.Locked; 163 view.Content = Content; 164 cachedViews.Add(viewType, view); 165 Control c = view as Control; 166 if (c != null) 167 this.Controls.Add(c); 168 } 169 UpdateActiveMenuItem(); 170 ActiveView = cachedViews[viewType]; 171 } 172 } 173 174 private void OnActiveViewChanged() { 175 this.SuspendRepaint(); 176 if (activeView != null) { 177 UpdateActiveMenuItem(); 178 this.ActiveViewControl.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right; 179 this.ActiveViewControl.Size = new System.Drawing.Size(this.Width - this.viewsLabel.Width - this.viewsLabel.Margin.Left - this.viewsLabel.Margin.Right, this.Height); 180 this.ActiveViewChanged(); 181 } 182 this.ResumeRepaint(true); 183 } 184 185 protected override void OnSizeChanged(EventArgs e) { 186 //mkommend: solution to resizing issues. taken from http://support.microsoft.com/kb/953934 187 //not implemented with a panel to reduce the number of nested controls 188 if (this.Handle != null) 189 this.BeginInvoke((Action<EventArgs>)OnSizeChangedHelper, e); 190 } 191 private void OnSizeChangedHelper(EventArgs e) { 192 base.OnSizeChanged(e); 193 this.viewsLabel.Location = new System.Drawing.Point(this.Width - this.viewsLabel.Margin.Right - this.viewsLabel.Width, this.viewsLabel.Margin.Top); 174 194 } 175 195 … … 194 214 } 195 215 } 216 196 217 #region forwarding of view events 197 218 protected override void OnReadOnlyChanged() { -
trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphVisualization/OperatorGraphView.cs
r3904 r4011 42 42 public OperatorGraphView() { 43 43 InitializeComponent(); 44 44 45 45 this.graphVisualizationInfoView.Controller.OnShowContextMenu += new EventHandler<EntityMenuEventArgs>(Controller_OnShowContextMenu); 46 46 this.graphVisualizationInfoView.Controller.Model.Selection.OnNewSelection += new EventHandler(Controller_SelectionChanged); … … 58 58 59 59 protected override void OnContentChanged() { 60 bool createdVisualizationInfo = false; 61 if (this.VisualizationInfo == null) { 62 this.VisualizationInfo = new OperatorGraphVisualizationInfo(this.Content); 63 createdVisualizationInfo = true; 64 } 65 this.graphVisualizationInfoView.Content = this.VisualizationInfo; 66 if (createdVisualizationInfo) 67 this.graphVisualizationInfoView.RelayoutGraph(); 60 if (Content != null) { 61 bool createdVisualizationInfo = false; 62 if (this.VisualizationInfo == null) { 63 this.VisualizationInfo = new OperatorGraphVisualizationInfo(this.Content); 64 createdVisualizationInfo = true; 65 } 66 this.graphVisualizationInfoView.Content = this.VisualizationInfo; 67 if (createdVisualizationInfo) 68 this.graphVisualizationInfoView.RelayoutGraph(); 69 } else { 70 this.graphVisualizationInfoView.Content = null; 71 } 68 72 } 69 73 … … 188 192 189 193 private void initialOperatorToolStripMenuItem_Click(object sender, EventArgs e) { 190 191 192 193 194 194 IOperatorShapeInfo shapeInfo = this.shapeContextMenu.Tag as IOperatorShapeInfo; 195 if (this.VisualizationInfo.InitialShape == shapeInfo) 196 this.VisualizationInfo.InitialShape = null; 197 else 198 this.VisualizationInfo.InitialShape = shapeInfo; 195 199 } 196 200 197 201 private void breakPointToolStripMenuItem_Click(object sender, EventArgs e) { 198 199 200 201 202 202 IOperatorShapeInfo shapeInfo = this.shapeContextMenu.Tag as IOperatorShapeInfo; 203 if (shapeInfo != null) { 204 IOperator op = this.VisualizationInfo.GetOperatorForShapeInfo(shapeInfo); 205 op.Breakpoint = !op.Breakpoint; 206 } 203 207 } 204 208 #endregion -
trunk/sources/HeuristicLab.Optimization.Views/3.3/AlgorithmView.Designer.cs
r3764 r4011 50 50 this.parameterCollectionView = new HeuristicLab.Core.Views.ParameterCollectionView(); 51 51 this.problemTabPage = new System.Windows.Forms.TabPage(); 52 this.problemPanel = new System.Windows.Forms.Panel();53 52 this.problemViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost(); 54 53 this.openProblemButton = new System.Windows.Forms.Button(); … … 69 68 this.parametersTabPage.SuspendLayout(); 70 69 this.problemTabPage.SuspendLayout(); 71 this.problemPanel.SuspendLayout();72 70 this.resultsTabPage.SuspendLayout(); 73 71 this.runsTabPage.SuspendLayout(); … … 123 121 // problemTabPage 124 122 // 125 this.problemTabPage.Controls.Add(this.problem Panel);123 this.problemTabPage.Controls.Add(this.problemViewHost); 126 124 this.problemTabPage.Controls.Add(this.openProblemButton); 127 125 this.problemTabPage.Controls.Add(this.newProblemButton); … … 134 132 this.problemTabPage.UseVisualStyleBackColor = true; 135 133 // 136 // problemPanel137 //138 this.problemPanel.AllowDrop = true;139 this.problemPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)140 | System.Windows.Forms.AnchorStyles.Left)141 | System.Windows.Forms.AnchorStyles.Right)));142 this.problemPanel.Controls.Add(this.problemViewHost);143 this.problemPanel.Location = new System.Drawing.Point(6, 36);144 this.problemPanel.Name = "problemPanel";145 this.problemPanel.Size = new System.Drawing.Size(659, 332);146 this.problemPanel.TabIndex = 3;147 this.problemPanel.DragOver += new System.Windows.Forms.DragEventHandler(this.problemPanel_DragEnterOver);148 this.problemPanel.DragDrop += new System.Windows.Forms.DragEventHandler(this.problemPanel_DragDrop);149 this.problemPanel.DragEnter += new System.Windows.Forms.DragEventHandler(this.problemPanel_DragEnterOver);150 //151 134 // problemViewHost 152 135 // 136 this.problemViewHost.AllowDrop = true; 153 137 this.problemViewHost.Content = null; 154 this.problemViewHost.Dock = System.Windows.Forms.DockStyle.Fill; 155 this.problemViewHost.Location = new System.Drawing.Point(0, 0); 138 this.problemViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 139 | System.Windows.Forms.AnchorStyles.Left) 140 | System.Windows.Forms.AnchorStyles.Right))); 141 this.problemViewHost.Location = new System.Drawing.Point(6, 36); 156 142 this.problemViewHost.Name = "problemViewHost"; 157 143 this.problemViewHost.Size = new System.Drawing.Size(659, 332); 158 this.problemViewHost.TabIndex = 0;144 this.problemViewHost.TabIndex = 3; 159 145 this.problemViewHost.ViewType = null; 146 this.problemViewHost.DragOver += new System.Windows.Forms.DragEventHandler(this.problemViewHost_DragEnterOver); 147 this.problemViewHost.DragDrop += new System.Windows.Forms.DragEventHandler(this.problemViewHost_DragDrop); 148 this.problemViewHost.DragEnter += new System.Windows.Forms.DragEventHandler(this.problemViewHost_DragEnterOver); 160 149 // 161 150 // openProblemButton … … 327 316 this.parametersTabPage.ResumeLayout(false); 328 317 this.problemTabPage.ResumeLayout(false); 329 this.problemPanel.ResumeLayout(false);330 318 this.resultsTabPage.ResumeLayout(false); 331 319 this.runsTabPage.ResumeLayout(false); … … 355 343 protected System.Windows.Forms.TabPage runsTabPage; 356 344 protected RunCollectionView runsView; 357 protected System.Windows.Forms.Panel problemPanel;358 359 345 } 360 346 } -
trunk/sources/HeuristicLab.Optimization.Views/3.3/AlgorithmView.cs
r3904 r4011 216 216 Content.Prepare(false); 217 217 } 218 protected virtual void problem Panel_DragEnterOver(object sender, DragEventArgs e) {218 protected virtual void problemViewHost_DragEnterOver(object sender, DragEventArgs e) { 219 219 e.Effect = DragDropEffects.None; 220 220 Type type = e.Data.GetData("Type") as Type; … … 227 227 } 228 228 } 229 protected virtual void problem Panel_DragDrop(object sender, DragEventArgs e) {229 protected virtual void problemViewHost_DragDrop(object sender, DragEventArgs e) { 230 230 if (e.Effect != DragDropEffects.None) { 231 231 IProblem problem = e.Data.GetData("Value") as IProblem; -
trunk/sources/HeuristicLab.Optimization.Views/3.3/BatchRunView.Designer.cs
r3764 r4011 48 48 this.tabControl = new System.Windows.Forms.TabControl(); 49 49 this.algorithmTabPage = new System.Windows.Forms.TabPage(); 50 this.algorithmPanel = new System.Windows.Forms.Panel();51 50 this.algorithmViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost(); 52 51 this.openAlgorithmButton = new System.Windows.Forms.Button(); … … 66 65 this.tabControl.SuspendLayout(); 67 66 this.algorithmTabPage.SuspendLayout(); 68 this.algorithmPanel.SuspendLayout();69 67 this.runsTabPage.SuspendLayout(); 70 68 ((System.ComponentModel.ISupportInitialize)(this.repetitionsNumericUpDown)).BeginInit(); … … 96 94 // algorithmTabPage 97 95 // 98 this.algorithmTabPage.Controls.Add(this.algorithm Panel);96 this.algorithmTabPage.Controls.Add(this.algorithmViewHost); 99 97 this.algorithmTabPage.Controls.Add(this.openAlgorithmButton); 100 98 this.algorithmTabPage.Controls.Add(this.newAlgorithmButton); … … 107 105 this.algorithmTabPage.UseVisualStyleBackColor = true; 108 106 // 109 // algorithmPanel 110 // 111 this.algorithmPanel.AllowDrop = true; 112 this.algorithmPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 107 // algorithmViewHost 108 // 109 this.algorithmViewHost.Content = null; 110 this.algorithmViewHost.AllowDrop = true; 111 this.algorithmViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 113 112 | System.Windows.Forms.AnchorStyles.Left) 114 113 | System.Windows.Forms.AnchorStyles.Right))); 115 this.algorithmPanel.Controls.Add(this.algorithmViewHost); 116 this.algorithmPanel.Location = new System.Drawing.Point(6, 36); 117 this.algorithmPanel.Name = "algorithmPanel"; 118 this.algorithmPanel.Size = new System.Drawing.Size(659, 306); 119 this.algorithmPanel.TabIndex = 3; 120 this.algorithmPanel.DragOver += new System.Windows.Forms.DragEventHandler(this.algorithmPanel_DragEnterOver); 121 this.algorithmPanel.DragDrop += new System.Windows.Forms.DragEventHandler(this.algorithmPanel_DragDrop); 122 this.algorithmPanel.DragEnter += new System.Windows.Forms.DragEventHandler(this.algorithmPanel_DragEnterOver); 123 // 124 // algorithmViewHost 125 // 126 this.algorithmViewHost.Content = null; 127 this.algorithmViewHost.Dock = System.Windows.Forms.DockStyle.Fill; 128 this.algorithmViewHost.Location = new System.Drawing.Point(0, 0); 114 this.algorithmViewHost.Location = new System.Drawing.Point(6, 36); 129 115 this.algorithmViewHost.Name = "algorithmViewHost"; 130 116 this.algorithmViewHost.Size = new System.Drawing.Size(659, 306); 131 this.algorithmViewHost.TabIndex = 0;117 this.algorithmViewHost.TabIndex = 3; 132 118 this.algorithmViewHost.ViewType = null; 119 this.algorithmViewHost.DragOver += new System.Windows.Forms.DragEventHandler(this.algorithmViewHost_DragEnterOver); 120 this.algorithmViewHost.DragDrop += new System.Windows.Forms.DragEventHandler(this.algorithmViewHost_DragDrop); 121 this.algorithmViewHost.DragEnter += new System.Windows.Forms.DragEventHandler(this.algorithmViewHost_DragEnterOver); 133 122 // 134 123 // openAlgorithmButton … … 317 306 this.tabControl.ResumeLayout(false); 318 307 this.algorithmTabPage.ResumeLayout(false); 319 this.algorithmPanel.ResumeLayout(false);320 308 this.runsTabPage.ResumeLayout(false); 321 309 ((System.ComponentModel.ISupportInitialize)(this.repetitionsNumericUpDown)).EndInit(); … … 342 330 private RunCollectionView runsView; 343 331 private System.Windows.Forms.Button pauseButton; 344 private System.Windows.Forms.Panel algorithmPanel;345 346 332 } 347 333 } -
trunk/sources/HeuristicLab.Optimization.Views/3.3/BatchRunView.cs
r3904 r4011 140 140 } 141 141 private void repetitionsNumericUpDown_ValueChanged(object sender, EventArgs e) { 142 Content.Repetitions = (int)repetitionsNumericUpDown.Value; 142 if (Content != null) 143 Content.Repetitions = (int)repetitionsNumericUpDown.Value; 143 144 } 144 145 private void newAlgorithmButton_Click(object sender, EventArgs e) { … … 197 198 Content.Prepare(false); 198 199 } 199 private void algorithm Panel_DragEnterOver(object sender, DragEventArgs e) {200 private void algorithmViewHost_DragEnterOver(object sender, DragEventArgs e) { 200 201 e.Effect = DragDropEffects.None; 201 202 if (ReadOnly) … … 210 211 } 211 212 } 212 private void algorithm Panel_DragDrop(object sender, DragEventArgs e) {213 private void algorithmViewHost_DragDrop(object sender, DragEventArgs e) { 213 214 if (e.Effect != DragDropEffects.None) { 214 215 IAlgorithm algorithm = e.Data.GetData("Value") as IAlgorithm; -
trunk/sources/HeuristicLab.Optimization.Views/3.3/EngineAlgorithmView.Designer.cs
r3764 r4011 58 58 this.resultsTabPage.SuspendLayout(); 59 59 this.runsTabPage.SuspendLayout(); 60 this.problemPanel.SuspendLayout();61 60 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 62 61 this.engineTabPage.SuspendLayout(); … … 148 147 // problemPanel 149 148 // 150 this.problem Panel.Size = new System.Drawing.Size(693, 399);149 this.problemViewHost.Size = new System.Drawing.Size(693, 399); 151 150 // 152 151 // nameTextBox … … 276 275 this.resultsTabPage.ResumeLayout(false); 277 276 this.runsTabPage.ResumeLayout(false); 278 this.problemPanel.ResumeLayout(false);279 277 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 280 278 this.engineTabPage.ResumeLayout(false); -
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunView.cs
r3904 r4011 103 103 } 104 104 105 private string selectedName; 105 106 private void FillListView() { 106 string selectedName = null;107 107 if (listView.SelectedItems.Count == 1) selectedName = listView.SelectedItems[0].SubItems[0].Text; 108 108 … … 117 117 for (int i = 0; i < listView.Columns.Count; i++) 118 118 listView.Columns[i].AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent); 119 selectedName = null; 119 120 } 120 121 } -
trunk/sources/HeuristicLab.Optimization.Views/3.3/UserDefinedAlgorithmView.Designer.cs
r3770 r4011 54 54 this.resultsTabPage.SuspendLayout(); 55 55 this.runsTabPage.SuspendLayout(); 56 this.problemPanel.SuspendLayout();57 56 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 58 57 this.globalScopeTabPage.SuspendLayout(); … … 152 151 this.resultsTabPage.ResumeLayout(false); 153 152 this.runsTabPage.ResumeLayout(false); 154 this.problemPanel.ResumeLayout(false);155 153 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 156 154 this.globalScopeTabPage.ResumeLayout(false); -
trunk/sources/HeuristicLab.Parameters.Views/3.3/ValueLookupParameterView.Designer.cs
r3306 r4011 47 47 private void InitializeComponent() { 48 48 this.valueGroupBox = new System.Windows.Forms.GroupBox(); 49 this.valuePanel = new System.Windows.Forms.Panel(); 50 this.viewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost(); 49 this.valueViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost(); 51 50 this.clearValueButton = new System.Windows.Forms.Button(); 52 51 this.setValueButton = new System.Windows.Forms.Button(); … … 55 54 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 56 55 this.valueGroupBox.SuspendLayout(); 57 this.valuePanel.SuspendLayout();58 56 this.SuspendLayout(); 59 57 // … … 92 90 | System.Windows.Forms.AnchorStyles.Left) 93 91 | System.Windows.Forms.AnchorStyles.Right))); 94 this.valueGroupBox.Controls.Add(this.value Panel);92 this.valueGroupBox.Controls.Add(this.valueViewHost); 95 93 this.valueGroupBox.Controls.Add(this.clearValueButton); 96 94 this.valueGroupBox.Controls.Add(this.setValueButton); … … 102 100 this.valueGroupBox.Text = "Value"; 103 101 // 104 // v aluePanel102 // viewHost 105 103 // 106 this.valuePanel.AllowDrop = true; 107 this.valuePanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 104 this.valueViewHost.AllowDrop = true; 105 this.valueViewHost.Content = null; 106 this.valueViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 108 107 | System.Windows.Forms.AnchorStyles.Left) 109 108 | System.Windows.Forms.AnchorStyles.Right))); 110 this.valuePanel.Controls.Add(this.viewHost); 111 this.valuePanel.Location = new System.Drawing.Point(6, 49); 112 this.valuePanel.Name = "valuePanel"; 113 this.valuePanel.Size = new System.Drawing.Size(374, 156); 114 this.valuePanel.TabIndex = 0; 115 this.valuePanel.DragOver += new System.Windows.Forms.DragEventHandler(this.valuePanel_DragEnterOver); 116 this.valuePanel.DragDrop += new System.Windows.Forms.DragEventHandler(this.valuePanel_DragDrop); 117 this.valuePanel.DragEnter += new System.Windows.Forms.DragEventHandler(this.valuePanel_DragEnterOver); 118 // 119 // viewHost 120 // 121 this.viewHost.Content = null; 122 this.viewHost.Dock = System.Windows.Forms.DockStyle.Fill; 123 this.viewHost.Location = new System.Drawing.Point(0, 0); 124 this.viewHost.Name = "viewHost"; 125 this.viewHost.Size = new System.Drawing.Size(374, 156); 126 this.viewHost.TabIndex = 0; 127 this.viewHost.ViewType = null; 109 this.valueViewHost.Location = new System.Drawing.Point(6, 49); 110 this.valueViewHost.Name = "valueViewHost"; 111 this.valueViewHost.Size = new System.Drawing.Size(374, 156); 112 this.valueViewHost.TabIndex = 0; 113 this.valueViewHost.ViewType = null; 114 this.valueViewHost.DragOver += new System.Windows.Forms.DragEventHandler(this.valueViewHostPanel_DragEnterOver); 115 this.valueViewHost.DragDrop += new System.Windows.Forms.DragEventHandler(this.valueViewHost_DragDrop); 116 this.valueViewHost.DragEnter += new System.Windows.Forms.DragEventHandler(this.valueViewHostPanel_DragEnterOver); 128 117 // 129 118 // clearValueButton … … 189 178 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 190 179 this.valueGroupBox.ResumeLayout(false); 191 this.valuePanel.ResumeLayout(false);192 180 this.ResumeLayout(false); 193 181 this.PerformLayout(); … … 198 186 199 187 protected System.Windows.Forms.GroupBox valueGroupBox; 200 protected System.Windows.Forms.Panel valuePanel; 201 protected HeuristicLab.MainForm.WindowsForms.ViewHost viewHost; 188 protected HeuristicLab.MainForm.WindowsForms.ViewHost valueViewHost; 202 189 protected System.Windows.Forms.Button setValueButton; 203 190 protected System.Windows.Forms.Button clearValueButton; -
trunk/sources/HeuristicLab.Parameters.Views/3.3/ValueLookupParameterView.cs
r3904 r4011 79 79 if (Content == null) { 80 80 actualNameTextBox.Text = "-"; 81 v iewHost.Content = null;81 valueViewHost.Content = null; 82 82 } else { 83 83 actualNameTextBox.Text = Content.ActualName; 84 v iewHost.ViewType = null;85 v iewHost.Content = Content.Value;84 valueViewHost.ViewType = null; 85 valueViewHost.Content = Content.Value; 86 86 } 87 87 } … … 107 107 else { 108 108 clearValueButton.Enabled = Content.Value != null && !ReadOnly; 109 v iewHost.ViewType = null;110 v iewHost.Content = Content.Value;109 valueViewHost.ViewType = null; 110 valueViewHost.Content = Content.Value; 111 111 } 112 112 } … … 133 133 Content.Value = null; 134 134 } 135 protected virtual void value Panel_DragEnterOver(object sender, DragEventArgs e) {135 protected virtual void valueViewHostPanel_DragEnterOver(object sender, DragEventArgs e) { 136 136 e.Effect = DragDropEffects.None; 137 137 Type type = e.Data.GetData("Type") as Type; … … 144 144 } 145 145 } 146 protected virtual void value Panel_DragDrop(object sender, DragEventArgs e) {146 protected virtual void valueViewHost_DragDrop(object sender, DragEventArgs e) { 147 147 if (e.Effect != DragDropEffects.None) { 148 148 T value = e.Data.GetData("Value") as T; -
trunk/sources/HeuristicLab.Parameters.Views/3.3/ValueParameterView.Designer.cs
r3306 r4011 47 47 private void InitializeComponent() { 48 48 this.valueGroupBox = new System.Windows.Forms.GroupBox(); 49 this.valuePanel = new System.Windows.Forms.Panel(); 50 this.viewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost(); 49 this.valueViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost(); 51 50 this.clearValueButton = new System.Windows.Forms.Button(); 52 51 this.setValueButton = new System.Windows.Forms.Button(); 53 52 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 54 53 this.valueGroupBox.SuspendLayout(); 55 this.valuePanel.SuspendLayout();56 54 this.SuspendLayout(); 57 55 // … … 78 76 | System.Windows.Forms.AnchorStyles.Left) 79 77 | System.Windows.Forms.AnchorStyles.Right))); 80 this.valueGroupBox.Controls.Add(this.value Panel);78 this.valueGroupBox.Controls.Add(this.valueViewHost); 81 79 this.valueGroupBox.Controls.Add(this.clearValueButton); 82 80 this.valueGroupBox.Controls.Add(this.setValueButton); … … 88 86 this.valueGroupBox.Text = "Value"; 89 87 // 90 // v aluePanel88 // viewHost 91 89 // 92 this.valuePanel.AllowDrop = true; 93 this.valuePanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 90 this.valueViewHost.AllowDrop = true; 91 this.valueViewHost.Content = null; 92 this.valueViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 94 93 | System.Windows.Forms.AnchorStyles.Left) 95 94 | System.Windows.Forms.AnchorStyles.Right))); 96 this.valuePanel.Controls.Add(this.viewHost); 97 this.valuePanel.Location = new System.Drawing.Point(6, 49); 98 this.valuePanel.Name = "valuePanel"; 99 this.valuePanel.Size = new System.Drawing.Size(374, 182); 100 this.valuePanel.TabIndex = 0; 101 this.valuePanel.DragOver += new System.Windows.Forms.DragEventHandler(this.valuePanel_DragEnterOver); 102 this.valuePanel.DragDrop += new System.Windows.Forms.DragEventHandler(this.valuePanel_DragDrop); 103 this.valuePanel.DragEnter += new System.Windows.Forms.DragEventHandler(this.valuePanel_DragEnterOver); 104 // 105 // viewHost 106 // 107 this.viewHost.Content = null; 108 this.viewHost.Dock = System.Windows.Forms.DockStyle.Fill; 109 this.viewHost.Location = new System.Drawing.Point(0, 0); 110 this.viewHost.Name = "viewHost"; 111 this.viewHost.Size = new System.Drawing.Size(374, 182); 112 this.viewHost.TabIndex = 0; 113 this.viewHost.ViewType = null; 95 this.valueViewHost.Location = new System.Drawing.Point(6, 49); 96 this.valueViewHost.Name = "viewHost"; 97 this.valueViewHost.Size = new System.Drawing.Size(374, 182); 98 this.valueViewHost.TabIndex = 0; 99 this.valueViewHost.ViewType = null; 100 this.valueViewHost.DragOver += new System.Windows.Forms.DragEventHandler(this.valueViewHost_DragEnterOver); 101 this.valueViewHost.DragDrop += new System.Windows.Forms.DragEventHandler(this.valueViewHost_DragDrop); 102 this.valueViewHost.DragEnter += new System.Windows.Forms.DragEventHandler(this.valueViewHost_DragEnterOver); 114 103 // 115 104 // clearValueButton … … 152 141 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 153 142 this.valueGroupBox.ResumeLayout(false); 154 this.valuePanel.ResumeLayout(false);155 143 this.ResumeLayout(false); 156 144 this.PerformLayout(); … … 161 149 162 150 protected System.Windows.Forms.GroupBox valueGroupBox; 163 protected System.Windows.Forms.Panel valuePanel; 164 protected HeuristicLab.MainForm.WindowsForms.ViewHost viewHost; 151 protected HeuristicLab.MainForm.WindowsForms.ViewHost valueViewHost; 165 152 protected System.Windows.Forms.Button setValueButton; 166 153 protected System.Windows.Forms.Button clearValueButton; -
trunk/sources/HeuristicLab.Parameters.Views/3.3/ValueParameterView.cs
r3904 r4011 78 78 if (Content == null) { 79 79 clearValueButton.Visible = true; 80 v iewHost.Content = null;80 valueViewHost.Content = null; 81 81 } else { 82 82 clearValueButton.Visible = !(Content is ValueParameter<T>); 83 v iewHost.ViewType = null;84 v iewHost.Content = Content.Value;83 valueViewHost.ViewType = null; 84 valueViewHost.Content = Content.Value; 85 85 } 86 86 } … … 98 98 else { 99 99 clearValueButton.Enabled = Content.Value != null && !ReadOnly; 100 v iewHost.ViewType = null;101 v iewHost.Content = Content.Value;100 valueViewHost.ViewType = null; 101 valueViewHost.Content = Content.Value; 102 102 } 103 103 } … … 121 121 Content.Value = null; 122 122 } 123 protected virtual void value Panel_DragEnterOver(object sender, DragEventArgs e) {123 protected virtual void valueViewHost_DragEnterOver(object sender, DragEventArgs e) { 124 124 e.Effect = DragDropEffects.None; 125 125 Type type = e.Data.GetData("Type") as Type; … … 132 132 } 133 133 } 134 protected virtual void value Panel_DragDrop(object sender, DragEventArgs e) {134 protected virtual void valueViewHost_DragDrop(object sender, DragEventArgs e) { 135 135 if (e.Effect != DragDropEffects.None) { 136 136 T value = e.Data.GetData("Value") as T; -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/EstimatedValuesView.cs
r3933 r4011 89 89 if (InvokeRequired) Invoke((Action)UpdateEstimatedValues); 90 90 else { 91 double[,] values = 92 MatrixExtensions<double>.Create( 93 Content.ProblemData.Dataset.GetVariableValues(Content.ProblemData.TargetVariable.Value), 94 Content.EstimatedValues.ToArray()); 95 var content = new DoubleMatrix(values); 96 content.ColumnNames = new string[] { "Original", "Estimated" }; 97 matrixView.Content = content; 91 DoubleMatrix matrix = null; 92 if (Content != null) { 93 double[,] values = 94 MatrixExtensions<double>.Create( 95 Content.ProblemData.Dataset.GetVariableValues(Content.ProblemData.TargetVariable.Value), 96 Content.EstimatedValues.ToArray()); 97 matrix = new DoubleMatrix(values); 98 matrix.ColumnNames = new string[] { "Original", "Estimated" }; 99 } 100 matrixView.Content = matrix; 98 101 } 99 102 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/LineChartView.cs
r3933 r4011 61 61 private void RedrawChart() { 62 62 this.chart.Series.Clear(); 63 this.chart.Series.Add(TARGETVARIABLE_SERIES_NAME); 64 this.chart.Series[TARGETVARIABLE_SERIES_NAME].LegendText = Content.ProblemData.TargetVariable.Value; 65 this.chart.Series[TARGETVARIABLE_SERIES_NAME].ChartType = SeriesChartType.FastLine; 66 this.chart.Series[TARGETVARIABLE_SERIES_NAME].Points.DataBindY(Content.ProblemData.Dataset.GetVariableValues(Content.ProblemData.TargetVariable.Value)); 67 this.UpdateStripLines(); 63 if (Content != null) { 64 this.chart.Series.Add(TARGETVARIABLE_SERIES_NAME); 65 this.chart.Series[TARGETVARIABLE_SERIES_NAME].LegendText = Content.ProblemData.TargetVariable.Value; 66 this.chart.Series[TARGETVARIABLE_SERIES_NAME].ChartType = SeriesChartType.FastLine; 67 this.chart.Series[TARGETVARIABLE_SERIES_NAME].Points.DataBindY(Content.ProblemData.Dataset.GetVariableValues(Content.ProblemData.TargetVariable.Value)); 68 this.UpdateStripLines(); 68 69 69 this.chart.Series.Add(ESTIMATEDVALUES_SERIES_NAME); 70 this.chart.Series[ESTIMATEDVALUES_SERIES_NAME].LegendText = Content.ItemName; 71 this.chart.Series[ESTIMATEDVALUES_SERIES_NAME].ChartType = SeriesChartType.FastLine; 72 this.chart.Series[ESTIMATEDVALUES_SERIES_NAME].Points.DataBindY(Content.EstimatedValues.ToArray()); 73 this.chart.Series[ESTIMATEDVALUES_SERIES_NAME].Tag = Content; 74 UpdateCursorInterval(); 70 this.chart.Series.Add(ESTIMATEDVALUES_SERIES_NAME); 71 this.chart.Series[ESTIMATEDVALUES_SERIES_NAME].LegendText = Content.ItemName; 72 this.chart.Series[ESTIMATEDVALUES_SERIES_NAME].ChartType = SeriesChartType.FastLine; 73 this.chart.Series[ESTIMATEDVALUES_SERIES_NAME].Points.DataBindY(Content.EstimatedValues.ToArray()); 74 this.chart.Series[ESTIMATEDVALUES_SERIES_NAME].Tag = Content; 75 UpdateCursorInterval(); 76 } 75 77 } 76 78
Note: See TracChangeset
for help on using the changeset viewer.