Esempio n. 1
0
        public NumericKeyboard(DataEntryField field, bool enhanced = false) : base(field)
        {
            foreach (int i in Enumerable.Range(1, 10 - 1))
            {
                string digitname = i.ToString();
                Keys.Add(new DMITextButton(digitname, digitname, false, () => field.HandleKeyPress(digitname), 102, 50, field.DMI, 16));
            }
            Keys.Add(new DMIIconButton("NA_21.bmp", "NA_21.bmp", "Delete", false, () => field.HandleKeyPress("DEL"), 102, 50, field.DMI));
            Keys.Add(new DMITextButton("0", "0", false, () => field.HandleKeyPress("0"), 102, 50, field.DMI, 16));
            foreach (var key in Keys)
            {
                key.Enabled = true;
            }
            var dotkey = new DMITextButton(".", ".", false, () => field.HandleKeyPress("."), 102, 50, field.DMI, 16);

            dotkey.Enabled = enhanced;
            Keys.Add(dotkey);
        }
Esempio n. 2
0
        public AlphanumericKeyboard(DataEntryField field) : base(field)
        {
            Keys.Add(new DMITextButton("1", "1", false, () => field.HandleKeyPress("1"), 102, 50, field.DMI, 16));
            Keys.Add(new AlphanumericButton("2", "abc", field));
            Keys.Add(new AlphanumericButton("3", "def", field));
            Keys.Add(new AlphanumericButton("4", "ghi", field));
            Keys.Add(new AlphanumericButton("5", "jkl", field));
            Keys.Add(new AlphanumericButton("6", "mno", field));
            Keys.Add(new AlphanumericButton("7", "pqrs", field));
            Keys.Add(new AlphanumericButton("8", "tuv", field));
            Keys.Add(new AlphanumericButton("9", "wxyz", field));
            Keys.Add(new DMIIconButton("NA_21.bmp", "NA_21.bmp", "Delete", false, () => field.HandleKeyPress("DEL"), 102, 50, field.DMI));
            Keys.Add(new DMITextButton("0", "0", false, () => field.HandleKeyPress("0"), 102, 50, field.DMI, 16));
            foreach (var key in Keys)
            {
                key.Enabled = true;
            }
            var dotkey = new DMITextButton(".", ".", false, () => field.HandleKeyPress("."), 102, 50, field.DMI);

            Keys.Add(dotkey);
        }
Esempio n. 3
0
        public DedicateKeyboard(List <string> keyLabels, DataEntryField field) : base(field)
        {
            int i = 0;

            foreach (string label in keyLabels)
            {
                if (label == null)
                {
                    Keys.Add(null);
                    i++;
                    continue;
                }
                DMIButton but = new DMITextButton(label, label, false, () => field.HandleKeyPress(label), 102, 50, field.DMI);
                but.Enabled = true;
                Keys.Add(but);
                i++;
            }
        }
Esempio n. 4
0
 public AlphanumericButton(string num, string letters, DataEntryField field) : base(num + " " + letters, false, () => field.HandleKeyPress(num + letters), 102, 50, field.DMI, true)
 {
     Number  = num + " ";
     Letters = letters;
     SetText();
 }