Exemplo n.º 1
0
        public virtual void SetActiveObject(NativeMethods.IOleInPlaceActiveObject pActiveObject, string pszObjName)
        {
            Debug.WriteLineIf(StyleBuilder.StyleBuilderSwitch.TraceVerbose, "CTridentSite: IOleInPlaceFrame::SetActiveObject");

            // NOTE, nikhilko, 7/99: Don't return E_NOTIMPL. Somehow doing nothing and returning S_OK
            //    fixes trident hosting in Win2000.
        }
Exemplo n.º 2
0
        public void CloseHtml()
        {
            this.hostControl.Resize -= new EventHandler(this.HostControl_Resize);

            try
            {
                if (this.propertyNotifySinkCookie != null)
                {
                    this.propertyNotifySinkCookie.Disconnect();
                    this.propertyNotifySinkCookie = null;
                }

                if (this.document != null)
                {
                    this.documentView  = null;
                    this.document      = null;
                    this.commandTarget = null;
                    this.activeObject  = null;

                    if (adviseSinkCookie != 0)
                    {
                        this.oleObject.Unadvise(adviseSinkCookie);
                        this.adviseSinkCookie = 0;
                    }

                    this.oleObject.Close(NativeMethods.OLECLOSE_NOSAVE);
                    this.oleObject.SetClientSite(null);
                    this.oleObject = null;
                }
            }
            catch (Exception exception)
            {
                Debug.Fail(exception.ToString());
            }
        }
Exemplo n.º 3
0
 int NativeMethods.IDocHostUIHandler.ShowUI(int dwID, NativeMethods.IOleInPlaceActiveObject activeObject, NativeMethods.IOleCommandTarget commandTarget, NativeMethods.IOleInPlaceFrame frame, NativeMethods.IOleInPlaceUIWindow doc)
 {
     return(NativeMethods.S_OK);
 }
Exemplo n.º 4
0
 void NativeMethods.IOleInPlaceFrame.SetActiveObject(NativeMethods.IOleInPlaceActiveObject pActiveObject, string pszObjName)
 {
     this.activeObject = pActiveObject;
 }
Exemplo n.º 5
0
 public virtual int ShowUI(int dwID, NativeMethods.IOleInPlaceActiveObject activeObject, NativeMethods.IOleCommandTarget commandTarget, NativeMethods.IOleInPlaceFrame frame, NativeMethods.IOleInPlaceUIWindow doc)
 {
     return(NativeMethods.S_OK);
 }
Exemplo n.º 6
0
 public virtual void SetActiveObject(NativeMethods.IOleInPlaceActiveObject pActiveObject, string pszObjName)
 {
     // NOTE, nikhilko, 7/99: Don't return E_NOTIMPL. Somehow doing nothing and returning S_OK
     //    fixes trident hosting in Win2000.
     // throw new COMException(String.Empty, NativeMethods.E_NOTIMPL);
 }
Exemplo n.º 7
0
        public void CloseHtml()
        {
            this.hostControl.Resize -= new EventHandler(this.HostControl_Resize);

            try
            {
                if (this.propertyNotifySinkCookie != null)
                {
                    this.propertyNotifySinkCookie.Disconnect();
                    this.propertyNotifySinkCookie = null;
                }

                if (this.document != null)
                {
                    this.documentView = null;
                    this.document = null;
                    this.commandTarget = null;
                    this.activeObject = null;

                    if (adviseSinkCookie != 0)
                    {
                        this.oleObject.Unadvise(adviseSinkCookie);
                        this.adviseSinkCookie = 0;
                    }

                    this.oleObject.Close(NativeMethods.OLECLOSE_NOSAVE);
                    this.oleObject.SetClientSite(null);
                    this.oleObject = null;
                }
            }
            catch (Exception exception)
            {
                Debug.Fail(exception.ToString());
            }
        }
Exemplo n.º 8
0
 void NativeMethods.IOleInPlaceFrame.SetActiveObject(NativeMethods.IOleInPlaceActiveObject pActiveObject, string pszObjName)
 {
     this.activeObject = pActiveObject;
 }
Exemplo n.º 9
0
 int NativeMethods.IDocHostUIHandler.ShowUI(int dwID, NativeMethods.IOleInPlaceActiveObject activeObject, NativeMethods.IOleCommandTarget commandTarget, NativeMethods.IOleInPlaceFrame frame, NativeMethods.IOleInPlaceUIWindow doc)
 {
     Debug.WriteLineIf(StyleBuilder.StyleBuilderSwitch.TraceVerbose, "CTridentSite: IDocHostUIHandler::ShowUI");
     return(NativeMethods.S_OK);
 }