Пример #1
0
        public void Execute()
        {
            if (formWindow == null)
            {
                flexMainWindow = new FlexMainWindow(logger);
                formWindow = ssmsProvider.ToolWindow.Create(flexMainWindow, Caption, formGuid, true);

                try
                {
                    formWindow.Window.IsFloating = true;
                    formWindow.Window.WindowState = WindowState.Maximize;
                }
                catch (Exception ex)
                {
                    //This is copied code from a Red-Gate sample.  If SIP is updated to address this better, it can be updated, but for now this works.
                    var error = "Exception setting Window State.";
                    logger.Log(error + " " + ex.Message);
                }
                formWindow.Window.IsFloating = false; // can't be docked
                formWindow.Window.Linkable = false;
                SetSelectedDBNode(currentNode);                
            }

            formWindow.Activate(true);
        }
Пример #2
0
        public void Execute()
        {
            if (formWindow == null)
            {
                flexMainWindow = new FlexMainWindow(logger);
                formWindow     = ssmsProvider.ToolWindow.Create(flexMainWindow, Caption, formGuid, true);

                try
                {
                    formWindow.Window.IsFloating  = true;
                    formWindow.Window.WindowState = WindowState.Maximize;
                }
                catch (Exception ex)
                {
                    //This is copied code from a Red-Gate sample.  If SIP is updated to address this better, it can be updated, but for now this works.
                    var error = "Exception setting Window State.";
                    logger.Log(error + " " + ex.Message);
                }
                formWindow.Window.IsFloating = false; // can't be docked
                formWindow.Window.Linkable   = false;
                SetSelectedDBNode(currentNode);
            }

            formWindow.Activate(true);
        }