From a32815a15cc63e8aca23d095435c916bb7bd304d Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期四, 01 四月 2021 09:09:25 +0800 Subject: [PATCH] 2021-4-1-1 --- HDL_ON/UI/UI2/FuntionControlView/Video/VideoSend.cs | 7 +-- HDL_ON/DAL/Server/HttpUtil.cs | 2 HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs | 7 --- HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs | 28 +++++++++---- HDL_ON/UI/UI2/FuntionControlView/Video/MainView.cs | 6 +- HDL_ON/DAL/Server/HttpServerRequest.cs | 4 -- HDL_ON/UI/UI2/FuntionControlView/Video/VideoMethod.cs | 21 ++++++---- .vs/HDL_APP_Project/xs/UserPrefs.xml | 28 ++++++++++---- 8 files changed, 57 insertions(+), 46 deletions(-) diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml index 2d58337..c6859fa 100644 --- a/.vs/HDL_APP_Project/xs/UserPrefs.xml +++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml @@ -1,21 +1,33 @@ 锘�<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default"> - <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/FuntionControlView/Video/VideoSend.cs"> + <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs"> <Files> - <File FileName="HDL_ON/UI/UI2/FuntionControlView/Video/MainView.cs" Line="19" Column="106" /> - <File FileName="HDL_ON/UI/UI2/FuntionControlView/Video/VideoMethod.cs" Line="28" Column="58" /> - <File FileName="HDL_ON/UI/UI2/FuntionControlView/Video/VideoSend.cs" Line="80" Column="25" /> + <File FileName="HDL_ON/UI/UI2/FuntionControlView/Video/MainView.cs" Line="158" Column="54" /> + <File FileName="HDL_ON/UI/UI2/FuntionControlView/Video/VideoMethod.cs" Line="49" Column="22" /> + <File FileName="HDL_ON/UI/UI2/FuntionControlView/Video/VideoSend.cs" Line="34" Column="10" /> + <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" Line="10" Column="28" /> + <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs" Line="78" Column="1" /> + <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs" Line="99" Column="47" /> + <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/BrandList.cs" Line="8" Column="2" /> </Files> <Pads> <Pad Id="ProjectPad"> <State name="__root__"> <Node name="HDL_APP_Project" expanded="True"> <Node name="HDL_ON" expanded="True"> + <Node name="Common" expanded="True" /> + <Node name="DAL" expanded="True"> + <Node name="Server" expanded="True" /> + </Node> <Node name="UI" expanded="True"> <Node name="UI2" expanded="True"> - <Node name="FuntionControlView" expanded="True"> - <Node name="Video" expanded="True"> - <Node name="VideoSend.cs" selected="True" /> + <Node name="4-PersonalCenter" expanded="True"> + <Node name="PirDevice" expanded="True"> + <Node name="View" expanded="True" /> + <Node name="PirSend.cs" selected="True" /> </Node> + </Node> + <Node name="FuntionControlView" expanded="True"> + <Node name="Video" expanded="True" /> </Node> </Node> </Node> @@ -39,7 +51,7 @@ <String>Shared.IOS/Shared.IOS.csproj</String> </DisabledProjects> <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" /> - <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.4b65c4650918" /> + <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.Android_Accelerated_Oreo" /> <MonoDevelop.Ide.DebuggingService.Breakpoints> <BreakpointStore /> </MonoDevelop.Ide.DebuggingService.Breakpoints> diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs index e08a283..4e68b34 100644 --- a/HDL_ON/DAL/Server/HttpServerRequest.cs +++ b/HDL_ON/DAL/Server/HttpServerRequest.cs @@ -492,11 +492,7 @@ Address = mHome.homeAddress, isAllowCreateScene = mHome.isAllowCreateScene, }; -#if DEBUG - UserInfo.Current.regionList.Add(home); - continue; -#endif if (home.isBindGateway) { UserInfo.Current.regionList.Add(home); diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs index b2743d6..905c804 100644 --- a/HDL_ON/DAL/Server/HttpUtil.cs +++ b/HDL_ON/DAL/Server/HttpUtil.cs @@ -17,7 +17,7 @@ /// 鍥哄畾鍩熷悕,姝e紡鐜 /// 鍏叡鍩熷悕灏辫繎瑙f瀽 /// </summary> - // public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; + //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; /// <summary> /// RegionMark diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs index 04b6f87..0d96fb9 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs @@ -260,13 +260,6 @@ { EventHandler<MouseEventArgs> eventHandler = (sender, e) => { - HDL_ON.UI.UI2.FuntionControlView.Video.VideoMethod videoMethod = new UI2.FuntionControlView.Video.VideoMethod(); - videoMethod.getVideo((device) => - { - videoMethod.MianView(this, device); - }, this, true); - return; - var page = new BrandListPage();// AddThirdPartyBrandListpage(); // BrandListPage(); MainPage.BasePageView.AddChidren(page); page.LoadPage(); diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs index a4884ea..31e6055 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs @@ -329,21 +329,31 @@ { //娓呯┖涔嬪墠鏁版嵁 brandList.Clear(); - var jArray = Newtonsoft.Json.Linq.JArray.Parse(responsePackNew.Data.ToString()); - for (int a = 0; a < jArray.Count; a++) + try { - var jay = jArray[a]; - var str = Newtonsoft.Json.JsonConvert.SerializeObject(jay); - var brand = Newtonsoft.Json.JsonConvert.DeserializeObject<Brand>(str); - if (brand != null) + var jArray = Newtonsoft.Json.Linq.JArray.Parse(responsePackNew.Data.ToString()); + for (int a = 0; a < jArray.Count; a++) { - if (null == brandList.Find((c) => c.id == brand.id)) + var jay = jArray[a]; + var str = Newtonsoft.Json.JsonConvert.SerializeObject(jay); + var brand = Newtonsoft.Json.JsonConvert.DeserializeObject<Brand>(str); + if (brand != null) { - brandList.Add(brand); + if (null == brandList.Find((c) => c.id == brand.id)) + { + brandList.Add(brand); + } } } } - actionBrand(brandList); + catch { } + finally + { + Application.RunOnMainThread(() => + { + actionBrand(brandList); + }); + } } else { diff --git a/HDL_ON/UI/UI2/FuntionControlView/Video/MainView.cs b/HDL_ON/UI/UI2/FuntionControlView/Video/MainView.cs index 7a14f2e..4326191 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Video/MainView.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Video/MainView.cs @@ -147,7 +147,7 @@ TextAlignment = TextAlignment.CenterLeft, Text = "123456" }; - bjFl.AddChidren(regionBtn); + // bjFl.AddChidren(regionBtn); /// <summary> ///鏀惰棌鍥炬爣 /// </summary> @@ -160,7 +160,7 @@ UnSelectedImagePath = "MusicIcon/collect.png", SelectedImagePath = "MusicIcon/collectSelected.png", }; - bjFl.AddChidren(collectIconBtn); + // bjFl.AddChidren(collectIconBtn); ///鍙瀵硅鍥炬爣 Button intercomBtnIcon = new Button { @@ -351,7 +351,7 @@ vv.BeginHeaderRefreshingAction += () => { VideoMethod videoMethod = new VideoMethod(); - var list = videoMethod.getCall(video.id); + var list = videoMethod.GetCall(video.id); RefreshView(vv, list); //鍏抽棴鍒锋柊View锛� vv.EndHeaderRefreshing(); diff --git a/HDL_ON/UI/UI2/FuntionControlView/Video/VideoMethod.cs b/HDL_ON/UI/UI2/FuntionControlView/Video/VideoMethod.cs index fea81eb..4131181 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Video/VideoMethod.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Video/VideoMethod.cs @@ -26,7 +26,7 @@ try { listESVideoInfo = VideoSend.GetVideoInfoList(video); - listCall = getCall(video.id); + listCall = GetCall(video.id); } catch { @@ -51,24 +51,28 @@ /// </summary> /// <param name="action">鍥炶皟鍑芥暟</param> /// <param name="frame">log鐖舵帶浠�</param> - public void getVideo(Action<VideoClouds> action, FrameLayout frame, bool tag) + /// <param name="tag">鏄惁瑕佹樉绀簂og(榛樿鏄剧ずtag=true)</param> + public void GetVideo(Action<VideoClouds> action, FrameLayout frame, bool tag) { + VideoClouds videoObj =null; ThreadSend(null, (responsePackNew) => { try { var str = responsePackNew.Data.ToString(); - var videoObj = Newtonsoft.Json.JsonConvert.DeserializeObject<VideoClouds>(str); + videoObj = Newtonsoft.Json.JsonConvert.DeserializeObject<VideoClouds>(str); action(videoObj); } - catch { } + catch { + action(videoObj); + } }, "鑾峰彇鍙瀵硅", "fram", frame, null, tag); - } + } /// <summary> /// 鑾峰彇鍘嗗彶閫氳瘽璁板綍 /// </summary> /// <param name="id"></param> - public List<CallView> getCall(string id) + public List<CallView> GetCall(string id) { List<CallView> callViewList = new List<CallView>(); try @@ -127,7 +131,7 @@ } catch { } return callViewList; - } + } /// <summary> /// 鍙戦�佸懡浠ょ嚎绋� /// </summary> @@ -140,7 +144,6 @@ /// <param name="tag">鏄惁瑕佹樉绀簂og</param> public static void ThreadSend(VideoClouds videoObj, Action<ResponsePackNew> action, string str, string view, FrameLayout frame, Dialog dialog, bool tag = true) { - //鍔犺浇log Loading loading = new Loading(); if (view == "dialog") @@ -206,7 +209,7 @@ /// <summary> /// 闅忔満瀵嗙爜6浣� /// </summary> - /// <returns></returns> public static string getCode() { Random rand = new Random(); string code = ""; for (int ctr = 0; ctr < 6; ctr++) { code += rand.Next(10).ToString(); } return code; } + /// <returns></returns> public static string GetCode() { Random rand = new Random(); string code = ""; for (int ctr = 0; ctr < 6; ctr++) { code += rand.Next(10).ToString(); } return code; } /// <summary> /// 鑾峰彇褰撳墠鏃堕棿鎴� /// </summary> /// <returns></returns> public static string GetCurrentTimeStamp() { //TimeSpan ts = DateTime.Now - new DateTime(1970, 1, 1, 0, 0, 0, 0); //return Convert.ToInt64(ts.TotalSeconds).ToString(); System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1)); // 褰撳湴鏃跺尯 return ((long)(DateTime.Now - startTime).TotalSeconds).ToString(); // 鐩稿樊绉掓暟 diff --git a/HDL_ON/UI/UI2/FuntionControlView/Video/VideoSend.cs b/HDL_ON/UI/UI2/FuntionControlView/Video/VideoSend.cs index 6ebce59..b77730f 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Video/VideoSend.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Video/VideoSend.cs @@ -12,8 +12,6 @@ public class VideoSend { - - /// <summary> /// 妫�鏌ヤ綇瀹呮槸鍚︾粦瀹氫赴鏋楋紝骞惰幏鍙栭棬鍙f満鍒楄〃 /// </summary> @@ -24,14 +22,13 @@ var responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_FL_Check); return responsePackNew; } - /// <summary> /// 鑾峰彇閫氳瘽璁板綍 /// </summary> /// <returns></returns> public static ResponsePackNew GetCall(string flBindId) { - var jObject = new JObject { { "homeId", PirSend.HomeId }, { "flBindId", flBindId }, { "pageSize", 100 } }; + var jObject = new JObject { { "homeId", PirSend.HomeId }, { "flBindId", flBindId }, { "pageSize", int.MaxValue } }; var responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_FL_GetCallList); return responsePackNew; } @@ -75,7 +72,7 @@ ///鏍囪鏄惁鎴愬姛 bool if_bool = false; //涓存椂瀵嗙爜 - string pwd = VideoMethod.getCode(); + string pwd = VideoMethod.GetCode(); var jobject = new JObject(); jobject.Add("communityID", video.flCmtId);//绀惧尯ID jobject.Add("fromTime", VideoMethod.GetCurrentTimeStamp());//寮�濮嬫椂闂� jobject.Add("validTime", VideoMethod.GetTomorrowTimeStamp());//鏈夋晥鏃堕棿 -- Gitblit v1.8.0