Exemplo n.º 1
0
        public static bool Load(string projectFilePath, MainWindowViewModel viewModelRef)
        {
            var studioContext = new StudioContext(projectFilePath);

            (var done, var msg) = studioContext.LoadChatFlowProject();
            if (!done)
            {
                MessageBox.Show(msg, "Unable to open the project");
                return(false);
            }
            Current = studioContext;

            if (!Utilities.Settings.RecentChatFlowFiles.Contains(projectFilePath))
            {
                Utilities.Settings.RecentChatFlowFiles.Insert(0, projectFilePath);
                Utilities.Settings.Save(App.Cryptio);
            }

            if (viewModelRef != null)
            {
                viewModelRef.LoadNodesIntoDesigner();
            }
            return(true);
        }
Exemplo n.º 2
0
 public static void ClearCurrent()
 {
     Current = null;
 }