private void openProjectToolStripMenuItem_Click(object sender, EventArgs e) { if (openFileDialog.ShowDialog(this) == DialogResult.OK) { saveFileDialog.FileName = openFileDialog.FileName; OpenProject(openFileDialog.FileName); m_recentMenu.AddFile(openFileDialog.FileName); } }
private void OpenProjectAndAddToRecentMenu(string fileName) { try { OpenProject(fileName); m_recentMenu.AddFile(fileName); } catch (ProjectLoadingException) { // already logged } catch (Exception ex) { MyLog.ERROR.WriteLine("Error while opening a project:" + ex.Message); } }
private void OpenProjectAndAddToRecentMenu(string fileName) { try { if (AskToSaveProjectAndForwardDialogResult() == DialogResult.Cancel) { return; } OpenProject(fileName); m_recentMenu.AddFile(fileName); } catch (ProjectLoadingException) { // already logged } catch (Exception ex) { MyLog.ERROR.WriteLine("Error while opening a project:" + ex.Message); } }
public void AddFile(string filename) { mruMenu.AddFile(filename); mruMenu.SaveToRegistry(); }