示例#1
0
 public bool NewProject()
 {
     Microsoft.Win32.SaveFileDialog dlg = new Microsoft.Win32.SaveFileDialog();
     dlg.DefaultExt = "prj";
     dlg.Filter     = "Project files (*.prj)|*.prj";
     if (dlg.ShowDialog() == true)
     {
         IDEProject prj = new IDEProject()
         {
             FilePath = dlg.FileName, ProjectDir = Path.GetDirectoryName(dlg.FileName)
         };
         prj.Settings = IDESettings.GetOrCreate(dlg.FileName);
         prj.Save();
         UserData.inst().AddRecentFile(dlg.FileName);
     }
     return(false);
 }