void htmlEditor1_ReadyStateChanged(object sender, ReadyStateChangedEventArgs e) { if (e.ReadyState == "complete") { // Designer needs to be setup every time webbrowser initiates // (affects going from edit mode to design mode) HtmlEditorClasses.CRestrictedEditDesigner restrictedEditDesigner = new HtmlEditorClasses.CRestrictedEditDesigner(); restrictedEditDesigner.moduleClicked += new HtmlEditorClasses.ModuleClickedEventHandler(restrictedEditDesigner_moduleClicked); restrictedEditDesigner.canvasClicked += new HtmlEditorClasses.CanvasClickedEventHandler(restrictedEditDesigner_canvasClicked); htmlEditor1.SetEditDesigner(restrictedEditDesigner); htmlEditor1.AllowDrop = true; // dropTarget is bound on complete readyState, though // remains when editor changes invisibility, so this would get // bound x times, unlike editDesigner above if (!this.eventsBound) { htmlEditor1.dropTarget.dragEnter += new DragEnterHandler(theSite_dragEnter); htmlEditor1.dropTarget.drop += new DropHandler(theSite_drop); htmlEditor1.dropTarget.dragOver += new DragOverHandler(dropTarget_dragOver); this.eventsBound = true; } } }
void htmlEditor1_ReadyStateChanged(object sender, ReadyStateChangedEventArgs e) { if (e.ReadyState == "complete") { // Designer needs to be setup every time webbrowser initiates // (affects going from edit mode to design mode) HtmlEditorClasses.CRestrictedEditDesigner restrictedEditDesigner = new HtmlEditorClasses.CRestrictedEditDesigner(); restrictedEditDesigner.moduleClicked += new HtmlEditorClasses.ModuleClickedEventHandler(restrictedEditDesigner_moduleClicked); restrictedEditDesigner.canvasClicked += new HtmlEditorClasses.CanvasClickedEventHandler(restrictedEditDesigner_canvasClicked); htmlEditor1.SetEditDesigner(restrictedEditDesigner); htmlEditor1.AllowDrop = true; // dropTarget is bound on complete readyState, though // remains when editor changes invisibility, so this would get // bound x times, unlike editDesigner above if (!this.eventsBound) { htmlEditor1.dropTarget.dragEnter += new DragEnterHandler(theSite_dragEnter); htmlEditor1.dropTarget.drop += new DropHandler(theSite_drop); htmlEditor1.dropTarget.dragOver += new DragOverHandler(dropTarget_dragOver); this.eventsBound = true; } } }