Changeset 4709
- Timestamp:
- 11/02/10 15:30:42 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.Designer.cs
r4477 r4709 54 54 this.contextMenu = new System.Windows.Forms.ContextMenuStrip(this.components); 55 55 this.ShowHideColumns = new System.Windows.Forms.ToolStripMenuItem(); 56 this.statusStrip = new System.Windows.Forms.StatusStrip(); 57 this.toolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel(); 56 58 ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit(); 57 59 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 58 60 this.contextMenu.SuspendLayout(); 61 this.statusStrip.SuspendLayout(); 59 62 this.SuspendLayout(); 60 63 // … … 93 96 this.dataGridView.Name = "dataGridView"; 94 97 this.dataGridView.RowHeadersWidth = 160; 95 this.dataGridView.Size = new System.Drawing.Size(424, 3 52);98 this.dataGridView.Size = new System.Drawing.Size(424, 327); 96 99 this.dataGridView.TabIndex = 4; 97 100 this.dataGridView.VirtualMode = true; … … 102 105 this.dataGridView.ColumnHeaderMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dataGridView_ColumnHeaderMouseClick); 103 106 this.dataGridView.Scroll += new System.Windows.Forms.ScrollEventHandler(this.dataGridView_Scroll); 107 this.dataGridView.SelectionChanged += new System.EventHandler(this.dataGridView_SelectionChanged); 104 108 this.dataGridView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView_KeyDown); 105 this.dataGridView.MouseClick += new System.Windows.Forms.MouseEventHandler( dataGridView_MouseClick);109 this.dataGridView.MouseClick += new System.Windows.Forms.MouseEventHandler(this.dataGridView_MouseClick); 106 110 this.dataGridView.Resize += new System.EventHandler(this.dataGridView_Resize); 107 111 // … … 146 150 this.ShowHideColumns.Click += new System.EventHandler(this.ShowHideColumns_Click); 147 151 // 152 // statusStrip1 153 // 154 this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 155 this.toolStripStatusLabel}); 156 this.statusStrip.Location = new System.Drawing.Point(0, 382); 157 this.statusStrip.Name = "statusStrip1"; 158 this.statusStrip.Size = new System.Drawing.Size(424, 22); 159 this.statusStrip.TabIndex = 5; 160 this.statusStrip.Text = "statusStrip1"; 161 // 162 // toolStripStatusLabel 163 // 164 this.toolStripStatusLabel.Name = "toolStripStatusLabel"; 165 this.toolStripStatusLabel.Size = new System.Drawing.Size(378, 17); 166 this.toolStripStatusLabel.Spring = true; 167 // 148 168 // StringConvertibleMatrixView 149 169 // 150 170 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 151 171 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 172 this.Controls.Add(this.statusStrip); 152 173 this.Controls.Add(this.dataGridView); 153 174 this.Controls.Add(this.columnsTextBox); … … 160 181 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 161 182 this.contextMenu.ResumeLayout(false); 183 this.statusStrip.ResumeLayout(false); 184 this.statusStrip.PerformLayout(); 162 185 this.ResumeLayout(false); 163 186 this.PerformLayout(); … … 174 197 protected System.Windows.Forms.ToolStripMenuItem ShowHideColumns; 175 198 protected System.Windows.Forms.DataGridView dataGridView; 199 private System.Windows.Forms.StatusStrip statusStrip; 200 private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel; 176 201 177 202 } -
trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs
r4707 r4709 56 56 get { return showRowsAndColumnsTextBox; } 57 57 set { 58 if (value != showRowsAndColumnsTextBox) { 59 showRowsAndColumnsTextBox = value; 60 UpdateVisibilityOfTextBoxes(); 61 } 58 showRowsAndColumnsTextBox = value; 59 UpdateVisibilityOfTextBoxes(); 60 } 61 } 62 63 private bool showStatisticalInformation; 64 public bool ShowStatisticalInformation { 65 get { return showStatisticalInformation; } 66 set { 67 showStatisticalInformation = value; 68 UpdateVisibilityOfStatisticalInformation(); 62 69 } 63 70 } … … 65 72 public StringConvertibleMatrixView() { 66 73 InitializeComponent(); 67 showRowsAndColumnsTextBox = true; 74 ShowRowsAndColumnsTextBox = true; 75 ShowStatisticalInformation = false; 68 76 errorProvider.SetIconAlignment(rowsTextBox, ErrorIconAlignment.MiddleLeft); 69 77 errorProvider.SetIconPadding(rowsTextBox, 2); … … 496 504 rowsTextBox.Visible = columnsTextBox.Visible = showRowsAndColumnsTextBox; 497 505 rowsLabel.Visible = columnsLabel.Visible = showRowsAndColumnsTextBox; 498 506 UpdateDataGridViewSizeAndLocation(); 507 } 508 509 private void UpdateVisibilityOfStatisticalInformation() { 510 statusStrip.Visible = showStatisticalInformation; 511 UpdateDataGridViewSizeAndLocation(); 512 } 513 514 private void UpdateDataGridViewSizeAndLocation() { 499 515 int headerSize = columnsTextBox.Location.Y + columnsTextBox.Size.Height + 500 516 columnsTextBox.Margin.Bottom + dataGridView.Margin.Top; 501 517 502 518 int offset = showRowsAndColumnsTextBox ? headerSize : 0; 503 519 dataGridView.Location = new Point(0, offset); 504 dataGridView.Size = new Size(Size.Width, Size.Height - offset); 520 521 int statusStripHeight = showStatisticalInformation ? statusStrip.Height : 0; 522 dataGridView.Size = new Size(Size.Width, Size.Height - offset - statusStripHeight); 523 } 524 525 private void dataGridView_SelectionChanged(object sender, EventArgs e) { 526 toolStripStatusLabel.Text = string.Empty; 527 if (dataGridView.SelectedCells.Count > 1) { 528 List<double> selectedValues = new List<double>(); 529 foreach (DataGridViewCell cell in dataGridView.SelectedCells) { 530 double value; 531 if (!double.TryParse(cell.Value.ToString(), out value)) return; 532 selectedValues.Add(value); 533 } 534 if (selectedValues.Count > 1) { 535 StringBuilder labelText = new StringBuilder(); 536 labelText.Append("Average: " + selectedValues.Average() + " "); 537 labelText.Append("StdDev: " + selectedValues.StandardDeviation() + " "); 538 labelText.Append("Sum: " + selectedValues.Sum() + " "); 539 labelText.Append("Count: " + selectedValues.Count + " "); 540 toolStripStatusLabel.Text = labelText.ToString(); 541 } 542 } 505 543 } 506 544 } -
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionBoxPlotView.Designer.cs
r4653 r4709 46 46 private void InitializeComponent() { 47 47 this.components = new System.ComponentModel.Container(); 48 System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea 1= new System.Windows.Forms.DataVisualization.Charting.ChartArea();49 System.Windows.Forms.DataVisualization.Charting.Series series 1= new System.Windows.Forms.DataVisualization.Charting.Series();48 System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea2 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); 49 System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series(); 50 50 this.xAxisLabel = new System.Windows.Forms.Label(); 51 51 this.xAxisComboBox = new System.Windows.Forms.ComboBox(); … … 56 56 this.splitContainer = new System.Windows.Forms.SplitContainer(); 57 57 this.statisticsGroupBox = new System.Windows.Forms.GroupBox(); 58 this.tooltip = new System.Windows.Forms.ToolTip(this.components); 58 59 this.statisticsMatrixView = new HeuristicLab.Data.Views.StringConvertibleMatrixView(); 59 this.tooltip = new System.Windows.Forms.ToolTip(this.components);60 60 ((System.ComponentModel.ISupportInitialize)(this.chart)).BeginInit(); 61 61 this.splitContainer.Panel1.SuspendLayout(); … … 112 112 | System.Windows.Forms.AnchorStyles.Left) 113 113 | System.Windows.Forms.AnchorStyles.Right))); 114 chartArea 1.Name = "ChartArea1";115 this.chart.ChartAreas.Add(chartArea 1);114 chartArea2.Name = "ChartArea1"; 115 this.chart.ChartAreas.Add(chartArea2); 116 116 this.chart.Location = new System.Drawing.Point(6, 30); 117 117 this.chart.Name = "chart"; 118 series 1.ChartArea = "ChartArea1";119 series 1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.BoxPlot;120 series 1.IsVisibleInLegend = false;121 series 1.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle;122 series 1.Name = "DataSeries";123 series 1.YValuesPerPoint = 6;124 this.chart.Series.Add(series 1);118 series2.ChartArea = "ChartArea1"; 119 series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.BoxPlot; 120 series2.IsVisibleInLegend = false; 121 series2.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle; 122 series2.Name = "DataSeries"; 123 series2.YValuesPerPoint = 6; 124 this.chart.Series.Add(series2); 125 125 this.chart.Size = new System.Drawing.Size(534, 217); 126 126 this.chart.TabIndex = 17; … … 184 184 this.statisticsMatrixView.ReadOnly = true; 185 185 this.statisticsMatrixView.ShowRowsAndColumnsTextBox = false; 186 this.statisticsMatrixView.ShowStatisticalInformation = false; 186 187 this.statisticsMatrixView.Size = new System.Drawing.Size(528, 110); 187 188 this.statisticsMatrixView.TabIndex = 0; -
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionTabularView.Designer.cs
r4200 r4709 45 45 /// </summary> 46 46 private void InitializeComponent() { 47 this.components = new System.ComponentModel.Container(); 48 this.dataGridView.RowHeaderMouseDoubleClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(dataGridView_RowHeaderMouseDoubleClick); 47 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 48 this.SuspendLayout(); 49 // 50 // rowsTextBox 51 // 52 this.errorProvider.SetIconAlignment(this.rowsTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft); 53 this.errorProvider.SetIconPadding(this.rowsTextBox, 2); 54 // 55 // RunCollectionTabularView 56 // 57 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 58 this.Name = "RunCollectionTabularView"; 59 this.ShowStatisticalInformation = true; 60 this.Controls.SetChildIndex(this.rowsLabel, 0); 61 this.Controls.SetChildIndex(this.columnsLabel, 0); 62 this.Controls.SetChildIndex(this.rowsTextBox, 0); 63 this.Controls.SetChildIndex(this.columnsTextBox, 0); 64 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 65 this.ResumeLayout(false); 66 this.PerformLayout(); 67 49 68 } 50 69
Note: See TracChangeset
for help on using the changeset viewer.