Exemple #1
0
        private void ClockTextBox_MouseUp(object sender, MouseEventArgs e)
        {
            int fcn = FindCurrentNumber();

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

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

            fcn += numbers.Length;
            fcn--;
            fcn         %= numbers.Length;
            currentValue = numbers[fcn];
        }
Exemple #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;
        }
Exemple #5
0
 protected override void OnGotFocus(EventArgs e)
 {
     base.OnGotFocus(e);
     currentValue = numbers[0];
     this.Select(currentValue.Location, currentValue.Length);
 }