コード例 #1
0
 // 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.");
         }
     }
 }
コード例 #2
0
ファイル: PropertyWindow.cs プロジェクト: polytronicgr/netrix
 public void SetEditor(IHtmlEditor editor)
 {
     _editor = editor;
     GuruComponents.Netrix.UserInterface.ResourceManager.Initialize(_editor.GetActiveDocument(true), "de-DE");
 }
コード例 #3
0
 internal MarkupService(IHtmlEditor editor)
 {
     this.editor = editor;
     ms          = (Interop.IMarkupServices)editor.GetActiveDocument(false);
     ms2         = (Interop.IMarkupServices2)editor.GetActiveDocument(false);
 }
コード例 #4
0
ファイル: DisplayService.cs プロジェクト: polytronicgr/netrix
 internal DisplayService(IHtmlEditor editor)
 {
     this.editor = editor;
     ds          = (Interop.IDisplayServices)editor.GetActiveDocument(false);
 }