示例#1
0
        static void Main(string [] stringargs)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            CommandArgs args = new CommandArgs(stringargs);
            string      arg1 = args.Next();
            Type        t    = Type.GetType("DialogTest." + arg1);

            if (t != null)
            {
                Application.Run((Form)Activator.CreateInstance(t));
            }
            else
            {
                Form sel = null;

                switch (arg1)
                {
                case "keyform":
                    ExtendedControls.KeyForm f = new ExtendedControls.KeyForm();
                    f.Init(null, true, " ", "", "", -1, false);
                    sel = f;
                    break;

                case "infoform":
                    ExtendedControls.ThemeStandard th = new ExtendedControls.ThemeStandard();
                    th.LoadBaseThemes();
                    th.SetThemeByName("Elite Verdana");
                    ExtendedControls.ThemeableFormsInstance.Instance = th;
                    ExtendedControls.InfoForm inf = new ExtendedControls.InfoForm();
                    inf.Info("Info form", Properties.Resources._3x3_grid, "This is a nice test\r\nOf the info form\r\n", new int[] { 0, 100, 200, 300, 400, 500, 600 });
                    sel = inf;
                    break;
                }

                if (sel != null)
                {
                    Application.Run(sel);
                }
            }
        }
示例#2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            string[] cmdlineopts = Environment.GetCommandLineArgs().ToArray();

            string selection = cmdlineopts.Length > 1 ? cmdlineopts[1].ToLower() : "default";

            Form sel;

            switch (selection)
            {
            default:
            case "default":
            case "testform":
                sel = new TestForm();
                break;

            case "testrolluppanel":
                sel = new TestRollUpPanel();
                break;

            case "testautocomplete":
                sel = new TestAutoComplete();
                break;

            case "testselectionpanel":
                sel = new TestSelectionPanel();
                break;

            case "keyform":
                ExtendedControls.KeyForm f = new ExtendedControls.KeyForm();
                f.Init(null, true, " ", "", "", -1, false);
                sel = f;
                break;

            case "infoform":
                ExtendedControls.ThemeStandard th = new ExtendedControls.ThemeStandard();
                th.LoadBaseThemes();
                th.SetThemeByName("Elite Verdana");
                ExtendedControls.ThemeableFormsInstance.Instance = th;
                ExtendedControls.InfoForm inf = new ExtendedControls.InfoForm();
                inf.Info("Info form", Properties.Resources._3x3_grid, "This is a nice test\r\nOf the info form\r\n", new int[] { 0, 100, 200, 300, 400, 500, 600 });
                sel = inf;
                break;

            case "testtabstrip":
                sel = new TestTabStrip();
                break;

            case "testdirectinput":
                sel = new TestDirectInput();
                break;

            case "testtabcontrolcustom":
                sel = new TestTabControlCustom();
                break;

            case "testjournalread":
                sel = new TestJournalRead();
                break;

            case "testcompositebutton":
                sel = new TestCompositeButton();
                break;

            case "testcompasscontrol":
                sel = new TestCompassControl();
                break;
            }


            Application.Run(sel);
        }