Пример #1
0
 void DoLoadTemplates()
 {
     if (DockForm != null)
     {
         using (StatusBusy s = new StatusBusy(Strings.LoadingTemplate, DockForm))
         {
             var files = DockForm.DockPanel.Documents
                 .OfType<IDocument>()
                 .Select(p => p.DocumentItem)
                 .OfType<TemplateFile>();
             view.Load(files);
         }
         DockForm.StatusText = Strings.TemplateLoaded;
     }
 }
Пример #2
0
 private void saveAllToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (StatusBusy s = new StatusBusy(Strings.Saveing, this))
     {
         Workspace.SaveAllProjects();
         foreach (var d in docManager.Documents)
             if (d.IsDirty)
                 d.Save();
     }
     StatusText = Strings.Saved;
 }
Пример #3
0
 private void saveAsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (StatusBusy s = new StatusBusy(Strings.Saveing, this))
     {
         Workspace.SaveActiveProjectAs();
     }
     StatusText = Strings.Saved;
 }
Пример #4
0
 private void saveToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (docManager.HasActiveDocument)
     {
         using (StatusBusy s = new StatusBusy(Strings.Saveing, this))
         {
             docManager.ActiveDocument.Save();
         }
         StatusText = Strings.Saved;
     }
 }
Пример #5
0
 private void openFileToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (StatusBusy s = new StatusBusy(Strings.LoadingProject, this))
     {
         Workspace.OpenProject();
     }
     StatusText = Strings.ProjectLoaded;
 }
Пример #6
0
 private void MainForm_Load(object sender, EventArgs e)
 {
     if (!DesignMode)
         LoadWindowSettings();
     Show();
     using (StatusBusy status = new StatusBusy(Strings.Loading, this))
     {
         if (Settings.Default.RememberOpenProjects)
         {
             Workspace.Load();
         }
         LoadDocking();
         ProjectExplorer.LoadProjects(this);
     }
 }