public String GetSlotValue(Model.TrickerStarSlotSide side, int slot_index) { String res = ""; try { if (side == Model.TrickerStarSlotSide.INPUT) { var grid = C_INPUT_STACK.Children[slot_index] as Grid; var border = grid.Children[0] as Border; var textbox = border.Child as TextBox; res = textbox.Text; } if (side == Model.TrickerStarSlotSide.OUTPUT) { var grid = C_OUTPUT_STACK.Children[slot_index] as Grid; var border = grid.Children[0] as Border; var textbox = border.Child as TextBox; res = textbox.Text; } }catch (Exception e) { } return(res); }
public String TS_GetSlotValue(String NodeName, int SlotIndex, Model.TrickerStarSlotSide Side) { 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]; return(node_v.GetSlotValue(Side, SlotIndex)); }
public void SetSlotValue(Model.TrickerStarSlotSide side, int slot_index, String value) { if (side == Model.TrickerStarSlotSide.INPUT) { var grid = C_INPUT_STACK.Children[slot_index] as Grid; var border = grid.Children[0] as Border; var textbox = border.Child as TextBox; textbox.Text = value; } if (side == Model.TrickerStarSlotSide.OUTPUT) { var grid = C_OUTPUT_STACK.Children[slot_index] as Grid; var border = grid.Children[0] as Border; var textbox = border.Child as TextBox; textbox.Text = value; } }
public void TS_SetSlotValue(String NodeName, int SlotIndex, Model.TrickerStarSlotSide Side, String value) { if (value == null) { return; } 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_v.SetSlotValue(Side, SlotIndex, value); return; }
public void TS_AddSlot(String NodeName, Model.TrickerStarSlotType typename, String slotname, Model.TrickerStarSlotSide side) { 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]; if (side == TrickerStarSlotSide.INPUT) { node_v.AddInpusStack(typename, slotname); //node_v.AddInputLabel(typename,placeholder); node_m.InputSlot.Add(new TrickerStarNodeSoltDetail() { NodeName = node_v.m_NodeName, SlotIndex = node_m.InputSlot.Count, SlotSide = TrickerStarSlotSide.INPUT, SlotName = slotname, SlotType = typename, }); } if (side == TrickerStarSlotSide.OUTPUT) { node_v.AddOutpusStack(typename, slotname); // node_v.AddOutputLabel(typename,placeholder); node_m.OutputSlot.Add(new TrickerStarNodeSoltDetail() { NodeName = node_v.m_NodeName, SlotIndex = node_m.OutputSlot.Count, SlotSide = TrickerStarSlotSide.OUTPUT, SlotName = slotname, SlotType = typename, }); } m_FunctionNodeModels[NodeName] = node_m; m_FunctionNodeViews[NodeName] = node_v; }