Esempio n. 1
0
        private void UpdateToolViews(IWorkspace workspace)
        {
            if (_workbenchToolViewManager == null)
            {
                //_workbenchToolViewManager = new ToolViewManager(WorkstationModel.ToolManager, this);
                _workbenchToolViewManager = new ToolViewManager(DesktopApplication.ToolSet, this);
                _workbenchToolViewManager.Activate(true);                       // always active
            }

            if (_lastActiveWorkspace != null && _workspaceToolViewManagers.ContainsKey(_lastActiveWorkspace))
            {
                _workspaceToolViewManagers[_lastActiveWorkspace].Activate(false);
            }

            if (workspace != null)
            {
                if (!_workspaceToolViewManagers.ContainsKey(workspace))
                {
                    //_workspaceToolViewManagers.Add(workspace, new ToolViewManager(workspace.ToolManager, this));
                    _workspaceToolViewManagers.Add(workspace, new ToolViewManager((ToolSet)workspace.ToolSet, this));
                }

                _workspaceToolViewManagers[workspace].Activate(true);


                _lastActiveWorkspace = workspace;
            }
        }
Esempio n. 2
0
		private void UpdateToolViews(IWorkspace workspace)
		{
			if(_workbenchToolViewManager == null)
			{
				//_workbenchToolViewManager = new ToolViewManager(WorkstationModel.ToolManager, this);
				_workbenchToolViewManager = new ToolViewManager(DesktopApplication.ToolSet, this);
				_workbenchToolViewManager.Activate(true);	// always active
			}
			
			if(_lastActiveWorkspace != null && _workspaceToolViewManagers.ContainsKey(_lastActiveWorkspace))
			{
				_workspaceToolViewManagers[_lastActiveWorkspace].Activate(false);
			}
			
			if(workspace != null)
			{
				if(!_workspaceToolViewManagers.ContainsKey(workspace))
				{
					//_workspaceToolViewManagers.Add(workspace, new ToolViewManager(workspace.ToolManager, this));
					_workspaceToolViewManagers.Add(workspace, new ToolViewManager((ToolSet)workspace.ToolSet, this));
				}
				
				_workspaceToolViewManagers[workspace].Activate(true);
		
			
			_lastActiveWorkspace = workspace;
			}
		}