示例#1
0
        protected override void DoDefaultAction()
        {
            FileDocumentManager manager = this.GetDocumentManager() as FileDocumentManager;

            Utilities.CheckNotNull(manager, "Could not get the FileDocumentManager");
            manager.Open(false, false, WindowFrameShowAction.Show);
        }
        /// <summary>
        /// Open a file depending on the SubType property associated with the file item in the project file
        /// </summary>
        protected override void DoDefaultAction()
        {
            FileDocumentManager manager = this.GetDocumentManager() as FileDocumentManager;

            Utilities.CheckNotNull(manager, "Could not get the FileDocumentManager");

            Guid viewGuid =
                (IsFormSubType ? VSConstants.LOGVIEWID_Designer : VSConstants.LOGVIEWID_Code);
            IVsWindowFrame frame;

            manager.Open(false, false, viewGuid, out frame, WindowFrameShowAction.Show);
        }
        /// <summary>
        /// Open a file depending on the SubType property associated with the file item in the project file
        /// </summary>
        protected override void DoDefaultAction()
        {
            if ("WebBrowser".Equals(SubType, StringComparison.OrdinalIgnoreCase))
            {
                CommonPackage.OpenVsWebBrowser(ProjectMgr.Site, Url);
                return;
            }

            FileDocumentManager manager = this.GetDocumentManager() as FileDocumentManager;

            Utilities.CheckNotNull(manager, "Could not get the FileDocumentManager");

            Guid           viewGuid = Guid.Empty;
            IVsWindowFrame frame;

            manager.Open(false, false, viewGuid, out frame, WindowFrameShowAction.Show);
        }
示例#4
0
        /// <summary>
        /// Open a file depending on the SubType property associated with the file item in the project file
        /// </summary>
        protected override void DoDefaultAction()
        {
            FileDocumentManager manager = this.GetDocumentManager() as FileDocumentManager;

            Utilities.CheckNotNull(manager, "Could not get the FileDocumentManager");

            IVsWindowFrame frame;

            if (IsFormSubType)
            {
                manager.Open(false, false, VSConstants.LOGVIEWID_Designer, out frame, WindowFrameShowAction.Show);
            }
            else
            {
                //manager.Open(false, false, VSConstants.LOGVIEWID_Code, out frame, WindowFrameShowAction.Show);    // Do not use, as in VS2010 css files are opened as plain text
                manager.Open(false, false, WindowFrameShowAction.Show);
            }
        }