Esempio n. 1
0
        private void ClockTextBox_MouseUp(object sender, MouseEventArgs e)
        {
            int fcn = FindCurrentNumber();

            currentValue = numbers[fcn];
            this.Select(currentValue.Location, currentValue.Length);
        }
Esempio n. 2
0
        private void FindNextCurrentNumber()
        {
            int fcn = FindCurrentNumber();

            fcn += numbers.Length;
            fcn++;
            fcn         %= numbers.Length;
            currentValue = numbers[fcn];
        }
Esempio n. 3
0
        private void FindPreviousCurrentNumber()
        {
            int fcn = FindCurrentNumber();

            fcn += numbers.Length;
            fcn--;
            fcn         %= numbers.Length;
            currentValue = numbers[fcn];
        }
Esempio n. 4
0
        public ClockTextBox()
        {
            InitializeComponent();
            CreateButton();
            SizeChanged        += new EventHandler(ClockTextBox_SizeChanged);
            RightToLeftChanged += new EventHandler(ClockTextBox_RightToLeftChanged);

            timeLayout = TimeLayout.Hour;

            UpdateLayoutValue();
            FindCurrentNumber();
            currentValue = numbers[0];
            this.Select(currentValue.Location, currentValue.Length);

            this.MouseWheel += ClockTextBox_MouseWheel;
        }
Esempio n. 5
0
 protected override void OnGotFocus(EventArgs e)
 {
     base.OnGotFocus(e);
     currentValue = numbers[0];
     this.Select(currentValue.Location, currentValue.Length);
 }