Hi everybody, thanks in advance for interest, help or other feedbacks.
How can use database table as source of data for diagram building?
I use LogicCirquit diagram from demo set as example.
Well, I get on display diagram from XML embedded file:
<LogicCircuit>
<Gate Key="4" Location="300 110" GateType="OneInThreeOut" Figure="Cylinder1" />
<Gate Key="2" Location="90 70" GateType="ThreeInOneOut" Figure="Cylinder1" />
</LogicCircuit>
I want to build diagram based on data from DB table like I posted below (It’s the same as XML)
Gate_Key | Key_Name | Loc_X | Loc_Y | Gate_Type | Figure |
Gate | 4 | 300 | 110 | OneInThreeOut | Cylinder1 |
Gate | 2 | 90 | 70 | ThreeInOneOut | Cylinder1 |
From LogicCircuit.xaml.cs I see that 2rows doing this with XML file:
String xml = ImasWpf.MainWindow.Instance.LoadText("LogicCircuit", xml);
model.Load<GateData, WireData>(XElement.Parse(xml), "Gate", "Wire");
How can I parse data from db dataset (or whatever else)?