Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8" ?>
- <Configuration version="1.2" createDate="2018-07-17T10:00:00">
- <AutoScale>1</Autoscale>
- <Threshold>2142</Threshold>
- <MinAuto>14</MinAuto>
- <MinMan>1</MinMan>
- <MaxMan>1</MaxMan>
- <BlueBackground>1</BlueBackground>
- <Contour>1</Contour>
- <Rotate>180</Rotate>
- <Flip>Vertical</Flip>
- </Configuration>
- using (var openFileDialogXML = new OpenFileDialog()){
- System.IO.Stream myStream = null;
- openFileDialogXML.InitialDirectory = @System.Environment.CurrentDirectory;
- openFileDialogXML.Filter = "xml files (*.xml)|*.xml|All files (*.*)|*.*";
- openFileDialogXML.FilterIndex = 1;
- openFileDialogXML.RestoreDirectory = true;
- DialogResult dr = openFileDialogXML.ShowDialog();
- if (dr == System.Windows.Forms.DialogResult.OK)
- {
- using (XmlReader reader = XmlReader.Create(openFileDialogXML.FileName))
- {
- reader.MoveToContent();
- var version = reader.GetAttribute("version");
- while (reader.Read())
- {
- if (reader.NodeType == XmlNodeType.Element)
- {
- switch (reader.Name)
- {
- case "AutoScale":
- //Get AutoScale value
- break;
- case "Threshold":
- break;
- case "MinAuto":
- break;
- case "MinMan":
- break;
- case "MaxMan":
- break;
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment