Exemplo n.º 1
0
        /// <summary>
        /// Handle the startup of the control
        /// </summary>
        private void InitializeControl()
        {
            // init to disabled
            ToggleToolbarButtonsEnabled(false);

            // set up some of the config info.
            var config = new ConfigurationInfo();

            config.ValidateCurrentTemplate();

            // now see if a configuration file was saved and is available.
            if (File.Exists(config.SettingsFileName))
            {
                config = config.LoadConfiguration(config.SettingsFileName);
            }
            else
            {
                config.SaveConfiguration(config.SettingsFileName);
            }

            // set up the properties grid with the config settings
            propertyGridConfig.SelectedObject = config;
        }