Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- XmlAttribute id = doc.CreateAttribute("id");
- id.Value = (i + 1).ToString();
- XmlAttribute type = doc.CreateAttribute("type");
- type.Value = comboBoxNO2.SelectedItem.ToString();
- XmlAttribute active = doc.CreateAttribute("active");
- active.Value = checkBoxNO2.Checked ? "true" : "false";
- newCondition.Attributes.Append(id);
- newCondition.Attributes.Append(type);
- newCondition.Attributes.Append(active);
- newCondition.InnerText = comboBoxNO2.SelectedItem.ToString() == "between" ? textBoxNO2.Text + "-" + textBoxNO2Max.Text : textBoxNO2.Text;
- parameter.AppendChild(newCondition);
- doc.Save("trigger-rules.xml");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement