示例#1
0
        private async void Main_Loaded(object sender, EventArgs e)
        {
            if (NgMain != null)
            {
                Downloads       = new ViewDownloadsWindow();
                Downloads.Owner = Main;
                Downloads.DownloadsView.ItemsSource = Business.DownloadManager.DownloadsList;
            }

            SplashWindow InitWin = SplashWindow.Instance(Main, SplashImage);

            SplashImage = null;
            // InitWin.Owner = Main;

            CancellationToken token = new CancellationToken();
            Task InitWinTask        = Task.Factory.StartNew(
                () => InitWin.ShowDialog(),
                token,
                TaskCreationOptions.None,
                TaskScheduler.FromCurrentSynchronizationContext());

            await TestDatabaseConnectionAsync();

            if (Settings.SavedFile == null)
            {
                AboutWindow.Instance();
                SettingsWindow.Instance();
            }

            if (NgMain != null)
            {
                await NgMain.InitializationCompleted();
            }

            InitWin.CanClose();
            await InitWinTask;
        }
示例#2
0
 private void CommandBinding_AboutPlayer(object sender, ExecutedRoutedEventArgs e)
 {
     AboutWindow.Instance();
 }