public ProjectExecuter(string projectFile, esSettings mainSettings) { userSettings = mainSettings; project = new esProject(); project.Load(projectFile, userSettings); }
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; } }