Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9854


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

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

Location:
branches/HeuristicLab.ReingoldTilfordTreeLayout/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4
Files:
2 edited

Legend:

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

    r9852 r9854  
    2626
    2727namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
    28   [Plugin("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views","Provides views for the symbolic expression tree encoding.", "3.4.4.9821")]
     28  [Plugin("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views","Provides views for the symbolic expression tree encoding.", "3.4.4.9852")]
    2929  [PluginFile("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4.dll", PluginFileType.Assembly)]
    3030  [PluginDependency("HeuristicLab.Collections", "3.3")]
  • 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.