1
0
mirror of https://github.com/Ylianst/MeshCentralRouter synced 2025-12-10 21:33:46 +00:00

First working remote desktop viewer.

This commit is contained in:
Ylian Saint-Hilaire
2020-08-12 11:57:19 -07:00
parent 013a9841b7
commit 869c4ebd78
36 changed files with 24285 additions and 749 deletions

View File

@@ -331,6 +331,7 @@ namespace MeshCentralRouter
}
case "changenode":
{
if (nodes == null) return;
Dictionary<string, object> node = (Dictionary<string, object>)ev["node"];
string nodeid = (string)node["_id"];
if (nodes.ContainsKey(nodeid))
@@ -340,6 +341,11 @@ namespace MeshCentralRouter
{
NodeClass n = (NodeClass)nodes[nodeid];
n.name = (string)node["name"];
if (node.ContainsKey("agent"))
{
n.agentid = (int)((Dictionary<string, object>)node["agent"])["id"];
n.agentcaps = (int)((Dictionary<string, object>)node["agent"])["caps"];
}
if (node.ContainsKey("conn")) { n.conn = (int)node["conn"]; }
n.icon = (int)node["icon"];
if (node.ContainsKey("rdpport")) { n.rdpport = (int)node["rdpport"]; }
@@ -471,7 +477,13 @@ namespace MeshCentralRouter
{
NodeClass n = (NodeClass)nodes[nodeid];
n.nodeid = nodeid;
if (node.ContainsKey("agent")) { n.agentid = (int)((Dictionary<string, object>)node["agent"])["id"]; } else { n.agentid = -1; }
if (node.ContainsKey("agent")) {
n.agentid = (int)((Dictionary<string, object>)node["agent"])["id"];
n.agentcaps = (int)((Dictionary<string, object>)node["agent"])["caps"];
} else {
n.agentid = -1;
n.agentcaps = 0;
}
n.name = (string)node["name"];
n.meshid = meshid;
if (node.ContainsKey("rdpport")) { n.rdpport = (int)node["rdpport"]; } else { n.rdpport = 3389; }
@@ -502,7 +514,13 @@ namespace MeshCentralRouter
{
NodeClass n = new NodeClass();
n.nodeid = nodeid;
if (node.ContainsKey("agent")) { n.agentid = (int)((Dictionary<string, object>)node["agent"])["id"]; } else { n.agentid = -1; }
if (node.ContainsKey("agent")) {
n.agentid = (int)((Dictionary<string, object>)node["agent"])["id"];
n.agentcaps = (int)((Dictionary<string, object>)node["agent"])["caps"];
} else {
n.agentid = -1;
n.agentcaps = 0;
}
n.name = (string)node["name"];
n.meshid = meshid;
if (node.ContainsKey("rdpport")) { n.rdpport = (int)node["rdpport"]; } else { n.rdpport = 3389; }