private void btnSave_Click(object sender, EventArgs e) { controller.Translations.Clear(); controller.Translations.AddRange(translationList); controller.Save(); this.Close(); }
private void timer1_Tick(object sender, EventArgs e) { if (this.WindowState == FormWindowState.Minimized) { timer1.Stop(); //TODO: QuestionsPerSession //QuestionForm qf = new QuestionForm(controller.GetTranslationsForSession(SettingsManager.Current.QuestionPerSession); QuestionSession session = new QuestionSession(controller.GetTranslationsForSession(2)); QuestionForm qf = new QuestionForm(session); qf.FormClosed += (d, a) => { controller.Save(); timer1.Start(); }; qf.Show(); qf.Activate(); } }