Microsoft.VisualStudio.Project.FileDocumentManager.Open C# (CSharp) Method

Open() public method

Open a file using the standard editor
public Open ( System.Guid &logicalView, IntPtr docDataExisting, IVsWindowFrame &windowFrame, WindowFrameShowAction windowFrameAction ) : int
logicalView System.Guid In MultiView case determines view to be activated by IVsMultiViewDocumentView. For a list of logical view GUIDS, see constants starting with LOGVIEWID_ defined in NativeMethods class
docDataExisting System.IntPtr IntPtr to the IUnknown interface of the existing document data object
windowFrame IVsWindowFrame A reference to the window frame that is mapped to the file
windowFrameAction WindowFrameShowAction Determine the UI action on the document window
return int
        public override int Open(ref Guid logicalView, IntPtr docDataExisting, out IVsWindowFrame windowFrame, WindowFrameShowAction windowFrameAction)
        {
            bool newFile = false;
            bool openWith = false;
            return this.Open(newFile, openWith, ref logicalView, docDataExisting, out windowFrame, windowFrameAction);
        }

Same methods

FileDocumentManager::Open ( bool newFile, bool openWith, System.Guid logicalView, IVsWindowFrame &frame, WindowFrameShowAction windowFrameAction ) : int
FileDocumentManager::Open ( bool newFile, bool openWith, System.Guid &logicalView, IntPtr docDataExisting, IVsWindowFrame &windowFrame, WindowFrameShowAction windowFrameAction ) : int
FileDocumentManager::Open ( bool newFile, bool openWith, WindowFrameShowAction windowFrameAction ) : int
FileDocumentManager::Open ( bool newFile, bool openWith, uint editorFlags, System.Guid &editorType, string physicalView, System.Guid &logicalView, IntPtr docDataExisting, IVsWindowFrame &windowFrame, WindowFrameShowAction windowFrameAction ) : int

Usage Example

Esempio n. 1
0
        protected override void DoDefaultAction()
        {
            CCITracing.TraceCall();
            FileDocumentManager manager = this.GetDocumentManager() as FileDocumentManager;

            Debug.Assert(manager != null, "Could not get the FileDocumentManager");
            manager.Open(false, false, WindowFrameShowAction.Show);
        }