private static void OpenCmd_Execute(object sender, CommandRunArgs e) { string str = (string)null; if (e.DataItem == null) { string lastBrowserLocation = Services.RecentFileService.LastBrowserLocation; if (Option.IsXP) { str = FileChooserDialogModel.GetOpenFilePath(new string[1] { "*.ccs" }, "Open File", false, lastBrowserLocation).FileName; Services.RecentFileService.LastBrowserLocation = Path.GetDirectoryName(str); } else { SelectFileDialog selectFileDialog = new SelectFileDialog(); selectFileDialog.Title = LanguageInfo.Menu_File_OpenProject; selectFileDialog.Action = FileChooserAction.Open; selectFileDialog.SelectMultiple = false; selectFileDialog.CurrentFolder = (FilePath)lastBrowserLocation; selectFileDialog.AddFilter("Solution Files", "*.ccs"); if (selectFileDialog.Run()) { str = (string)selectFileDialog.SelectedFile; Services.RecentFileService.LastBrowserLocation = Path.GetDirectoryName(str); } } } else { str = e.DataItem.ToString(); } StartInfoService.Instance.HandleOpenSolution(str); }
private static void PlayCmd_Execute(object sender, CommandRunArgs e) { TimelineActionManager.Instance.Play(!TimelineActionManager.Instance.IsPlaying); }