From 6a7a5797af489455bbae8db46c30ec229fc2a020 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期二, 16 三月 2021 13:20:56 +0800
Subject: [PATCH] 2021-3-16-1
---
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddButton.cs | 11 +-
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControl.cs | 2
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs | 2
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/EditControl.cs | 2
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs | 119 +++++++++++++++--------
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/BrandList.cs | 2
.vs/HDL_APP_Project/xs/UserPrefs.xml | 40 +++----
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs | 2
HDL_ON/DAL/Mqtt/MqttClient.cs | 4
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/DeviceSet.cs | 2
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs | 76 +++++++++++----
11 files changed, 167 insertions(+), 95 deletions(-)
diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index 10f9f7d..337ed12 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,36 +1,34 @@
锘�<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default">
<MonoDevelop.Ide.ItemProperties.HDL-ON__iOS automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-001674E61438002E" />
- <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/DeviceSet.cs">
+ <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/DAL/Mqtt/MqttClient.cs">
<Files>
- <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs" Line="389" Column="22" />
- <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs" Line="250" Column="36" />
- <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs" Line="378" Column="17" />
- <File FileName="HDL_ON/DAL/Mqtt/MqttClient.cs" Line="293" Column="55" />
- <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControl.cs" Line="154" Column="72" />
- <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddButton.cs" Line="132" Column="75" />
- <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs" Line="267" Column="70" />
- <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/EditControl.cs" Line="14" Column="91" />
- <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Pir.cs" Line="59" Column="65" />
- <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Matching.cs" Line="215" Column="81" />
- <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs" Line="214" Column="1" />
- <File FileName="HDL_ON/Entity/Function/Function.cs" Line="637" Column="18" />
- <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/BrandList.cs" Line="220" Column="55" />
- <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/PirView.cs" Line="167" Column="20" />
- <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/DeviceSet.cs" Line="232" Column="70" />
- <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/ControlView.cs" Line="104" Column="45" />
+ <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs" Line="504" Column="10" />
+ <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControl.cs" Line="256" Column="72" />
+ <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs" Line="341" Column="41" />
+ <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs" Line="45" Column="19" />
+ <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs" Line="223" Column="28" />
+ <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs" Line="271" Column="71" />
+ <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Matching.cs" Line="233" Column="78" />
+ <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/EditControl.cs" Line="98" Column="15" />
+ <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/BrandList.cs" Line="264" Column="56" />
+ <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddButton.cs" Line="169" Column="26" />
+ <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/DeviceSet.cs" Line="14" Column="40" />
+ <File FileName="HDL_ON/DAL/Mqtt/MqttClient.cs" Line="304" Column="34" />
</Files>
<Pads>
<Pad Id="ProjectPad">
<State name="__root__">
<Node name="HDL_APP_Project" expanded="True">
<Node name="HDL_ON" expanded="True">
+ <Node name="DAL" expanded="True">
+ <Node name="Mqtt" expanded="True">
+ <Node name="MqttClient.cs" selected="True" />
+ </Node>
+ </Node>
<Node name="UI" expanded="True">
<Node name="UI2" expanded="True">
<Node name="4-PersonalCenter" expanded="True">
- <Node name="PirDevice" expanded="True">
- <Node name="View" expanded="True" />
- <Node name="DeviceSet.cs" selected="True" />
- </Node>
+ <Node name="PirDevice" expanded="True" />
</Node>
</Node>
</Node>
diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs
index 1074361..a3fe1fe 100644
--- a/HDL_ON/DAL/Mqtt/MqttClient.cs
+++ b/HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -298,7 +298,7 @@
{
var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey);
var revString = Encoding.UTF8.GetString(bytes);
- HDL_ON.UI.UI2.PersonalCenter.PirDevice.Method.mqttdata = revString;
+ HDL_ON.UI.UI2.PersonalCenter.PirDevice.Method.controldata = revString;
//ReceiveCheckGateway(ss);
//return;
}
@@ -307,7 +307,7 @@
{
var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey);
var revString = Encoding.UTF8.GetString(bytes);
- HDL_ON.UI.UI2.PersonalCenter.PirDevice.Method.mqttdata = revString;
+ HDL_ON.UI.UI2.PersonalCenter.PirDevice.Method.buttondata = revString;
//ReceiveCheckGateway(ss);
//return;
}
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddButton.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddButton.cs
index 559e88a..d22a2ca 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddButton.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddButton.cs
@@ -134,11 +134,12 @@
if (responsePackNew != null && responsePackNew.Code == "0" && responsePackNew.Data.ToString() != "")
{
Method method = new Method();
- var mqttdate = method.MqttDate(control.sid, 25);
- if (mqttdate !=null)
+ Method.buttondata = "";
+ var mqttdate = method.MqttDate("鎸夐敭", control.sid, 25);
+ if (mqttdate != null)
{
//浼戠湢鏄负鏄剧ず寮曞鐣岄潰
- // System.Threading.Thread.Sleep(3000);
+ // System.Threading.Thread.Sleep(3000);
//绉婚櫎娣诲姞鎸夐挳寮曞鐣岄潰
replication.RemView();
var buttonName = control.status.Find((c) => c.value == buttonObj.value);
@@ -173,12 +174,12 @@
new TipPopView().FlashingBox(Language.StringByID(StringId.tianjiashibai));
}
-
+
}
else
{
Method method = new Method();
- method.ErrorShow(responsePackNew);
+ method.ErrorShow(responsePackNew, "");
}
});
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControl.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControl.cs
index 76f446d..484c1fa 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControl.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControl.cs
@@ -253,7 +253,7 @@
}
else {
Method method = new Method();
- method.ErrorShow(responsePackNew);
+ method.ErrorShow(responsePackNew,"");
}
});
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs
index 3958f65..c31a4b1 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs
@@ -127,7 +127,7 @@
else
{
Method methodError = new Method();
- methodError.ErrorShow(responsePackNew);
+ methodError.ErrorShow(responsePackNew,"");
}
});
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/BrandList.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/BrandList.cs
index 0f62f69..3634608 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/BrandList.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/BrandList.cs
@@ -261,7 +261,7 @@
else
{
Method method = new Method();
- method.ErrorShow(responsePackNew);
+ method.ErrorShow(responsePackNew,"");
}
}, id, "鍝佺墝绾㈠鐮佸簱鍒楄〃");
}
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/DeviceSet.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/DeviceSet.cs
index d936aef..b7077cf 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/DeviceSet.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/DeviceSet.cs
@@ -258,7 +258,7 @@
else
{
Method method = new Method();
- method.ErrorShow(responsePackNew);
+ method.ErrorShow(responsePackNew,"");
}
});
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/EditControl.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/EditControl.cs
index 0325f8a..b5140c1 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/EditControl.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/EditControl.cs
@@ -84,7 +84,7 @@
else
{
Method methodError = new Method();
- methodError.ErrorShow(responsePackNew);
+ methodError.ErrorShow(responsePackNew,"");
}
});
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs
index d0745a8..8982e40 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs
@@ -84,7 +84,8 @@
if (responsePackNew != null && responsePackNew.Code == "0" && responsePackNew.Data.ToString() != "")
{
string sid = responsePackNew.Data.ToString();
- mqttdate = MqttDate(sid);
+ controldata = "";
+ mqttdate = MqttDate("閬ユ帶鍣�", sid);
if (mqttdate != null)
{
control.sid = sid;
@@ -336,37 +337,51 @@
/// <summary>
- /// MQTT涓婚鎺ㄩ�佷笅鏉ョ殑鏁版嵁
+ /// MQTT涓婚鎺ㄩ�佷笅鏉ョ殑閬ユ帶鍣ㄦ暟鎹�
/// </summary>
- public static string mqttdata = "";
+ public static string controldata = "";
+ /// <summary>
+ /// MQTT涓婚鎺ㄩ�佷笅鏉ユ寜閿殑鏁版嵁
+ /// </summary>
+ public static string buttondata = "";
/// <summary>
/// 鍒ゆ柇杩欎釜涓婚鏄惁鏄坊鍔犻仴鎺у櫒涓婚
/// </summary>
+ /// <param name="text">琛ㄧず涓嶅悓涓婚鏁版嵁</param>
/// <param name="sid">鍞竴鏍囪瘑</param>
/// <param name="timeValue">绛夊緟鏃堕棿鍊�</param>
/// <returns></returns>
- public Cloud MqttDate(string sid, int timeValue = 10)
+ public Cloud MqttDate(string text, string sid, int timeValue = 10)
{
Cloud cloud = null;
var dateTime = DateTime.Now;
while ((DateTime.Now - dateTime).TotalMilliseconds < timeValue * 1000)
{
- if (!string.IsNullOrEmpty(mqttdata))
+ string str = "";
+ if (str == "閬ユ帶鍣�")
+ {
+ str = controldata;
+ }
+ else if (str == "鎸夐敭")
+ {
+ str = buttondata;
+ }
+
+ if (!string.IsNullOrEmpty(controldata))
{
try
{
- var cloudjson = Newtonsoft.Json.JsonConvert.DeserializeObject<Cloud>(mqttdata);
+ var cloudjson = Newtonsoft.Json.JsonConvert.DeserializeObject<Cloud>(str);
for (int i = 0; i < cloudjson.objects.Count; i++)
{
var objects = cloudjson.objects[i];
if (sid == objects.sid)
{
cloud = cloudjson;
- mqttdata = "";
break;
}
}
- if (cloud!=null)
+ if (cloud != null)
{
break;
}
@@ -381,44 +396,63 @@
/// 閿欒鐮佹彁绀�
/// </summary>
/// <param name="responsePackNew"></param>
- /// <param name="str"></param>
- public void ErrorShow(ResponsePackNew responsePackNew=null, string str = "")
+ /// <param name="text">鑷畾涔夐敊璇枃鏈�</param>
+ /// <param name="popValue">寮规绫诲瀷锛�1=闂儊寮规锛�</param>
+ public void ErrorShow(ResponsePackNew responsePackNew, string text, int popValue = 1)
{
- if (str == "鍒犻櫎閬ユ帶鍣�")
+ string str = "";
+ if (text == "鍒犻櫎閬ユ帶鍣�")
{
- new Intelligence.Automation.LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.delFail));
- } else if (str == "璇诲彇绾㈠瀹濆垪琛ㄥけ璐�") {
-
- new Intelligence.Automation.LogicView.TipPopView().FlashingBox("璇诲彇绾㈠瀹濆垪琛ㄥけ璐�");
+ str = Language.StringByID(StringId.delFail);
+ }
+ else if (text == "璇诲彇绾㈠瀹濆垪琛ㄥけ璐�")
+ {
+ str = "璇诲彇绾㈠瀹濆垪琛ㄥけ璐�"; //Language.StringByID(StringId.delFail);
}
else
{
-
if (responsePackNew != null)
{
+
switch (responsePackNew.Code)
{
case "14005":
{
- new Intelligence.Automation.LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.gatewayNotOnline));
+ str = Language.StringByID(StringId.gatewayNotOnline);
+
}
break;
case "10807":
{
- //绾㈠瀹濅笅閬ユ帶鍣ㄨ秴杩囨渶澶�(10涓�)鏁伴噺闄愬埗
- new Intelligence.Automation.LogicView.TipPopView().FlashingBox("绾㈠瀹濅笅閬ユ帶鍣ㄨ秴杩囨渶澶�(10涓�)鏁伴噺闄愬埗");
+ str = "绾㈠瀹濅笅閬ユ帶鍣ㄨ秴杩囨渶澶�(10涓�)鏁伴噺闄愬埗";// Language.StringByID(StringId.gatewayNotOnline);
+
+
+ }
+ break;
+ case "2":
+ {
+ str = "绯荤粺缁存姢涓瓇璇风◢鍚庡啀璇晘";
}
break;
default:
{
- new Intelligence.Automation.LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.saveFail));
+ str ="鑾峰彇鏁版嵁澶辫触" ;// Language.StringByID(StringId.saveFail);
}
break;
}
}
-
+ }
+ switch (popValue)
+ {
+ case 1:
+ {
+ new Intelligence.Automation.LogicView.TipPopView().FlashingBox(str);
+ }
+ break;
+ case 2: { } break;
+ case 3: { } break;
}
}
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs
index b1e7b74..cfa6492 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs
@@ -78,7 +78,7 @@
};
pirDeviceFLayout.AddChidren(text2Btn);
- //
+ //绾㈠瀹濇暟閲�
Button numberDeviceBtn = new Button
{
Y = Application.GetRealHeight(137),
@@ -105,7 +105,7 @@
TextID = StringId.dangqianhongwaishebei,
};
pirDeviceFLayout.AddChidren(numberDeviceTextBtn);
- //
+ //鎵�鏈夌孩澶栧疂鐨勯仴鎺у櫒鏁伴噺
Button currDeviceNumberControlBtn = new Button
{
Y = Application.GetRealHeight(137),
@@ -135,7 +135,7 @@
///绾㈠瀹濈偣鍑讳簨浠�
FrameLayout clickFLayout = new FrameLayout();
pirDeviceFLayout.AddChidren(clickFLayout);
-
+
FrameLayout deviceListFLayout = new FrameLayout();
deviceListFLayout.Y = pirDeviceFLayout.Bottom + Application.GetRealHeight(12);
@@ -174,8 +174,15 @@
deviceListFLayout.AddChidren(deviceNameBtn);
if (Pir.pirDeviceList.Count != 0)
{
- deviceNameBtn.Text = Pir.pirDeviceList[0].name;
Pir.currPir = Pir.pirDeviceList[0];
+ int sum = 0;
+ for (int i = 0; i < Pir.pirDeviceList.Count; i++)
+ {
+ sum += Pir.pirDeviceList[i].FunctioList.Count;
+ }
+ deviceNameBtn.Text = Pir.pirDeviceList[0].name;
+ numberDeviceBtn.Text = Pir.pirDeviceList.Count.ToString() + Language.StringByID(StringId.ge);
+ currDeviceNumberControlBtn.Text = sum.ToString() + Language.StringByID(StringId.ge);
}
//涓嬫媺鍥炬爣
@@ -274,17 +281,28 @@
}
};
-
+ ///
clickFLayout.MouseUpEventHandler += (sender, e) =>
{
DeviceSet deviceSet = new DeviceSet();
MainPage.BasePageView.AddChidren(deviceSet);
- deviceSet.Show(() => {
+ deviceSet.Show(() =>
+ {
if (Pir.currPir != null)
{
deviceNameBtn.Text = Pir.currPir.name;
+ deviceNameBtn.Text = Pir.pirDeviceList[0].name;
+ numberDeviceBtn.Text = Pir.pirDeviceList.Count.ToString() + Language.StringByID(StringId.ge);
}
+ int sum = 0;
+ for (int i = 0; i < Pir.pirDeviceList.Count; i++)
+ {
+ sum += Pir.pirDeviceList[i].FunctioList.Count;
+ }
+ currDeviceNumberControlBtn.Text = sum.ToString() + Language.StringByID(StringId.ge);
+
+
});
MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
};
@@ -347,45 +365,61 @@
}
else
{
- var strings = GetTypeString(if_value).Split('-');
- var jobDeviceType = DeviceTypeList.Find((c) => c.deviceType == strings[0]);
- if (jobDeviceType == null)
+ if (DeviceTypeList.Count == 0)
{
- return;
- }
- GetBrandList(jobDeviceType.id, (brandList) =>
- {
- var brandSupportStrList = GetBrandSupport(if_value);
- var strList = new List<string>();
- for (int str = 0; str < brandList.Count; str++)
+ GetDeviceTypeList(true,() =>
{
- string s = brandList[str].brandName;
- var bool_if = brandSupportStrList.Find((c) => s.Contains(c));
- if (bool_if != null)
- {
- strList.Add(s);
- }
+ DeviceTypeViewClick(if_value);
- }
- Application.RunOnMainThread(() =>
- {
- BrandList brandObj = new BrandList();
- MainPage.BasePageView.AddChidren(brandObj);
- brandObj.Show(brandList, strList, strings[1]);
- MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
});
-
- });
-
+ }
+ else
+ {
+ DeviceTypeViewClick(if_value);
+ }
}
-
-
};
-
}
- GetDeviceTypeList();
+ GetDeviceTypeList(false,() => { });
}
+ /// <summary>
+ /// 璁惧杩涘叆涓嬩竴绾ф柟娉�
+ /// </summary>
+ /// <param name="if_value"></param>
+ void DeviceTypeViewClick(int if_value) {
+ var strings = GetTypeString(if_value).Split('-');
+ var jobDeviceType = DeviceTypeList.Find((c) => c.deviceType == strings[0]);
+ if (jobDeviceType == null)
+ {
+ return;
+ }
+ GetBrandList(jobDeviceType.id, (brandList) =>
+ {
+ var brandSupportStrList = GetBrandSupport(if_value);
+ var strList = new List<string>();
+ for (int str = 0; str < brandList.Count; str++)
+ {
+ string s = brandList[str].brandName;
+ var bool_if = brandSupportStrList.Find((c) => s.Contains(c));
+ if (bool_if != null)
+ {
+ strList.Add(s);
+ }
+
+ }
+ Application.RunOnMainThread(() =>
+ {
+ BrandList brandObj = new BrandList();
+ MainPage.BasePageView.AddChidren(brandObj);
+ brandObj.Show(brandList, strList, strings[1]);
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ });
+
+ });
+
+ }
+
/// <summary>
/// 鑾峰彇鍝佺墝鏀寔
/// </summary>
@@ -551,7 +585,9 @@
/// <summary>
/// 璇诲彇绾㈠璁惧绫诲瀷鍒楄〃
/// </summary>
- private void GetDeviceTypeList()
+ /// <param name="tag">鏍囪瘑瑕佷笉瑕佹彁绀猴紙true=鎻愮ず锛�</param>
+ /// <param name="action">鍥炶皟鍑芥暟</param>
+ private void GetDeviceTypeList(bool tag,Action action)
{
PirSend.GetDeviceTypesList(this, (responsePackNew) =>
{
@@ -574,11 +610,14 @@
}
}
}
+ action();
}
else
{
- Method method = new Method();
- method.ErrorShow(responsePackNew);
+ if (tag) {
+ Method method = new Method();
+ method.ErrorShow(responsePackNew,"");
+ }
}
}, "", "璁惧绫诲瀷鍒楄〃");
}
@@ -614,7 +653,7 @@
else
{
Method method = new Method();
- method.ErrorShow(responsePackNew);
+ method.ErrorShow(responsePackNew,"");
}
}, id, "鍝佺墝鍒楄〃");
}
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs
index 9ef310f..9d51783 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs
@@ -247,7 +247,7 @@
url = "/smart-footstone/app/ir/code/list";
jObject.Add("brandId", id);
}
- responsePackNew = RequestServerhomeId(jObject, url);
+ responsePackNew = RequestServerhomeId(jObject, url,5);
}
catch { }
finally
--
Gitblit v1.8.0