예제 #1
0
 /// <summary>
 /// Navigates to the SRS page and starts a review session.
 /// </summary>
 public void NavigateToReviewSession()
 {
     lock (_mainWindowLock)
     {
         RequireMainWindow();
         CurrentPage = NavigationPageEnum.Srs;
         SrsVm.StartReviewSession();
     }
 }
예제 #2
0
        /// <summary>
        /// Event handler triggered when the Main Window is closed.
        /// </summary>
        private void OnMainWindowClosed(object sender, EventArgs e)
        {
            lock (_mainWindowLock)
            {
                // Unsubscribe and release windows.
                MainWindow.Closed -= OnMainWindowClosed;
                MainWindow         = null;
                ActiveWindow       = null;

                // Dispose and release main pages View Models.
                KanjiVm.Dispose();
                KanjiVm = null;

                SrsVm.Dispose();
                SrsVm = null;
            }
        }