private void RunTool(string[] paths, bool quick = false) { if (!CanRun) { return; } IOHelper.SaveMapBackup(paths); BackgroundWorker.RunWorkerAsync(new Arguments(paths, TemporalBox.GetDouble(), SpatialBox.GetDouble(), MoveAnchorsBox.IsChecked.GetValueOrDefault(), SelectionModeBox.SelectedIndex, quick)); CanRun = false; }
private void RunTool(string[] paths, bool quick = false) { if (!CanRun) { return; } IOHelper.SaveMapBackup(paths); var args = new Arguments(quick, paths, ObjectsBox.IsChecked.GetValueOrDefault(), BookmarkBox.IsChecked.GetValueOrDefault(), GreenlinesBox.IsChecked.GetValueOrDefault(), RedlinesBox.IsChecked.GetValueOrDefault(), OmitBarlineBox.IsChecked.GetValueOrDefault(), LeniencyBox.GetDouble(defaultValue: 3), TemporalBox.GetDouble(), int.Parse(Snap1.Text.Split('/')[1]), int.Parse(Snap2.Text.Split('/')[1])); BackgroundWorker.RunWorkerAsync(args); CanRun = false; }
private void Start_Click(object sender, RoutedEventArgs e) { string[] filesToCopy = MainWindow.AppWindow.GetCurrentMaps(); IOHelper.SaveMapBackup(filesToCopy); BackgroundWorker.RunWorkerAsync(new Arguments(filesToCopy, (bool)ObjectsBox.IsChecked, (bool)BookmarkBox.IsChecked, (bool)GreenlinesBox.IsChecked, (bool)RedlinesBox.IsChecked, (bool)OmitBarlineBox.IsChecked, LeniencyBox.GetDouble(defaultValue: 3), TemporalBox.GetDouble(), int.Parse(Snap1.Text.Split('/')[1]), int.Parse(Snap2.Text.Split('/')[1]))); CanRun = false; }