コード例 #1
0
        private void projectLink_Click(object sender, RoutedEventArgs e)
        {
            var hyperLink     = sender as Hyperlink;
            var recentProject = hyperLink.Tag as RecentProject;

            if (File.Exists(recentProject.Path))
            {
                recentProject.LastUsageDate = DateTime.Now;
                persistor.UpateRecentProject(recentProject);
                var project = persistor.LoadProject(recentProject.Path);
                NavigationService.Navigate(new ProjectPage(project));
            }
            else
            {
                if (sharedServices.PromptYesNoCancel("File not found", "Remove from the project list?") == MessageBoxResult.Yes)
                {
                    persistor.RemoveRecentProject(recentProject);
                    RecentProjects.Remove(recentProject);
                }
            }
        }