private string fillArgument(TreeNode site) { string res = ""; foreach (var aux in site.getVizinhos()) { res += aux.Key + "%" + aux.Value+";"; } return res; }
private void fillVizinhos(TreeNode t) { string brokerName; string info; if (t.Parent != null)//root nao tem PAI { brokerName = node_broker[t.Parent].Name; info = node_broker[t.Parent].Site + "%" + node_broker[t.Parent].URL; t.getVizinhos().Add(brokerName, info); } foreach (var f in t.GetChildren()) { brokerName = node_broker[f].Name; info = node_broker[f].Site + "%" + node_broker[f].URL; t.getVizinhos().Add(brokerName, info); } }
private void fillVizinhos(TreeNode t) { string brokerName; string info; if (t.Parent != null)//root nao tem PAI { foreach(var b in node_broker[t.Parent]) { brokerName = b.Name; info = b.Site + "%" + b.URL; if (t.getVizinhos().ContainsKey(brokerName) == false) { t.getVizinhos().Add(brokerName, info); } } } foreach (var f in t.GetChildren()) { foreach (var b in node_broker[f]) { brokerName = b.Name; info = b.Site + "%" + b.URL; if (t.getVizinhos().ContainsKey(brokerName) == false) { t.getVizinhos().Add(brokerName, info); } } } }