Esempio n. 1
0
 private void RLCSFL_Click(object sender, EventArgs e)
 {
     CommonSoundFonts.LoadCSF();
     RebindList();
 }
Esempio n. 2
0
        static void Main(String[] Arguments)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            if (Properties.Settings.Default.PreRelease)
            {
                MessageBox.Show("You are using a pre-release version of the converter.\n" +
                                "Anything you might try and see here might not make it into the final release.\n\n" +
                                "You have been warned.\n\nPress OK to continue.", "OmniConverter - Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }

            if (Properties.Settings.Default.SUP)
            {
                Properties.Settings.Default.Upgrade();
                Properties.Settings.Default.SUP = false;
                Properties.Settings.Default.Save();
                Debug.PrintToConsole("ok", "Restored settings from old version.");
            }

            if (Properties.Settings.Default.MultiThreadedLimitV == -1)
            {
                Properties.Settings.Default.MultiThreadedLimitV = Environment.ProcessorCount;
                Properties.Settings.Default.Save();
                Debug.PrintToConsole("ok", String.Format("MTL = {0}", Properties.Settings.Default.MultiThreadedLimit));
            }

            if (Properties.Settings.Default.UpdateBranch == "choose")
            {
                SelectBranch frm = new SelectBranch();
                frm.ShowInTaskbar = true;
                frm.StartPosition = FormStartPosition.CenterScreen;
                frm.ShowDialog();
                frm.Dispose();
            }

            foreach (String Arg in Arguments)
            {
                switch (Arg.ToLowerInvariant())
                {
                case "/debug":
                case "/mode":
                    Debug.EnableConsole();
                    Debug.PrintToConsole("ok", "Restored settings from old version.");
                    break;

                case "/reset":
                    if (MessageBox.Show("Are you sure you want to reset OmniConverter's settings?") == DialogResult.Yes)
                    {
                        Properties.Settings.Default.Reset();
                        Properties.Settings.Default.SUP = false;
                        Properties.Settings.Default.Save();
                        break;
                    }
                    else
                    {
                        return;
                    }
                }
            }

            CommonSoundFonts.LoadCSF();

            Application.Run(new MainWindow(Arguments));
        }