Ejemplo n.º 1
0
        /// <include file='doc\ViewFilter.uex' path='docs/doc[@for="TextTipData.TextTipData"]/*' />
        public TextTipData(IServiceProvider site)
        {
            if (site == null)
            {
                throw new System.ArgumentNullException("site");
            }

            //this.textView = view;
            // Create our method tip window (through the local registry)
            Type t    = typeof(IVsTextTipWindow);
            Guid riid = t.GUID;

            Guid clsid = typeof(VsTextTipWindowClass).GUID;

            Microsoft.VisualStudio.Shell.Package pkg = (Microsoft.VisualStudio.Shell.Package)site.GetService(typeof(Microsoft.VisualStudio.Shell.Package));
            if (pkg == null)
            {
                throw new NullReferenceException(typeof(Microsoft.VisualStudio.Shell.Package).FullName);
            }
            this.textTipWindow = (IVsTextTipWindow)pkg.CreateInstance(ref clsid, ref riid, t);
            if (this.textTipWindow == null)
            {
                NativeHelpers.RaiseComError(NativeMethods.E_FAIL);
            }

            NativeMethods.ThrowOnFailure(textTipWindow.SetTextTipData(this));
        }
Ejemplo n.º 2
0
 public void Close(IVsTextView textView)
 {
     if (this.isWindowUp)
     {
         textView.UpdateTipWindow(this.textTipWindow, (uint)TipWindowFlags.UTW_DISMISS);
     }
     this.textTipWindow = null;
 }
Ejemplo n.º 3
0
        /// <include file='doc\ViewFilter.uex' path='docs/doc[@for="TextTipData.Close"]/*' />
        public void Close(IVsTextView textView)
        {
            if (this.textTipWindow != null)
            {
                if (this.isWindowUp)
                {
                    NativeMethods.ThrowOnFailure(textView.UpdateTipWindow(this.textTipWindow, (uint)TipWindowFlags.UTW_DISMISS));
                }

                Marshal.ReleaseComObject(this.textTipWindow);
                this.textTipWindow = null;
            }
        }
Ejemplo n.º 4
0
        public TextTipData(IServiceProvider site)
        {
            Debug.Assert(site != null);

            //this.textView = view;
            // Create our method tip window (through the local registry)
            this.textTipWindow = (IVsTextTipWindow)VsShell.CreateInstance(site, ref VsConstants.CLSID_VsTextTipWindow, ref VsConstants.IID_IVsTextTipWindow, typeof(IVsTextTipWindow));
            if (this.textTipWindow == null)
            {
                NativeHelpers.RaiseComError(HResult.E_FAIL);
            }

            textTipWindow.SetTextTipData(this);
        }
Ejemplo n.º 5
0
        /// <include file='doc\ViewFilter.uex' path='docs/doc[@for="TextTipData.TextTipData"]/*' />
        internal TextTipData(IServiceProvider site)
        {
            if (site == null)
                throw new System.ArgumentNullException("site");

            //this.textView = view;
            // Create our method tip window (through the local registry)
            Type t = typeof(IVsTextTipWindow);
            Guid riid = t.GUID;

            Guid clsid = typeof(VsTextTipWindowClass).GUID;
            Microsoft.VisualStudio.Shell.Package pkg = (Microsoft.VisualStudio.Shell.Package)site.GetService(typeof(Microsoft.VisualStudio.Shell.Package));
            if (pkg == null) {
                throw new NullReferenceException(typeof(Microsoft.VisualStudio.Shell.Package).FullName);
            }
            this.textTipWindow = (IVsTextTipWindow)pkg.CreateInstance(ref clsid, ref riid, t);
            if (this.textTipWindow == null)
                NativeHelpers.RaiseComError(NativeMethods.E_FAIL);
            else
                NativeMethods.ThrowOnFailure(textTipWindow.SetTextTipData(this));
        }
Ejemplo n.º 6
0
 public void Close(IVsTextView textView) {
   if (this.isWindowUp)
     textView.UpdateTipWindow(this.textTipWindow, (uint)TipWindowFlags.UTW_DISMISS);
   this.textTipWindow = null;
 }
Ejemplo n.º 7
0
    public TextTipData(ServiceProvider site) {
      Debug.Assert(site != null);

      //this.textView = view;
      // Create our method tip window (through the local registry)
      this.textTipWindow = (IVsTextTipWindow)VsShell.CreateInstance(site, ref VsConstants.CLSID_VsTextTipWindow, ref VsConstants.IID_IVsTextTipWindow, typeof(IVsTextTipWindow));
      if (this.textTipWindow == null)
        NativeHelpers.RaiseComError(HResult.E_FAIL);

      textTipWindow.SetTextTipData(this);
    }
Ejemplo n.º 8
0
        /// <include file='doc\ViewFilter.uex' path='docs/doc[@for="TextTipData.Close"]/*' />
        public void Close(IVsTextView textView) {
            if (this.textTipWindow != null) {
                if (this.isWindowUp)
                    NativeMethods.ThrowOnFailure(textView.UpdateTipWindow(this.textTipWindow, (uint)TipWindowFlags.UTW_DISMISS));

                Marshal.ReleaseComObject(this.textTipWindow);
                this.textTipWindow = null;
            }
        }