Exemple #1
0
        /// <summary>
        /// Called when the editor is disposed
        /// </summary>
        public void Dispose()
        {
            if (ExecutionEngine != null && ExecutionEngine.IsRunning())
            {
                try
                {
                    ExecutionEngine.Stop();
                }
                catch (Exception ex)
                {
                    GuiLogMessage(string.Format(Resources.WorkspaceManagerClass_Dispose_Exception_during_stopping_of_the_ExecutionEngine___0_, ex), NotificationLevel.Error);
                }
            }

            EventsHelper.AsynchronousPropertyChanged = true;

            try
            {
                if (WorkspaceModel != null)
                {
                    WorkspaceModel.Dispose();
                }
            }
            catch (Exception ex)
            {
                GuiLogMessage(string.Format(Resources.WorkspaceManagerClass_Dispose_Exception_during_disposing_of_the_Model___0_, ex), NotificationLevel.Error);
            }
        }
Exemple #2
0
        public void Dispose()
        {
            PopupModel?.Dispose();
            WorkspaceModel?.Dispose();
            AuthenticationModel?.Dispose();

            _modelDisposable.Dispose();
        }
Exemple #3
0
        private void GoToInitialPage()
        {
            PageIndex = (int)Page.Initial;

            AuthenticationModel?.Dispose();
            AuthenticationModel = null;

            WorkspaceModel?.Dispose();
            WorkspaceModel = null;
        }
Exemple #4
0
        private void GoToAuthenticationPage()
        {
            PageIndex = (int)Page.Authentication;

            if (AuthenticationModel == null)
            {
                WorkspaceModel?.Dispose();
                WorkspaceModel = null;

                AuthenticationModel = _authenticationModelFactory.Create();
            }
        }
Exemple #5
0
 /// <summary>
 ///     Remove a workspace from the dynamo model.
 /// </summary>
 /// <param name="workspace">Workspace to remove</param>
 public void RemoveWorkspace(WorkspaceModel workspace)
 {
     OnWorkspaceRemoveStarted(workspace);
     if (_workspaces.Remove(workspace))
     {
         if (workspace is HomeWorkspaceModel) {
             workspace.Dispose();
         }
         OnWorkspaceRemoved(workspace);
     }
 }