コード例 #1
0
 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);
     }
 }
コード例 #2
0
 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);
     }
 }
コード例 #3
0
        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);
            }
        }
コード例 #4
0
 public void AddFile(string filename)
 {
     mruMenu.AddFile(filename);
     mruMenu.SaveToRegistry();
 }