private void timer3_Tick(object sender, EventArgs e) { this.Opacity -= 0.02; if (this.Opacity <= 0.0001) { timer3.Stop(); (this.Owner as MainForm).ResetCounter(resetOpacity: true); TimeUpForm.CloseForm(this); } }
public static void ShowForm(IWin32Window owner) { foreach (var screen in Screen.AllScreens) { var timeUpForm = new TimeUpForm { Bounds = screen.Bounds }; timeUpForm.ClickCloseButton += TimeUpForm_ClickCloseButton; _TimeUpForms.Add(timeUpForm); timeUpForm.Show(owner); } }
private static void CloseForm(TimeUpForm timeUpForm) { timeUpForm.Close(); _TimeUpForms.Remove(timeUpForm); timeUpForm.Dispose(); }
private void ShowTimeUpForm() { this.Opacity = 1.0; TimeUpForm.ShowForm(this); }