Inheritance: VsNativeWindow, IDisposable
        public int OnBeforeDocumentWindowShow(uint docCookie, int fFirstShow, IVsWindowFrame pFrame)
        {
            if( VSGestureService.Current.VSGestureInfo.UserSettings.EnableVSGesture == false ) return VSConstants.S_OK;

            var win = VsShellUtilities.GetWindowObject(pFrame);
            if( win == null ) return VSConstants.S_OK;

            var view = VsShellUtilities.GetTextView(pFrame);
            if( view == null ) return VSConstants.S_OK;

            IDesignerHost host = win.Object as IDesignerHost;

            var handler = view.GetWindowHandle();

            var hwnd = handler;
            if (list.ContainsKey(hwnd) == true) return VSConstants.S_OK;

            GestureNativeWindow window = new GestureNativeWindow(hwnd);
            list.Add(hwnd, window);

            if (VSGestureService.Current.VSGestureInfo.UserSettings.EnableVSGestureAlram == true)
            {
                // Welcome 메시지
                VSGesture.Controls.frmWelcome frm = new Umc.Core.Tools.VSGesture.Controls.frmWelcome();
                frm.ShowInTaskbar = false;
                frm.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
                frm.Show();

                VSGestureService.Current.VSGestureInfo.UserSettings.EnableVSGestureAlram = false;
                VSGestureService.Current.VSGestureInfo = VSGestureService.Current.VSGestureInfo;
            }

            return VSConstants.S_OK;
        }
Example #2
0
        public int OnBeforeDocumentWindowShow(uint docCookie, int fFirstShow, IVsWindowFrame pFrame)
        {
            if (VSGestureService.Current.VSGestureInfo.UserSettings.EnableVSGesture == false)
            {
                return(VSConstants.S_OK);
            }

            var win = VsShellUtilities.GetWindowObject(pFrame);

            if (win == null)
            {
                return(VSConstants.S_OK);
            }

            var view = VsShellUtilities.GetTextView(pFrame);

            if (view == null)
            {
                return(VSConstants.S_OK);
            }

            IDesignerHost host = win.Object as IDesignerHost;


            var handler = view.GetWindowHandle();

            var hwnd = handler;

            if (list.ContainsKey(hwnd) == true)
            {
                return(VSConstants.S_OK);
            }



            GestureNativeWindow window = new GestureNativeWindow(hwnd);

            list.Add(hwnd, window);

            if (VSGestureService.Current.VSGestureInfo.UserSettings.EnableVSGestureAlram == true)
            {
                // Welcome 메시지
                VSGesture.Controls.frmWelcome frm = new Umc.Core.Tools.VSGesture.Controls.frmWelcome();
                frm.ShowInTaskbar = false;
                frm.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
                frm.Show();

                VSGestureService.Current.VSGestureInfo.UserSettings.EnableVSGestureAlram = false;
                VSGestureService.Current.VSGestureInfo = VSGestureService.Current.VSGestureInfo;
            }

            return(VSConstants.S_OK);
        }