コード例 #1
0
ファイル: App.axaml.cs プロジェクト: ystallonne/WalletWasabi
        public override void OnFrameworkInitializationCompleted()
        {
            AutoBringIntoViewExtension.Initialise();

            if (!Design.IsDesignMode)
            {
                MainViewModel.Instance = new MainViewModel(_global !);

                if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
                {
                    desktop.MainWindow = new MainWindow
                    {
                        DataContext = MainViewModel.Instance
                    };

                    RxApp.MainThreadScheduler.Schedule(
                        async() =>
                    {
                        await _backendInitialiseAsync();

                        MainViewModel.Instance !.Initialize();
                    });
                }
            }

            base.OnFrameworkInitializationCompleted();
        }
コード例 #2
0
ファイル: App.xaml.cs プロジェクト: xmess7/WalletWasabi
        public override void OnFrameworkInitializationCompleted()
        {
            AutoBringIntoViewExtension.Initialise();

            if (!Design.IsDesignMode)
            {
                MainViewModel.Instance = new MainViewModel(_global !);

                if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
                {
                    desktop.MainWindow = new MainWindow
                    {
                        DataContext = MainViewModel.Instance
                    };
                }
            }

            base.OnFrameworkInitializationCompleted();
        }