Beispiel #1
0
 private void cmbShuffleMode_SelectedIndexChanged(object sender, EventArgs e)
 {
     shuffleMode = (ShuffleModes)this.cmbShuffleMode.SelectedIndex;
     MP3_Randomizer_2.Properties.Settings.Default.ShuffleMode = (int)shuffleMode;
     MP3_Randomizer_2.Properties.Settings.Default.Save();
 }
Beispiel #2
0
        private int sa3FirstMissionMemAddress = 0x008DF778; // downgraded sa version (gta-sa in task manager)

        public Form1()
        {
            InitializeComponent();

            try
            {
                firstLaunch    = true;
                previousResult = originalFileNameList.Count();
                enableButtons();
                this.cmbShuffleMode.SelectedIndex = 0;
                this.shuffleMode = (ShuffleModes)cmbShuffleMode.SelectedIndex;

                txtPath.Text = MP3_Randomizer_2.Properties.Settings.Default.Path;
                path         = MP3_Randomizer_2.Properties.Settings.Default.Path;
                shuffleMode  = (ShuffleModes)MP3_Randomizer_2.Properties.Settings.Default.ShuffleMode;
                cmbShuffleMode.SelectedIndex = MP3_Randomizer_2.Properties.Settings.Default.ShuffleMode;
                checkReset             = MP3_Randomizer_2.Properties.Settings.Default.shouldAutoReset;
                chkautoReOrder.Checked = checkReset;

                if (!checkReset)
                {
                    btnRearrangeNow.Enabled = true;
                    btnResetDisable.Enabled = true;
                }
                else
                {
                    btnRearrangeNow.Enabled = false;
                    btnResetDisable.Enabled = false;
                }


                threadUpdateUI = new Thread(new ThreadStart(updateUI));
                threadUpdateUI.Start();

                threadGameDetector = new Thread(new ThreadStart(detectGame));
                threadGameDetector.Start();

                threadRename = new Thread(new ThreadStart(RenameFiles));

                if (path != "")
                {
                    FolderBrowserDialog fbd = new FolderBrowserDialog();
                    fbd.SelectedPath = path;
                    updateToNewPath(fbd);
                    lblMp3Files.ForeColor = Color.Black;
                    loadingError          = false;
                }
            }
            catch (IOException io)
            {
                status = "Unable to read or write to path, is the path accessible?";
                lblMp3Files.ForeColor = Color.Red;
                loadingError          = true;
                Console.WriteLine(io.Message);
                //MessageBox.Show("An error occured when trying to launch the application. Unable to read or write to path. Is the path accessible?", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            catch (Exception ex)
            {
                MessageBox.Show("An error occured when trying to launch the application.\r\n " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Console.WriteLine(ex.Message);
            }
        }