コード例 #1
0
 public async void CancelChangesAsync()
 {
     await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
                                                                   async() =>
     {
         await HomepageViewModel.LoadProjects();
     });
 }
コード例 #2
0
        public async void DeleteProjectAsync()
        {
            await((App)App.Current).projects.DeleteProjectAsync(SelectedProject);

            await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
                                                                          async() =>
            {
                await HomepageViewModel.LoadProjects();
            });
        }
コード例 #3
0
        public async void SaveChangesAsync()
        {
            Project project = ProjectInputModel.ToProject(ProjectInputModel);

            project.ProjectId = SelectedProject.ProjectId;

            await((App)App.Current).projects.UpdateAsync(project);

            await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
                                                                          async() =>
            {
                SelectedProject = await((App)App.Current).projects.GetAsync(SelectedProject.ProjectId);
                await HomepageViewModel.LoadProjects();
            });
        }