- Timestamp:
- 04/14/11 00:18:46 (14 years ago)
- Location:
- branches/histogram/HeuristicLab.Visualization.ChartControlsExtensions/3.3
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/histogram/HeuristicLab.Visualization.ChartControlsExtensions/3.3/EnhancedChart.Designer.cs
r5445 r6010 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(); 52 54 this.contextMenuStrip.SuspendLayout(); 53 55 ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); … … 58 60 this.contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 59 61 this.exportChartToolStripMenuItem, 60 this.copyImageToClipboardBitmapToolStripMenuItem}); 62 this.copyImageToClipboardBitmapToolStripMenuItem, 63 this.propertiesToolStripSeparator, 64 this.propertiesToolStripMenuItem}); 61 65 this.contextMenuStrip.Name = "contextMenuStrip"; 62 this.contextMenuStrip.Size = new System.Drawing.Size(257, 48); 66 this.contextMenuStrip.Size = new System.Drawing.Size(257, 76); 67 this.contextMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip_Opening); 63 68 // 64 69 // exportChartToolStripMenuItem … … 78 83 // saveFileDialog 79 84 // 80 this.saveFileDialog.Filter = "Bitmap (*.bmp)|*.bmp|JPEG (*.jpg)|*.jpg|EMF (*.emf)|*.emf|PNG (*.png)|*.png|GIF " +81 " (*.gif)|*.gif|TIFF (*.tif)|*.tif\"";85 this.saveFileDialog.Filter = "Bitmap (*.bmp)|*.bmp|JPEG (*.jpg)|*.jpg|EMF (*.emf)|*.emf|PNG (*.png)|*.png|GIF (" + 86 "*.gif)|*.gif|TIFF (*.tif)|*.tif\""; 82 87 this.saveFileDialog.FilterIndex = 2; 88 // 89 // propertiesToolStripMenuItem 90 // 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 // propertiesToolStripSeparator 97 // 98 this.propertiesToolStripSeparator.Name = "propertiesToolStripSeparator"; 99 this.propertiesToolStripSeparator.Size = new System.Drawing.Size(253, 6); 83 100 // 84 101 // EnhancedChart … … 97 114 private System.Windows.Forms.ToolStripMenuItem copyImageToClipboardBitmapToolStripMenuItem; 98 115 private System.Windows.Forms.SaveFileDialog saveFileDialog; 116 private System.Windows.Forms.ToolStripSeparator propertiesToolStripSeparator; 117 private System.Windows.Forms.ToolStripMenuItem propertiesToolStripMenuItem; 99 118 } 100 119 } -
branches/histogram/HeuristicLab.Visualization.ChartControlsExtensions/3.3/EnhancedChart.cs
r5445 r6010 40 40 [DefaultValue(true)] 41 41 public bool EnableMiddleClickPanning { get; set; } 42 [DefaultValue(false)] 43 public bool ShowPropertiesContextMenuItem { get; set; } 42 44 43 45 public static void CustomizeChartArea(ChartArea chartArea) { … … 138 140 #endregion 139 141 142 private void contextMenuStrip_Opening(object sender, CancelEventArgs e) { 143 propertiesToolStripSeparator.Visible = ShowPropertiesContextMenuItem; 144 propertiesToolStripMenuItem.Visible = ShowPropertiesContextMenuItem; 145 } 146 140 147 private void exportChartToolStripMenuItem_Click(object sender, System.EventArgs e) { 141 148 // Set image file format … … 168 175 Clipboard.SetDataObject(bmp); 169 176 } 177 178 private void propertiesToolStripMenuItem_Click(object sender, EventArgs e) { 179 OnPropertiesClicked(); 180 } 181 182 public event EventHandler PropertiesClicked; 183 private void OnPropertiesClicked() { 184 var handler = PropertiesClicked; 185 if (handler != null) handler(this, EventArgs.Empty); 186 } 170 187 } 171 188 } -
branches/histogram/HeuristicLab.Visualization.ChartControlsExtensions/3.3/HeuristicLab.Visualization.ChartControlsExtensions-3.3.csproj
r5970 r6010 141 141 </ProjectReference> 142 142 </ItemGroup> 143 <ItemGroup> 144 <EmbeddedResource Include="EnhancedChart.resx"> 145 <DependentUpon>EnhancedChart.cs</DependentUpon> 146 </EmbeddedResource> 147 </ItemGroup> 143 148 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 144 149 <PropertyGroup>
Note: See TracChangeset
for help on using the changeset viewer.