示例#1
0
        private void optionsButton_Click(object sender, EventArgs e)
        {
            string oldOsuPath = Configs.OsuPath;

            ConfigurationsForm configForm = new ConfigurationsForm(Configs.Cfg);

            configForm.ShowDialog();

            while (!Configs.updateConfigurations(configForm.Cfg))
            {
                configForm.Dispose();

                configForm = new ConfigurationsForm(Configs.Cfg);
                configForm.ShowDialog();
            }

            outputLabelData.Text = Configs.OutPath;
            osuLabelData.Text    = Configs.OsuPath;

            if (Configs.OsuPath != oldOsuPath)
            {
                extractButton.Enabled = false;
                updateComboBox(true);
            }
        }
示例#2
0
        public MainForm()
        {
            InitializeComponent();

            string[] spstring = Application.ExecutablePath.Split(new string[] { "\\osu! mp3 extractor.exe" }, StringSplitOptions.None);
            AppPath = spstring[0];                 //appPath

            Configs = new Configurations(AppPath); //Initialize configurations
            if (!Configs.getConfigurations())
            {
                ConfigurationsForm configForm = new ConfigurationsForm();
                configForm.ShowDialog();
                if (configForm.ShouldClose)
                {
                    Environment.Exit(0);
                }

                while (!Configs.updateConfigurations(configForm.Cfg))
                {
                    configForm.Dispose();

                    configForm = new ConfigurationsForm(configForm.Cfg);
                    configForm.ShowDialog();
                    if (configForm.ShouldClose)
                    {
                        Environment.Exit(0);
                    }
                }
            }

            outputLabelData.Text = Configs.OutPath;
            osuLabelData.Text    = Configs.OsuPath;

            extractor = new Extractor(this.progressBar, this.extractButton, this.optionsButton, this.cancelButton);

            Cdb = new CollectionDb();
            Odb = new OsuDb();

            updateComboBox(false);
        }