Ejemplo n.º 1
0
        private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
        {
            string        Sun       = cmbSunZenith.SelectedItem.ToString();
            string        longitude = cmbProfile.SelectedItem.ToString();
            List <string> list      = XmlOperate.getNodeValue(Sun, longitude);

            txtaVegetation.Text = list[0];
            txtbVegetation.Text = list[1];
            txtaSoil.Text       = list[2];
            txtbSoil.Text       = list[3];
        }
Ejemplo n.º 2
0
        private void button4_Click(object sender, EventArgs e)
        {
            string        Sun        = cmbSunZenith.SelectedItem.ToString();
            string        longitude  = cmbProfile.SelectedItem.ToString();
            List <string> list_veget = new List <string>();

            list_veget.Add(txtaVegetation.Text);
            list_veget.Add(txtbVegetation.Text);
            List <string> list_soil = new List <string>();

            list_soil.Add(txtaSoil.Text);
            list_soil.Add(txtbSoil.Text);
            try
            {
                XmlOperate.setNodeValue(Sun, longitude, list_veget, list_soil);
                MessageBox.Show("保存成功!");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }