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