private void exportButton_Click(object sender, EventArgs e) {
      var exporter = new SymbolicDiscriminantFunctionClassificationSolutionExcelExporter();
      exportFileDialog.Filter = exporter.FileTypeFilter;
      if (exportFileDialog.ShowDialog(this) == DialogResult.OK) {

        var name = exportFileDialog.FileName;
        using (BackgroundWorker bg = new BackgroundWorker()) {
          MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().AddOperationProgressToView(this, "Exportion solution to " + name + ".");
          bg.DoWork += (o, a) => exporter.Export(Content, name);
          bg.RunWorkerCompleted += (o, a) => MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this);
          bg.RunWorkerAsync();
        }
      }
    }
Esempio n. 2
0
        private void exportButton_Click(object sender, EventArgs e)
        {
            var exporter = new SymbolicDiscriminantFunctionClassificationSolutionExcelExporter();

            exportFileDialog.Filter = exporter.FileTypeFilter;
            if (exportFileDialog.ShowDialog(this) == DialogResult.OK)
            {
                var name = exportFileDialog.FileName;
                using (BackgroundWorker bg = new BackgroundWorker()) {
                    Progress.Show(this, "Exportion solution to " + name + ".", ProgressMode.Indeterminate);
                    bg.DoWork             += (o, a) => exporter.Export(Content, name);
                    bg.RunWorkerCompleted += (o, a) => Progress.Hide(this);
                    bg.RunWorkerAsync();
                }
            }
        }
        private void exportButton_Click(object sender, EventArgs e)
        {
            var exporter = new SymbolicDiscriminantFunctionClassificationSolutionExcelExporter();

            exportFileDialog.Filter = exporter.FileTypeFilter;
            if (exportFileDialog.ShowDialog(this) == DialogResult.OK)
            {
                var name = exportFileDialog.FileName;
                using (BackgroundWorker bg = new BackgroundWorker()) {
                    MainFormManager.GetMainForm <MainForm.WindowsForms.MainForm>().AddOperationProgressToView(this, "Exportion solution to " + name + ".");
                    bg.DoWork             += (o, a) => exporter.Export(Content, name);
                    bg.RunWorkerCompleted += (o, a) => MainFormManager.GetMainForm <MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this);
                    bg.RunWorkerAsync();
                }
            }
        }