|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Xml;
using System.Xml.Linq;
using ROMNET;
namespace LogicianDebuggerTestApp2012
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
SetupApplication();
}
private void SetupApplication()
{
try
{
ROMNode node = ROMNode.LoadXML("config.xml", null);
if (node == null)
return;
ROMNode childNode = new ROMNode("Child1");
childNode.SetAttribute("attr1", "A child attr");
node.AddChildROMObject(childNode);
ROMNode childNode2 = new ROMNode("Child2");
childNode2.SetAttribute("attr2", "A child attr");
node.AddChildROMObject(childNode2);
ROMNode childNode3 = new ROMNode("Child3");
childNode3.SetAttribute("attr3", "A child attr");
childNode3.SetAttribute("attr3", "attrSub1", "A sub child attr");
childNode3.SetAttribute("attr3", "attrSub2", "A 2nd sub child attr");
childNode2.AddChildROMObject(childNode3);
Debugger.RootNode = node;
Debugger.Update();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I have extensive experience developing software on both Linux and Windows in C++ and Python. I have also done a lot of work in the C#/.NET ecosystem. I currently work in the fields of robotics and machine learning, and also have a strong background in business automation/rules engines.