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;
        }
Ejemplo n.º 2
0
        private void RunTool(string[] paths, bool quick = false)
        {
            if (!CanRun)
            {
                return;
            }

            IOHelper.SaveMapBackup(paths);

            BackgroundWorker.RunWorkerAsync(new Arguments(paths, LeniencyBox.GetDouble(0),
                                                          SelectionModeBox.SelectedIndex, (ConnectionMode)ConnectionModeBox.SelectedItem,
                                                          LinearOnLinearBox.IsChecked.GetValueOrDefault(), 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;
        }
Ejemplo n.º 4
0
        private void Start_Click(object sender, RoutedEventArgs e)
        {
            foreach (string fileToCopy in BeatmapToBox.Text.Split('|'))
            {
                IOHelper.SaveMapBackup(fileToCopy);
            }

            BackgroundWorker.RunWorkerAsync(new Arguments(BeatmapToBox.Text, BeatmapFromBox.Text,
                                                          CopyModeBox.SelectedIndex, LeniencyBox.GetDouble(5),
                                                          CopyHitsoundsBox.IsChecked.GetValueOrDefault(), CopyBodyBox.IsChecked.GetValueOrDefault(),
                                                          CopySamplesetBox.IsChecked.GetValueOrDefault(),
                                                          CopyVolumeBox.IsChecked.GetValueOrDefault(), AlwaysPreserve5VolumeBox.IsChecked.GetValueOrDefault(),
                                                          CopyStoryboardedSamplesBox.IsChecked.GetValueOrDefault(),
                                                          IgnoreHitsoundSatisfiedSamplesBox.IsChecked.GetValueOrDefault(),
                                                          MuteSliderendBox.IsChecked.GetValueOrDefault(),
                                                          int.Parse(MutedSnap1.Text.Split('/')[1]), int.Parse(MutedSnap2.Text.Split('/')[1]),
                                                          MutedMinLengthBox.GetDouble(0), MutedCustomIndexBox.GetInt(),
                                                          (SampleSet)(MutedSampleSetBox.SelectedIndex + 1)));
            CanRun = false;
        }