示例#1
0
        public void Init()
        {
            _hotfixService.ApplyHotfixes();

            _mainViewModel.Init();

            InitializeComponent();
            MainPage = _viewFactory.CreatePage(_mainViewModel);
        }
    public MainViewModel(IMainViewModel view)
    {
        _view            = view;
        backgroundWorker = new BackgroundWorker()
        {
            WorkerSupportsCancellation = true
        };
        backgroundWorker.DoWork             += BackgroundWorker_DoWork;
        backgroundWorker.RunWorkerCompleted +=
            BackgroundWorker_RunWorkerCompleted;
        var pleaseWaitViewModel = new PleaseWaitViewModel(backgroundWorker);

        _view.Init(pleaseWaitViewModel);
    }