Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        public void getValuesFromProfil(Profil source)
        {
            this.checkProfil();
            if (this.isXmlMode())
            {
                this.setup = source.setup.copyValues(this.setup);
            }

            if (this.isPmode())
            {
                this.name = source.getName();
            }
        }
Exemplo n.º 3
0
        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");
            }
        }