Exemple #1
0
        void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                MagicArrow.DockManager.ApplyCurrentSide();

                var viewmodel = MainViewModel.Instance;
                viewmodel.Loaded(this);

                RefreshHostWindow(false);

                viewmodel.MusicManager.CSCoreEngine.PlaybackStateChanged += CSCoreEngine_PlaybackStateChanged;

                ResetFlyout();
            }
            catch (Exception ex)
            {
#if (!DEBUG)
                var reportExceptionWindow = new ReportExceptionWindow(ex) { Owner = this };
                reportExceptionWindow.ShowDialog();
#else
                MessageBox.Show(ex.ToString());
#endif
            }
        }
Exemple #2
0
 protected void OnExceptionOccurred(Exception ex)
 {
     if (!_isHandled)
     {
         _isHandled = true;
         if (MainViewModel.Instance.MusicManager != null && MainViewModel.Instance.MusicManager.CSCoreEngine.IsPlaying)
         {
             MainViewModel.Instance.MusicManager.CSCoreEngine.StopPlayback();
         }
         ReportExceptionWindow window = new ReportExceptionWindow(ex);
         window.ShowDialog();
     }
 }