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

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

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

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