private void SaveProject(string fileNameAndPath) { TreeNode rootNode = this.projectTree.Nodes[0]; project = new esProject(); ConvertTreeToProject(project.RootNode, rootNode); project.Save(fileNameAndPath, MainWindow.Settings); project = null; isDirty = false; }
private void OpenProject(string fileNameAndPath) { Cursor oldCursor = Cursor.Current; try { Cursor.Current = Cursors.WaitCursor; esProject project = new esProject(); project.Load(fileNameAndPath, MainWindow.Settings); this.projectTree.Nodes.Clear(); ConvertProjectToTree(null, project.RootNode); this.ButtonSave.Enabled = true; this.projectName = fileNameAndPath; this.projectTree.ExpandAll(); this.projectTree.SelectedNode = this.projectTree.Nodes[0]; this.projectTree.Select(); EnableToolbarButtons(true); mru.Push(this.projectName); SaveMruList(); } catch (Exception ex) { mru.Remove(fileNameAndPath); this.SaveMruList(); this.MainWindow.ShowError(ex); } finally { Cursor.Current = oldCursor; } }
public ProjectExecuter(string projectFile, esSettings mainSettings) { userSettings = mainSettings; project = new esProject(); project.Load(projectFile, userSettings); }