private void MenuFileOpenRecentFile_Click(object sender, System.EventArgs e) { try { ToolStripMenuItem mi = (ToolStripMenuItem)sender; int spaceIndex = mi.Text.IndexOf(" "); string indexString = mi.Text.Substring(1, spaceIndex - 1); int index = int.Parse(indexString) - 1; MostRecentFile[] recentFiles = AppWorkspace.MostRecentFiles.GetFileList(); string fileName = recentFiles[recentFiles.Length - index - 1].FileName; AppWorkspace.OpenFileInNewWorkspace(fileName); } catch (Exception) { } }