public DataSourceWindow() { this.InheritanceBehavior = InheritanceBehavior.SkipAllNow; InitializeComponent(); // Attempt to read encrypted storage string xmlData = EncryptedStorage.ReadEncryptedString("C_DATA"); if (xmlData != null && xmlData != "") { ConnectionInfo = ConnectionParams.FromXML(xmlData); if (ConnectionInfo == null) { return; } // Populate text boxes directoryBox.Text = ConnectionInfo.Directory; } else { ConnectionInfo = null; } }
public DataSourceWindow() { this.InheritanceBehavior = InheritanceBehavior.SkipAllNow; InitializeComponent(); // Attempt to read encrypted storage string xmlData = EncryptedStorage.ReadEncryptedString("C_DATA"); if (xmlData != null && xmlData != "") { ConnectionInfo = ConnectionParams.FromXML(xmlData); if (ConnectionInfo == null) { return; } // Populate text boxes serverBox.Text = ConnectionInfo.Server; portBox.Text = ConnectionInfo.Port.ToString(); databaseBox.Text = ConnectionInfo.Database; userBox.Text = ConnectionInfo.Username; passwordBox.Password = ConnectionInfo.Password; directoryBox.Text = ConnectionInfo.Directory; // Correct source selection if (ConnectionInfo.Source == ConnectionSource.RSMLDirectory) { rsmlRadioButton.IsChecked = true; } } else { ConnectionInfo = null; } }