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(""); }
bool OnWarnAndDecide(Util.WarnAndDecideEventArgs e) { return(UtilGUI.WarnAndDecide(e.Text)); }