Esempio n. 1
0
 private void RunBtn_Click(object sender, RoutedEventArgs e)
 {
     // Get BaseModel
     var(success, baseModel) = FileUtility.GetBaseModel(fileName);
     if (success)
     {
         //hide window
         this.Hide();
         Thread.Sleep(500);
         // num of iterations
         numIterations = Convert.ToInt32(NumIterationTxt.Text);
         // get fill type
         fillType = GetFillType(RunningTypeCB.SelectedIndex);
         // Extract PreProcess, Run, Process, PostProcessing Models
         var(PreProcess, Run, Process, PostProcessing, processName) = ModelUtility.ConvertBaseModelToActionModels(baseModel);
         RunReport runReport = new RunReport(new GenericRunner(PreProcess, Run, Process, PostProcessing, processName), fillType);
         runReport.Run(ClickEngine.Engine.SeedWork.FileUtility.GetUniqueTxtFileName(nameof(GenericRunner)), numIterations);
         this.Show();
         MessageBox.Show("The process is successfully finished.");
     }
     else
     {
         this.Show();
         MessageBox.Show($"Cannot read the model {fileName}");
     }
     SystemInteractions.ShowHideWindow(SystemInteractions.WindowHideShow.SHOW);
 }