コード例 #1
0
        public void TS_SetNodeTitle(String NodeName, String Title)
        {
            if (NodeName == null)
            {
                return;
            }
            if (!m_FunctionNodeModels.ContainsKey(NodeName))
            {
                return;
            }
            Model.TrickerStarFunctionNodeModel node_m = (Model.TrickerStarFunctionNodeModel)m_FunctionNodeModels[NodeName];
            TrickerStarFunctionNode            node_v = (TrickerStarFunctionNode)m_FunctionNodeViews[NodeName];

            node_m.NodeTitle = Title;
            node_v.SetNodeTitle(Title);
        }
コード例 #2
0
        public void TS_AddNode(String NodeName)
        {
            Model.TrickerStarFunctionNodeModel node_m = new Model.TrickerStarFunctionNodeModel();
            node_m.NodeName = NodeName;

            TrickerStarFunctionNode node_v = new TrickerStarFunctionNode();

            Canvas.SetZIndex(node_v, 999);
            node_v.m_NodeName  = NodeName;
            node_v.DataContext = node_m;
            node_v.SetNodeTitle(node_m.NodeName);
            C_MAIN_CANVAS.Children.Add(node_v);
            node_v.PointerPressed     += Node_PointerPressed;
            node_v.PointerReleased    += Node_PointerReleased;
            node_v.PointerMoved       += Node_PointerMoved;
            node_v.OnSlotClicked      += NODE_OnSlotClicked;
            node_v.OnNodeClose        += NODE_OnNodeClose;
            node_v.OnSlotValueChanged += NODE_OnSlotValueChanged;
            m_FunctionNodeViews.Add(NodeName, node_v);
            m_FunctionNodeModels.Add(NodeName, node_m);
        }