- Timestamp:
- 10/20/10 14:38:17 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/EnhancedChart.Designer.cs
r4614 r4628 27 27 this.contextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); 28 28 this.saveImageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 29 this.copyImageToClipboard ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();29 this.copyImageToClipboardBitmapToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 30 30 this.contextMenuStrip.SuspendLayout(); 31 31 ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); … … 36 36 this.contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 37 37 this.saveImageToolStripMenuItem, 38 this.copyImageToClipboard ToolStripMenuItem});38 this.copyImageToClipboardBitmapToolStripMenuItem}); 39 39 this.contextMenuStrip.Name = "contextMenuStrip"; 40 this.contextMenuStrip.Size = new System.Drawing.Size(2 08, 48);40 this.contextMenuStrip.Size = new System.Drawing.Size(257, 70); 41 41 // 42 42 // saveImageToolStripMenuItem 43 43 // 44 44 this.saveImageToolStripMenuItem.Name = "saveImageToolStripMenuItem"; 45 this.saveImageToolStripMenuItem.Size = new System.Drawing.Size(2 07, 22);45 this.saveImageToolStripMenuItem.Size = new System.Drawing.Size(256, 22); 46 46 this.saveImageToolStripMenuItem.Text = "Save Image"; 47 47 this.saveImageToolStripMenuItem.Click += new System.EventHandler(this.saveImageToolStripMenuItem_Click); 48 48 // 49 // copyImageToClipboard ToolStripMenuItem49 // copyImageToClipboardBitmapToolStripMenuItem 50 50 // 51 this.copyImageToClipboardToolStripMenuItem.Name = "copyImageToClipboardToolStripMenuItem"; 52 this.copyImageToClipboardToolStripMenuItem.Size = new System.Drawing.Size(207, 22); 53 this.copyImageToClipboardToolStripMenuItem.Text = "Copy Image to Clipboard"; 54 this.copyImageToClipboardToolStripMenuItem.Click += new System.EventHandler(this.copyImageToClipboardToolStripMenuItem_Click); 51 this.copyImageToClipboardBitmapToolStripMenuItem.Name = "copyImageToClipboardBitmapToolStripMenuItem"; 52 this.copyImageToClipboardBitmapToolStripMenuItem.Size = new System.Drawing.Size(256, 22); 53 this.copyImageToClipboardBitmapToolStripMenuItem.Text = "Copy Image to Clipboard (Bitmap)"; 54 this.copyImageToClipboardBitmapToolStripMenuItem.Click += new System.EventHandler(this.copyImageToClipboardBitmapToolStripMenuItem_Click); 55 // 56 // EnhancedChart 57 // 58 this.ContextMenuStrip = this.contextMenuStrip; 55 59 this.contextMenuStrip.ResumeLayout(false); 56 60 ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); … … 63 67 private System.Windows.Forms.ContextMenuStrip contextMenuStrip; 64 68 private System.Windows.Forms.ToolStripMenuItem saveImageToolStripMenuItem; 65 private System.Windows.Forms.ToolStripMenuItem copyImageToClipboard ToolStripMenuItem;69 private System.Windows.Forms.ToolStripMenuItem copyImageToClipboardBitmapToolStripMenuItem; 66 70 } 67 71 } -
trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/EnhancedChart.cs
r4621 r4628 26 26 namespace HeuristicLab.Visualization.ChartControlsExtensions { 27 27 public partial class EnhancedChart : Chart { 28 29 30 28 public EnhancedChart() 31 29 : base() { 30 InitializeComponent(); 32 31 EnableDoubleClickResetsZoom = true; 33 32 EnableMiddleClickPanning = true; … … 42 41 public void InitializeChartAreas() { 43 42 ChartAreas.Clear(); 44 ChartAreas.Add( GetDefaultChartArea("ChartArea"));43 ChartAreas.Add(CreateDefaultChartArea("ChartArea")); 45 44 } 46 45 47 public static ChartArea GetDefaultChartArea(string name) {46 public static ChartArea CreateDefaultChartArea(string name) { 48 47 ChartArea chartArea = new ChartArea(name); 49 48 chartArea.AxisX.MajorGrid.LineColor = SystemColors.GradientInactiveCaption; … … 86 85 87 86 private class PanningSupport { 88 89 87 public ChartArea ChartArea { get; private set; } 90 88 … … 150 148 // the choices that appear in the "Save as file type" or 151 149 // "Files of type" box in the dialog box. 152 saveFileDialog.Filter = "Bitmap (*.bmp)|*.bmp|JPEG (*.jpg)|*.jpg|EMF (*.emf)|*.emf|PNG (*.png)|*.png| SVG (*.svg)|*.svg|GIF (*.gif)|*.gif|TIFF (*.tif)|*.tif";150 saveFileDialog.Filter = "Bitmap (*.bmp)|*.bmp|JPEG (*.jpg)|*.jpg|EMF (*.emf)|*.emf|PNG (*.png)|*.png|GIF (*.gif)|*.gif|TIFF (*.tif)|*.tif"; 153 151 saveFileDialog.FilterIndex = 2; 154 152 saveFileDialog.RestoreDirectory = true; … … 177 175 } 178 176 179 private void copyImageToClipboard ToolStripMenuItem_Click(object sender, System.EventArgs e) {177 private void copyImageToClipboardBitmapToolStripMenuItem_Click(object sender, System.EventArgs e) { 180 178 System.IO.MemoryStream stream = new System.IO.MemoryStream(); 181 179 SaveImage(stream, System.Drawing.Imaging.ImageFormat.Bmp);
Note: See TracChangeset
for help on using the changeset viewer.