示例#1
0
        private void cloneWorkspace()
        {
            if (ActiveQueryWorkspace == null)
            {
                return;
            }
            var workspaceModel = ActiveQueryWorkspace.CloneModel();

            AddWorkspace($"Copy of {mainTabControl.SelectedTab.Text}", QueryWorkspaceView.New(workspaceModel));
        }
示例#2
0
        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;
        }
示例#3
0
 private void openWorkspace(string filename)
 {
     AddWorkspace(Path.GetFileName(filename), QueryWorkspaceView.New(filename));
     pushMRUItem(filename);
 }
示例#4
0
 private void newWorkspace()
 {
     AddWorkspace($"Query Workspace {mainTabControl.TabPages.Count + 1} *", QueryWorkspaceView.New());
 }