Exemple #1
0
 private void Keypress_Click(object sender, EventArgs e)
 {
     ExtendedControls.KeyForm kf = new ExtendedControls.KeyForm();
     kf.Init(this.Icon, false, ",", buttonKeys.Text.Equals("?") ? "" : buttonKeys.Text);
     if (kf.ShowDialog(FindForm()) == DialogResult.OK)
     {
         buttonKeys.Text          = kf.KeyList;
         cd.fields[0].matchstring = kf.KeyList;
         cd.fields[0].matchtype   = (kf.KeyList.Contains(",")) ? ConditionEntry.MatchType.IsOneOf : ConditionEntry.MatchType.Equals;
     }
 }
Exemple #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, " ", "", "KeyLogger", new List <string>()
                {
                    "{1}", "{2}"
                }, 100, false);
                sel = f;
                break;

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

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

            Application.Run(sel);
        }
Exemple #3
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);
                }
            }
        }
Exemple #4
0
        static public string Menu(Control parent, System.Drawing.Icon ic, string userdata, EliteDangerousCore.BindingsFile bf)
        {
            ConditionVariables vars;
            string             keys;

            FromString(userdata, out keys, out vars);

            ExtendedControls.KeyForm kf = new ExtendedControls.KeyForm();
            int    defdelay             = vars.Exists(DelayID) ? vars[DelayID].InvariantParseInt(DefaultDelay) : DefaultDelay;
            string process = vars.Exists(ProcessID) ? vars[ProcessID] : "";

            kf.Init(ic, true, " ", keys, process, defdelay: defdelay);

            if (kf.ShowDialog(parent) == DialogResult.OK)
            {
                return(ToString(kf.KeyList, new ConditionVariables(new string[] { ProcessID, kf.ProcessSelected, DelayID, kf.DefaultDelay.ToStringInvariant() })));
            }
            else
            {
                return(null);
            }
        }
Exemple #5
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);
        }