Free cookie consent management tool by TermsFeed Policy Generator

Changeset 6640


Ignore:
Timestamp:
08/05/11 20:11:18 (13 years ago)
Author:
abeham
Message:

#1611

  • committed first version of a slightly more advanced export dialog
  • it's possible to specify image resolution and size directly, as well as change axis titles and chart title
Location:
trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/EnhancedChart.Designer.cs

    r6342 r6640  
    5050      this.copyImageToClipboardBitmapToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
    5151      this.saveFileDialog = new System.Windows.Forms.SaveFileDialog();
     52      this.exportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
    5253      this.contextMenuStrip.SuspendLayout();
    5354      ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
     
    5859      this.contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
    5960            this.exportChartToolStripMenuItem,
     61            this.exportToolStripMenuItem,
    6062            this.copyImageToClipboardBitmapToolStripMenuItem});
    6163      this.contextMenuStrip.Name = "contextMenuStrip";
    62       this.contextMenuStrip.Size = new System.Drawing.Size(257, 76);
     64      this.contextMenuStrip.Size = new System.Drawing.Size(257, 70);
    6365      //
    6466      // exportChartToolStripMenuItem
     
    6668      this.exportChartToolStripMenuItem.Name = "exportChartToolStripMenuItem";
    6769      this.exportChartToolStripMenuItem.Size = new System.Drawing.Size(256, 22);
    68       this.exportChartToolStripMenuItem.Text = "Export Chart";
     70      this.exportChartToolStripMenuItem.Text = "Quick Export Chart";
    6971      this.exportChartToolStripMenuItem.Click += new System.EventHandler(this.exportChartToolStripMenuItem_Click);
    7072      //
     
    8183          "*.gif)|*.gif|TIFF (*.tif)|*.tif\"";
    8284      this.saveFileDialog.FilterIndex = 2;
     85      //
     86      // exportToolStripMenuItem
     87      //
     88      this.exportToolStripMenuItem.Name = "exportToolStripMenuItem";
     89      this.exportToolStripMenuItem.Size = new System.Drawing.Size(256, 22);
     90      this.exportToolStripMenuItem.Text = "Export Chart...";
     91      this.exportToolStripMenuItem.Click += new System.EventHandler(this.exportToolStripMenuItem_Click);
    8392      //
    8493      // EnhancedChart
     
    97106    private System.Windows.Forms.ToolStripMenuItem copyImageToClipboardBitmapToolStripMenuItem;
    98107    private System.Windows.Forms.SaveFileDialog saveFileDialog;
     108    private System.Windows.Forms.ToolStripMenuItem exportToolStripMenuItem;
    99109  }
    100110}
  • trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/EnhancedChart.cs

    r5445 r6640  
    2828namespace HeuristicLab.Visualization.ChartControlsExtensions {
    2929  public partial class EnhancedChart : Chart {
     30    private ImageExportDialog exportDialog;
     31
    3032    public EnhancedChart()
    3133      : base() {
    3234      InitializeComponent();
     35      exportDialog = new ImageExportDialog(this);
    3336      EnableDoubleClickResetsZoom = true;
    3437      EnableMiddleClickPanning = true;
     
    138141    #endregion
    139142
    140     private void exportChartToolStripMenuItem_Click(object sender, System.EventArgs e) {
     143    private void exportChartToolStripMenuItem_Click(object sender, EventArgs e) {
    141144      // Set image file format
    142145      if (saveFileDialog.ShowDialog() == DialogResult.OK) {
     
    162165    }
    163166
    164     private void copyImageToClipboardBitmapToolStripMenuItem_Click(object sender, System.EventArgs e) {
     167    private void exportToolStripMenuItem_Click(object sender, EventArgs e) {
     168      exportDialog.ShowDialog();
     169    }
     170
     171    private void copyImageToClipboardBitmapToolStripMenuItem_Click(object sender, EventArgs e) {
    165172      System.IO.MemoryStream stream = new System.IO.MemoryStream();
    166173      SaveImage(stream, System.Drawing.Imaging.ImageFormat.Bmp);
  • trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/HeuristicLab.Visualization.ChartControlsExtensions-3.3.csproj

    r6514 r6640  
    128128      <DependentUpon>HistogramControl.cs</DependentUpon>
    129129    </Compile>
     130    <Compile Include="ImageExportDialog.cs">
     131      <SubType>Form</SubType>
     132    </Compile>
     133    <Compile Include="ImageExportDialog.Designer.cs">
     134      <DependentUpon>ImageExportDialog.cs</DependentUpon>
     135    </Compile>
    130136    <Compile Include="Properties\AssemblyInfo.cs" />
    131137  </ItemGroup>
     
    140146      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
    141147    </ProjectReference>
     148  </ItemGroup>
     149  <ItemGroup>
     150    <None Include="Resources\HeuristicLabLogo.png" />
     151  </ItemGroup>
     152  <ItemGroup>
     153    <None Include="Resources\genotype_FDC.jpg" />
    142154  </ItemGroup>
    143155  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Note: See TracChangeset for help on using the changeset viewer.