From d3266109e296abd22d65bc240457bebd75b226bc Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期二, 14 七月 2020 11:05:47 +0800 Subject: [PATCH] 2020-7-14-1 --- ZigbeeApp/Shared/Phone/Device/Logic/Send.cs | 51 +++++++++++++++---------- ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml | 52 +++++++++----------------- ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide | 0 .DS_Store | 0 ZigbeeApp/Shared/Phone/Device/VideoIntercom/VideoMachine.cs | 5 -- 5 files changed, 49 insertions(+), 59 deletions(-) diff --git a/.DS_Store b/.DS_Store index 2fc6a44..52ccf61 100644 --- a/.DS_Store +++ b/.DS_Store Binary files differ diff --git a/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml b/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml index b628aa1..fe09fb8 100644 --- a/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml +++ b/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml @@ -1,46 +1,37 @@ 锘�<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/Device/VideoIntercom/VideoMachine.cs"> + <MonoDevelop.Ide.Workbench ActiveDocument="Home.Ios/AppDelegate.cs"> <Files> - <File FileName="Shared/Phone/Device/VideoIntercom/VideoMachine.cs" Line="114" Column="10" 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" Line="1236" Column="55" /> - <File FileName="Shared/Phone/MainPage/HomeMainPageForm.cs" /> - <File FileName="Home.Ios/ESVideo.cs" Line="50" Column="66" /> - <File FileName="Home.Ios/AppDelegate.cs" Line="68" Column="1" /> + <File FileName="Shared/Phone/Device/VideoIntercom/VideoMachine.cs" Line="181" Column="41" IsPinned="True" /> + <File FileName="Shared/Common/CommonPage.cs" Line="238" Column="74" IsPinned="True" /> + <File FileName="Shared/Phone/Category/CategoryMainForm.cs" Line="1" Column="1" /> + <File FileName="Shared/Phone/Device/Logic/Send.cs" Line="1302" Column="83" /> + <File FileName="Shared/Phone/MainPage/HomeMainPageForm.cs" Line="159" Column="39" /> + <File FileName="Home.Ios/AppDelegate.cs" Line="207" Column="23" /> + <File FileName="GateWay.Droid/Application.cs" /> + <File FileName="Shared/Phone/MainPage/ListRoomViewFrom.cs" /> + <File FileName="Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs" /> + <File FileName="Shared/Phone/UserView/HomePage.cs" /> + <File FileName="Shared/Phone/UserView/UserPage.cs" Line="32" Column="42" /> </Files> <Pads> <Pad Id="ProjectPad"> <State name="__root__"> <Node name="GateWay" expanded="True"> <Node name="Home.IOS" expanded="True"> - <Node name="References" expanded="True" /> - <Node name="Resources" expanded="True" /> + <Node name="AppDelegate.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 name="VideoMachine.cs" selected="True" /> - </Node> + <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="Common" expanded="True" /> - <Node name="Logic" expanded="True" /> - </Node> - </Node> + <Node name="UserView" expanded="True" /> </Node> </Node> </Node> @@ -48,16 +39,9 @@ </Pad> </Pads> </MonoDevelop.Ide.Workbench> - <MonoDevelop.Ide.ItemProperties.Home.IOS automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.D4411691-F5B8-40F4-97C1-964F33115DBC" /> - <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|iPhoneSimulator" /> + <MonoDevelop.Ide.ItemProperties.Home.IOS automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.913cb77b0eef11c9119c61a02bc00fec01bf67d6" /> + <MonoDevelop.Ide.DebuggingService.PinnedWatches /> + <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" /> <MonoDevelop.Ide.DebuggingService.Breakpoints> <BreakpointStore /> </MonoDevelop.Ide.DebuggingService.Breakpoints> diff --git a/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide b/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide index 25886e5..76536c7 100644 --- a/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide +++ b/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide Binary files differ diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs index 35b7328..d185dd6 100644 --- a/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs @@ -1238,35 +1238,44 @@ /// <returns></returns> 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); - request.ContentLength = jsonbyte.Length; - Stream postStream = request.GetRequestStream(); - postStream.Write(jsonbyte, 0, jsonbyte.Length); - postStream.Close(); - } - //鍙戦�佽姹傚苟鑾峰彇鐩稿簲鍥炲簲鏁版嵁 - HttpWebResponse res; try { - res = (HttpWebResponse)request.GetResponse(); + if (_bool) + { + //鐢ㄤ簬楂樿儨鍙瀵硅鎺ュ彛 + request.Headers.Add("Authorization", Config.Instance.Token); + } + if (method == "POST") + { + byte[] jsonbyte = System.Text.Encoding.UTF8.GetBytes(str); + request.ContentLength = jsonbyte.Length; + Stream postStream = request.GetRequestStream(); + postStream.Write(jsonbyte, 0, jsonbyte.Length); + postStream.Close(); + } + //鍙戦�佽姹傚苟鑾峰彇鐩稿簲鍥炲簲鏁版嵁 + HttpWebResponse res; + try + { + res = (HttpWebResponse)request.GetResponse(); + } + catch (WebException ex) + { + res = (HttpWebResponse)ex.Response; + } + StreamReader sr = new StreamReader(res.GetResponseStream(), System.Text.Encoding.UTF8); + string content = sr.ReadToEnd(); //鑾峰緱鍝嶅簲瀛楃涓� + return content; } - catch (WebException ex) + catch { - res = (HttpWebResponse)ex.Response; + return null; } - StreamReader sr = new StreamReader(res.GetResponseStream(), System.Text.Encoding.UTF8); - string content = sr.ReadToEnd(); //鑾峰緱鍝嶅簲瀛楃涓� - return content; } /// <summary> /// 璇锋眰鏈嶅姟鍣ㄧ殑鏂规硶 diff --git a/ZigbeeApp/Shared/Phone/Device/VideoIntercom/VideoMachine.cs b/ZigbeeApp/Shared/Phone/Device/VideoIntercom/VideoMachine.cs index 070ceac..69299ed 100644 --- a/ZigbeeApp/Shared/Phone/Device/VideoIntercom/VideoMachine.cs +++ b/ZigbeeApp/Shared/Phone/Device/VideoIntercom/VideoMachine.cs @@ -115,7 +115,7 @@ /// <summary> /// 鍒ゆ柇璐﹀彿鏄惁鏀寔鍙瀵硅 /// </summary> - /// <param name="topFrameLayout"></param> + /// <param name="topFrameLayout">鍙瀵硅鍥炬爣鐨勭埗鎺т欢</param> public async static void AccountSupportVideo(FrameLayout topFrameLayout) { var jobject = new JObject(); @@ -166,9 +166,6 @@ } catch { } } - - - } /// <summary> /// 鑾峰彇鍙瀵硅鍒楄〃 -- Gitblit v1.8.0