Пример #1
0
        public App()
        {
            LogonViewModel               = new LogonViewModel();
            MainPageViewModel            = new MainPageViewModel();
            LogonUserViewModel           = new LogonUserViewModel();
            UserManagerViewModel         = new UserManagerViewModel();
            FileTypeManagerViewModel     = new FileTypeManagerViewModel();
            TaxPayerTypeManagerViewModel = new TaxPayerTypeManagerViewModel();
            TaxPayerManagerViewModel     = new TaxPayerManagerViewModel();
            DocumentManagerViewModel     = new DocumentManagerViewModel();

            this.Startup            += this.Application_Startup;
            this.UnhandledException += this.Application_UnhandledException;
            this.CheckAndDownloadUpdateCompleted += new CheckAndDownloadUpdateCompletedEventHandler(App_CheckAndDownloadUpdateCompleted);
            InitializeComponent();
            WebContext webContext = new WebContext();

            webContext.Authentication = new FormsAuthentication();
            this.ApplicationLifetimeObjects.Add(webContext);
        }
Пример #2
0
        protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
        {
            FileTypeManagerViewModel fileTypeManagerViewModel = this.DataContext as FileTypeManagerViewModel;

            fileTypeManagerViewModel.ConfirmLeave();
        }
Пример #3
0
        // 当用户导航到此页面时执行。
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            FileTypeManagerViewModel fileTypeManagerViewModel = this.DataContext as FileTypeManagerViewModel;

            fileTypeManagerViewModel.LoadData();
        }