From e5f993f52e09eb46878baced83bb8492f147d41c Mon Sep 17 00:00:00 2001 From: WJC <wjc@hdlchina.com.cn> Date: 星期一, 04 十一月 2019 17:58:40 +0800 Subject: [PATCH] 2019-11-04-1 --- ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs | 123 ++++++++++++++++++++++++++++++++++------ 1 files changed, 103 insertions(+), 20 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs index e17fcde..1991435 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs @@ -28,8 +28,11 @@ dicCheck["寮�鍏�:寮�"] = false; dicCheck["寮�鍏�:鍏�"] = false; dicCheck["寮�鍏�:鍒囨崲"] = false; - dicCheck["浜害:璋冨ぇ"] = false; - dicCheck["浜害:璋冨皬"] = false; + dicCheck["浜害:鎸夌瓑绾ц皟澶�"] = false; + dicCheck["浜害:鎸夌瓑绾ц皟灏�"] = false; + dicCheck["浜害:鎸夌瓑绾у垏鎹�"] = false; + dicCheck["浜害:鎵撳紑"] = false; + dicCheck["浜害:鍏抽棴"] = false; dicCheck["浜害:鍒囨崲"] = false; dicCheck["绐楀笜:寮�"] = false; dicCheck["绐楀笜:鍏�"] = false; @@ -37,30 +40,60 @@ dicCheck["绐楀笜:涓婂崌鍋�"] = false; dicCheck["绐楀笜:涓嬮檷鍋�"] = false; + + List<int> result = null; //鑾峰彇绗竴绾у姛鑳� - var result = await key.GetPanelDeviceFunctionLevel1(); - if (result == null) + if (key.privateFuncFirstLevelList.Count == 0 || key.privateFuncFirstLevelList.Contains(256) == false) { - return null; + result = await key.GetPanelDeviceFunctionLevel1(); + if (result == null) + { + return null; + } + key.privateFuncFirstLevelList = result; + //闈㈡澘娌℃湁鎸夐敭绫� + if (result.Contains(256) == false) + { + return dicCheck; + } + } + else + { + result = key.privateFuncFirstLevelList; } - //闈㈡澘娌℃湁鎸夐敭绫� - if (result.Contains(256) == false) + if (key.privateFuncSecondLevelList.Count == 0 || key.privateFuncSecondLevelList.Contains(1) == false || key.privateFuncSecondLevelList.Contains(100) == false || key.privateFuncSecondLevelList.Contains(200) == false || key.privateFuncSecondLevelList.Contains(300) == false) { - return dicCheck; + //鑾峰彇绗簩绾у姛鑳� + result = await key.GetPanelDeviceFunctionLevel2(256); + if (result == null) + { + return null; + } + key.privateFuncSecondLevelList = result; + } + else + { + result = key.privateFuncSecondLevelList; } - //鑾峰彇绗簩绾у姛鑳� - result = await key.GetPanelDeviceFunctionLevel2(256); - if (result == null) - { - return null; - } //鐗规畩鍔熻兘 if (result.Contains(1) == true) { + List<int> result3 = null; //鑾峰彇绗笁绾у姛鑳� - var result3 = await key.GetPanelDeviceFunctionLevel3(256, 1); + if (key.privateFuncThirdLevelList.Count == 0 || key.privateFuncThirdLevelList.Contains(1) == false) + { + result3 = await key.GetPanelDeviceFunctionLevel3(256, 1); + foreach (var l3 in result3) + { + key.privateFuncThirdLevelList.Add(l3); + } + } + else + { + result3 = key.privateFuncThirdLevelList; + } if (result3 != null) { if (result3.Contains(1) == true) @@ -72,8 +105,21 @@ //鎸夐敭寮�鍏崇被 if (result.Contains(100) == true) { + + List<int> result3 = null; //鑾峰彇绗笁绾у姛鑳� - var result3 = await key.GetPanelDeviceFunctionLevel3(256, 100); + if (key.privateFuncThirdLevelList.Count == 0 || key.privateFuncThirdLevelList.Contains(100) == false || key.privateFuncThirdLevelList.Contains(101) == false || key.privateFuncThirdLevelList.Contains(102) == false) + { + result3 = await key.GetPanelDeviceFunctionLevel3(256, 100); + foreach (var l3 in result3) + { + key.privateFuncThirdLevelList.Add(l3); + } + } + else + { + result3 = key.privateFuncThirdLevelList; + } if (result3 != null) { if (result3.Contains(100) == true) @@ -93,19 +139,43 @@ //鎸夐敭璋冨厜绫� if (result.Contains(200) == true) { + List<int> result3 = null; //鑾峰彇绗笁绾у姛鑳� - var result3 = await key.GetPanelDeviceFunctionLevel3(256, 200); + if (key.privateFuncThirdLevelList.Count == 0 || key.privateFuncThirdLevelList.Contains(200) == false || key.privateFuncThirdLevelList.Contains(201) == false || key.privateFuncThirdLevelList.Contains(202) == false) + { + result3 = await key.GetPanelDeviceFunctionLevel3(256, 200); + foreach (var l3 in result3) + { + key.privateFuncThirdLevelList.Add(l3); + } + } + else + { + result3 = key.privateFuncThirdLevelList; + } if (result3 != null) { if (result3.Contains(200) == true) { - dicCheck["浜害:璋冨ぇ"] = true; + dicCheck["浜害:鎸夌瓑绾ц皟澶�"] = true; } if (result3.Contains(201) == true) { - dicCheck["浜害:璋冨皬"] = true; + dicCheck["浜害:鎸夌瓑绾ц皟灏�"] = true; } if (result3.Contains(202) == true) + { + dicCheck["浜害:鎸夌瓑绾у垏鎹�"] = true; + } + if (result3.Contains(203) == true) + { + dicCheck["浜害:鎵撳紑"] = true; + } + if (result3.Contains(204) == true) + { + dicCheck["浜害:鍏抽棴"] = true; + } + if (result3.Contains(205) == true) { dicCheck["浜害:鍒囨崲"] = true; } @@ -114,8 +184,21 @@ //绐楀笜绫� if (result.Contains(300) == true) { + List<int> result3 = null; //鑾峰彇绗笁绾у姛鑳� - var result3 = await key.GetPanelDeviceFunctionLevel3(256, 300); + if (key.privateFuncThirdLevelList.Count == 0 || (key.privateFuncThirdLevelList.Contains(300) == false && key.privateFuncThirdLevelList.Contains(301) == false && key.privateFuncThirdLevelList.Contains(302) == false && key.privateFuncThirdLevelList.Contains(303) == false && key.privateFuncThirdLevelList.Contains(304) == false)) + { + result3 = await key.GetPanelDeviceFunctionLevel3(256, 300); + foreach (var l3 in result3) + { + key.privateFuncThirdLevelList.Add(l3); + } + } + else + { + result3 = key.privateFuncThirdLevelList; + } + if (result3 != null) { if (result3.Contains(300) == true) -- Gitblit v1.8.0