public override void LoadPageConfig() { if (base.IsCreationMode) { this.templateIdString = Guid.NewGuid().ToString("N"); } else { if (string.IsNullOrEmpty(base.InputConfigurationXml)) { return; } try { ProxyAgentConfig config = XmlHelper.Deserialize(base.InputConfigurationXml, typeof(ProxyAgentConfig), true) as ProxyAgentConfig; this.templateIdString = config.TemplateIdString; this.proxyAgentBrowseTextBox.Text = config.ProxyAgentComputerPrincipalName; this.SetSharedUserData(); } catch (ArgumentNullException exception) { return; } catch (InvalidOperationException exception2) { return; } } base.IsConfigValid = this.ValidatePageConfiguration(); base.LoadPageConfig(); }
public override bool SavePageConfig() { base.IsConfigValid = this.ValidatePageConfiguration(); if (!base.IsConfigValid) { return(false); } if (!this.RunAsAccountDistributionDialog()) { return(false); } ProxyAgentConfig config = new ProxyAgentConfig(); config.TemplateIdString = this.templateIdString; config.ProxyAgentComputerPrincipalName = this.proxyAgentBrowseTextBox.Text; base.OutputConfigurationXml = XmlHelper.Serialize(config, true); this.SetSharedUserData(); return(true); }