Ignore:
Timestamp:
08/06/13 15:53:24 (9 years ago)
Author:
bburlacu
Message:

#2076: Wrapped dialog creation for pgf/tikz export in an using statement.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.ReingoldTilfordTreeLayout/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeChart.cs

    r9852 r9854  
    367367    }
    368368    #endregion
    369     #region
     369    #region export pgf/tikz
    370370    private void exportLatexToolStripMenuItem_Click(object sender, EventArgs e) {
    371       var dialog = new SaveFileDialog { Filter = "Tex (*.tex)|*.tex" };
    372       if (dialog.ShowDialog() != DialogResult.OK) return;
    373       string filename = dialog.FileName.ToLower();
    374       var formatter = new SymbolicExpressionTreeLatexFormatter();
    375       File.WriteAllText(filename, formatter.Format(Tree));
     371      using (var dialog = new SaveFileDialog { Filter = "Tex (*.tex)|*.tex" }) {
     372        if (dialog.ShowDialog() != DialogResult.OK) return;
     373        string filename = dialog.FileName.ToLower();
     374        var formatter = new SymbolicExpressionTreeLatexFormatter();
     375        File.WriteAllText(filename, formatter.Format(Tree));
     376      }
    376377    }
    377378    #endregion
Note: See TracChangeset for help on using the changeset viewer.