Пример #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            _outputWindow = new OutputWindow();
            _outputWindow.Show(dockPanel, DockState.DockBottomAutoHide);

            _connectionBrowserWindow = new ConnectionBrowserWindow();
            _connectionBrowserWindow.Show(dockPanel, DockState.DockLeft);

            _schemaWindow = new SchemaWindow();
            //_schemaWindow.Show(dockPanel, DockState.DockLeftAutoHide);

            // WindowManager.Instance.MainForm = this;
            WindowManager.Instance.MainDockPanel           = dockPanel;
            WindowManager.Instance.ConnectionBrowserWindow = _connectionBrowserWindow;
            WindowManager.Instance.SchemaWindow            = _schemaWindow;
            WindowManager.Instance.OutputWindow            = _outputWindow;
        }
Пример #2
0
        private void FormMain_Load(object sender, EventArgs e)
        {
            dockPanel.DockLeftPortion = .20D;
            _outputWindow             = new OutputWindow();
            _outputWindow.Show(dockPanel, DockState.DockBottomAutoHide);

            _connectionBrowserWindow = new ConnectionBrowserWindow();
            _connectionBrowserWindow.Show(dockPanel, DockState.DockLeft);

            _schemaWindow = new SchemaWindow();
            //_schemaWindow.Show(dockPanel, new Rectangle(98, 133, 200, 383));

            _codeSnippetsWindow = new CodeSnippetsWindow();
            _codeSnippetsWindow.Show(dockPanel, DockState.DockRightAutoHide);
            _codeSnippetsWindow.OnInsertCode += (code) =>
            {
                if (dockPanel.ActiveDocument is EditorWindow)
                {
                    var editorWindow = dockPanel.ActiveDocument as EditorWindow;
                    editorWindow.InsertText(code);
                }
            };

            Theme.ColorTable = new MongoSharpTheme();

            WindowManager.Instance.MainForm                = this;
            WindowManager.Instance.MainDockPanel           = dockPanel;
            WindowManager.Instance.HomeRibbonTab           = ribbonTabHome;
            WindowManager.Instance.ClipBoardRibbonPanel    = ribbonPanelClipboard;
            WindowManager.Instance.EditorRibbonPanel       = ribbonPanelEditor;
            WindowManager.Instance.ConnectionBrowserWindow = _connectionBrowserWindow;
            WindowManager.Instance.SchemaWindow            = _schemaWindow;
            WindowManager.Instance.OutputWindow            = _outputWindow;
            WindowManager.Instance.CodeSnippetsWindow      = _codeSnippetsWindow;

            UpdateRecentFiles();
        }