public override bool SavePageConfig()
        {
            base.IsConfigValid = this.ValidatePageConfiguration();
            if (!base.IsConfigValid)
            {
                return(false);
            }

            this.SetSharedUserData();

            if (!this.RunAsAccountDistributionDialog())
            {
                return(false);
            }

            SBWSNamespaceDetailsConfig config = new SBWSNamespaceDetailsConfig();

            config.SBWSNamespaceName = this.sbwsNamespaceNameTextBox.Text.ToLowerInvariant();
            config.RunAsAccount      = this.runAsAccountList[this.runAsAccountComboBox.SelectedIndex].AccountStorageIdString;
            config.SBWSHostName      = this.sbwsHostNameBrowseTextBox.Text.ToLowerInvariant();
            config.TemplateIdString  = this.templateIdString;

            base.OutputConfigurationXml = XmlHelper.Serialize(config, true);
            return(true);
        }
        public override void LoadPageConfig()
        {
            if (base.IsCreationMode)
            {
                this.templateIdString = Guid.NewGuid().ToString("N");
            }
            else
            {
                if (string.IsNullOrEmpty(base.InputConfigurationXml))
                {
                    //Bid.TraceError("<ApplicationDetails.LoadPageConfig|ERR> input configuration xml is null\n");
                    return;
                }
                try
                {
                    Predicate <WindowsRunAsAccount> match = null;

                    SBWSNamespaceDetailsConfig pageConfig = XmlHelper.Deserialize(base.InputConfigurationXml, typeof(SBWSNamespaceDetailsConfig), true) as SBWSNamespaceDetailsConfig;
                    this.PopulateRunAsComboBox();

                    this.sbwsNamespaceNameTextBox.Text  = pageConfig.SBWSNamespaceName;
                    this.sbwsHostNameBrowseTextBox.Text = pageConfig.SBWSHostName;
                    this.templateIdString = pageConfig.TemplateIdString;

                    if (string.IsNullOrEmpty(pageConfig.RunAsAccount))
                    {
                        this.runAsAccountComboBox.SelectedIndex = -1;
                    }
                    else
                    {
                        if (match == null)
                        {
                            match = delegate(WindowsRunAsAccount windowsAccount)
                            {
                                return(windowsAccount.AccountStorageIdString.Equals(pageConfig.RunAsAccount));
                            };
                        }
                        this.runAsAccountComboBox.SelectedIndex = this.runAsAccountList.FindIndex(match);
                    }

                    this.SetSharedUserData();
                }
                catch (Exception exception)
                {
                    return;
                }
            }

            base.IsConfigValid = this.ValidatePageConfiguration();
            base.LoadPageConfig();
        }