コード例 #1
0
 private void mainSplitContainer_SplitterMoved(object sender, SplitterEventArgs e)
 {
     if (splitterMovePending)
     {
         splitterMovePending = false;
         wbContext.save_state("sidebar_width", "model_diagram", mainSplitContainer.SplitterDistance);
     }
 }
コード例 #2
0
        public override void PerformCommand(string command)
        {
            Logger.LogDebug("WQE.net", 1, "performing command: + " + command + "\n");
            switch (command)
            {
            case "wb.toggleSidebar":
                mainSplitContainer.Panel1Collapsed = !mainSplitContainer.Panel1Collapsed;
                wbContext.save_state("sidebar_visible", "query_editor", !mainSplitContainer.Panel1Collapsed);
                break;

            case "wb.toggleOutputArea":
                outputIsVisible = !outputIsVisible;
                if (IsAdminActive())
                {
                    outputVisibilySetInAdmin = true;
                }
                contentSplitContainer.Panel2Collapsed = !contentSplitContainer.Panel2Collapsed;
                wbContext.save_state("output_visible", "query_editor", !contentSplitContainer.Panel2Collapsed);
                break;

            case "wb.toggleSecondarySidebar":
                secondarySidebarIsVisible = !secondarySidebarIsVisible;
                if (IsAdminActive())
                {
                    secondarySidebarVisibilySetInAdmin = true;
                }
                mainContentSplitContainer.Panel2Collapsed = !mainContentSplitContainer.Panel2Collapsed;
                wbContext.save_state("support_sidebar_visible", "query_editor", !mainContentSplitContainer.Panel2Collapsed);
                break;

            case "close_editor":
                mainContentTabControl.CloseTabPage(mainContentTabControl.SelectedTab);
                break;
            }
        }