void LoadProjectExecute() { string?path = UtilGUI.OpenFileDialogToGetFolder(); if (path == null) { return; } if (projectData?.IsBusy ?? false) { if (UtilGUI.WarnAndDecide("Current project is busy.\nTerminate and continue?")) { projectData?.Terminate(); } else { return; } } projectData = NnProjectData.Load(path); if (projectData == null) { UtilGUI.Error("Error!"); return; } projectData.PropertyChanged += OnComponentPropertyChanged; ResetSelectionAndCollections(); OnPropertyChanged(""); }
void OnError(Util.ErrorEventArgs e) { UtilGUI.Error(e.Text); }