コード例 #1
0
        public ButtonBitmapSetupForm(int bit, ButtonBitmapMapping.BitButtonParameters Params)
        {
            InitializeComponent();
            CenterToScreen();

            Text = "Setup Bit " + bit;

            checkEnable.Checked = Params.Enabled;
            numericButton.Value = Params.Button + 1;
            checkInvert.Checked = Params.Invert;

            onEnableCheck(null, null);
        }
コード例 #2
0
        void ButtonOKClick(object sender, EventArgs e)
        {
            Parameters = new ButtonBitmapMapping.BitButtonParameters()
            {
                Enabled         = checkEnable.Checked,
                Button          = (int)numericButton.Value - 1,
                Invert          = checkInvert.Checked,
                Failsafe        = comboFailsafe.SelectedIndex,
                Trigger         = checkTriggerEnable.Checked,
                TriggerEdge     = (TriggerState.Edge)comboTrigerEdge.SelectedIndex,
                TriggerDuration = (int)numericTriggerDuration.Value
            };

            DialogResult = DialogResult.OK;
            Close();
        }
コード例 #3
0
        public ButtonBitmapSetupForm(int bit, ButtonBitmapMapping.BitButtonParameters Params)
        {
            InitializeComponent();
            CenterToScreen();

            Text = "Setup Bit " + bit;

            checkEnable.Checked           = Params.Enabled;
            numericButton.Value           = Params.Button + 1;
            checkInvert.Checked           = Params.Invert;
            comboFailsafe.SelectedIndex   = Params.Failsafe;
            checkTriggerEnable.Checked    = Params.Trigger;
            comboTrigerEdge.SelectedIndex = (int)Params.TriggerEdge;
            numericTriggerDuration.Value  = Params.TriggerDuration == 0 ? TriggerState.DEFAULT_DURATION : Params.TriggerDuration;

            onEnableCheck(null, null);
        }