- Timestamp:
- 05/10/11 15:25:05 (13 years ago)
- Location:
- branches/histogram
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/histogram/HeuristicLab.Analysis.Views/3.3/DataTableView.Designer.cs
r6010 r6176 89 89 series1.Name = "Default"; 90 90 this.chart.Series.Add(series1); 91 this.chart.ShowPropertiesContextMenuItem = true;92 91 this.chart.Size = new System.Drawing.Size(359, 248); 93 92 this.chart.TabIndex = 3; … … 97 96 title1.Text = "Title"; 98 97 this.chart.Titles.Add(title1); 99 this.chart.PropertiesClicked += new System.EventHandler(this.chart_PropertiesClicked);100 98 this.chart.CustomizeLegend += new System.EventHandler<System.Windows.Forms.DataVisualization.Charting.CustomizeLegendEventArgs>(this.chart_CustomizeLegend); 101 99 this.chart.MouseDown += new System.Windows.Forms.MouseEventHandler(this.chart_MouseDown); -
branches/histogram/HeuristicLab.Analysis.Views/3.3/DataTableView.cs
r6115 r6176 36 36 [View("DataTable View")] 37 37 [Content(typeof(DataTable), true)] 38 public partial class DataTableView : NamedItemView {38 public partial class DataTableView : NamedItemView, IConfigureableView { 39 39 protected List<Series> invisibleSeries; 40 40 protected Dictionary<IObservableList<double>, DataRow> valuesRowsTable; … … 144 144 base.SetEnabledStateOfControls(); 145 145 chart.Enabled = Content != null; 146 } 147 148 public void ShowConfiguration() { 149 if (Content != null) { 150 DataTableVisualPropertiesDialog dialog = new DataTableVisualPropertiesDialog(Content); 151 dialog.ShowDialog(); 152 } else MessageBox.Show("Nothing to configure."); 146 153 } 147 154 … … 503 510 } 504 511 } 505 private void chart_PropertiesClicked(object sender, EventArgs e) {506 DataTableVisualPropertiesDialog dialog = new DataTableVisualPropertiesDialog(Content);507 dialog.ShowDialog();508 }509 512 #endregion 510 513 -
branches/histogram/HeuristicLab.Visualization.ChartControlsExtensions/3.3/EnhancedChart.Designer.cs
r6010 r6176 50 50 this.copyImageToClipboardBitmapToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 51 51 this.saveFileDialog = new System.Windows.Forms.SaveFileDialog(); 52 this.propertiesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();53 this.propertiesToolStripSeparator = new System.Windows.Forms.ToolStripSeparator();54 52 this.contextMenuStrip.SuspendLayout(); 55 53 ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); … … 60 58 this.contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 61 59 this.exportChartToolStripMenuItem, 62 this.copyImageToClipboardBitmapToolStripMenuItem, 63 this.propertiesToolStripSeparator, 64 this.propertiesToolStripMenuItem}); 60 this.copyImageToClipboardBitmapToolStripMenuItem}); 65 61 this.contextMenuStrip.Name = "contextMenuStrip"; 66 62 this.contextMenuStrip.Size = new System.Drawing.Size(257, 76); 67 this.contextMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip_Opening);68 63 // 69 64 // exportChartToolStripMenuItem … … 87 82 this.saveFileDialog.FilterIndex = 2; 88 83 // 89 // propertiesToolStripMenuItem90 //91 this.propertiesToolStripMenuItem.Name = "propertiesToolStripMenuItem";92 this.propertiesToolStripMenuItem.Size = new System.Drawing.Size(256, 22);93 this.propertiesToolStripMenuItem.Text = "Properties";94 this.propertiesToolStripMenuItem.Click += new System.EventHandler(this.propertiesToolStripMenuItem_Click);95 //96 // propertiesToolStripSeparator97 //98 this.propertiesToolStripSeparator.Name = "propertiesToolStripSeparator";99 this.propertiesToolStripSeparator.Size = new System.Drawing.Size(253, 6);100 //101 84 // EnhancedChart 102 85 // … … 114 97 private System.Windows.Forms.ToolStripMenuItem copyImageToClipboardBitmapToolStripMenuItem; 115 98 private System.Windows.Forms.SaveFileDialog saveFileDialog; 116 private System.Windows.Forms.ToolStripSeparator propertiesToolStripSeparator;117 private System.Windows.Forms.ToolStripMenuItem propertiesToolStripMenuItem;118 99 } 119 100 } -
branches/histogram/HeuristicLab.Visualization.ChartControlsExtensions/3.3/EnhancedChart.cs
r6014 r6176 25 25 using System.Windows.Forms; 26 26 using System.Windows.Forms.DataVisualization.Charting; 27 using HeuristicLab.Common.Resources;28 27 29 28 namespace HeuristicLab.Visualization.ChartControlsExtensions { … … 32 31 : base() { 33 32 InitializeComponent(); 34 propertiesToolStripMenuItem.Image = VSImageLibrary.Properties;35 33 EnableDoubleClickResetsZoom = true; 36 34 EnableMiddleClickPanning = true; … … 42 40 [DefaultValue(true)] 43 41 public bool EnableMiddleClickPanning { get; set; } 44 [DefaultValue(false)]45 public bool ShowPropertiesContextMenuItem { get; set; }46 42 47 43 public static void CustomizeChartArea(ChartArea chartArea) { … … 142 138 #endregion 143 139 144 private void contextMenuStrip_Opening(object sender, CancelEventArgs e) {145 propertiesToolStripSeparator.Visible = ShowPropertiesContextMenuItem;146 propertiesToolStripMenuItem.Visible = ShowPropertiesContextMenuItem;147 }148 149 140 private void exportChartToolStripMenuItem_Click(object sender, System.EventArgs e) { 150 141 // Set image file format … … 177 168 Clipboard.SetDataObject(bmp); 178 169 } 179 180 private void propertiesToolStripMenuItem_Click(object sender, EventArgs e) {181 OnPropertiesClicked();182 }183 184 public event EventHandler PropertiesClicked;185 private void OnPropertiesClicked() {186 var handler = PropertiesClicked;187 if (handler != null) handler(this, EventArgs.Empty);188 }189 170 } 190 171 }
Note: See TracChangeset
for help on using the changeset viewer.