From a7e8f9ea1b9d0b9c8e9c09a8101e65c59a475465 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期四, 09 七月 2020 17:07:31 +0800
Subject: [PATCH] 2020-07-09-01
---
ZigbeeApp/Home.Ios/AppDelegate.cs | 163 +++++++++++++++++-----
ZigbeeApp/GateWay.Droid/Assets/Language.ini | 4
ZigbeeApp/Shared/Phone/Device/Logic/Send.cs | 10 +
ZigbeeApp/Home.Ios/Resources/Language.ini | 6
ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml | 54 +++----
ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs | 49 +++---
ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide | 0
ZigbeeApp/Shared/Phone/Device/VideoIntercom/VideoMachine.cs | 105 ++++++++++++--
ZigbeeApp/Shared/R.cs | 5
9 files changed, 287 insertions(+), 109 deletions(-)
diff --git a/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml b/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml
index c9d11d3..e322e8d 100644
--- a/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml
+++ b/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml
@@ -1,44 +1,42 @@
锘�<Properties StartupConfiguration="{F1296E2C-3777-4385-85B2-DA77617E3178}|Default">
<MonoDevelop.Ide.ItemProperties.GateWay.Droid PreferredExecutionTarget="Android.5c86e4357d63" />
<MonoDevelop.Ide.ItemProperties.ShardLib PreferredExecutionTarget="Android.Android_Accelerated_Oreo" />
- <MonoDevelop.Ide.Workbench ActiveDocument="Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs">
+ <MonoDevelop.Ide.Workbench>
<Files>
- <File FileName="Shared/Phone/Device/VideoIntercom/VideoMachine.cs" Line="105" Column="19" IsPinned="True" />
- <File FileName="Shared/Common/CommonPage.cs" Line="288" Column="22" IsPinned="True" />
- <File FileName="Shared/Phone/Category/CategoryMainForm.cs" Line="1" Column="1" />
- <File FileName="Shared/Phone/Device/Logic/Send.cs" Line="1245" Column="34" />
- <File FileName="Shared/Phone/MainPage/HomeMainPageForm.cs" Line="21" Column="23" />
- <File FileName="Home.Ios/ESVideo.cs" Line="75" Column="23" />
- <File FileName="Shared/Phone/SmartSound/Util/MyHttpWebResponse.cs" />
- <File FileName="Shared/Phone/SmartSound/Forms/SmartSoundContentForDeviceChange.cs" />
- <File FileName="Home.Ios/AppDelegate.cs" Line="121" Column="129" />
- <File FileName="Shared/Phone/UserCenter/Abount/AbountForm.cs" Line="61" Column="10" />
- <File FileName="Shared/Phone/Device/Logic/Method.cs" Line="688" Column="45" />
- <File FileName="Shared/Phone/Device/Logic/CustomText.cs" Line="125" Column="23" />
- <File FileName="Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs" Line="70" Column="53" />
+ <File FileName="Shared/Phone/Device/VideoIntercom/VideoMachine.cs" Line="233" Column="23" IsPinned="True" />
+ <File FileName="Shared/Common/CommonPage.cs" IsPinned="True" />
+ <File FileName="Shared/Phone/Category/CategoryMainForm.cs" />
+ <File FileName="Shared/Phone/Device/Logic/Send.cs" />
+ <File FileName="Shared/Phone/MainPage/HomeMainPageForm.cs" />
+ <File FileName="Home.Ios/ESVideo.cs" Line="50" Column="66" />
+ <File FileName="Home.Ios/AppDelegate.cs" Line="237" Column="47" />
</Files>
<Pads>
<Pad Id="ProjectPad">
<State name="__root__">
<Node name="GateWay" expanded="True">
- <Node name="GateWay.Droid" expanded="True" />
<Node name="Home.IOS" expanded="True">
<Node name="Resources" expanded="True" />
+ <Node name="ESVideo.cs" selected="True" />
</Node>
<Node name="Shared" expanded="True">
<Node name="Common" expanded="True" />
<Node name="Phone" expanded="True">
<Node name="Category" expanded="True" />
+ <Node name="CommonForm" expanded="True" />
<Node name="Device" expanded="True">
<Node name="Logic" expanded="True" />
<Node name="VideoIntercom" expanded="True" />
</Node>
<Node name="MainPage" expanded="True" />
+ <Node name="SmartSound" expanded="True">
+ <Node name="Util" expanded="True" />
+ </Node>
<Node name="UserCenter" expanded="True">
+ <Node name="Abount" expanded="True" />
<Node name="CommonBase" expanded="True">
- <Node name="Logic" expanded="True">
- <Node name="HdlGatewayReceiveLogic.cs" selected="True" />
- </Node>
+ <Node name="Common" expanded="True" />
+ <Node name="Logic" expanded="True" />
</Node>
</Node>
</Node>
@@ -49,17 +47,17 @@
</Pads>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.ItemProperties.Home.IOS automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.913cb77b0eef11c9119c61a02bc00fec01bf67d6" />
- <MonoDevelop.Ide.DebuggingService.PinnedWatches />
- <MonoDevelop.Ide.Workspace ActiveConfiguration="Release|iPhone" />
+ <MonoDevelop.Ide.DebuggingService.PinnedWatches>
+ <Watch file="../../../Home.Ios/AppDelegate.cs" line="113" offsetX="-1" offsetY="-1" expression="application.ApplicationState" liveUpdate="False" />
+ <Watch file="../../../Home.Ios/AppDelegate.cs" line="113" offsetX="-1" offsetY="-1" expression="application.ApplicationState" liveUpdate="False" />
+ <Watch file="../../../Home.Ios/AppDelegate.cs" line="113" offsetX="-1" offsetY="-1" expression="application.ApplicationState" liveUpdate="False" />
+ <Watch file="../../../Home.Ios/AppDelegate.cs" line="113" offsetX="-1" offsetY="-1" expression="application.ApplicationState" liveUpdate="False" />
+ <Watch file="../../../Home.Ios/AppDelegate.cs" line="104" offsetX="-1" offsetY="-1" expression="application.ApplicationState" liveUpdate="False" />
+ <Watch file="../../../Home.Ios/AppDelegate.cs" line="113" offsetX="-1" offsetY="-1" expression="application.ApplicationState" liveUpdate="False" />
+ </MonoDevelop.Ide.DebuggingService.PinnedWatches>
+ <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" />
<MonoDevelop.Ide.DebuggingService.Breakpoints>
- <BreakpointStore>
- <Breakpoint file="/Users/hdl/Desktop/wjc/HomeApp/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs" relfile="Shared/Phone/Device/Logic/Send.cs" line="1265" column="1" />
- <Breakpoint file="/Users/hdl/Desktop/wjc/HomeApp/ZigbeeApp/Home.Ios/AppDelegate.cs" relfile="Home.Ios/AppDelegate.cs" line="91" column="1" />
- <Breakpoint file="/Users/hdl/Desktop/wjc/HomeApp/ZigbeeApp/Home.Ios/AppDelegate.cs" relfile="Home.Ios/AppDelegate.cs" line="27" column="1" />
- <Breakpoint file="/Users/hdl/Desktop/wjc/HomeApp/ZigbeeApp/Home.Ios/AppDelegate.cs" relfile="Home.Ios/AppDelegate.cs" line="98" column="1" />
- <Breakpoint file="/Users/hdl/Desktop/wjc/HomeApp/ZigbeeApp/Home.Ios/AppDelegate.cs" relfile="Home.Ios/AppDelegate.cs" line="37" column="1" />
- <Breakpoint file="/Users/hdl/Desktop/wjc/HomeApp/ZigbeeApp/Home.Ios/AppDelegate.cs" relfile="Home.Ios/AppDelegate.cs" line="89" column="1" />
- </BreakpointStore>
+ <BreakpointStore />
</MonoDevelop.Ide.DebuggingService.Breakpoints>
<MultiItemStartupConfigurations />
</Properties>
\ No newline at end of file
diff --git a/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide b/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide
index 81fbdef..19f7105 100644
--- a/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide
+++ b/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Language.ini b/ZigbeeApp/GateWay.Droid/Assets/Language.ini
index 98f8d16..26886c0 100755
--- a/ZigbeeApp/GateWay.Droid/Assets/Language.ini
+++ b/ZigbeeApp/GateWay.Droid/Assets/Language.ini
@@ -617,6 +617,10 @@
5411=鏆梴\r\n} 0lux
5412=浜畕\r\n} 100lux
5413=鍦ㄥ鍐呮潯浠朵笅,榛戞殫鐓у害鍊肩害涓�0.02lux,榛勬槒鐓у害鍊納\r\n}绾︿负10lux,闃村ぉ鐓у害鍊肩害涓�5~50lux,璇锋牴鎹疄闄厈\r\n}闇�瑕佽繘琛岃皟鑺�
+5414=鍙瀵硅
+5415=鏍�
+5416=鍗曞厓
+5417=瀹ゅ鏈�
diff --git a/ZigbeeApp/Home.Ios/AppDelegate.cs b/ZigbeeApp/Home.Ios/AppDelegate.cs
index 0e8b0ca..ee2740e 100644
--- a/ZigbeeApp/Home.Ios/AppDelegate.cs
+++ b/ZigbeeApp/Home.Ios/AppDelegate.cs
@@ -23,6 +23,7 @@
internal static UINavigationController rootViewController;
+
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
Shared.Application.IsGpsEnable = false;
@@ -36,7 +37,7 @@
Window.MakeKeyAndVisible();
Shared.IOS.TBL.WXApi.RegisterApp("wx2ec8f53f6fa36e82", "https://hdlcontrol.com/ZigbeeApp/");
-
+ Console.WriteLine("FinishedLaunching");
DeviceTokenAction += (deviceToken) =>
{
Shared.Common.Config.Instance.RegistrationID = deviceToken;
@@ -53,26 +54,42 @@
NSString key_hiddenJson = new NSString("HiddenJson");
if (userInfo.ContainsKey(key_hiddenJson))
{
- NSDictionary hiddenJsonDic = userInfo["HiddenJson"] as NSDictionary;
- if (hiddenJsonDic != null)
+ var hiddenJson = userInfo["HiddenJson"].ToString();
+ if (!string.IsNullOrEmpty(hiddenJson))
{
- NSString key_Offline = new NSString("Offline");
- if (hiddenJsonDic.ContainsKey(key_Offline))
+ if (hiddenJson.Contains("cmtID"))
{
- string signOut = hiddenJsonDic["Offline"].ToString();
+
+ ///鐩墠鏍规嵁杩欎釜鍒ゆ柇鏄惁鏄彲瑙嗗璁叉暟鎹�
+ // VideoMethod(hiddenJson);
+ }
+ else
+ {
- if (signOut == "0")
+ NSDictionary hiddenJsonDic = userInfo["HiddenJson"] as NSDictionary;
+ if (hiddenJsonDic != null)
{
- //涓嶄笅绾�
- }
- else
- {
- //鏍囪涓嬬嚎
- haveToSignOut = true;
+ NSString key_Offline = new NSString("Offline");
+ if (hiddenJsonDic.ContainsKey(key_Offline))
+ {
+ string signOut = hiddenJsonDic["Offline"].ToString();
+
+ if (signOut == "0")
+ {
+ //涓嶄笅绾�
+ }
+ else
+ {
+ //鏍囪涓嬬嚎
+ haveToSignOut = true;
+ }
+ }
+
}
}
-
}
+
+
}
}
@@ -89,6 +106,7 @@
}
public override void DidReceiveRemoteNotification(UIApplication application, NSDictionary userInfo, Action<UIBackgroundFetchResult> completionHandler)
{
+ Console.WriteLine("DidReceiveRemoteNotification");
if (userInfo == null)
{
return;
@@ -100,25 +118,41 @@
NSString key_hiddenJson = new NSString("HiddenJson");
if (userInfo.ContainsKey(key_hiddenJson))
{
- NSDictionary hiddenJsonDic = userInfo["HiddenJson"] as NSDictionary;
- if (hiddenJsonDic == null)
+ var hiddenJson = userInfo["HiddenJson"].ToString();
+ if (string.IsNullOrEmpty(hiddenJson))
{
return;
}
- NSString key_Offline = new NSString("Offline");
- if (hiddenJsonDic.ContainsKey(key_Offline))
- {
- string signOut = hiddenJsonDic["Offline"].ToString();
- if (signOut == "0")
+ if (hiddenJson.Contains("cmtID"))
+ {
+
+ ///鐩墠鏍规嵁杩欎釜鍒ゆ柇鏄惁鏄彲瑙嗗璁叉暟鎹�
+ VideoMethod(hiddenJson);
+ }
+ else
+ {
+
+ NSDictionary hiddenJsonDic = userInfo["HiddenJson"] as NSDictionary;
+ if (hiddenJsonDic == null)
{
- //涓嶄笅绾�
+ return;
}
- else
+ NSString key_Offline = new NSString("Offline");
+ if (hiddenJsonDic.ContainsKey(key_Offline))
{
- //寮哄埗涓嬬嚎
- CommonPage.Instance.SingOut();
- CommonPage.Instance.ShowErrorInfoAlert(Shared.R.MyInternationalizationString.uHadBeenLoginAndOffLine);
+ string signOut = hiddenJsonDic["Offline"].ToString();
+
+ if (signOut == "0")
+ {
+ //涓嶄笅绾�
+ }
+ else
+ {
+ //寮哄埗涓嬬嚎
+ CommonPage.Instance.SingOut();
+ CommonPage.Instance.ShowErrorInfoAlert(Shared.R.MyInternationalizationString.uHadBeenLoginAndOffLine);
+ }
}
}
}
@@ -128,24 +162,39 @@
NSString key_hiddenJson = new NSString("HiddenJson");
if (userInfo.ContainsKey(key_hiddenJson))
{
- NSDictionary hiddenJsonDic = userInfo["HiddenJson"] as NSDictionary;
- if (hiddenJsonDic == null)
- {
+
+ var hiddenJson = userInfo["HiddenJson"].ToString();
+ if (string.IsNullOrEmpty(hiddenJson)) {
return;
}
- NSString key_Offline = new NSString("Offline");
- if (hiddenJsonDic.ContainsKey(key_Offline))
- {
- string signOut = hiddenJsonDic["Offline"].ToString();
- if (signOut == "0")
+ if (hiddenJson.Contains("cmtID"))
+ {
+ ///鐩墠鏍规嵁杩欎釜鍒ゆ柇鏄惁鏄彲瑙嗗璁叉暟鎹�
+ VideoMethod(hiddenJson);
+ }
+ else
+ {
+
+ NSDictionary hiddenJsonDic = userInfo["HiddenJson"] as NSDictionary;
+ if (hiddenJsonDic == null)
{
- //涓嶄笅绾�
+ return;
}
- else
+ NSString key_Offline = new NSString("Offline");
+ if (hiddenJsonDic.ContainsKey(key_Offline))
{
- //鏍囪涓嬬嚎
- haveToSignOut = true;
+ string signOut = hiddenJsonDic["Offline"].ToString();
+
+ if (signOut == "0")
+ {
+ //涓嶄笅绾�
+ }
+ else
+ {
+ //鏍囪涓嬬嚎
+ haveToSignOut = true;
+ }
}
}
}
@@ -153,6 +202,44 @@
}
completionHandler(UIBackgroundFetchResult.NewData);
}
+ /// <summary>
+ /// ios閫氱煡鏍忕偣鍑绘墦寮�鍙瀵硅鐨勬柟娉�
+ /// </summary>
+ /// <param name="hiddenJson">浜戠鎺ㄨ繃鏉ョ殑鏁版嵁</param>
+ private void VideoMethod(string hiddenJson)
+ {
+
+ var json = Newtonsoft.Json.Linq.JObject.Parse(hiddenJson);
+ if (json == null)
+ {
+ return;
+ }
+ GateWay.Ios.ESVideoInfo eSVideoInfo = new GateWay.Ios.ESVideoInfo();
+ if (json["uuid"].ToString().Contains(","))
+ {
+ var uuid = json["uuid"].ToString().Split(',');
+ eSVideoInfo.ESVideoUUID = uuid[0];
+ }
+ else
+ {
+ eSVideoInfo.ESVideoUUID = json["uuid"].ToString();
+ }
+
+ eSVideoInfo.DeviceName = Language.StringByID(Shared.R.MyInternationalizationString.theOutdoorUnit);
+ eSVideoInfo.ESRoomID = int.Parse(json["roomno"].ToString());
+ if (!string.IsNullOrEmpty(json["unitno"].ToString()))
+ {
+ string str = json["unitno"].ToString();
+ string str1 = str.Substring(0, 2).TrimStart('0');
+ string str2 = str.Substring(2, 2).TrimStart('0');
+ eSVideoInfo.RoomName = str1 + Language.StringByID(Shared.R.MyInternationalizationString.dong) + str2 + Language.StringByID(Shared.R.MyInternationalizationString.unit);
+ }
+ GateWay.Ios.ESVideo.ShowESvideoVideoIntercom(eSVideoInfo);
+
+
+ //var url = "https://global.hdlcontrol.com/HangZhouHdlCloudApi/VideoIntercom/Answer";
+ //var dd=await Shared.Phone.Device.Logic.Send.HttpWebRequest(url, json.ToString(), "POST", 3, true);
+ }
public override void ReceivedRemoteNotification(UIApplication application, NSDictionary userInfo)
{
diff --git a/ZigbeeApp/Home.Ios/Resources/Language.ini b/ZigbeeApp/Home.Ios/Resources/Language.ini
index 8008022..fb21fce 100755
--- a/ZigbeeApp/Home.Ios/Resources/Language.ini
+++ b/ZigbeeApp/Home.Ios/Resources/Language.ini
@@ -617,8 +617,10 @@
5411=鏆梴\r\n} 0lux
5412=浜畕\r\n} 100lux
5413=鍦ㄥ鍐呮潯浠朵笅,榛戞殫鐓у害鍊肩害涓�0.02lux,榛勬槒鐓у害鍊納\r\n}绾︿负10lux,闃村ぉ鐓у害鍊肩害涓�5~50lux,璇锋牴鎹疄闄厈\r\n}闇�瑕佽繘琛岃皟鑺�
-
-
+5414=鍙瀵硅
+5415=鏍�
+5416=鍗曞厓
+5417=瀹ゅ鏈�
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
old mode 100755
new mode 100644
index da81d33..35b7328
--- a/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
@@ -1236,12 +1236,16 @@
/// <param name="method">璇锋眰鏂瑰紡涓篜OST/GET</param>
/// <param name="second">瓒呮椂鏃堕棿</param>
/// <returns></returns>
- public static async System.Threading.Tasks.Task<string> HttpWebRequest(string getUrl, string str, string method, int second = 3)
+ public static async System.Threading.Tasks.Task<string> HttpWebRequest(string getUrl, string str, string method, int second = 3, bool _bool = false)
{
HttpWebRequest request = WebRequest.Create(getUrl) as HttpWebRequest; //鍒涘缓璇锋眰
request.Method = method; //璇锋眰鏂瑰紡涓篜OST/GET
- request.ContentType = "application/json";
+ request.ContentType = "application/json";
request.Timeout = second * 1000;//瓒呮椂鏃堕棿
+ if (_bool) {
+ //鐢ㄤ簬楂樿儨鍙瀵硅鎺ュ彛
+ request.Headers.Add("Authorization", Config.Instance.Token);
+ }
if (method == "POST")
{
byte[] jsonbyte = System.Text.Encoding.UTF8.GetBytes(str);
@@ -1360,6 +1364,6 @@
deviceConditionsInfo.Add(Key, Value);
}
-
+
}
}
diff --git a/ZigbeeApp/Shared/Phone/Device/VideoIntercom/VideoMachine.cs b/ZigbeeApp/Shared/Phone/Device/VideoIntercom/VideoMachine.cs
index a00c9dd..f3487e6 100644
--- a/ZigbeeApp/Shared/Phone/Device/VideoIntercom/VideoMachine.cs
+++ b/ZigbeeApp/Shared/Phone/Device/VideoIntercom/VideoMachine.cs
@@ -4,8 +4,6 @@
using System.Collections.Generic;
using Shared.Phone.Device.Logic;
-
-
namespace Shared.Phone.Device.VideoIntercom
{
public class VideoMachine : FrameLayout
@@ -13,15 +11,11 @@
public VideoMachine()
{
}
- public async void Show()
+ public void Show(List<VideoCalss> videoInfosLists)
{
-
- var videoInfosLists = await GetVideoInfoList();
-
TopView view = new TopView();
this.AddChidren(view.TopRowView());
- //view.toptitleNameBtn.TextID = R.MyInternationalizationString.selection;
- view.toptitleNameBtn.Text = "鍙瀵硅";
+ view.toptitleNameBtn.TextID = R.MyInternationalizationString.videoIntercom;
view.clickBtn.MouseDownEventHandler += (sender, e) => { RemoveFromParent(); };
var middle = new VerticalRefreshLayout
@@ -65,7 +59,7 @@
var name1Btn = new Button
{
- Text = "2,2,0801",
+ Text = videoInfos.RoomName,
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
TextSize = 12,
@@ -118,13 +112,66 @@
}
}
+ public async static void Video(FrameLayout topFrameLayout)
+ {
+ var jobject = new JObject();
+ jobject.Add("RequestVersion", CommonPage.RequestVersion);
+ jobject.Add("RequestSource", "0");
+ jobject.Add("HomeID", Config.Instance.HomeId);
+ var url = "https://developer.hdlcontrol.com/ProposedProductionApi/VideoIntercom/CheckBindRecord";
+ var str = await Send.HttpWebRequest(url, jobject.ToString(), "POST", 3, true);
+ if (!string.IsNullOrEmpty(str))
+ {
+ try
+ {
+ var json = JObject.Parse(str);
+ if (json != null)
+ {
+ var stateCode = json["StateCode"].ToString();
+ //鍙瀵硅蹇嵎鏂瑰紡
+ var videoIntercomBtn = new Button();
+ videoIntercomBtn.Gravity = Gravity.CenterVertical;
+ videoIntercomBtn.UnSelectedImagePath = "Item/videoIntercom.png";
+ videoIntercomBtn.Width = Application.GetMinRealAverage(69);
+ videoIntercomBtn.Height = Application.GetMinRealAverage(69);
+ List<VideoCalss> videoList= new List<VideoCalss>();
+ if (stateCode == "Success")
+ {//鍒ゆ柇杩欎釜璐﹀彿鏄惁缁戝畾;
+ topFrameLayout.AddChidren(videoIntercomBtn);
+ CloudsVideo cloudsVideo = Newtonsoft.Json.JsonConvert.DeserializeObject<CloudsVideo>(json["ResponseData"].ToString());
+ videoList = await GetVideoInfoList(cloudsVideo);
+ }
+ if (UserCenter.UserCenterResourse.ResidenceOption.SafetyShortcut)
+ {
+ videoIntercomBtn.X = Application.GetRealWidth(746 + 10);
+ }
+ else
+ {
+ videoIntercomBtn.X = Application.GetRealWidth(850 + 10);
+ }
+ videoIntercomBtn.MouseUpEventHandler += (sender, e) =>
+ {
- async System.Threading.Tasks.Task<List<VideoCalss>> GetVideoInfoList()
+ var videoMachine = new Device.VideoIntercom.VideoMachine();
+ UserView.HomePage.Instance.AddChidren(videoMachine);
+ UserView.HomePage.Instance.PageIndex += 1;
+ videoMachine.Show(videoList);
+
+ };
+ }
+ }
+ catch { }
+ }
+
+
+
+ }
+ static async System.Threading.Tasks.Task<List<VideoCalss>> GetVideoInfoList(CloudsVideo clouds)
{
List<VideoCalss> eSVideoInfosList = new List<VideoCalss>();
var jobject = new JObject();
- jobject.Add("cmtID", "10006");
- jobject.Add("unitno", "0801");
+ jobject.Add("cmtID", clouds.FLCommunityID);
+ jobject.Add("unitno", clouds.FLBuildingID);
jobject.Add("method", "getUUIDList");
var url = " http://112.74.164.111:180/api.php/Device/getmonitorUUID";
var str = await Send.HttpWebRequest(url, jobject.ToString(), "POST");
@@ -149,6 +196,10 @@
foreach (var videoInfo in list)
{
VideoCalss eSVideoInfo = new VideoCalss();
+ eSVideoInfo.ESRoomID = int.Parse(clouds.FLRoomID);
+ string str1 = clouds.FLBuildingID.Substring(0, 2).TrimStart('0');
+ string str2 = clouds.FLBuildingID.Substring(2, 2).TrimStart('0');
+ eSVideoInfo.RoomName = str1 +Language.StringByID( R.MyInternationalizationString.dong) + str2 + Language.StringByID(R.MyInternationalizationString.unit);
eSVideoInfo.DeviceName = videoInfo["aliasName"];
if (videoInfo["uuid"].Contains(","))
{
@@ -163,10 +214,8 @@
}
return eSVideoInfosList;
}
-
}
-
- class VideoCalss
+ public class VideoCalss
{
/// <summary>
/// 瀹ゅ鏈虹殑UUID
@@ -190,4 +239,30 @@
public string RoomName = string.Empty;
}
+ public class CloudsVideo
+ {
+ /// <summary>
+ /// 鏍嬫ゼ鍗曞厓鍙�
+ /// </summary>
+ public string FLBuildingID = string.Empty;
+ /// <summary>
+ /// 閭f爧妤肩殑鍚嶇О
+ /// </summary>
+ public string FLBuildingName = string.Empty;
+ /// <summary>
+ /// 灏忓尯ID
+ /// </summary>
+ public string FLCommunityID = string.Empty;
+ /// <summary>
+ /// 鎴块棿ID
+ /// </summary>
+ public string FLRoomID = string.Empty;
+ /// <summary>
+ /// 浣忓畢ID
+ /// </summary>
+ public string HomeID = string.Empty;
+
+ public string FLSecretKey = string.Empty;
+
+ }
}
diff --git a/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs b/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs
index 1573600..717fe41 100644
--- a/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs
@@ -89,7 +89,10 @@
/// 鍒濆鍖栧ご閮ㄦ帶浠�
/// </summary>
private void InitTopFrameLayoutControl()
- {
+ {
+
+
+
//澶撮儴瀹瑰櫒
base.topFrameLayout = new FrameLayout();
topFrameLayout.Y = Application.GetRealHeight(60);
@@ -132,29 +135,29 @@
}
//鍙瀵硅蹇嵎鏂瑰紡
- var videoIntercomBtn = new Button();
- videoIntercomBtn.Gravity = Gravity.CenterVertical;
- videoIntercomBtn.UnSelectedImagePath = "Item/videoIntercom.png";
- videoIntercomBtn.Width = Application.GetMinRealAverage(69);
- videoIntercomBtn.Height = Application.GetMinRealAverage(69);
- topFrameLayout.AddChidren(videoIntercomBtn);
- if (UserCenterResourse.ResidenceOption.SafetyShortcut)
- {
- videoIntercomBtn.X = Application.GetRealWidth(746+10);
- }
- else
- {
- videoIntercomBtn.X = Application.GetRealWidth(850+10);
- }
- videoIntercomBtn.MouseUpEventHandler += (sender, e) =>
- {
+ Shared.Phone.Device.VideoIntercom.VideoMachine.Video(topFrameLayout);
- var videoMachine = new Device.VideoIntercom.VideoMachine();
- UserView.HomePage.Instance.AddChidren(videoMachine);
- UserView.HomePage.Instance.PageIndex += 1;
- videoMachine.Show();
-
- };
+ //var videoIntercomBtn = new Button();
+ //videoIntercomBtn.Gravity = Gravity.CenterVertical;
+ //videoIntercomBtn.UnSelectedImagePath = "Item/videoIntercom.png";
+ //videoIntercomBtn.Width = Application.GetMinRealAverage(69);
+ //videoIntercomBtn.Height = Application.GetMinRealAverage(69);
+ //topFrameLayout.AddChidren(videoIntercomBtn);
+ //if (UserCenterResourse.ResidenceOption.SafetyShortcut)
+ //{
+ // videoIntercomBtn.X = Application.GetRealWidth(746+10);
+ //}
+ //else
+ //{
+ // videoIntercomBtn.X = Application.GetRealWidth(850+10);
+ //}
+ //videoIntercomBtn.MouseUpEventHandler += (sender, e) =>
+ //{
+ // var videoMachine = new Device.VideoIntercom.VideoMachine();
+ // UserView.HomePage.Instance.AddChidren(videoMachine);
+ // UserView.HomePage.Instance.PageIndex += 1;
+ // videoMachine.Show();
+ //};
diff --git a/ZigbeeApp/Shared/R.cs b/ZigbeeApp/Shared/R.cs
index c0ccb31..8267aec 100644
--- a/ZigbeeApp/Shared/R.cs
+++ b/ZigbeeApp/Shared/R.cs
@@ -910,6 +910,11 @@
public readonly static int dark = 5411;
public readonly static int bright = 5412;
public readonly static int tipIlluminanceValue = 5413;
+ public readonly static int videoIntercom = 5414;
+ public readonly static int dong = 5415;
+ public readonly static int unit = 5416;
+ public readonly static int theOutdoorUnit = 5417;
+
/// <summary>
--
Gitblit v1.8.0