// used internally for the base undo manager (parent for all others) private void GetUndoManager() { if (oleUndoManagerInstance == null) { Interop.IOleServiceProvider serviceProvider = _editor.GetActiveDocument(false) as Interop.IOleServiceProvider; Guid undoManagerGuid = typeof(Interop.IOleUndoManager).GUID; Guid undoManagerGuid2 = typeof(Interop.IOleUndoManager).GUID; IntPtr undoManagerPtr; int hr = serviceProvider.QueryService(ref undoManagerGuid2, ref undoManagerGuid, out undoManagerPtr); if ((hr == Interop.S_OK) && (undoManagerPtr != Interop.NullIntPtr)) { oleUndoManagerInstance = (Interop.IOleUndoManager)Marshal.GetObjectForIUnknown(undoManagerPtr); Debug.WriteLine(oleUndoManagerInstance.GetHashCode(), "MANAGER INSTANCE"); Marshal.Release(undoManagerPtr); } else { throw new ExecutionEngineException("Component threw an internal exception creating Undo manager."); } } }
public void SetEditor(IHtmlEditor editor) { _editor = editor; GuruComponents.Netrix.UserInterface.ResourceManager.Initialize(_editor.GetActiveDocument(true), "de-DE"); }
internal MarkupService(IHtmlEditor editor) { this.editor = editor; ms = (Interop.IMarkupServices)editor.GetActiveDocument(false); ms2 = (Interop.IMarkupServices2)editor.GetActiveDocument(false); }
internal DisplayService(IHtmlEditor editor) { this.editor = editor; ds = (Interop.IDisplayServices)editor.GetActiveDocument(false); }