Changeset 14982
- Timestamp:
- 05/15/17 16:26:34 (8 years ago)
- Location:
- trunk/sources/HeuristicLab.Analysis.Views/3.3
- Files:
-
- 1 edited
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Analysis.Views/3.3/DataTableView.Designer.cs
r14981 r14982 21 21 22 22 namespace HeuristicLab.Analysis.Views { 23 partial class DataTable Control{23 partial class DataTableView { 24 24 /// <summary> 25 25 /// Required designer variable. … … 52 52 this.chart = new HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart(); 53 53 this.configureToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 54 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 54 55 ((System.ComponentModel.ISupportInitialize)(this.chart)).BeginInit(); 55 56 this.SuspendLayout(); 56 57 // 58 // nameTextBox 59 // 60 this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft); 61 this.errorProvider.SetIconPadding(this.nameTextBox, 2); 62 this.nameTextBox.Location = new System.Drawing.Point(55, 0); 63 this.nameTextBox.Size = new System.Drawing.Size(279, 20); 64 // 65 // infoLabel 66 // 67 this.infoLabel.Location = new System.Drawing.Point(340, 3); 68 // 57 69 // chart 58 70 // 59 this.chart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 60 | System.Windows.Forms.AnchorStyles.Left) 71 this.chart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 72 | System.Windows.Forms.AnchorStyles.Left) 61 73 | System.Windows.Forms.AnchorStyles.Right))); 62 74 this.chart.BorderlineColor = System.Drawing.Color.Black; … … 74 86 legend1.Name = "Default"; 75 87 this.chart.Legends.Add(legend1); 76 this.chart.Location = new System.Drawing.Point(0, 0);88 this.chart.Location = new System.Drawing.Point(0, 26); 77 89 this.chart.Name = "chart"; 78 90 series1.ChartArea = "Default"; … … 80 92 series1.Name = "Default"; 81 93 this.chart.Series.Add(series1); 82 this.chart.Size = new System.Drawing.Size(359, 2 74);94 this.chart.Size = new System.Drawing.Size(359, 248); 83 95 this.chart.TabIndex = 3; 84 96 this.chart.Text = "chart"; … … 98 110 this.configureToolStripMenuItem.Click += new System.EventHandler(this.configureToolStripMenuItem_Click); 99 111 // 100 // DataTable Control112 // DataTableView 101 113 // 102 114 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; 103 115 this.Controls.Add(this.chart); 104 this.Name = "DataTable Control";116 this.Name = "DataTableView"; 105 117 this.Size = new System.Drawing.Size(359, 274); 118 this.Controls.SetChildIndex(this.chart, 0); 119 this.Controls.SetChildIndex(this.nameLabel, 0); 120 this.Controls.SetChildIndex(this.nameTextBox, 0); 121 this.Controls.SetChildIndex(this.infoLabel, 0); 122 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 106 123 ((System.ComponentModel.ISupportInitialize)(this.chart)).EndInit(); 107 124 this.ResumeLayout(false); 125 this.PerformLayout(); 108 126 109 127 } -
trunk/sources/HeuristicLab.Analysis.Views/3.3/DataTableView.cs
r14981 r14982 27 27 using System.Windows.Forms.DataVisualization.Charting; 28 28 using HeuristicLab.Collections; 29 using HeuristicLab.MainForm.WindowsForms; 29 using HeuristicLab.Core.Views; 30 using HeuristicLab.MainForm; 30 31 31 32 namespace HeuristicLab.Analysis.Views { 32 public partial class DataTableControl : AsynchronousContentView { 33 [View("DataTable View")] 34 [Content(typeof(DataTable), true)] 35 public partial class DataTableView : NamedItemView, IConfigureableView { 33 36 protected List<Series> invisibleSeries; 34 37 protected Dictionary<IObservableList<double>, DataRow> valuesRowsTable; … … 39 42 } 40 43 41 public DataTableControl() { 44 public bool ShowName { 45 get { return nameTextBox.Visible; } 46 set { 47 if (nameTextBox.Visible != value) { 48 foreach (Control c in Controls) { 49 if (c == chart) continue; 50 c.Visible = value; 51 } 52 chart.Dock = value ? DockStyle.None : DockStyle.Fill; 53 } 54 } 55 } 56 57 public DataTableView() { 42 58 InitializeComponent(); 43 59 valuesRowsTable = new Dictionary<IObservableList<double>, DataRow>(); … … 89 105 90 106 protected override void OnContentChanged() { 107 base.OnContentChanged(); 91 108 invisibleSeries.Clear(); 92 109 chart.Titles[0].Text = string.Empty; … … 105 122 106 123 protected override void SetEnabledStateOfControls() { 124 base.SetEnabledStateOfControls(); 107 125 chart.Enabled = Content != null; 108 126 } … … 306 324 #region Event Handlers 307 325 #region Content Event Handlers 326 protected override void Content_NameChanged(object sender, EventArgs e) { 327 if (InvokeRequired) 328 Invoke(new EventHandler(Content_NameChanged), sender, e); 329 else { 330 Content.VisualProperties.Title = Content.Name; 331 base.Content_NameChanged(sender, e); 332 } 333 } 308 334 private void Content_VisualPropertiesChanged(object sender, EventArgs e) { 309 335 if (InvokeRequired) -
trunk/sources/HeuristicLab.Analysis.Views/3.3/HeuristicLab.Analysis.Views-3.3.csproj
r14734 r14982 126 126 </ItemGroup> 127 127 <ItemGroup> 128 <Compile Include="DataTable Control.cs">129 <SubType>UserControl</SubType> 130 </Compile> 131 <Compile Include="DataTable Control.Designer.cs">132 <DependentUpon>DataTable Control.cs</DependentUpon>128 <Compile Include="DataTableView.cs"> 129 <SubType>UserControl</SubType> 130 </Compile> 131 <Compile Include="DataTableView.Designer.cs"> 132 <DependentUpon>DataTableView.cs</DependentUpon> 133 133 </Compile> 134 134 <Compile Include="GanttDataView.cs"> … … 144 144 <DependentUpon>IndexedDataTableView.cs</DependentUpon> 145 145 </Compile> 146 <Compile Include="ScatterPlot Control.cs">147 <SubType>UserControl</SubType> 148 </Compile> 149 <Compile Include="ScatterPlot Control.Designer.cs">150 <DependentUpon>ScatterPlot Control.cs</DependentUpon>146 <Compile Include="ScatterPlotView.cs"> 147 <SubType>UserControl</SubType> 148 </Compile> 149 <Compile Include="ScatterPlotView.Designer.cs"> 150 <DependentUpon>ScatterPlotView.cs</DependentUpon> 151 151 </Compile> 152 152 <Compile Include="ScatterPlotVisualPropertiesDialog.cs"> … … 168 168 <DependentUpon>ScatterPlotDataRowVisualPropertiesControl.cs</DependentUpon> 169 169 </Compile> 170 <Compile Include="ScatterPlotView.cs">171 <SubType>UserControl</SubType>172 </Compile>173 <Compile Include="ScatterPlotView.Designer.cs">174 <DependentUpon>ScatterPlotView.cs</DependentUpon>175 </Compile>176 170 <Compile Include="ScatterPlotHistoryView.cs"> 177 171 <SubType>UserControl</SubType> … … 237 231 <Compile Include="Plugin.cs" /> 238 232 <Compile Include="Properties\AssemblyInfo.cs" /> 239 <Compile Include="DataTableView.cs">240 <SubType>UserControl</SubType>241 </Compile>242 <Compile Include="DataTableView.Designer.cs">243 <DependentUpon>DataTableView.cs</DependentUpon>244 </Compile>245 233 <Compile Include="HistogramControl.cs"> 246 234 <SubType>UserControl</SubType> -
trunk/sources/HeuristicLab.Analysis.Views/3.3/ScatterPlotView.Designer.cs
r14981 r14982 21 21 22 22 namespace HeuristicLab.Analysis.Views { 23 partial class ScatterPlot Control{23 partial class ScatterPlotView { 24 24 /// <summary> 25 25 /// Required designer variable. … … 52 52 this.chart = new HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart(); 53 53 this.configureToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 54 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 54 55 ((System.ComponentModel.ISupportInitialize)(this.chart)).BeginInit(); 55 56 this.SuspendLayout(); 57 // 58 // nameTextBox 59 // 60 this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft); 61 this.errorProvider.SetIconPadding(this.nameTextBox, 2); 62 this.nameTextBox.Location = new System.Drawing.Point(55, 0); 63 this.nameTextBox.Size = new System.Drawing.Size(279, 20); 64 // 65 // infoLabel 66 // 67 this.infoLabel.Location = new System.Drawing.Point(340, 3); 56 68 // 57 69 // chart … … 73 85 legend1.Name = "Default"; 74 86 this.chart.Legends.Add(legend1); 75 this.chart.Location = new System.Drawing.Point(0, 0);87 this.chart.Location = new System.Drawing.Point(0, 26); 76 88 this.chart.Name = "chart"; 77 89 series1.ChartArea = "Default"; … … 79 91 series1.Name = "Default"; 80 92 this.chart.Series.Add(series1); 81 this.chart.Size = new System.Drawing.Size(359, 2 74);93 this.chart.Size = new System.Drawing.Size(359, 248); 82 94 this.chart.TabIndex = 3; 83 95 this.chart.Text = "chart"; … … 98 110 this.configureToolStripMenuItem.Click += new System.EventHandler(this.configureToolStripMenuItem_Click); 99 111 // 100 // ScatterPlot Control112 // ScatterPlotView 101 113 // 102 114 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; 103 115 this.Controls.Add(this.chart); 104 this.Name = "ScatterPlot Control";116 this.Name = "ScatterPlotView"; 105 117 this.Size = new System.Drawing.Size(359, 274); 118 this.Controls.SetChildIndex(this.chart, 0); 119 this.Controls.SetChildIndex(this.nameLabel, 0); 120 this.Controls.SetChildIndex(this.nameTextBox, 0); 121 this.Controls.SetChildIndex(this.infoLabel, 0); 122 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 106 123 ((System.ComponentModel.ISupportInitialize)(this.chart)).EndInit(); 107 124 this.ResumeLayout(false); 125 this.PerformLayout(); 108 126 109 127 } -
trunk/sources/HeuristicLab.Analysis.Views/3.3/ScatterPlotView.cs
r14981 r14982 29 29 using HeuristicLab.Collections; 30 30 using HeuristicLab.Common; 31 using HeuristicLab.Core.Views; 31 32 using HeuristicLab.MainForm; 32 using HeuristicLab.MainForm.WindowsForms;33 33 34 34 namespace HeuristicLab.Analysis.Views { 35 public partial class ScatterPlotControl : AsynchronousContentView { 35 [View("ScatterPlot View")] 36 [Content(typeof(ScatterPlot), true)] 37 public partial class ScatterPlotView : NamedItemView, IConfigureableView { 36 38 protected List<Series> invisibleSeries; 37 39 protected Dictionary<IObservableList<Point2D<double>>, ScatterPlotDataRow> pointsRowsTable; … … 44 46 } 45 47 46 public ScatterPlotControl() { 48 public bool ShowName { 49 get { return nameTextBox.Visible; } 50 set { 51 if (nameTextBox.Visible != value) { 52 foreach (Control c in Controls) { 53 if (c == chart) continue; 54 c.Visible = value; 55 } 56 chart.Dock = value ? DockStyle.None : DockStyle.Fill; 57 } 58 } 59 } 60 61 public ScatterPlotView() { 47 62 InitializeComponent(); 48 63 pointsRowsTable = new Dictionary<IObservableList<Point2D<double>>, ScatterPlotDataRow>(); … … 93 108 94 109 protected override void OnContentChanged() { 110 base.OnContentChanged(); 95 111 invisibleSeries.Clear(); 96 112 chart.Titles[0].Text = string.Empty; … … 109 125 110 126 protected override void SetEnabledStateOfControls() { 127 base.SetEnabledStateOfControls(); 111 128 chart.Enabled = Content != null; 112 129 } … … 282 299 #region Event Handlers 283 300 #region Content Event Handlers 301 protected override void Content_NameChanged(object sender, EventArgs e) { 302 if (InvokeRequired) 303 Invoke(new EventHandler(Content_NameChanged), sender, e); 304 else { 305 Content.VisualProperties.Title = Content.Name; 306 base.Content_NameChanged(sender, e); 307 } 308 } 284 309 private void Content_VisualPropertiesChanged(object sender, EventArgs e) { 285 310 if (InvokeRequired) … … 443 468 #region Chart Event Handlers 444 469 private void chart_MouseDoubleClick(object sender, MouseEventArgs e) { 445 HitTestResult result = chart.HitTest(e.X, e.Y, ChartElementType.DataPoint);470 HitTestResult result = chart.HitTest(e.X, e.Y, ChartElementType.DataPoint); 446 471 if (result.ChartElementType != ChartElementType.DataPoint) return; 447 472
Note: See TracChangeset
for help on using the changeset viewer.