private Project(AppView app, ProjectDOM.Project doc, PathString documentPath) { _Application = app; _Source = doc; _SourceBody = doc.GetBody(false); _SourceFilePath = documentPath; _Configurations = new Configurations(doc); _ActiveConfiguration = _Configurations.RootConfiguration; SaveCmd = new RelayCommand(Save); AddTaskCmd = new RelayCommand(_AddNewTask); EditPluginsCmd = new RelayCommand(_EditPlugin); EditConfigurationsCmd = new RelayCommand(_EditConfigurations); DeleteActiveDocumentCmd = new RelayCommand <BindableBase>(_DeleteTask); CopyTaskToClipboardCmd = new RelayCommand <BindableBase>(_CopyTaskToClipboard); PasteTaskFromClipboardCmd = new RelayCommand(_PasteTaskFromClipboard); BuildAllCmd = new RelayCommand(Build); TestAllCmd = new RelayCommand(Test); ShowSourceDirectoryCmd = new RelayCommand(() => new PathString(this.SourceDirectory).TryOpenContainingFolder()); ShowTargetDirectoryCmd = new RelayCommand(() => new PathString(this.TargetDirectory).TryOpenContainingFolder()); }
public static Project Create(AppView app, ProjectDOM.Project doc, PathString docPath) { if (doc == null || docPath == null) { return(null); } var ppp = new Project(app, doc, docPath); ppp._ReloadPlugins(); return(ppp); }