예제 #1
0
        private void OnViewCommand()
        {
            //MessageBox.Show(FileUrl + ".xod");
            ReviewWindow review = new ReviewWindow(FileUrl + ".xod");

            review.Show();
        }
예제 #2
0
        /////////////////////////////////////////////////////////////////////////////
        // Overriden Package Implementation
        #region Package Members

        /// <summary>
        /// Initialization of the package; this method is called right after the package is sited, so this is the place
        /// where you can put all the initilaization code that rely on services provided by VisualStudio.
        /// </summary>
        protected override void Initialize()
        {
            Trace.WriteLine(string.Format(CultureInfo.CurrentCulture, "Entering Initialize() of: {0}", this.ToString()));
            base.Initialize();

            // Add our command handlers for menu (commands must exist in the .vsct file)
            OleMenuCommandService mcs = GetService(typeof(IMenuCommandService)) as OleMenuCommandService;

            if (null != mcs)
            {
                // Create the command for the menu item.
                CommandID   menuCommandID = new CommandID(GuidList.guidReviewPal2010CmdSet, (int)PkgCmdIDList.cmdidReviewPal);
                MenuCommand menuItem      = new MenuCommand(MenuItemCallback, menuCommandID);
                mcs.AddCommand(menuItem);
                // Create the command for the tool window
                CommandID   toolwndCommandID = new CommandID(GuidList.guidReviewPal2010CmdSet, (int)PkgCmdIDList.cmdidReviewWindow);
                MenuCommand menuToolWin      = new MenuCommand(ShowToolWindow, toolwndCommandID);
                mcs.AddCommand(menuToolWin);
            }

            VSIDEHelper.VisualStudioInstance = Package.GetGlobalService(typeof(DTE)) as DTE2;

            solutionEvents                = VSIDEHelper.VisualStudioInstance.Events.SolutionEvents;
            solutionEvents.Opened        += new _dispSolutionEvents_OpenedEventHandler(SolutionEvents_Opened);
            solutionEvents.BeforeClosing += new _dispSolutionEvents_BeforeClosingEventHandler(solutionEvents_BeforeClosing);

            ToolWindowPane window = this.FindToolWindow(typeof(ReviewToolWindow), 0, true);

            reviewWindow = (ReviewWindow)((ReviewToolWindow)window).Content;


            //initialize the Utility class
            Utils.Initialize();
        }
예제 #3
0
        private void ShowReviewWindow(IEnumerable <FilePatcher> results)
        {
            var w = new ReviewWindow(results, commonBasePath: baseDir + '/')
            {
                AutoHeaders = true,
            };

            ElementHost.EnableModelessKeyboardInterop(w);
            w.ShowDialog();
        }
        private void onView()
        {
            if (fileUrl == null)
            {
                if (TaxPayerIsLink.GetValueOrDefault(false))
                {
                    fileUrl = (CustomUri.GetAbsoluteUrl("upload/" + TaxPayerLinkId.Value) + "/" + TaxPayerDocumentName);
                }
                else
                {
                    fileUrl = (CustomUri.GetAbsoluteUrl("upload/" + TaxPayerId.Value) + "/" + TaxPayerDocumentName);
                }
            }
            ReviewWindow review = new ReviewWindow(fileUrl + ".xod");

            review.Show();
        }
예제 #5
0
        /// <summary>
        /// Initializes the plug in.
        /// </summary>
        private void InitializePlugIn()
        {
            object   programmableObject = null;
            String   guidstr            = "{858C3FCD-8B39-4540-A592-F31C1520B174}";
            Windows2 windows2           = (EnvDTE80.Windows2)_visualStudioInstance.Windows;
            Assembly asm = Assembly.GetExecutingAssembly();

            Utils.AssemblyTitle = GetAssemblyTitle(asm);
            Utils.AssemblyPath  = GetAssemblyPath(asm);

            _windowToolWindow = windows2.CreateToolWindow2(_addInInstance, asm.Location, "ReviewPal.UI.ReviewWindow",
                                                           "Review List", guidstr, ref programmableObject);

            _windowToolWindow.Visible = true;
            ReviewWindow rCommentControl = (ReviewWindow)_windowToolWindow.Object;

            rCommentControl.VisualStudioInstance = _visualStudioInstance;
        }
예제 #6
0
        private void OnViewCommand()
        {
            ReviewWindow review = new ReviewWindow(FileUrl + ".xod");

            review.Show();
        }
예제 #7
0
        /// <summary>
        /// Initialization of the package; this method is called right after the package is sited, so this is the place
        /// where you can put all the initilaization code that rely on services provided by VisualStudio.
        /// </summary>
        protected override void Initialize()
        {
            Trace.WriteLine (string.Format(CultureInfo.CurrentCulture, "Entering Initialize() of: {0}", this.ToString()));
            base.Initialize();

            // Add our command handlers for menu (commands must exist in the .vsct file)
            OleMenuCommandService mcs = GetService(typeof(IMenuCommandService)) as OleMenuCommandService;
            if ( null != mcs )
            {
                // Create the command for the menu item.
                CommandID menuCommandID = new CommandID(GuidList.guidReviewPal2012CmdSet, (int)PkgCmdIDList.cmdidReviewPal);
                MenuCommand menuItem = new MenuCommand(MenuItemCallback, menuCommandID );
                mcs.AddCommand( menuItem );
                // Create the command for the tool window
                CommandID toolwndCommandID = new CommandID(GuidList.guidReviewPal2012CmdSet, (int)PkgCmdIDList.cmdidReviewWindow);
                MenuCommand menuToolWin = new MenuCommand(ShowToolWindow, toolwndCommandID);
                mcs.AddCommand( menuToolWin );
            }

            VSIDEHelper.VisualStudioInstance = Package.GetGlobalService(typeof(DTE)) as DTE2;

            solutionEvents = VSIDEHelper.VisualStudioInstance.Events.SolutionEvents;
            solutionEvents.Opened += new _dispSolutionEvents_OpenedEventHandler(SolutionEvents_Opened);
            solutionEvents.BeforeClosing += new _dispSolutionEvents_BeforeClosingEventHandler(solutionEvents_BeforeClosing);

            ToolWindowPane window = this.FindToolWindow(typeof(ReviewToolWindow), 0, true);
            reviewWindow = (ReviewWindow)((ReviewToolWindow)window).Content;

            //initialize the Utility class
            Utils.Initialize();
        }