private void CheckTimer(object sender, EventArgs e) { uint timeLeft = 1; timeLeft--; if (timeLeft == 0) { this.timer1.Stop(); this.Hide(); switch (UserInformation.Value) { case 0: AgeConfirmation _ageConfirmation = new AgeConfirmation(); _ageConfirmation.ShowDialog(); break; case 1: MainForm _mainForm = new MainForm(); _mainForm.ShowDialog(); break; case 2: Event _event = new Event(); _event.ShowDialog(); break; } this.Close(); } }
private void HandleConfirmAge() { var dialog = new ConfirmCustomerAge { Title = "Verify Customer's Age", }; AgeConfirmation.Raise(dialog, DoSomethingCool); }