Exemplo n.º 1
0
        static void Main(string[] arg)
        {
            ControllerMainForm cm;

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            switch (arg.Length)
            {
                case 0: cm = new ControllerMainForm(); break;
                case 1: cm = new ControllerMainForm(Convert.ToInt32(arg[0], new CultureInfo("EN", true))); break;
                case 2: cm = new ControllerMainForm(Convert.ToInt32(arg[0], new CultureInfo("EN", true)), Convert.ToInt32(arg[1], new CultureInfo("EN", true))); break;
                case 3: cm = new ControllerMainForm(Convert.ToInt32(arg[0], new CultureInfo("EN", true)), Convert.ToInt32(arg[1], new CultureInfo("EN", true)), Convert.ToInt32(arg[2], new CultureInfo("EN", true))); break;
                case 4: cm = new ControllerMainForm(Convert.ToInt32(arg[0], new CultureInfo("EN", true)), Convert.ToInt32(arg[1], new CultureInfo("EN", true)), Convert.ToInt32(arg[2], new CultureInfo("EN", true)), Convert.ToInt32(arg[3], new CultureInfo("EN", true))); break;
                default: cm = new ControllerMainForm(); break;
            }

            Application.Run(cm);
        }
Exemplo n.º 2
0
        static void Main(string[] arg)
        {
            ControllerMainForm cm;

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            switch (arg.Length)
            {
            case 0: cm = new ControllerMainForm();
                break;

            case 1: cm = new ControllerMainForm(Convert.ToInt32(arg[0])); break;

            case 2: cm = new ControllerMainForm(Convert.ToInt32(arg[0]), Convert.ToInt32(arg[1])); break;

            default: cm = new ControllerMainForm(); break;      // если передали больше параметров, чем определено в конструкторе
            }

            Application.Run(cm);
        }
Exemplo n.º 3
0
        static void Main(string [] arg)
        {
            ControllerMainForm cm;

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            switch (arg.Length)
            {
            case 0: cm = new ControllerMainForm(); break;

            case 1: cm = new ControllerMainForm(Convert.ToInt32(arg[0], new CultureInfo("En", true))); break;

            case 2: cm = new ControllerMainForm(Convert.ToInt32(arg[0], new CultureInfo("En", true)), Convert.ToInt32(arg[1], new CultureInfo("En", true))); break;

            case 3: cm = new ControllerMainForm(Convert.ToInt32(arg[0], new CultureInfo("En", true)), Convert.ToInt32(arg[1], new CultureInfo("En", true)), Convert.ToInt32(arg[2], new CultureInfo("En", true))); break;

            case 4: cm = new ControllerMainForm(Convert.ToInt32(arg[0], new CultureInfo("En", true)), Convert.ToInt32(arg[1], new CultureInfo("En", true)), Convert.ToInt32(arg[2], new CultureInfo("En", true)), Convert.ToInt32(arg[3], new CultureInfo("En", true))); break;

            default: cm = new ControllerMainForm(); break;
            }
            Application.Run(cm);
        }
Exemplo n.º 4
0
        static void Main(string[] args)
        {
            ControllerMainForm cm;

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            switch (args.Length)
            {
            case 0: cm = new ControllerMainForm(); break;

            case 1: cm = new ControllerMainForm(Convert.ToInt32(args[0])); break;

            case 2: cm = new ControllerMainForm(Convert.ToInt32(args[0]), Convert.ToInt32(args[1])); break;

            case 3: cm = new ControllerMainForm(Convert.ToInt32(args[0]), Convert.ToInt32(args[1]), Convert.ToInt32(args[2])); break;

            case 4: cm = new ControllerMainForm(Convert.ToInt32(args[0]), Convert.ToInt32(args[1]), Convert.ToInt32(args[2]), Convert.ToInt32(args[3])); break;

            case 5: cm = new ControllerMainForm(Convert.ToInt32(args[0]), Convert.ToInt32(args[1]), Convert.ToInt32(args[2]), Convert.ToInt32(args[3]), Convert.ToInt32(args[4])); break;

            default: cm = new ControllerMainForm(); break;
            }
            Application.Run(cm);
        }
Exemplo n.º 5
0
        static void Main(string[] args)
        {
            ControllerMainForm cm;

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            switch (args.Length)
            {
            case 0: cm = new ControllerMainForm(); break;

            case 1: cm = new ControllerMainForm(Convert.ToInt32(args[0], new CultureInfo("En", true))); break;

            case 2: cm = new ControllerMainForm(Convert.ToInt32(args[0], new CultureInfo("En", true)), Convert.ToInt32(args[1], new CultureInfo("En", true))); break;

            case 3: cm = new ControllerMainForm(Convert.ToInt32(args[0], new CultureInfo("En", true)), Convert.ToInt32(args[1], new CultureInfo("En", true)), Convert.ToInt32(args[2], new CultureInfo("En", true))); break;

            case 4: cm = new ControllerMainForm(Convert.ToInt32(args[0], new CultureInfo("En", true)), Convert.ToInt32(args[1], new CultureInfo("En", true)), Convert.ToInt32(args[2]), Convert.ToInt32(args[3], new CultureInfo("En", true))); break;

            default: cm = new ControllerMainForm(); break;        // вызываем конструктор по умолчанию если кол во аргументом не соотвествует списку
            }

            Application.Run(cm);
        }