.vs/HDL_APP_Project/xs/UserPrefs.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL-ON_Android/Application.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL-ON_Android/Resources/Resource.designer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs | 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddButton.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Matching.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,19 +1,43 @@ <Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default"> <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs"> <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/EditControl.cs"> <Files> <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs" Line="17" Column="33" /> <File FileName="HDL_ON/DAL/Mqtt/MqttClient.cs" /> <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs" /> <File FileName="HDL_ON/Common/R.cs" /> <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TipPopView.cs" /> <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs" /> <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs" Line="37" Column="23" /> <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddButton.cs" /> <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControl.cs" /> <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/EditControl.cs" /> <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddButton.cs" Line="159" Column="81" /> <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/EditControl.cs" Line="1" Column="1" /> <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/AddMiniRemoteControlDirection4Page.cs" /> <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/SetPir.cs" /> <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs" Line="20" Column="23" /> <File FileName="HDL-ON_Android/Application.cs" Line="393" Column="33" /> <File FileName="../../Application.cs" Line="257" Column="45" /> <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Matching.cs" Line="183" Column="48" /> <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs" Line="28" Column="40" /> <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/BrandList.cs" Line="12" Column="60" /> </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> <Node name="UI" expanded="True"> <Node name="UI2" expanded="True"> <Node name="4-PersonalCenter" expanded="True"> <Node name="AddFunction" expanded="True" /> <Node name="PirDevice" expanded="True"> <Node name="EditControl.cs" selected="True" /> </Node> </Node> </Node> </Node> </Node> <Node name="HDL-ON_Android" expanded="True"> <Node name="Resources" expanded="True" /> </Node> </Node> </State> </Pad> </Pads> </MonoDevelop.Ide.Workbench> <MonoDevelop.Ide.DebuggingService.PinnedWatches /> <DisabledProjects> @@ -22,7 +46,7 @@ <String>Shared.IOS/Shared.IOS.csproj</String> </DisabledProjects> <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" /> <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.Android_Accelerated_Oreo" /> <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.4b65c4650918" /> <MonoDevelop.Ide.DebuggingService.Breakpoints> <BreakpointStore /> </MonoDevelop.Ide.DebuggingService.Breakpoints> HDL-ON_Android/Application.cs
@@ -33,7 +33,6 @@ public override void OnCreate() { //注册未处理异常事件 Com.Chteam.Agent.BuglyAgentHelper.Init(this.ApplicationContext, "cb89f20750"); if (Shared.Application.Activity != null) { @@ -47,6 +46,7 @@ initAll(); } /// <summary> /// 所有初始化全部在这个方法实现 /// </summary> @@ -60,7 +60,8 @@ //隐藏虚拟按键 BaseActivity.IsHideVirualButtons = true; //实现安卓返回按键 BaseActivity.BackKeyAction = () => { BaseActivity.BackKeyAction = () => { try { var result = MainPage.LoadEvent_BackAction(); @@ -173,6 +174,7 @@ /// <param name="activity"></param> void GetJPushRegistrationID(BaseActivity activity) { try { //保存获取的极光服务器上的注册ID到本地文件 HDL-ON_Android/Resources/Resource.designer.cs
Diff too large HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddButton.cs
@@ -159,7 +159,7 @@ var view = MainPage.BasePageView.GetChildren(i); if (view.GetType() == typeof(AddControl)) { new TipPopView().FlashingBox(Language.StringByID(StringId.tianjiashibai)); //new TipPopView().FlashingBox(Language.StringByID(StringId.tianjiachenggong)); view.RemoveFromParent(); } HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs
@@ -154,11 +154,13 @@ if (bool_library) { this.RemoveFromParent(); RefreshView(); } else { Method method = new Method(); method.AddControl(this, (controlDevice) => { method.AddControl(this, (controlDevice) => { AddButton addButton = new AddButton(); MainPage.BasePageView.AddChidren(addButton); addButton.Show(controlDevice); @@ -171,6 +173,17 @@ { //移除所有界面 MainPage.BasePageView.RemoveViewByTag("PirView"); RefreshView(); }; #endregion } /// <summary> /// 刷新红外宝主界面 /// </summary> void RefreshView() { //移除红外宝根界面 MainPage.BasePageView.RemoveViewByTag("PirMain"); //重新加载界面 @@ -178,9 +191,6 @@ MainPage.BasePageView.AddChidren(page); page.Show(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; }; #endregion } } } HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Matching.cs
@@ -108,7 +108,7 @@ X = Application.GetRealWidth(136), Width = Application.GetRealWidth(104), Height = Application.GetRealHeight(17), Text = "(1/20)", Text = $"(1/{libraryList.Count})", TextSize = TextSize.text12, TextColor = CSS.CSS_Color.textCancelColor, }; @@ -160,7 +160,7 @@ { if (index>1) { index--; sumBtn.Text = "(" + index.ToString() + "/20)"; sumBtn.Text = $"({index.ToString()}/{libraryList.Count})"; } code = 1; GetBtnText(testBtn, code, spk); @@ -168,10 +168,10 @@ //右 rightIconBtn.MouseUpEventHandler += (sender, e) => { if (index < 20) if (index < libraryList.Count) { index++; sumBtn.Text = "(" + index.ToString() + "/20)"; sumBtn.Text = $"({index.ToString()}/{libraryList.Count})"; } code = 1; GetBtnText(testBtn, code, spk); @@ -192,12 +192,12 @@ //控制失败 failedBtn.MouseUpEventHandler += (sender, e) => { if (index < 20) if (index < libraryList.Count) { //先加 index++; //更新文本 sumBtn.Text = "(" + index.ToString() + "/20)"; sumBtn.Text = $"({index.ToString()}/{libraryList.Count})"; } code = 1; //更新状态 @@ -214,7 +214,7 @@ GetBtnText(testBtn, code, spk); if (if_bool) { var library = libraryList[index]; var library = libraryList[index-1]; var control = GetControl(spk, testBtn.TextID, library); Method method = new Method(); //发送库添加遥控器命令 HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs
@@ -33,7 +33,8 @@ MainPage.BasePageView.AddChidren(page); page.Show(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; page.BackAction += () => { PirMain.BackAction += () => { action?.Invoke(); }; }); @@ -272,7 +273,7 @@ var pirDevice = Pir.pirDeviceList[i]; try { var responsePackNew = PirSend.ControlList(pirDevice); var responsePackNew = PirSend.ControlList(pirDevice.deviceId); if (responsePackNew != null && responsePackNew.Code == "0" && responsePackNew.Data.ToString() != "") { var jArray = JArray.Parse(responsePackNew.Data.ToString()); @@ -319,18 +320,7 @@ /// <param name="action">回调函数</param> public static void GetControlList(FrameLayout frame ,Action action, Pir pirDevice) { Loading loading = new Loading(); frame.AddChidren(loading); loading.Start(); new System.Threading.Thread(() => { try { try { var responsePackNew = PirSend.ControlList(pirDevice); if (responsePackNew != null && responsePackNew.Code == "0" && responsePackNew.Data.ToString() != "") ThreadSend(new Control { deviceId = pirDevice.deviceId }, (responsePackNew) => { var jArray = JArray.Parse(responsePackNew.Data.ToString()); for (int a = 0; a < jArray.Count; a++) @@ -341,33 +331,14 @@ var pirJosn = Newtonsoft.Json.JsonConvert.DeserializeObject<Entity.Function>(str); if (pirJosn != null) { if (null == pirDevice.FunctioList.Find((c) => c.sid == pirJosn.sid)) if (null == pirDevice.FunctioList.Find((c) => c.deviceId == pirJosn.deviceId)) { pirDevice.FunctioList.Add(pirJosn); } } } } } catch { } } catch { } finally { Application.RunOnMainThread(() => { loading.Hide(); action(); }); } }) { IsBackground = true }.Start(); }, "获取遥控器列表", "frame", frame, null); } /// <summary> @@ -378,37 +349,12 @@ /// <param name="action">回调函数</param> public void GetControl(FrameLayout frame, Control control, Action<Entity.Function> action) { Entity.Function function = null; //加载log Loading loading = new Loading(); frame.AddChidren(loading); loading.Start(); new System.Threading.Thread(() => ThreadSend(control, (responsePackNew) => { try { // 获取设备详情通过(spk,sid) var responsePackNew = PirSend.GetinfoBySid(control); if (responsePackNew != null && responsePackNew.Code == "0" && responsePackNew.Data.ToString() != "") { //var str = Newtonsoft.Json.JsonConvert.SerializeObject(responsePackNew.Data.ToString()); function = Newtonsoft.Json.JsonConvert.DeserializeObject<Entity.Function>(responsePackNew.Data.ToString()); } } catch { } finally { Application.RunOnMainThread(() => { loading.Hide(); var function = Newtonsoft.Json.JsonConvert.DeserializeObject<Entity.Function>(responsePackNew.Data.ToString()); action(function); }); }, "获取设备详情", "frame", frame, null); } }) { IsBackground = true }.Start(); } /// <summary> /// 发送命令线程 /// </summary> @@ -446,8 +392,18 @@ responsePackNew = PirSend.DeviceRename(control.deviceId, control.name); } else if (str == "删除按键") { else if (str == "删除按键") { // responsePackNew = PirSend.CodeRemove(control.deviceId, control.name); } else if (str == "获取设备详情") { // 获取设备详情通过(spk,sid) responsePackNew = PirSend.GetinfoBySid(control); } else if (str == "获取遥控器列表") { responsePackNew = PirSend.ControlList(control.deviceId); } } catch { } @@ -505,7 +461,7 @@ str = buttondata; } if (!string.IsNullOrEmpty(controldata)) if (!string.IsNullOrEmpty(str)) { try { HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs
@@ -14,7 +14,11 @@ /// <summary> /// 回调 /// </summary> public Action BackAction; public static Action BackAction; /// <summary> /// /// </summary> Button addDevice; /// <summary> /// 临时储存设备类型列表 /// </summary> @@ -26,9 +30,12 @@ topView.topNameBtn.TextID = StringId.hongwaiyaokong; topView.topIconBtn.Visible = true; this.AddChidren(topView.FLayoutView()); topView.clickBackBtn.MouseUpEventHandler += (sender, e) => { topView.clickBackBtn.MouseUpEventHandler += (sender, e) => { BackAction(); this.RemoveFromParent(); }; BackAction = null; this.RemoveFromParent(); }; FrameLayout middFLayout = new FrameLayout(); middFLayout.Y = Application.GetRealHeight(64); @@ -38,19 +45,22 @@ VerticalRefreshLayout vv = new VerticalRefreshLayout(); middFLayout.AddChidren(vv); //加号图标 Button addDevice = new Button addDevice = new Button { Y = Application.GetRealHeight(480), X = Application.GetRealWidth(293), Width = Application.GetRealWidth(82), Height = Application.GetRealWidth(84), UnSelectedImagePath = "PirIcon/add.png", }; Visible=false, }; middFLayout.AddChidren(addDevice); if (Pir.currPir.FunctioList.Count < 10) { //10个遥控器就会隐藏添加图标 middFLayout.AddChidren(addDevice); // middFLayout.AddChidren(addDevice); addDevice.Visible = true; } vv.BeginHeaderRefreshingAction += () => @@ -77,7 +87,7 @@ MainPage.BasePageView.AddChidren(setPir); setPir.Show(() => { BackAction(); //BackAction(); ////刷新界面 UIView(vv); }); @@ -267,7 +277,12 @@ Pir.currPir.FunctioList.Remove(Function); } UIView(vv); if (Pir.currPir.FunctioList.Count < 10) { //10个遥控器就会隐藏添加图标 // middFLayout.AddChidren(addDevice); addDevice.Visible = true; } }, "删除", "dialog", null, dialog); }, () => { }, false); HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs
@@ -79,9 +79,9 @@ /// <summary> /// 获取遥控器列表 /// </summary> public static ResponsePackNew ControlList(Pir pir) public static ResponsePackNew ControlList(string deviceId) { var jObject = new JObject { { "homeId", HomeId }, { "deviceId", pir.deviceId } }; var jObject = new JObject { { "homeId", HomeId }, { "deviceId", deviceId} }; var responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Ir_List); return responsePackNew; }