Exemple #1
0
        public static void SetVisible(Window win, bool v)
        {
            try
            {
                if (chDTE.Version == "9.0")
                {
                    Windows2 windows2 = (Windows2)Common.chDTE.Windows;
                    Window   w2       = Common.chDTE.Windows.Item(EnvDTE.Constants.vsWindowKindOutput).LinkedWindowFrame;
                    frame = (Window2)windows2.CreateLinkedWindowFrame(win, w2, vsLinkedWindowType.vsLinkedWindowTypeTabbed);
                    Common.chDTE.MainWindow.LinkedWindows.Add(frame);
                    frame.SetKind(EnvDTE.vsWindowType.vsWindowTypeToolWindow);
                    if (frame != null)
                    {
                        frame.Activate();
                    }
                }
                else if (chDTE.Version == "8.0")
                {
                    //frame =  (Window2)w2 ;
                }
            }
            catch (Exception)
            {
            }
            win.Visible = v;
            Control ctl = win.Object as Control;

            if (ctl != null)
            {
                ctl.Visible = true;
            }
        }