private void LoadNode(PlanNode node) { // check if already loaded if (node.AddSubs) { return; } node.AddSubs = true; // go through downlinks OpLink[] downlinks = (from link in node.Link.Downlinks where node.Link.Confirmed.Contains(link.UserID) || Uplinks.Contains(link.UserID) select link).ToArray(); foreach (OpLink link in downlinks) { // if doesnt exist search for it if (!link.Trust.Loaded) { Trust.Research(link.UserID, ProjectID, false); continue; } Plans.Research(link.UserID); GuiUtils.InsertSubNode(node, CreateNode(link)); } }
private void ConnectRoom(ChatRoom room) { room.Members.LockReading(delegate() { foreach (ulong key in room.Members) { List <ClientInfo> clients = Core.Locations.GetClients(key); if (clients.Count == 0) { Core.Locations.Research(key); } else { foreach (ClientInfo info in clients) { Network.RudpControl.Connect(info.Data); } } if (Trust != null && Trust.GetTrust(key) == null) { Trust.Research(key, 0, false); } } }); }
private void LoadNode(LinkNode node) { // check if already loaded if (node.AddSubs) { return; } node.AddSubs = true; // go through downlinks foreach (OpLink link in node.Link.Downlinks) { if (!node.Link.IsLoopedTo(link)) { if (SearchOnline) { Core.Locations.Research(link.UserID); } // if doesnt exist search for it if (!link.Trust.Loaded) { Trust.Research(link.UserID, Project, false); continue; } //if(node.Link.IsLoopRoot) // node.Nodes.Insert(0, CreateNode(link)); //else GuiUtils.InsertSubNode(node, CreateNode(link)); } } }
private void GoalTree_SelectedItemChanged(object sender, EventArgs e) { if (GoalTree.SelectedNodes.Count == 0) { return; } GoalNode node = GoalTree.SelectedNodes[0] as GoalNode; if (node == null) { return; } Plans.Research(node.Goal.Person); Trust.Research(node.Goal.Person, View.ProjectID, false); UpdatePlanItems(node); View.SetDetails(node.Goal, null); }