public XmlSetup copyValues(XmlSetup target) { foreach (DictionaryEntry de in this.settings) { string keyname = de.Key.ToString(); string value = de.Value.ToString(); target.addSetting(keyname, value); } return(target); }
public void getValuesFromProfil(Profil source) { this.checkProfil(); if (this.isXmlMode()) { this.setup = source.setup.copyValues(this.setup); } if (this.isPmode()) { this.name = source.getName(); } }
private void button1_Click_1(object sender, EventArgs e) { if (openProfilXml.ShowDialog() == System.Windows.Forms.DialogResult.OK) { XmlSetup tmpSetup = new XmlSetup(); tmpSetup.setFullFilename(openProfilXml.FileName); tmpSetup.loadXml(); username.Text = tmpSetup.getValue("db_username"); password.Text = tmpSetup.getValue("db_password"); host.Text = tmpSetup.getValue("db_host"); schema.Text = tmpSetup.getValue("db_schema"); } }