Exemple #1
0
        public TouchNumberBox()
        {
            if (_PopupForm == null || _PopupForm.IsDisposed)
            {
                _PopupForm                = new TouchNumberBoxForm();
                _PopupForm.AddEvent      += FormAddEvent;
                _PopupForm.SubtractEvent += FormSubtractEvent;
            }

            Step      = 1;
            Direction = PopupDirection.Right;
            Value     = null;

            Leave += TouchNumberBoxLeave;
        }
Exemple #2
0
        protected override void OnClick(EventArgs e)
        {
            base.OnClick(e);

            Leave -= TouchNumberBoxLeave;

            if (_PopupForm == null || _PopupForm.IsDisposed)
            {
                _PopupForm                = new TouchNumberBoxForm();
                _PopupForm.AddEvent      += FormAddEvent;
                _PopupForm.SubtractEvent += FormSubtractEvent;
            }

            SetPopupLocation();

            if (!_PopupForm.Visible)
            {
                _PopupForm.Show(this);
            }

            Focus();

            Leave += TouchNumberBoxLeave;
        }