public PendingChangesToolWindow() : base(null) { // set the window title this.Caption = Resources.ResourceManager.GetString("PendingChangesToolWindowCaption"); //// set the CommandID for the window ToolBar this.ToolBar = new CommandID(GuidList.guidSccProviderCmdSet, CommandId.imnuPendingChangesToolWindowToolbarMenu); // set the icon for the frame this.BitmapResourceID = CommandId.ibmpToolWindowsImages; // bitmap strip resource ID this.BitmapIndex = CommandId.iconSccProviderToolWindow; // index in the bitmap strip control = new PendingChangesView(); // 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.icmdPendingChangesCommit); var menu = new MenuCommand(new EventHandler(OnCommitCommand), cmd); mcs.AddCommand(menu); cmd = new CommandID(GuidList.guidSccProviderCmdSet, CommandId.icmdPendingChangesAmend); menu = new MenuCommand(new EventHandler(OnAmendCommitCommand), cmd); mcs.AddCommand(menu); }
protected override void Initialize() { base.Initialize(); control = new PendingChangesView(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.icmdPendingChangesCommit); var menu = new MenuCommand(new EventHandler(OnCommitCommand), cmd); mcs.AddCommand(menu); cmd = new CommandID(GuidList.guidSccProviderCmdSet, CommandId.icmdPendingChangesAmend); menu = new MenuCommand(new EventHandler(OnAmendCommitCommand), cmd); mcs.AddCommand(menu); cmd = new CommandID(GuidList.guidSccProviderCmdSet, CommandId.icmdPendingChangesRefresh); menu = new MenuCommand(new EventHandler(OnRefreshCommand), cmd); mcs.AddCommand(menu); sccProviderService = BasicSccProvider.GetServiceEx<SccProviderService>(); }
protected override void Initialize() { base.Initialize(); control = new PendingChangesView(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.icmdPendingChangesCommit); var menu = new MenuCommand(new EventHandler(OnCommitCommand), cmd); mcs.AddCommand(menu); cmd = new CommandID(GuidList.guidSccProviderCmdSet, CommandId.icmdPendingChangesAmend); menu = new MenuCommand(new EventHandler(OnAmendCommitCommand), cmd); mcs.AddCommand(menu); cmd = new CommandID(GuidList.guidSccProviderCmdSet, CommandId.icmdPendingChangesRefresh); menu = new MenuCommand(new EventHandler(OnRefreshCommand), cmd); mcs.AddCommand(menu); sccProviderService = BasicSccProvider.GetServiceEx <SccProviderService>(); }