private void ToggleValue(bool newValue) { if (IsReadOnly == false) { EditValue = newValue; if (newValue) { ButtonOn.Focus(); } else { ButtonOff.Focus(); } } }
private void ButtonOn_Tick(object sender, EventArgs e) { m++; if (m < 2) { button.Height -= 2; button.Width -= 1; button.Left += 1; button.Top += 2; } else { ButtonOn.Stop(); } if (Button_Up == true) { ButtonOn.Stop(); ButtonOff.Start(); } }
private void Button_MouseDown(object sender, MouseEventArgs e) { Button_Up = false; this.Capture = true; Button S = (Button)sender; button = S; L = button.Left; T = button.Top; H = button.Height; W = button.Width; if (S.Name == "StartGame" | S.Name == "KAdd" | S.Name == "Web") { BigButtonOn.Enabled = true; BigButtonOn.Start(); } else { ButtonOn.Enabled = true; ButtonOn.Start(); } this.Capture = false; }