private void LogOutClick(object sender, EventArgs e) { bw_recurring.CancelAsync(); Instances.User = null; Authorization auth = new Authorization(); auth.Activate(); auth.ShowDialog(); }
private void LogOutTimerTick(object sender, EventArgs e) { if (GetIdleTime() > idleSeconds * 1000) { tm_auto_log_out.Enabled = false; bw_recurring.CancelAsync(); Instances.User = null; Authorization auth = new Authorization(); auth.Activate(); auth.ShowDialog(); } }
private void MoneyAppActivated(object sender, EventArgs e) { //if (Instances.User == null) { Instances.User = new User { ID = 7, LastAccessDate = DateTime.Now, Name = "Abduvokhid" }; } if (Instances.User == null) { Authorization auth = new Authorization(); auth.Activate(); auth.ShowDialog(); } else { btn_first_name.Text = Instances.User.Name; GenerateInfo(); if (!tm_auto_log_out.Enabled) { tm_auto_log_out.Enabled = true; } if (!bw_recurring.IsBusy) { bw_recurring.RunWorkerAsync(); } ShowEventsForDate(mc_calendar.SelectionStart); } }