Exemple #1
0
 public WindowsEvents(Interop.IHTMLWindow2 window, IHtmlEditor editor, IHtmlWindow htmlWindow)
 {
     this.window     = window;
     this.editor     = editor;
     this.htmlWindow = (GuruComponents.Netrix.WebEditing.Documents.HtmlWindow)htmlWindow;
     this.ConnectWindow();
     this.ConnectDocument();
 }
Exemple #2
0
 private Interop.IHTMLEventObj GetEventObject()
 {
     if (_element == null)
     {
         return(null);
     }
     _document = (Interop.IHTMLDocument2) this._element.GetDocument();
     Interop.IHTMLWindow2 window1 = _document.GetParentWindow();
     return(window1.@event);
 }
Exemple #3
0
 protected HtmlEvents(IElement _element)
 {
     this._element = _element;
     Interop.IHTMLDocument2 _document = _element.HtmlEditor.GetActiveDocument(false);
     if (_document == null)
     {
         return;
     }
     window = _document.GetParentWindow();
 }
Exemple #4
0
 internal HtmlWindow(Interop.IHTMLWindow2 window, IHtmlEditor editor)
 {
     this.editor = editor;
     try
     {
         this.window = window.parent;
         doc         = window.document;
     }
     catch
     {
     }
 }
Exemple #5
0
 private Interop.IHTMLEventObj GetEventObject()
 {
     _document = (Interop.IHTMLDocument2) this._element.GetDocument();
     try
     {
         Interop.IHTMLWindow2 window1 = _document.GetParentWindow();
         return(window1.@event);
     }
     catch
     {
         return(null);
     }
 }
Exemple #6
0
 internal FrameWindow(Interop.IHTMLWindow2 window, MSHTMLSite relatedSite, HtmlEditor htmlEditor)
 {
     this._relatedSite          = relatedSite;
     this.window                = window;
     this.doc                   = (Interop.IHTMLDocument2)window.document;
     this.url                   = ((Interop.IHTMLLocation)((Interop.IHTMLWindow2)doc.GetParentWindow()).location).href;
     this.body                  = (Interop.IHTMLElement3)doc.GetBody();
     this.framebase             = ((Interop.IHTMLWindow4)window).frameElement;
     this.htmlFormatter         = new HtmlFormatter();
     this.CommandTarget         = (Interop.IOleCommandTarget)doc;
     this.winEvents             = new FrameEvents(window, htmlEditor);
     this.winEvents.Activate   += new EventHandler(winEvents_Activate);
     this.winEvents.DeActivate += new EventHandler(winEvents_DeActivate);
     this.nativeElement         = (FrameElement)htmlEditor.GenericElementFactory.CreateElement(framebase as Interop.IHTMLElement);
 }
Exemple #7
0
 public FrameEvents(Interop.IHTMLWindow2 window, IHtmlEditor editor)
     : base(window, editor, new HtmlWindow(window, editor))
 {
 }