private void UpdateRepository(IConnectionInfo cx)
        {
            cx.DatabaseInfo.Server = this.cboServer.Text.Trim();
            cx.DisplayName         = this.txtDisplayName.Text.Trim();
            XElement element = cx.DriverData.Element("AccountKey");

            if (element != null)
            {
                element.Remove();
            }
            if (this.txtKey.Text.Trim().Length > 0)
            {
                cx.DriverData.SetElementValue("AccountKey", cx.Encrypt(this.txtKey.Text.Trim()));
            }
            cx.Persist = this.chkRemember.Checked;
        }
Exemple #2
0
 void WithEncrypt(string elementName, string value)
 {
     driverData.SetElementValue(elementName, cxInfo.Encrypt(value));
 }
 private void UpdateRepository(IConnectionInfo cx)
 {
     cx.DatabaseInfo.Server = this.cboServer.Text.Trim();
     cx.DisplayName = this.txtDisplayName.Text.Trim();
     XElement element = cx.DriverData.Element("AccountKey");
     if (element != null)
     {
         element.Remove();
     }
     if (this.txtKey.Text.Trim().Length > 0)
     {
         cx.DriverData.SetElementValue("AccountKey", cx.Encrypt(this.txtKey.Text.Trim()));
     }
     cx.Persist = this.chkRemember.Checked;
 }