合并最新

This commit is contained in:
2022-12-20 09:32:32 +08:00
parent 844e9f1488
commit 1abdaa9476
654 changed files with 73563 additions and 9746 deletions
+28 -21
View File
@@ -37,31 +37,38 @@ namespace FineUIPro.Web.Video
this.tvControlItem.Nodes.Add(rootNode);
string url = ConfigurationManager.AppSettings["Video_URL"];
List<string> urls = new List<string>();
string res = APIGetHttpService.Http(url + "api/v1/device/channeltree");
List<Dictionary<string, string>> jsonNvr = JsonConvert.DeserializeObject<List<Dictionary<string, string>>>(res);
foreach (Dictionary<string, string> nvr in jsonNvr)
if (!string.IsNullOrEmpty(url))
{
TreeNode newNode = new TreeNode();
newNode.NodeID = nvr["id"];
newNode.Text = nvr["customName"];
newNode.ToolTip = "项目";
newNode.Expanded = false;
rootNode.Nodes.Add(newNode);
string jsonCameras = APIGetHttpService.Http(url + "api/v1/device/channeltree?serial=" + nvr["serial"]);
var data = JsonConvert.DeserializeObject<List<Dictionary<string, string>>>(jsonCameras);
foreach (var video in data)
{
TreeNode tempNode = new TreeNode();
tempNode.NodeID = video["id"];
tempNode.Text = video["name"];
tempNode.ToolTip = "设备";
tempNode.EnableClickEvent = true;
List<string> urls = new List<string>();
string res = APIGetHttpService.Http(url + "api/v1/device/channeltree");
newNode.Nodes.Add(tempNode);
List<Dictionary<string, string>> jsonNvr = JsonConvert.DeserializeObject<List<Dictionary<string, string>>>(res);
foreach (Dictionary<string, string> nvr in jsonNvr)
{
TreeNode newNode = new TreeNode();
newNode.NodeID = nvr["id"];
newNode.Text = nvr["customName"];
newNode.ToolTip = "项目";
newNode.Expanded = false;
rootNode.Nodes.Add(newNode);
string jsonCameras = APIGetHttpService.Http(url + "api/v1/device/channeltree?serial=" + nvr["serial"]);
var data = JsonConvert.DeserializeObject<List<Dictionary<string, string>>>(jsonCameras);
foreach (var video in data)
{
TreeNode tempNode = new TreeNode();
tempNode.NodeID = video["id"];
tempNode.Text = video["name"];
tempNode.ToolTip = "设备";
tempNode.EnableClickEvent = true;
newNode.Nodes.Add(tempNode);
}
}
}
else {
Alert.ShowInParent("请配置视频服务器地址!", MessageBoxIcon.Warning);
}
}
}
#region