示例#1
0
        public void CreateWorkspace(string name, params ILayoutEngine[] layouts)
        {
            var newLayouts = layouts.Length > 0 ? _context.ProxyLayouts(layouts) : _context.DefaultLayouts();

            var workspace = new Workspace(_context, name, newLayouts.ToArray());

            _workspaces.Add(workspace);
            _workspaceMap[workspace] = _workspaces.Count - 1;
            _context.Workspaces.ForceWorkspaceUpdate();
        }
示例#2
0
        public void CreateWorkspace(IMonitor monitor, string name, params ILayoutEngine[] layouts)
        {
            var newLayouts = layouts.Length > 0 ? _context.ProxyLayouts(layouts) : _context.DefaultLayouts();

            var workspace = new Workspace(_context, name, newLayouts.ToArray());

            _workspaces[monitor].Add(workspace);
            _orderedWorkspaces[monitor].Add(workspace);
            _allWorkspaces.Add(workspace);
            _wtm[workspace] = monitor;
            _context.Workspaces.ForceWorkspaceUpdate();
        }