protected override void Initialize()
        {
            base.Initialize();
            control = new HistoryView(this);

            // This is the user control hosted by the tool window; Note that, even if this class implements IDisposable,
            // we are not calling Dispose on this object. This is because ToolWindowPane calls Dispose on
            // the object returned by the Content property.
            base.Content = control;

            var sccProviderService = BasicSccProvider.GetServiceEx<SccProviderService>();
            if (sccProviderService != null)
            {
                Refresh(sccProviderService.CurrentTracker);
            }
        }
Esempio n. 2
0
        protected override void Initialize()
        {
            base.Initialize();
            control = new HistoryView(this);

            // This is the user control hosted by the tool window; Note that, even if this class implements IDisposable,
            // we are not calling Dispose on this object. This is because ToolWindowPane calls Dispose on
            // the object returned by the Content property.
            base.Content = control;

            OleMenuCommandService mcs = GetService(typeof(IMenuCommandService)) as OleMenuCommandService;

            var cmd  = new CommandID(GuidList.guidSccProviderCmdSet, CommandId.icmdHistoryViewRefresh);
            var menu = new MenuCommand(new EventHandler(OnRefreshCommand), cmd);

            mcs.AddCommand(menu);

            sccProviderService = BasicSccProvider.GetServiceEx <SccProviderService>();
        }