/// <summary> /// OnAddPropertyPages virtual method is called to add property pages to a property sheet. /// </summary> /// <param name="propertyPageCollection">The property page collection.</param> protected override void OnAddPropertyPages(PropertyPageCollection propertyPageCollection) { if (SelectedNodes.Count == 0) { throw new Exception("there should be one selection"); } else { GeneralPropertyPage generalPropertyPage = new GeneralPropertyPage(); generalPropertyPage.Title = "General"; GeneralPropertiesControl generalPropertiesControl = new GeneralPropertiesControl(generalPropertyPage); generalPropertyPage.Control = generalPropertiesControl; propertyPageCollection.Add(generalPropertyPage); StartupPropertyPage startupPropertyPage = new StartupPropertyPage(); startupPropertyPage.Title = "Startup"; StartupPropertiesControl startupPropertiesControl = new StartupPropertiesControl(startupPropertyPage); startupPropertyPage.Control = startupPropertiesControl; propertyPageCollection.Add(startupPropertyPage); } }
/// <summary> /// OnAddPropertyPages virtual method is called to add property pages to a property sheet. /// </summary> /// <param name="propertyPageCollection">The property page collection.</param> protected override void OnAddPropertyPages(PropertyPageCollection propertyPageCollection) { if( SelectedNodes.Count == 0) { throw new Exception("there should be one selection"); } else { GeneralPropertyPage generalPropertyPage = new GeneralPropertyPage(); generalPropertyPage.Title = "General"; GeneralPropertiesControl generalPropertiesControl = new GeneralPropertiesControl(generalPropertyPage); generalPropertyPage.Control = generalPropertiesControl; propertyPageCollection.Add(generalPropertyPage); StartupPropertyPage startupPropertyPage = new StartupPropertyPage(); startupPropertyPage.Title = "Startup"; StartupPropertiesControl startupPropertiesControl = new StartupPropertiesControl(startupPropertyPage); startupPropertyPage.Control = startupPropertiesControl; propertyPageCollection.Add(startupPropertyPage); } }
/// <summary> /// Initialize notification for the page. Default implementation is empty. /// </summary> protected override void OnInitialize() { generalPropertiesControl = (GeneralPropertiesControl)Control; generalPropertiesControl.InitializePageControl(); }