Ejemplo n.º 1
0
        public void Load(object button)
        {
            if (typeof(SmallButtonControl) == button.GetType())
            {
                SmallButtonControl btn = button as SmallButtonControl;

                txtName.Text = btn.ButtonName;
                _mainKey     = btn.MainHotKey;
                _subKey      = btn.SubHotKey;
                HotKeyChanged();
                _hotButtonSettingFinish = true;
                ddlColor.EditValue      = btn.ButtonColor;
                rdoSize.SelectedIndex   = 0;

                LoadSignsFromSession(btn.Sign);
            }
            else if (typeof(LargeButtonControl) == button.GetType())
            {
                LargeButtonControl btn = button as LargeButtonControl;

                txtName.Text = btn.ButtonName;
                _mainKey     = btn.MainHotKey;
                _subKey      = btn.SubHotKey;
                HotKeyChanged();
                _hotButtonSettingFinish = true;
                ddlColor.EditValue      = btn.ButtonColor;
                rdoSize.SelectedIndex   = 1;
                LoadSignsFromSession(btn.Sign);
            }
        }
Ejemplo n.º 2
0
        private void btnHotKey_Click(object sender, EventArgs e)
        {
            HotKeyAssignForm frmHotKeyAssign = null;

            try
            {
                frmHotKeyAssign = new HotKeyAssignForm();
                if (frmHotKeyAssign.ShowDialog(this) == DialogResult.OK)
                {
                    _hotButtonSettingFinish = true;
                    _mainKey = frmHotKeyAssign.MainHotKey;
                    _subKey  = frmHotKeyAssign.SubHotKey;
                    rdoSize_SelectedIndexChanged(sender, e);

                    HotKeyChanged();
                }
            }
            finally
            {
                if (frmHotKeyAssign != null)
                {
                    frmHotKeyAssign.Dispose();
                }
            }
        }