protected override void OnAddPropertyPages(PropertyPageCollection propertyPageCollection)
 {
     if (string.IsNullOrEmpty(this.CurrentPropertySheetTitle) == true)
     {
         AppPropertyPageManager propPageManager = new AppPropertyPageManager(this.DisplayName);
         propPageManager.AddPropertyPages(propertyPageCollection);
     }
     base.OnAddPropertyPages(propertyPageCollection);
 }
Beispiel #2
0
        protected override void OnAddPropertyPages(PropertyPageCollection propertyPageCollection)
        {
            // get application name from selected node
            string appName = this.SelectedNodes[0].DisplayName;

            switch (this.currentPropertyPageTitle)
            {
            case "Add Field":
                // create property page and attach event handlers
                AppFieldPropertyPage propPage = new AppFieldPropertyPage(appName);
                propPage.Saved += PropPage_Saved;
                // add the page to the collection
                propertyPageCollection.Add(new AppFieldPropertyPage(appName));
                break;

            default:
                // create instance of the AppPropertyPageManager
                AppPropertyPageManager propPageManager = new AppPropertyPageManager(appName);
                propPageManager.Saved += PropPageManager_Saved;
                // add property pages
                propPageManager.AddPropertyPages(propertyPageCollection);
                break;
            }
        }