Ejemplo n.º 1
0
 protected override void OnCreateMainForm()
 {
     MainForm = mainForm;
     if (CommandLineArgs.Count <= 1)
     {
         return;
     }
     CommandLineArgs.CopyTo(((MainForm)MainForm).Args, 0);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// We are responsible for creating the application's main form in this override.
        /// </summary>
        protected override void OnCreateMainForm()
        {
            // Create an instance of the main form and set it in the application;
            // but don't try to run it.
            MainForm = new Form1();

            // We want to pass along the command-line arguments to this first instance

            // Allocate room in our string array
            ((Form1)MainForm).Args = new string[CommandLineArgs.Count];

            // And copy the arguments over to our form
            CommandLineArgs.CopyTo(((Form1)MainForm).Args, 0);
        }
Ejemplo n.º 3
0
 protected override void OnCreateMainForm()
 {
     MainForm = new Main();
     ((Main)MainForm).Args = new string[CommandLineArgs.Count];
     CommandLineArgs.CopyTo(((Main)MainForm).Args, 0);
 }