Beispiel #1
0
        private void AddHotKeyBox(Control parent, string label, string prefix, EnumSetting <Keys> setting, ref int rowIndex, ref int tabIndex)
        {
            parent.Controls.Add(FormTools.NewLabel(label, 0, rowIndex));
            HotKeyBox hotKeyBox = new HotKeyBox();

            hotKeyBox.Prefix   = prefix;
            hotKeyBox.Location = FormTools.NewLocation(1, rowIndex++);
            hotKeyBox.Size     = new Size(340, 20);
            hotKeyBox.TabIndex = tabIndex++;
            hotKeyBox.Setting  = setting;
            HotKeyBox value = hotKeyBox;

            parent.Controls.Add(value);
        }
Beispiel #2
0
        public static ValueComboBox <TEnum> AddLabeledEnumDropDown <TEnum>(Control parent, string text, EnumSetting <TEnum> setting, ref int rowIndex, ref int tabIndex, Func <TEnum, string> toString) where TEnum : struct
        {
            Label value = NewLabel(text, 0, rowIndex);
            ValueComboBox <TEnum> valueComboBox = new ValueComboBox <TEnum>(setting, Helpers.EnumValues <TEnum>(), toString);

            SetDropDownProperties(valueComboBox, 1, rowIndex++, tabIndex++);
            parent.Controls.Add(value);
            parent.Controls.Add(valueComboBox);
            return(valueComboBox);
        }