From a0b77501012265c4638c9f49ccfd1e6cd0f71a45 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期四, 09 三月 2023 18:44:00 +0800 Subject: [PATCH] 2023年03月09日18:43:53 --- HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs | 4 HDL_ON/UI/UI2/1-HomePage/HomePage.cs | 4 HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Cell.png | 0 HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs | 15 + HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Cell.png | 0 HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs | 65 +++++ HDL_ON/UI/UI2/2-Classification/RoomPage.cs | 35 ++- HDL_ON/HDL_ON.projitems | 1 HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs | 10 HDL-ON_Android/HDL-ON_Android.csproj | 2 HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs | 66 +++++ HDL_ON/Entity/Function/Function.cs | 2 HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs | 8 HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/Send.cs | 80 +++++++ HDL_ON/UI/UI2/2-Classification/FunctionPage.cs | 6 HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs | 17 + HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs | 42 +++ HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs | 32 ++ HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockListPage.cs | 5 HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs | 2 HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs | 235 +++++++++++++-------- 21 files changed, 504 insertions(+), 127 deletions(-) diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Cell.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Cell.png index 875ba67..5ae517b 100644 --- a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Cell.png +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Cell.png Binary files differ diff --git a/HDL-ON_Android/HDL-ON_Android.csproj b/HDL-ON_Android/HDL-ON_Android.csproj index 88add3e..21024b9 100644 --- a/HDL-ON_Android/HDL-ON_Android.csproj +++ b/HDL-ON_Android/HDL-ON_Android.csproj @@ -427,7 +427,7 @@ <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\VideoDoorlockClose.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\VideoDoorLockOpen.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\History.png" /> - <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\cell.png" /> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\Cell.png" /> </ItemGroup> <ItemGroup> <AndroidResource Include="Resources\values\colors.xml" /> diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Cell.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Cell.png index 875ba67..5ae517b 100644 --- a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Cell.png +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Cell.png Binary files differ diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs index f453869..cefcba4 100644 --- a/HDL_ON/Entity/Function/Function.cs +++ b/HDL_ON/Entity/Function/Function.cs @@ -1375,7 +1375,7 @@ /// <summary> /// 钀ょ煶瑙嗛闂ㄩ攣 /// </summary> - public const string VideoDoorLock= "钀ょ煶瑙嗛闂ㄩ攣"; + public const string VideoDoorLock="security.door.ezviz"; /// <summary> /// 钀ょ煶瑙嗛闂ㄩ攣spk鍒楄〃 /// </summary> diff --git a/HDL_ON/HDL_ON.projitems b/HDL_ON/HDL_ON.projitems index 9b36c79..4018e42 100644 --- a/HDL_ON/HDL_ON.projitems +++ b/HDL_ON/HDL_ON.projitems @@ -531,6 +531,7 @@ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\VideoDoorLockListPage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\VideoDoorLockPage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\CommonMethod.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\Send.cs" /> </ItemGroup> <ItemGroup> <Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" /> diff --git a/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs b/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs index b109f73..e682ffb 100644 --- a/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs +++ b/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs @@ -12,7 +12,7 @@ /// <summary> /// 鍔熻兘鎺у埗鐣岄潰璺宠浆浜嬩欢 /// </summary> - public EventHandler<MouseEventArgs> LoadEvent_SkipFunctionControlPage(Function function, Button btnCollectionIcon, Button btnName, Button btnFromFloor, Comerom comerom + public EventHandler<MouseEventArgs> LoadEvent_SkipFunctionControlPage(Function function, Button btnCollectionIcon, Button btnName, Button btnFromFloor, Comerom comerom,Action action ) { EventHandler<MouseEventArgs> eventHandler = (sender, e) => @@ -309,7 +309,7 @@ break; case SPK.VideoDoorLock: { //钀ょ煶瑙嗛闂ㄩ攣 - var form = new VideoDoorLockPage(function, btnName, btnFromFloor,comerom); + var form = new VideoDoorLockPage(function, btnName, btnFromFloor,comerom,action); MainPage.BasePageView.AddChidren(form); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; form.Show(); diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs index 9d3f726..b4d6ff9 100644 --- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs +++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs @@ -1243,7 +1243,9 @@ }; - var skipControlPageEvent = new PublicAssmebly().LoadEvent_SkipFunctionControlPage(function, btnCollection, btnName, btnZone,Comerom.collect); + var skipControlPageEvent = new PublicAssmebly().LoadEvent_SkipFunctionControlPage(function, btnCollection, btnName, btnZone,Comerom.collect,()=> { + this.LoadDeviceFunctionControlZone();//鍒犻櫎璁惧鍚庨噸鏂板埛鏂癠I + }); view.MouseUpEventHandler = skipControlPageEvent; btnName.MouseUpEventHandler = skipControlPageEvent; btnIcon.MouseUpEventHandler = skipControlPageEvent; diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs index 1b607d7..8c9339e 100644 --- a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs +++ b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs @@ -38,12 +38,18 @@ /// 鏄惁鍦ㄨ皟鍏� /// </summary> bool onDimmerBar; + /// <summary> + /// 鍒犻櫎璁惧鍚庡洖璋冪粰鐣岄潰鍒锋柊 + /// </summary> + Action action; + #endregion - public FunctionControlZone(Function func) + public FunctionControlZone(Function func,Action action) { bodyDiv = this; bodyDiv.Tag = func.sid; function = func; + this.action = action; } public override void RemoveFromParent() diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs b/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs index fba531b..9ea32c1 100644 --- a/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs +++ b/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs @@ -405,7 +405,7 @@ /// </summary> void LoadEvent_DivSkipEvent() { - var eventHandler = new PublicAssmebly().LoadEvent_SkipFunctionControlPage(function, btnCollectionIcon, btnName, btnFromFloor,Comerom.function); + var eventHandler = new PublicAssmebly().LoadEvent_SkipFunctionControlPage(function, btnCollectionIcon, btnName, btnFromFloor,Comerom.room,this.action); this.MouseUpEventHandler = eventHandler; btnName.MouseUpEventHandler = eventHandler; btnFromFloor.MouseUpEventHandler = eventHandler; diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs b/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs index 5ba2bed..3e55089 100644 --- a/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs +++ b/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs @@ -255,7 +255,7 @@ } if (function.spk == SPK.LightRGBW || function.spk == SPK.LightRGB || function.spk == SPK.LightDimming) { - var functionDiv = new FunctionControlZone(function) + var functionDiv = new FunctionControlZone(function,null) { Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(343), @@ -271,7 +271,7 @@ } else if (function.spk == SPK.IpCam_Imou) { - var functionDiv = new FunctionControlZone(function) + var functionDiv = new FunctionControlZone(function,null) { Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(343), @@ -288,7 +288,7 @@ } else { - var functionDiv = new FunctionControlZone(function) + var functionDiv = new FunctionControlZone(function,null) { Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(343), diff --git a/HDL_ON/UI/UI2/2-Classification/RoomPage.cs b/HDL_ON/UI/UI2/2-Classification/RoomPage.cs index ab78fd4..3c04eec 100644 --- a/HDL_ON/UI/UI2/2-Classification/RoomPage.cs +++ b/HDL_ON/UI/UI2/2-Classification/RoomPage.cs @@ -53,6 +53,7 @@ deleteAction = delAction; this.modifyImageAction = modifyImageAction; } + /// <summary> /// 閲嶈浇鐣岄潰 /// </summary> @@ -65,22 +66,25 @@ } } + public void LoadPage() { bodyView.BackgroundColor = CSS_Color.BackgroundColor; - new TopViewDiv(bodyView,room.roomName).LoadTopView_RoomTop(ReloadRoomName, skipEditPageAction); + new TopViewDiv(bodyView, room.roomName).LoadTopView_RoomTop(ReloadRoomName, skipEditPageAction); functionListView = new VerticalScrolViewLayout() { Y = Application.GetRealHeight(64), - Height = Application.GetRealHeight(603-12), + Height = Application.GetRealHeight(603 - 12), }; bodyView.AddChidren(functionListView); - foreach (var function in room.GetRoomFunctions(false)) + var list = room.GetRoomFunctions(false); + + foreach (var function in list) { - if (MainPage.RoomNotSupportFunctionList.Contains( function.spk)) + if (MainPage.RoomNotSupportFunctionList.Contains(function.spk)) { continue; } @@ -89,7 +93,7 @@ if (function.spk == SPK.LightRGB || function.spk == SPK.LightDimming) { - var functionDiv = new FunctionControlZone(function) + var functionDiv = new FunctionControlZone(function, null) { Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(343), @@ -105,7 +109,10 @@ } else { - var functionDiv = new FunctionControlZone(function) + var functionDiv = new FunctionControlZone(function, () => + { + this.ReLoadPage(); + }) { Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(343), @@ -132,7 +139,7 @@ BorderColor = 0x00FFFFFF, BorderWidth = 1, BackgroundColor = CSS_Color.MainBackgroundColor, - Tag = "Scene-" + scene.sid + Tag = "Scene-" + scene.sid }; functionListView.AddChidren(sceneRow); LoadSceneRow(sceneRow, scene); @@ -147,7 +154,7 @@ /// </summary> public void LoadSceneRow(FrameLayout bodyDiv, Scene scene) { - var btnIcon = new Button() + var btnIcon = new Button() { X = Application.GetRealWidth(10), Y = Application.GetRealHeight(15), @@ -214,15 +221,15 @@ btnName.X = Application.GetRealWidth(52 + 16); } //鍔犺浇鍦烘櫙鎺у埗浜嬩欢 - LoadEvent_ControlScene(btnName,btnFromFloor,bodyDiv,scene ); + LoadEvent_ControlScene(btnName, btnFromFloor, bodyDiv, scene); - LoadEvent_FunctionCollection(btnCollectionIcon,scene); + LoadEvent_FunctionCollection(btnCollectionIcon, scene); } /// <summary> /// 鍔犺浇鍔熻兘鏀惰棌鎸夐挳浜嬩欢 /// </summary> - void LoadEvent_FunctionCollection(Button btnCollectionIcon,Scene scene) + void LoadEvent_FunctionCollection(Button btnCollectionIcon, Scene scene) { btnCollectionIcon.MouseUpEventHandler += (sender, e) => { @@ -233,9 +240,10 @@ /// <summary> /// 鍔犺浇鍦烘櫙鎺у埗浜嬩欢 /// </summary> - void LoadEvent_ControlScene(Button btnName,Button btnFromFloor,FrameLayout bodyDiv, Scene scene) + void LoadEvent_ControlScene(Button btnName, Button btnFromFloor, FrameLayout bodyDiv, Scene scene) { - EventHandler<MouseEventArgs> upEvent = (sender, e) => { + EventHandler<MouseEventArgs> upEvent = (sender, e) => + { DriverLayer.Control.Ins.ControlScene(scene); string msg = scene.name + Language.StringByID(StringId.AlreadyOpened); new PublicAssmebly().TipMsgAutoClose(msg, false); @@ -245,5 +253,6 @@ bodyDiv.MouseUpEventHandler = upEvent; } + } } diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs index 6094f4a..3e8e461 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs @@ -618,7 +618,24 @@ } } break; - + //钀ょ煶瑙嗛闂ㄩ攣 + case SPK.VideoDoorLock: + { + LogicView.FunTypeView view1 = new LogicView.FunTypeView(); + view1.btnText.Text = "鐢ㄦ埛浜哄憳";// StringId.shipintonghuahujiao; + view1.btnText.Name = Language.StringByID(StringId.shipinmensuo); + fLayout.AddChidren(view1.FLayoutView()); + view1.btnClick.MouseUpEventHandler += (sender, e) => + { + this.VideoDoorLockAction(this, device, view1.btnState); + }; + if (edit) + { + this.GetEditState(device, index, view1.btnState,null, null, null); + } + } + break; + } #region 淇濆瓨 ///淇濆瓨View @@ -1075,6 +1092,52 @@ } /// <summary> + /// 钀ょ煶瑙嗛闂ㄩ攣涓撶敤(浜岀骇鐣岄潰) + /// </summary> + /// <param name="frame">褰撳墠鐣岄潰</param> + /// <param name="device">褰撳墠璁惧</param> + /// <param name="btnState">鏃х姸鎬�</param> + public void VideoDoorLockAction(FrameLayout frame, Entity.Function device, Button btnState) + { + selectedState = device.spk + "_"; + Loading loading = new Loading(); + frame.AddChidren(loading); + loading.Start(); + System.Threading.Tasks.Task.Run(() => + { + try + { + var userList = Send.Current.GetVideoDoorLockUserIdList(device.deviceId, true); + List<string> userIdList = new List<string>(); + for (int i = 0; i < userList.Count; i++) + { + var user = userList[i]; + userIdList.Add(user.userName); + } + Application.RunOnMainThread(() => + { + loading.Hide(); + PublicInterface publicInterface = new PublicInterface(); + publicInterface.FrameOrVv(this, userIdList, new List<string> { btnState.Text }, device.name, (index) => + { + var userId = userIdList[index]; + //鐣岄潰鏄剧ず閫変腑鍊� + btnState.Text = userId; + //鏁版嵁灏佽 + AddDictionary("open_type", "1", "integer"); + AddDictionary("user_id", userId, "string"); + + }, false); + + }); + } + catch { } + + }); + + } + + /// <summary> /// 鏄剧ず缂栬緫涔嬪墠鐨勮澶囩姸鎬� /// </summary> /// <param name="device">缂栬緫璁惧</param> diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs index 4930ec3..d493be3 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs @@ -406,6 +406,12 @@ } } break; + case SPK.VideoDoorLock: + { + string value = this.GetValue(dicList); + inputView.btnState.Text = value; + } + break; case SPK.doorgate: { if (inputCondition.identifier == "door_call_cloud_event") @@ -2128,6 +2134,15 @@ } } break; + case SPK.VideoDoorLock: + { + foreach (var dic in dicList) + { + string value = dic["value"]; + button1.Text = value; + } + } + break; case SPK.MusicStandard: case SPK.AvMusic: { diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs index d54f4de..6e55a2f 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs @@ -187,7 +187,7 @@ var list2 = this.GetVideoDeviceList(); list.AddRange(list1); list.AddRange(list2); - //GetTestDevice(ref list, true); + GetTestDevice(ref list, true); return list; } /// <summary> @@ -360,7 +360,8 @@ { return "LogicIcon/sensor.png"; } - else if (SPK.DoorLock == device.spk) + else if (SPK.DoorLock == device.spk + || SPK.VideoDoorLock == device.spk) { return "FunctionIcon/DoorLock/DoorLock.png"; } @@ -576,7 +577,8 @@ deviceStrTypeList.Add(Language.StringByID(StringId.Electric)); } ///闂ㄩ攣绫� - var doorlock = deviceList.Find((device) => device.spk == SPK.DoorLock); + var doorlock = deviceList.Find((device) => device.spk == SPK.DoorLock + || device.spk == SPK.VideoDoorLock); if (doorlock != null) { deviceStrTypeList.Add(Language.StringByID(StringId.DoorLock)); @@ -696,6 +698,7 @@ else if (deviceType == Language.StringByID(StringId.DoorLock)) { functionTypeList.Add(SPK.DoorLock); + functionTypeList.Add(SPK.VideoDoorLock); } ///闊充箰绫� else if (deviceType == Language.StringByID(StringId.Music)) @@ -773,6 +776,7 @@ functionTypeList.Add(SPK.MechanicalArm); functionTypeList.Add(SPK.IpCam_Imou); functionTypeList.Add(SPK.SensorPm10); + functionTypeList.Add(SPK.VideoDoorLock); } @@ -832,6 +836,7 @@ deviceTypeList.Add(SPK.doorgate); deviceTypeList.Add(SPK.IpCam_Imou); deviceTypeList.Add(SPK.SensorPm10); + deviceTypeList.Add(SPK.VideoDoorLock); } break; @@ -1173,9 +1178,9 @@ //new Entity.Function { sid = "1234567890", name = "瓒呭0娉紶鎰熷櫒", spk = Entity.SPK.SensorUtrasonic }, // new Entity.Function { sid = "1234567891", name = "娓╁害浼犳劅鍣�", spk = Entity.SPK.SensorTemperature }, // new Entity.Function { sid = "1234567892", name = "婀垮害浼犳劅鍣�", spk = Entity.SPK.SensorHumidity }, - new Entity.Function { sid = "12345678933456", name = "璋冨厜鐏�", spk = Entity.SPK.LightDimming }, - new Entity.Function { sid = "1234567895444", name = "闈㈡澘", spk = Entity.SPK.PanelSocket }, - new Entity.Function { sid = "12345678968888", name = "pm10", spk = Entity.SPK.SensorPm10 }, + new Entity.Function { sid = "12345678933456", name = "闂ㄩ攣", spk = Entity.SPK.DoorLock }, + new Entity.Function { sid = "1234567895444", name = "瑙嗛闂ㄩ攣", spk = Entity.SPK.VideoDoorLock }, + //new Entity.Function { sid = "12345678968888", name = "pm10", spk = Entity.SPK.SensorPm10 }, // new Entity.Function { sid = "1234567897", name = "姣背娉紶鎰熷櫒1", spk = Entity.SPK.SenesorMegahealth2 }, // new Entity.Function { sid = "1234567899", name = "闂ㄧ浼犳劅鍣�", spk = Entity.SPK.SensorDoorWindow }, // new Entity.Function { sid = "12345678991234", name = "HDL鏈烘鎵�", spk = Entity.SPK.MechanicalArm }, diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs index d6835e6..6cf8458 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs @@ -462,6 +462,38 @@ } + /// <summary> + /// 鑾峰彇钀ょ煶瑙嗛闂ㄩ攣鐢ㄦ埛鍒楄〃 + /// </summary> + /// <param name="deviceId">鍙瀵硅璁惧id</param> + /// <returns></returns> + public List<Face> GetVideoDoorLockUserIdList(string deviceId, bool isTip) + { + var jObject = new JObject(); + jObject.Add("homeId", LogicMethod.Current.HomeId); + jObject.Add("deviceId", deviceId); + var responsePackNew = RequestServerhomeId(jObject, NewAPI.Api_Post_GetListHomeFace, "鑾峰彇浣忓畢宸插綍鍏ヤ汉鑴镐俊鎭�"); + //濡傛灉鏄痶oken杩囨湡鍒欏埛鏂皌oken + if (responsePackNew.Code == StateCode.TOKEN_EXPIRED) + { + RefreshToken(); + GetListHomeFace(deviceId, isTip); + } + if (Check(responsePackNew, isTip) == false) + { + return new List<Face>(); + } + var list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Face>>(responsePackNew.Data.ToString()); + if (list == null) + { + list = new List<Face>(); + } + faceList.Clear(); + faceList.AddRange(list); + return list; + + } + /// <summary> ///璇锋眰鏈嶅姟鍣紙涓庝綇瀹呮湁鍏�:渚嬪锛沨omeId锛� /// </summary> diff --git a/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs b/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs index d58fb4b..b1ac002 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs @@ -29,6 +29,18 @@ /// 浣嶇疆淇℃伅璺宠浆缂栬緫鎸夐挳 /// </summary> Button btnLocationInfoRight; + /// <summary> + /// 鍒犻櫎璁惧 + /// </summary> + Button delTextBtn; + /// <summary> + /// 涓嬩竴绾у浘鏍� + /// </summary> + Button delRightBtn; + /// <summary> + /// 鍒犻櫎璁惧琛孎rameLayout + /// </summary> + FrameLayout delView; #endregion @@ -38,13 +50,19 @@ /// 鍚庨��鏃讹紝鍒锋柊涔嬪墠鐣岄潰鐨勬樉绀轰俊鎭� /// </summary> Action actionRefresh; + + /// <summary> + /// 瑙g粦璁惧鍥炶皟 + /// </summary> + Action actionDel; #endregion - public FunctionBaseInfoSetPage(Function func, Action action) + public FunctionBaseInfoSetPage(Function func, Action action,Action actionDel=null) { bodyView = this; function = func; actionRefresh = action; + this.actionDel = actionDel; } public override void RemoveFromParent() @@ -180,13 +198,13 @@ #endregion } #region 鍏变韩 + //var sharedView = new FrameLayout() //{ // Height = Application.GetRealHeight(55), // BackgroundColor = CSS_Color.MainBackgroundColor, //}; //contentView.AddChidren(sharedView); - //var btnSharedText = new Button() //{ // X = Application.GetRealWidth(16), @@ -219,6 +237,50 @@ // }); #endregion + #region 鍒犻櫎璁惧琛� + + delView = new FrameLayout() + { + Height = Application.GetRealHeight(55), + BackgroundColor = CSS_Color.MainBackgroundColor, + }; + if (this.function.spk == SPK.VideoDoorLock) + { + contentView.AddChidren(delView); + } + var lineBtn = new Button() + { + Gravity = Gravity.CenterHorizontal, + BackgroundColor = CSS_Color.DividingLineColor, + Width = Application.GetRealWidth(343), + Height = Application.GetRealHeight(1) + }; + delView.AddChidren(lineBtn); + delTextBtn = new Button() + { + X = Application.GetRealWidth(16), + Width = Application.GetRealWidth(160), + TextAlignment = TextAlignment.CenterLeft, + TextColor = CSS_Color.FirstLevelTitleColor, + TextSize = CSS_FontSize.SubheadingFontSize, + TextID = StringId.DeleteDevice, + }; + delView.AddChidren(delTextBtn); + + delRightBtn= new Button() + { + X = Application.GetRealWidth(339), + Gravity = Gravity.CenterVertical, + Width = Application.GetMinRealAverage(16), + Height = Application.GetMinRealAverage(16), + UnSelectedImagePath = "Public/RightIcon.png", + }; + delView.AddChidren(delRightBtn); + + + + + #endregion #if stage2 #region 娣诲姞鍒版闈� var addToDesktopView = new FrameLayout() diff --git a/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs index 006e71d..3c791b7 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs @@ -12,6 +12,8 @@ { LoadEvent_ChangeFunctionName (); SkipChooseRoomPage(); + DelDeviceEvent(); + } /// <summary> @@ -77,5 +79,45 @@ } } + /// <summary> + /// 瑙g粦璁惧鐨勪簨浠� + /// </summary> + void DelDeviceEvent() + { + + EventHandler<MouseEventArgs> ClickEvent = (sener, e) => + { + new HDL_ON.UI.Music.View.TipView().TipBox(-1, StringId.AreYouSureToDeleteThisDevice, () => + { + UI2.FuntionControlView.VideoDoorLock.Send.Currnet.DelDevice(this.function, (isBool) => + { + Application.RunOnMainThread(() => + { + if (!isBool) + { + new Tip() + { + CloseTime = 1, + Text = Language.StringByID(StringId.delFail), + Direction = AMPopTipDirection.None, + }.Show(bodyView); + return; + } + //鍒犻櫎鏈湴鏂囦欢 + FunctionList.List.DeleteFunction(this.function); + this.RemoveFromParent(); + this.actionDel?.Invoke(); + }); + + }); + + }); + }; + this.delView.MouseUpEventHandler += ClickEvent; + this.delTextBtn.MouseUpEventHandler += ClickEvent; + this.delRightBtn.MouseUpEventHandler += ClickEvent; + } + + } } diff --git a/HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs b/HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs index d631763..d61186b 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs @@ -86,7 +86,7 @@ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("deviceIds", functionIds); var responsePackNew = RequestServerhomeId(d, NewAPI.Api_Post_RefreshDeviceStatus, "鍒锋柊璁惧鐘舵��"); - if (!this.dataChecking(responsePackNew)) + if (!this.DataChecking(responsePackNew)) { return; } @@ -123,7 +123,7 @@ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("deviceIds", new List<string> { music.deviceId }); var responsePackNew = RequestServerhomeId(d, NewAPI.Api_Post_PlayerList, "鑾峰彇闊充箰鍒楄〃"); - if (!this.dataChecking(responsePackNew)) + if (!this.DataChecking(responsePackNew)) { return; } @@ -173,7 +173,7 @@ } d.Add("deviceInfos", new List<Dictionary<string, object>> { deviceIds }); var responsePackNew = RequestServerhomeId(d, NewAPI.Api_Post_GroupList, "鑾峰彇鍒楄〃鍚嶅垪琛�"); - if (!this.dataChecking(responsePackNew)) + if (!this.DataChecking(responsePackNew)) { return new List<GroupList>(); } @@ -238,7 +238,7 @@ d.Add("sidGroups", new List<Dictionary<string, object>> { d1 }); var responsePackNew = RequestServerhomeId(d, NewAPI.Api_Post_GroupPlayerList, "閫氳繃鍒楄〃鍚嶈幏鍙栨瓕鏇插垪琛�"); - if (!this.dataChecking(responsePackNew)) + if (!this.DataChecking(responsePackNew)) { return new List<PalyerSongListInfo>(); } @@ -282,7 +282,7 @@ /// </summary> /// <param name="responsePackNew">鍥炲鏁版嵁瀵硅薄</param> /// <returns></returns> - private bool dataChecking(ResponsePackNew responsePackNew) + public bool DataChecking(ResponsePackNew responsePackNew) { if (responsePackNew.Code != "0" || responsePackNew.Data == null || responsePackNew.Data.ToString() == "") { diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/Send.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/Send.cs new file mode 100644 index 0000000..0f57e71 --- /dev/null +++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/Send.cs @@ -0,0 +1,80 @@ +锘縰sing System; +using System.Threading; +using HDL_ON.Entity; + +namespace HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock +{ + public class Send + { + public Send() + { + } + + private static Send send = null; + + public static Send Currnet + { + get + { + if (send == null) + { + send = new Send(); + } + + return send; + } + } + + /// <summary> + /// 瑙g粦璁惧 + /// </summary> + /// <param name="function">褰撳墠鐨勮澶�</param> + /// <param name="action">鍥炶皟缁撴灉</param> + public void DelDevice(Function function, Action<bool> action) + { + new Thread(() => + { + try + { + //HDL_ON.UI.Music.SendMethod.Current.RequestServerhomeId(); + + if (function != null) + { + action?.Invoke(false); + } + } + catch(Exception s) { + } + }) + { IsBackground = true }.Start(); + + } + + + /// <summary> + /// 鑾峰彇鐢垫睜鐢甸噺 + /// </summary> + /// <param name="function">褰撳墠鐨勮澶�</param> + /// <param name="action">鍥炶皟缁撴灉</param> + public void GetCellValue(Function function, Action<int> action) + { + new Thread(() => + { + try + { + //HDL_ON.UI.Music.SendMethod.Current.RequestServerhomeId(); + + if (function != null) + { + action?.Invoke(8); + } + } + catch (Exception s) + { + } + }) + { IsBackground = true }.Start(); + + } + } +} diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockListPage.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockListPage.cs index 848166f..3f89126 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockListPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockListPage.cs @@ -171,10 +171,13 @@ this.dicBatteryContr[i_device.sid] = btnBattery; frameBack.ButtonClickEvent += (sender, e) => { - var form = new VideoDoorLockPage(i_device, btnName, btnRoom,Comerom.function); + var form = new VideoDoorLockPage(i_device, btnName, btnRoom,Comerom.function,()=> { + this.CloseForm(); + }); MainPage.BasePageView.AddChidren(form); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; form.Show(); + //var form = new VideoDoorLockPage(); //form.AddForm(i_device, new Button(), btnName, btnRoom); }; diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs index b6922dc..1a58e4d 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs @@ -44,6 +44,10 @@ /// </summary> private Button btnCell; /// <summary> + /// 鐢甸噺杩涘害鏉� + /// </summary> + private DiyArcSeekBar cellDiyArcSeekBar; + /// <summary> ///鏀惰棌鍥炬爣 /// </summary> private Button btnCollectIcon; @@ -55,10 +59,6 @@ /// 瀹炴椂瑙嗛 /// </summary> private CustomFrameLayout rtvFL; - /// <summary> - /// 涓�閿紑閿� - /// </summary> - private CustomFrameLayout openFL; /// <summary> /// 涓存椂瀵嗙爜 /// </summary> @@ -72,6 +72,10 @@ /// 琛ㄧず鏉ヨ嚜閭d釜鐣岄潰 /// </summary> private Comerom Comerom; + /// <summary> + /// 鍒犻櫎璁惧鍚庨渶瑕佹洿鏂扮晫闈㈢殑鍥炶皟 + /// </summary> + public Action action; #endregion @@ -81,12 +85,13 @@ /// <param name="function">璁惧</param> /// <param name="btnDeviceName">涓婁竴绾х晫闈㈢殑璁惧鍚嶅瓧鎺т欢</param> /// <param name="btnRoomName">涓婁竴绾х晫闈㈢殑鎴块棿鍚嶅瓧鎺т欢</param> - public VideoDoorLockPage(Function function, Button btnDeviceName, Button btnRoomName, Comerom comerom) + public VideoDoorLockPage(Function function, Button btnDeviceName, Button btnRoomName, Comerom comerom, Action action) { this.device = function; this.btnDeviceName = btnDeviceName; this.btnRoomName = btnRoomName; this.Comerom = comerom; + this.action = action; } @@ -95,10 +100,15 @@ //鍒濆鍖朥I this.InitUI(); //鍒濆鍖栦簨浠� - this.EventListener (); + this.EventListener(); + //璇诲彇鏁版嵁 + this.ReadData(); + } + + /// <summary> /// 鍒濆鍖栫晫闈� /// </summary> @@ -108,16 +118,16 @@ this.BackgroundColor = MusicColor.ViewColor; this.topView = new TopView(); this.topView.setBtn.Visible = true; - this.topView.topNameBtn.TextID =StringId.shipinmensuo; + this.topView.topNameBtn.TextID = StringId.shipinmensuo; this.AddChidren(topView.TopFLayoutView()); - var middleFl=new FrameLayout + var middleFl = new FrameLayout { Y = topView.fLayout.Bottom, Height = Application.GetRealHeight(H_W.H - H_W.T_Height), }; this.AddChidren(middleFl); - var whiteFl = new FrameLayout + var whiteFl = new FrameLayout { Y = Application.GetRealHeight(24), X = Application.GetRealWidth(24), @@ -128,48 +138,6 @@ }; middleFl.AddChidren(whiteFl); - - btnCurrDeviceName= new Button - { - TextSize = TextSize.Text24, - TextColor = MusicColor.Text18Color, - Width = Application.GetRealWidth(160), - Height = Application.GetRealHeight(33), - Y = Application.GetRealHeight(16), - X = Application.GetRealWidth(16), - Text = this.device.name, - TextAlignment=TextAlignment.CenterLeft, - }; - whiteFl.AddChidren(btnCurrDeviceName); - - btnCurrDeviceRoom = new Button - { - TextSize = TextSize.Text12, - TextColor = MusicColor.MusicNoTxetColor, - Width = Application.GetRealWidth(160), - Height = Application.GetRealHeight(33), - Y = btnCurrDeviceName.Bottom+ Application.GetRealHeight(4), - X = Application.GetRealWidth(16), - Text = this.device.GetRoomListName(), - TextAlignment = TextAlignment.CenterLeft, - }; - whiteFl.AddChidren(btnCurrDeviceRoom); - btnCurrDeviceRoom.Width=btnCurrDeviceName.GetTextWidth(); - - btnCell = new Button - { - TextSize = TextSize.Text10, - TextColor = MusicColor.TextColor, - Y = Application.GetRealHeight(43), - X = btnCurrDeviceRoom.Right+Application.GetRealWidth(17), - //Text ="60"+"%", - //TextAlignment = TextAlignment.Center, - Width = Application.GetRealWidth(36), - Height = Application.GetRealWidth(36), - UnSelectedImagePath ="FunctionIcon/DoorLock/Cell.png", - }; - whiteFl.AddChidren(btnCell); - btnCollectIcon = new Button { X = Application.GetRealWidth(264), @@ -178,10 +146,84 @@ Height = Application.GetRealWidth(40), UnSelectedImagePath = "MusicIcon/collect.png", SelectedImagePath = "MusicIcon/collectSelected.png", - IsSelected= this.device.collect, + IsSelected = this.device.collect, Name = "collect" }; whiteFl.AddChidren(btnCollectIcon); + + btnCurrDeviceName = new Button + { + TextSize = TextSize.Text24, + TextColor = MusicColor.Text18Color, + Width = Application.GetRealWidth(160), + Height = Application.GetRealHeight(33), + Y = Application.GetRealHeight(16), + X = Application.GetRealWidth(16), + Text = this.device.name, + TextAlignment = TextAlignment.CenterLeft, + }; + whiteFl.AddChidren(btnCurrDeviceName); + + btnCurrDeviceName.Width = btnCurrDeviceName.GetTextWidth(); + if (btnCurrDeviceName.GetTextWidth() > btnCollectIcon.X) + { + btnCurrDeviceName.Width = btnCollectIcon.X; + } + btnCurrDeviceRoom = new Button + { + TextSize = TextSize.Text12, + TextColor = MusicColor.MusicNoTxetColor, + Width = Application.GetRealWidth(160), + Height = Application.GetRealHeight(17), + Y = btnCurrDeviceName.Bottom + Application.GetRealHeight(4), + X = Application.GetRealWidth(16), + Text = this.device.GetRoomListName(), + TextAlignment = TextAlignment.CenterLeft, + }; + whiteFl.AddChidren(btnCurrDeviceRoom); + btnCurrDeviceRoom.Width = btnCurrDeviceRoom.GetTextWidth(); + + var cellFrame = new FrameLayout + { + X = btnCurrDeviceRoom.Right + Application.GetRealWidth(20), + Y = btnCurrDeviceName.Bottom + Application.GetRealHeight(5), + Width = Application.GetRealWidth(30), + Height = Application.GetRealHeight(16), + }; + whiteFl.AddChidren(cellFrame); + + + + cellDiyArcSeekBar = new DiyArcSeekBar + { + X = Application.GetRealWidth(3), + Y = Application.GetRealHeight(3), + Width = cellFrame.Width + Application.GetRealWidth(-6), + Height = cellFrame.Height + Application.GetRealHeight(-6), + Progress = 60, + ProgressBarColor = MusicColor.MusicNoTxetColor, + MaxValue = 100, + MinValue = 0, + + //IsCanMove = false, + //IsCanScrolled=false, + }; + //cellFrame.AddChidren(cellDiyArcSeekBar); + + btnCell = new Button + { + TextSize = TextSize.Text10, + TextColor = MusicColor.TextColor, + Text = "60" + "%", + TextAlignment = TextAlignment.Center, + UnSelectedImagePath = "FunctionIcon/DoorLock/Cell.png", + }; + cellFrame.AddChidren(btnCell); + + + + + //闂ㄩ攣鐘舵�� btnDoorLockIcon = new Button { @@ -193,12 +235,12 @@ SelectedImagePath = "FunctionIcon/DoorLock/UnLocking.png", }; whiteFl.AddChidren(btnDoorLockIcon); - + int heightY = btnDoorLockIcon.Bottom + Application.GetRealHeight(70); //瀹炴椂瑙嗛 rtvFL = new CustomFrameLayout(CustomFrameLayout.widthFrameLayout, CustomFrameLayout.heightFrameLayout); whiteFl.AddChidren(rtvFL); - rtvFL.Y = btnDoorLockIcon.Bottom+ Application.GetRealHeight(45); - rtvFL.X = Application.GetRealWidth(68); + rtvFL.Y = heightY; + rtvFL.X = Application.GetRealWidth(41); rtvFL.AddImageView(); rtvFL.AddTextButtonView(); rtvFL.GetImageButton().UnSelectedImagePath = "FunctionIcon/DoorLock/RTV.png"; @@ -206,32 +248,24 @@ //鍘嗗彶璁板綍 recordFL = new CustomFrameLayout(CustomFrameLayout.widthFrameLayout, CustomFrameLayout.heightFrameLayout); whiteFl.AddChidren(recordFL); - recordFL.Y = btnDoorLockIcon.Bottom + Application.GetRealHeight(45); - recordFL.X = rtvFL.Right + Application.GetRealHeight(CustomFrameLayout.interval); + recordFL.Y = heightY; + recordFL.X = rtvFL.Right + Application.GetRealWidth(CustomFrameLayout.interval); recordFL.AddImageView(); recordFL.AddTextButtonView(); recordFL.GetImageButton().UnSelectedImagePath = "FunctionIcon/DoorLock/HistoryList.png"; recordFL.GetTextButton().TextID = StringId.lishijilu; - //涓�閿紑閿� - openFL = new CustomFrameLayout(CustomFrameLayout.widthFrameLayout, CustomFrameLayout.heightFrameLayout); - whiteFl.AddChidren(openFL); - openFL.X = rtvFL.X; - openFL.Y = rtvFL.Bottom+Application.GetRealHeight(14); - openFL.AddImageView(); - openFL.AddTextButtonView(); - openFL.GetImageButton().UnSelectedImagePath = "FunctionIcon/DoorLock/OneOpenLock.png"; - openFL.GetTextButton().TextID = StringId.yijiankaisuo; //涓存椂瀵嗙爜 pswFL = new CustomFrameLayout(CustomFrameLayout.widthFrameLayout, CustomFrameLayout.heightFrameLayout); whiteFl.AddChidren(pswFL); - pswFL.X = recordFL.X; - pswFL.Y = rtvFL.Bottom + Application.GetRealHeight(14); + pswFL.Y = heightY; + pswFL.X = recordFL.Right + Application.GetRealWidth(CustomFrameLayout.interval); pswFL.AddImageView(); pswFL.AddTextButtonView(); pswFL.GetImageButton().UnSelectedImagePath = "FunctionIcon/DoorLock/OneOpenLock.png"; pswFL.GetTextButton().TextID = StringId.linshimima1; - + #endregion + } /// <summary> @@ -261,7 +295,7 @@ this.btnRoomName.Text = this.device.GetRoomListName(); this.topView.topNameBtn.Text = this.device.name; this.btnCurrDeviceName.Text = this.device.name; - this.btnCurrDeviceRoom.Text= this.device.GetRoomListName(); + this.btnCurrDeviceRoom.Text = this.device.GetRoomListName(); ////浠庢柊璁$畻瀹藉害 //this.btnDeviceName.Text = btnDeviceName.Text; @@ -272,27 +306,54 @@ ////鍥炶皟浜嬩欢 //this.SettionFinishEvent?.Invoke(); + }, () => + { + //瑙g粦璁惧鍚� + this.RemoveFromParent(); + this.action?.Invoke(); }); MainPage.BasePageView.AddChidren(infoView); infoView.LoadPage(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; }; //鏀惰棌 - btnCollectIcon.MouseUpEventHandler += (sender, e) => + this.btnCollectIcon.MouseUpEventHandler += (sender, e) => { btnCollectIcon.IsSelected = this.device.collect = !btnCollectIcon.IsSelected; this.device.CollectFunction(); }; //瀹炴椂瑙嗛 - rtvFL.SetClickListener((fl, btnStateImage, btnStateText) => { }); - //涓�閿紑閿� - openFL.SetClickListener((fl, btnStateImage, btnStateText) => { }); - //涓存椂瀵嗙爜 - pswFL.SetClickListener((fl, btnStateImage, btnStateText) => { }); - //鍘嗗彶璁板綍 - recordFL.SetClickListener((fl, btnStateImage, btnStateText) => { }); - + this.rtvFL.SetClickListener((fl, btnStateImage, btnStateText) => + { + }); + //涓存椂瀵嗙爜 + this.pswFL.SetClickListener((fl, btnStateImage, btnStateText) => { }); + //鍘嗗彶璁板綍 + this.recordFL.SetClickListener((fl, btnStateImage, btnStateText) => { }); + + + } + /// <summary> + /// 鍒濆鏁版嵁 + /// </summary> + private void ReadData() + { + new System.Threading.Thread(() => + { + HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.Send.Currnet.GetCellValue(this.device, (value) => + { + Application.RunOnMainThread(() => + { + //this.cellDiyArcSeekBar.Progress = i; + //鏇存柊鐢甸噺鍊� + this.btnCell.Text = value + "%"; + }); + + }); + + }) + { IsBackground = true }.Start(); } } @@ -301,11 +362,11 @@ /// </summary> class CustomFrameLayout : FrameLayout { - public const int widthFrameLayout = 74; - public const int heightFrameLayout = 70; - public const int yFrameLayout = 353; - public const int xFrameLayout = 68; - public const int interval = 47;//琛屼腑鐨勫垪闂撮殧鍊� + public const int widthFrameLayout = 48; + public const int heightFrameLayout = 53; + public const int yFrameLayout = 378; + public const int xFrameLayout = 41; + public const int interval = 51;//琛屼腑鐨勫垪闂撮殧鍊� public CustomFrameLayout(int width, int height, int x = 0, int y = 0) { @@ -372,11 +433,7 @@ { EventHandler<MouseEventArgs> click = (sender, e) => { - if (action == null) - { - return; - } - action(this, btnStateImage, btnStateText); + action?.Invoke(this, btnStateImage, btnStateText); }; this.MouseUpEventHandler += click; btnStateImage.MouseUpEventHandler += click; -- Gitblit v1.8.0