private void OnMarketChangedEvent(MarketUpdEventArgs eventArgs) { var gameStr = eventArgs.ChangetMarket.Player1.Name + " : " + eventArgs.ChangetMarket.Player2.Name; var isHaveElem = false; if (eventArgs.ChangetMarket.Player1.Name == null) { return; } for (var j = 0; j < Closed.Nodes.Count; j++) { if (Closed.Nodes[j].Text.Equals(gameStr)) { isHaveElem = true; } } if (!isHaveElem) { Closed.Nodes?.Add(new TreeNodeAdv(gameStr)); } }
private void OnMarketChangedEvent(MarketUpdEventArgs eventArgs) { var gameStr = eventArgs.ChangetMarket.Player1.Name + " : " + eventArgs.ChangetMarket.Player2.Name; var isHaveElem = false; if (eventArgs.ChangetMarket.Player1.Name == null) return; for (var j = 0; j < Closed.Nodes.Count; j++) { if (Closed.Nodes[j].Text.Equals(gameStr)) isHaveElem = true; } if (!isHaveElem) { Closed.Nodes?.Add(new TreeNodeAdv(gameStr)); } }