private void RecentSolutionSelection_Click(object sender, RoutedEventArgs e) { Solution selectedSol = (Solution)((MenuItem)sender).Tag; if (selectedSol != null && Directory.Exists(selectedSol.Folder)) { App.SetSolution(selectedSol.Folder); } else { Reporter.ToUser(eUserMsgKeys.SolutionLoadError, "Selected Solution was not found"); } e.Handled = true; }
internal void AutoLoadLastSolution() { try { if (App.UserProfile.RecentSolutionsAsObjects.Count > 0) { App.SetSolution(App.UserProfile.RecentSolutionsAsObjects[0].Folder); xSolutionTabsListView.SelectedItem = null; xSolutionTabsListView.SelectedItem = xBusinessFlowsListItem; } } catch (Exception ex) { Reporter.ToUser(eUserMsgKeys.SolutionLoadError, ex); } }
private void xOpenSolutionMenuItem_Click(object sender, RoutedEventArgs e) { string solutionFolder = General.OpenSelectFolderDialog("Select Ginger Solution Folder"); if (solutionFolder != null) { string solutionFileName = System.IO.Path.Combine(solutionFolder, @"Ginger.Solution.xml"); if (System.IO.File.Exists(PathHelper.GetLongPath(solutionFileName))) { App.SetSolution(Path.GetDirectoryName(PathHelper.GetLongPath(solutionFolder))); } else { Reporter.ToUser(eUserMsgKeys.SolutionFileNotFound, solutionFileName); } } }
private void RecentSolution_Click(object sender, RequestNavigateEventArgs e) { try { string selectedSolFolder = ((Hyperlink)sender).ToolTip.ToString().ToUpper(); Solution selectedSol = App.UserProfile.RecentSolutionsAsObjects.Where(x => x.Folder.ToUpper() == selectedSolFolder).FirstOrDefault(); if (selectedSol != null) { App.SetSolution(selectedSol.Folder); } else { Reporter.ToUser(eUserMsgKeys.SolutionLoadError, "Selected Solution was not found"); } e.Handled = true; } catch (Exception ex) { Reporter.ToUser(eUserMsgKeys.SolutionLoadError, ex); } }