public async void RunSimulationAsync() { ProgressDialogController controller = await dialogCoordinator.ShowProgressAsync(this, "Simulate", "Running the waferfab simulation"); controller.SetIndeterminate(); // Build simulation model updateWaferFabSettings(); WaferFabSim.MyWaferFabSettings = waferFabSettings; WaferFabSim.MyExperimentSettings = experimentSettings; // Run simulation await Task.Run(() => WaferFabSim.RunSimulation()); // Update WIP data ClearAllWIPPlots(); // Close... await controller.CloseAsync(); }
public async void LoadRealSnapshotsAsync() { OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.Multiselect = true; openFileDialog.InitialDirectory = @"C:\Users\nx008314\OneDrive - Nexperia\Work\WaferFab\SerializedFiles"; try { if (openFileDialog.ShowDialog() == true) { ProgressDialogController controller = await dialogCoordinator.ShowProgressAsync(this, "Loading", "Reading snapshot data..."); controller.SetIndeterminate(); await Task.Run(() => WaferFabSim.ReadRealSnaphots(openFileDialog.FileName)); await controller.CloseAsync(); } } catch { throw new Exception("Cannot read selected file"); } }