예제 #1
0
 void SingleInstanceManager_StartupNextInstance(object sender, StartupNextInstanceEventArgs e)
 {
     string[] args = new string[e.CommandLine.Count];
     e.CommandLine.CopyTo(args, 0);
     mainForm.ProcessArgs(args);
     mainForm.Show();
 }
예제 #2
0
        protected override void OnCreateMainForm()
        {
            try
            {
                Factory.CurrentTheme = NimbusTheme.FromFile(Path.GetDirectoryName(Application.ExecutablePath) + "\\themes\\default\\default.theme");
            }
            catch (ThemingError e)
            {
                MessageBox.Show(e.Error);
                Application.Exit();
            }

            mainForm = new NimbusMain(Factory.CurrentTheme);
            this.MainForm = mainForm;
            string[] args = new string[this.CommandLineArgs.Count];
            this.CommandLineArgs.CopyTo(args, 0);
            base.OnCreateMainForm();
            mainForm.ProcessArgs(args);
        }
예제 #3
0
        protected override void OnCreateMainForm()
        {
            try
            {
                Factory.CurrentTheme = NimbusTheme.FromFile(Path.GetDirectoryName(Application.ExecutablePath) + "\\themes\\default\\default.theme");
            }
            catch (ThemingError e)
            {
                MessageBox.Show(e.Error);
                Application.Exit();
            }

            mainForm      = new NimbusMain(Factory.CurrentTheme);
            this.MainForm = mainForm;
            string[] args = new string[this.CommandLineArgs.Count];
            this.CommandLineArgs.CopyTo(args, 0);
            base.OnCreateMainForm();
            mainForm.ProcessArgs(args);
        }