private void cloneWorkspace() { if (ActiveQueryWorkspace == null) { return; } var workspaceModel = ActiveQueryWorkspace.CloneModel(); AddWorkspace($"Copy of {mainTabControl.SelectedTab.Text}", QueryWorkspaceView.New(workspaceModel)); }
public void AddWorkspace(string title, QueryWorkspaceView workspaceView) { Workspaces.Add(workspaceView); var newTab = new QWBTabPage(title); var newWorkspace = workspaceView.WithDockStyle(DockStyle.Fill) .WithContainer(newTab); workspaceView.OnDirtyChanged += WorkspaceView_OnDirtyChanged; workspaceView.OnSaved += WorkspaceView_OnSaved; newTab.SetWorkspace(newWorkspace); mainTabControl.TabPages.Add(newTab); mainTabControl.SelectedTab = newTab; }
private void openWorkspace(string filename) { AddWorkspace(Path.GetFileName(filename), QueryWorkspaceView.New(filename)); pushMRUItem(filename); }
private void newWorkspace() { AddWorkspace($"Query Workspace {mainTabControl.TabPages.Count + 1} *", QueryWorkspaceView.New()); }