/// <summary> /// Initialize the tools options page. /// </summary> public WutheringCommentsOptionsPageUI ( WutheringCommentsOptionsPage page ) { InitializeComponent ( ) ; OptionsPage = page ; }
/// <summary> /// Performs the following : /// <list type="-"> /// <item>Registers the callback for handling the Insertxxx menu items</item> /// </list> /// </summary> protected override void Initialize ( ) { base. Initialize ( ) ; // Register commands as a "Comments" submenu in the "Edit" menu // Initially disable everything RegisterMenuCommands ( Symbols. Guids. SourceCommentsMenu, CommentsMenuCommands. Select ( x => x. Key ). ToArray ( ), OnMenuCommand ) ; EnableCommentsMenu ( false ) ; // Get the DTE object EnvDTE = GetDTE ( ) ; // Get the comments options page CommentsOptionsPage = GetDialogPage<WutheringCommentsOptionsPage> ( ) ; XmlComments = CommentsOptionsPage. GetXmlDefinitions ( ) ; // Install event handlers EnvDTE. Events. WindowEvents. WindowActivated += new WindowActivatedEventHandler ( OnWindowActivated ) ; }