Exemplo n.º 1
0
 public NodeListViewModel(string windowName) : base(windowName)
 {
     foreach (var t in Frame.MainFrameData.GetOneElementAllContent("Parameters", windowName))
     {
         nodeList.Add(NodeViewModelBase.GetNodeViewModel(t));
     }
 }
Exemplo n.º 2
0
        void CreateNode(string elementType, Point p)
        {
            Console.WriteLine("CreateNode");

            string        TestNodeName = allNodes.Count.ToString();
            NodeModelBase nodeModel    = NodeModelBase.GetNodeModel(TestNodeName, elementType);
            DiagramItem   node         = NodeViewModelBase.GetNodeViewModel(nodeModel).GetCompleteNode();

            node.Width  = 100;
            node.Height = 50;
            node.SetValue(Canvas.LeftProperty, p.X - 50);
            node.SetValue(Canvas.TopProperty, p.Y - 25);
            AddNode(TestNodeName, node);
        }