public override void refreshCurNodeData(NodeData nCurData) { base.refreshCurNodeData(nCurData); bool isAllAdd = true; for (int nIdx = 0; nIdx < (int)eCardType.eCard_Robot_Max; ++nIdx) { if (vCardTypeBtn[nIdx] == null) { continue; } if ( nCurData.m_nValue == 0) { if (nIdx != (int)eCardType.eCard_YiDui && nIdx != (int)eCardType.eCard_TongHua && nIdx != (int)eCardType.eCard_ShunZi && nIdx != (int)eCardType.eCard_GaoPai ) { vCardTypeBtn[nIdx].Enabled = false; vCardTypeBtn[nIdx].Checked = false; continue; } } vCardTypeBtn[nIdx].Enabled = nCurData.isNodeValueAlreadyExist(nIdx) == false; vCardTypeBtn[nIdx].Checked = false; if (vCardTypeBtn[nIdx].Enabled) isAllAdd = false; } m_panel.enableAddNodeBtn = isAllAdd == false; m_descLabel.Text = string.Format("当前是{0},请选择配置的牌型", nCurData.desc); }
public override void refreshCurNodeData(NodeData nCurData) { base.refreshCurNodeData(nCurData); bool isAllAdd = true; for (int nIdx = 0; nIdx < 15; ++nIdx) { if (vCardFaceValue[nIdx] == null) { continue; } if (nIdx == 0) { if ( m_pCurNodeData.m_pParentNode.m_nValue != 3 ) { vCardFaceValue[nIdx].Enabled = false; vCardFaceValue[nIdx].Checked = false; continue; } } vCardFaceValue[nIdx].Enabled = nCurData.isNodeValueAlreadyExist(nIdx) == false; vCardFaceValue[nIdx].Checked = false; if (vCardFaceValue[nIdx].Enabled) isAllAdd = false; } m_panel.enableAddNodeBtn = isAllAdd == false; m_descLabel.Text = string.Format("当前是{0},\n牌型是{1} \n请选择配置牌面值", nCurData.m_pParentNode.desc, nCurData.desc); }
public override void refreshCurNodeData(NodeData nCurData) { base.refreshCurNodeData(nCurData); m_panel.enableAddNodeBtn = false; m_descLabel.Text = string.Format("当前是{0},\n最终牌型是{1},\n{2} ,\n", nCurData.m_pParentNode.m_pParentNode.m_pParentNode.m_pParentNode.desc,nCurData.m_pParentNode.m_pParentNode.m_pParentNode.desc, nCurData.m_pParentNode.desc); NodeBettimes ret = (NodeBettimes)nCurData; string strStrage = string.Format("当场上最大下注{0}倍盲注 \n 跟注概率{1}\n 过牌概率{2} \nALL In概率{3}\n 加注概率{4}\n 加注下限{5}倍盲注 \n加注上限{6}倍盲注", ret.m_nValue, ret.nFollowRate,ret.nPassRate,ret.nALLInRate,ret.nAddRate,ret.nAddLowLimit,ret.nAddTopLimit); m_descLabel.Text = m_descLabel.Text + strStrage; }
private TreeNode bindNodeDataToTreeNode(NodeData pdata) { TreeNode pNode = new TreeNode() ; pNode.Tag = pdata; pNode.Text = pdata.desc; foreach ( NodeData tdata in pdata.m_vChildNode.Values) { TreeNode chiNode = bindNodeDataToTreeNode(tdata); pNode.Nodes.Add(chiNode); } return pNode; }
public void removeChildNode(NodeData childNode) { foreach (int vkey in m_vChildNode.Keys) { if (vkey == childNode.m_nValue) { m_vChildNode.Remove(vkey); return; } } }
public NodeData addChildNode(NodeData childNode) { if (getValidChildNodeType() != childNode.nodeType) { Console.WriteLine("node type = {0} , value = {1} add child = {2}, value {3} type error ",nodeType,m_nValue,childNode.nodeType,childNode.m_nValue); return null; } if (m_vChildNode.ContainsKey(childNode.m_nValue)) { Console.WriteLine("node type = {0} , value = {1} add child = {2}, value {3} already add error ", nodeType, m_nValue, childNode.nodeType, childNode.m_nValue); return null; } m_vChildNode.Add(childNode.m_nValue, childNode); childNode.m_pParentNode = this; return childNode; }
public NodeData(eNodeType eType, int nValue) { m_eNodeType = eType; m_nValue = nValue; m_nString = null; m_vChildNode = new Dictionary<int,NodeData>() ; m_pParentNode = null; }
public override void refreshCurNodeData(NodeData nCurData) { base.refreshCurNodeData(nCurData); m_panel.enableAddNodeBtn = true; m_descLabel.Text = string.Format("当前是{0},\n最终牌型是{1},\n{2},\n请配置操作策略", nCurData.m_pParentNode.m_pParentNode.m_pParentNode.desc, nCurData.m_pParentNode.desc, nCurData.desc); }