/// <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);
            }
        }
Beispiel #2
0
 /// <summary>
 /// Constructor for property page control.
 /// </summary>
 /// <param name="parentStartupPropertyPage">Owner property sheet page</param>
 public StartupPropertiesControl(StartupPropertyPage parentStartupPropertyPage)
 {
     // This call is required by the Windows.Forms Form Designer.
     InitializeComponent();
     startupPropertyPage = parentStartupPropertyPage;
 }
 /// <summary>
 /// Constructor for property page control.
 /// </summary>
 /// <param name="parentStartupPropertyPage">Owner property sheet page</param>
 public StartupPropertiesControl(StartupPropertyPage parentStartupPropertyPage)
 {
     // This call is required by the Windows.Forms Form Designer.
     InitializeComponent();
     startupPropertyPage = parentStartupPropertyPage;
 }
        /// <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);
            }
        }