Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9906 for trunk/sources


Ignore:
Timestamp:
08/23/13 12:52:43 (11 years ago)
Author:
mkommend
Message:

#1730: Added progress bar to excel export.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/MenuItems/ExportSymbolicSolutionToExcelMenuItem.cs

    r9860 r9906  
    7777      var formatter = new SymbolicDataAnalysisExpressionExcelFormatter();
    7878      var formula = formatter.Format(solution.Model.SymbolicExpressionTree, solution.ProblemData.Dataset);
     79      control = (Control)activeView;
    7980
    8081
     
    8586        string fileName = saveFileDialog.FileName;
    8687        using (BackgroundWorker bg = new BackgroundWorker()) {
     88          MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().AddOperationProgressToView(control, "Exportion solution to " + fileName + ".");
    8789          bg.DoWork += (b, e) => ExportChart(fileName, solution, formula);
     90          bg.RunWorkerCompleted += (o, e) => MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(control);
    8891          bg.RunWorkerAsync();
    8992        }
     
    391394            datasetWorksheet.Cells[row + 2, col + 1].Value = dataset.GetDoubleValue(variableNames[col], row);
    392395          else
    393             datasetWorksheet.Cells[row + 2, col + 1].Value = dataset.GetValue(col, row);
     396            datasetWorksheet.Cells[row + 2, col + 1].Value = dataset.GetValue(row, col);
    394397        }
    395398      }
Note: See TracChangeset for help on using the changeset viewer.