Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/05/13 10:33:30 (11 years ago)
Author:
mkommend
Message:

#1730: Minor code changes and organization in the export to excel functionality.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ExportSymbolicDataAnalysisSolutions/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/MenuItems/ExportSymbolicSolutionToExcelMenuItem.cs

    r9583 r9584  
    5757    protected override void OnActiveViewChanged(object sender, EventArgs e) {
    5858      IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView;
    59       ToolStripItem.Enabled = activeView != null && activeView.Content as ISymbolicDataAnalysisSolution != null;
     59      ToolStripItem.Enabled = activeView != null && activeView.Content is ISymbolicDataAnalysisSolution;
    6060    }
    6161
    6262    public override void Execute() {
    63       IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView;
    64       var solution = activeView.Content as ISymbolicDataAnalysisSolution;
     63      var activeView = (IContentView)MainFormManager.MainForm.ActiveView;
     64      var solution = (ISymbolicDataAnalysisSolution)activeView.Content;
    6565      var formatter = new SymbolicDataAnalysisExpressionExcelFormatter();
    6666      var formula = formatter.Format(solution.Model.SymbolicExpressionTree);
Note: See TracChangeset for help on using the changeset viewer.