Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4655


Ignore:
Timestamp:
10/29/10 13:02:49 (14 years ago)
Author:
mkommend
Message:

Reused SaveFileDialog (ticket #1228).

Location:
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/SymbolicExpressionTreeChart.Designer.cs

    r4651 r4655  
    4949      this.contextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
    5050      this.saveImageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     51      this.saveFileDialog = new System.Windows.Forms.SaveFileDialog();
    5152      this.contextMenuStrip.SuspendLayout();
    5253      this.SuspendLayout();
     
    6263      //
    6364      this.saveImageToolStripMenuItem.Name = "saveImageToolStripMenuItem";
    64       this.saveImageToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
     65      this.saveImageToolStripMenuItem.Size = new System.Drawing.Size(134, 22);
    6566      this.saveImageToolStripMenuItem.Text = "Save Image";
    6667      this.saveImageToolStripMenuItem.Click += new System.EventHandler(this.saveImageToolStripMenuItem_Click);
     68      //
     69      // saveFileDialog
     70      //
     71      this.saveFileDialog.Filter = "\"Bitmap (*.bmp)|*.bmp|EMF (*.emf)|*.emf\"";
    6772      //
    6873      // SymbolicExpressionTreeChart
     
    8792    private System.Windows.Forms.ContextMenuStrip contextMenuStrip;
    8893    private System.Windows.Forms.ToolStripMenuItem saveImageToolStripMenuItem;
     94    private System.Windows.Forms.SaveFileDialog saveFileDialog;
    8995  }
    9096}
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/SymbolicExpressionTreeChart.cs

    r4651 r4655  
    292292    #region save image
    293293    private void saveImageToolStripMenuItem_Click(object sender, EventArgs e) {
    294       SaveFileDialog saveFileDialog = new SaveFileDialog();
    295 
    296       // Sets the current file name filter string, which determines
    297       // the choices that appear in the "Save as file type" or
    298       // "Files of type" box in the dialog box.
    299       saveFileDialog.Filter = "Bitmap (*.bmp)|*.bmp|EMF (*.emf)|*.emf";
    300       saveFileDialog.FilterIndex = 1;
    301       saveFileDialog.RestoreDirectory = true;
    302 
    303294      if (saveFileDialog.ShowDialog() == DialogResult.OK) {
    304295        string filename = saveFileDialog.FileName.ToLower();
Note: See TracChangeset for help on using the changeset viewer.