private void ClockTextBox_MouseUp(object sender, MouseEventArgs e) { int fcn = FindCurrentNumber(); currentValue = numbers[fcn]; this.Select(currentValue.Location, currentValue.Length); }
private void FindNextCurrentNumber() { int fcn = FindCurrentNumber(); fcn += numbers.Length; fcn++; fcn %= numbers.Length; currentValue = numbers[fcn]; }
private void FindPreviousCurrentNumber() { int fcn = FindCurrentNumber(); fcn += numbers.Length; fcn--; fcn %= numbers.Length; currentValue = numbers[fcn]; }
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; }
protected override void OnGotFocus(EventArgs e) { base.OnGotFocus(e); currentValue = numbers[0]; this.Select(currentValue.Location, currentValue.Length); }