Example #1
0
        private void ToDo2()
        {
            var a = new SimpleXmlChecker(2);

            //list2.Items.Clear();
            if (String.IsNullOrEmpty(file2) || !File.Exists(file2))
            {
                MessageBox.Show("No file2 found");
                return;
            }
            String xml = File.ReadAllText(file2);

            xml_str2 = xml;
            if (!a.Check(xml))
            {
                MessageBox.Show("\"" + file2 + "+\" " + a.err_desc + "!\n" + a.detailed_err);
                return;
            }
            OneXmlNode node = new OneXmlNode(a.doc.Root);

            list2.ItemsSource = new BindingList <OneXmlNode> {
                node
            };
            list2_nodes = node;
            Compare(list1_nodes, list2_nodes);
        }
Example #2
0
        private void ToDo1()
        {
            var a = new SimpleXmlChecker(2);

            //list1.Items.Clear();
            b_changed = false;
            if (String.IsNullOrEmpty(file1) || !File.Exists(file1))
            {
                MessageBox.Show("No file found");
                return;
            }

            String xml = File.ReadAllText(file1);

            xml_str1 = xml;
            if (!a.Check(xml))
            {
                MessageBox.Show("\"" + file1 + "+\" " + a.err_desc + "!\n" + a.detailed_err);
                return;
            }

            OneXmlNode node = new OneXmlNode(a.doc.Root);

            node.IsChecked    = true;
            node.IsEnable     = false;
            list1.ItemsSource = new BindingList <OneXmlNode> {
                node
            };
            list1_nodes      = node;
            b_changed        = false;
            btn_f2.IsEnabled = true;
        }