Merge branch 'Dev-Branch' of http://59.41.255.150:6688/r/~wxr/OnPro into Dev-Branch
| | |
| | | 678=Current user data has been cleared, about to return to the previous page. |
| | | 679=Group control |
| | | 680=Colorful switch |
| | | 681=Test |
| | | 682=Group |
| | | 683=The time is invalid |
| | | 684=Length out of range |
| | | 685=note: User management can only manage added users. If you need to add a new user, please go to the lock end for relevant operations. |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | 676=中 |
| | | 677=高 |
| | | 678=当前用户数据已清空,即将返回上一页。 |
| | | 679=群控 |
| | | 679=组控 |
| | | 680=炫彩开关 |
| | | 681=自动炫彩测试 |
| | | 682=群组 |
| | | 683=该时间无效 |
| | | 684=长度超出范围 |
| | | 685=注:用户管理仅可对已添加用户进行管理。如需添加新用户,请前往锁端进行相关操作。 |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | 678=Current user data has been cleared, about to return to the previous page. |
| | | 679=Group control |
| | | 680=Colorful switch |
| | | 681=Test |
| | | 682=Group |
| | | 683=The time is invalid |
| | | 684=Length out of range |
| | | 685=note: User management can only manage added users. If you need to add a new user, please go to the lock end for relevant operations. |
| | | |
| | | |
| | | |
| | | |
| | |
| | | 678=Current user data has been cleared, about to return to the previous page. |
| | | 679=Group control |
| | | 680=Colorful switch |
| | | |
| | | 681=Test |
| | | 682=Group |
| | | 683=The time is invalid |
| | | 684=Length out of range |
| | | 685=note: User management can only manage added users. If you need to add a new user, please go to the lock end for relevant operations. |
| | | |
| | | |
| | | |
| | |
| | | 678=Current user data has been cleared, about to return to the previous page. |
| | | 679=Group control |
| | | 680=Colorful switch |
| | | 681=Test |
| | | 682=Group |
| | | 683=The time is invalid |
| | | 684=Length out of range |
| | | 685=note: User management can only manage added users. If you need to add a new user, please go to the lock end for relevant operations. |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | <AndroidAsset Include="Assets\Phone\LogicIcon\selectlocation.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Light\ColorfulBar.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\groupControl_blue.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\GroupControl_white.png" /> |
| | | <AndroidAsset Include="Assets\h5\index.html" /> |
| | | <AndroidAsset Include="Assets\h5\static\index.63b34199.css" /> |
| | | <AndroidAsset Include="Assets\h5\static\images\coal-save-ic.png" /> |
| | |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\DoorlockHelpImage4.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HorseRaceLampIcon.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\VideoDoorlockBatteryManagementBg.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\groupControl_white.png" /> |
| | | <AndroidAsset Include="Assets\Phone\Classification\Room\HomePagebg.png" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <AndroidResource Include="Resources\values\colors.xml" /> |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.8.1" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202307061"> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.0.0" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202307261"> |
| | | <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" /> |
| | | <uses-permission android:name="android.permission.RECEIVE_SMS" /> |
| | | <!--友盟--> |
| | |
| | | <MtouchEnableSGenConc>false</MtouchEnableSGenConc> |
| | | <CodesignEntitlements>Entitlements.plist</CodesignEntitlements> |
| | | <AllowUnsafeBlocks>true</AllowUnsafeBlocks> |
| | | <CodesignProvision>OnPro230605-1-Dev</CodesignProvision> |
| | | <CodesignProvision>OnPro230630-1-Dev</CodesignProvision> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' "> |
| | | <DebugType>none</DebugType> |
| | |
| | | <Reference Include="HDL.Shared.IOS.ScanQRCode"> |
| | | <HintPath>..\DLL\IOS\HDL.Shared.IOS.ScanQRCode.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Shared.IOS"> |
| | | <HintPath>..\DLL\Shared.IOS.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Shared.IOS.HDLLinphoneSDK"> |
| | | <HintPath>..\DLL\Linphone\iOS\Shared.IOS.HDLLinphoneSDK.dll</HintPath> |
| | | </Reference> |
| | |
| | | </Reference> |
| | | <Reference Include="EZSDK.IOS"> |
| | | <HintPath>..\DLL\IOS\EZSDK.IOS.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Shared.IOS"> |
| | | <HintPath>..\DLL\Shared.IOS.dll</HintPath> |
| | | </Reference> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Light\ColorfulBar.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\groupControl_blue.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\groupControl_white.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\DoorlockUserManager.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\groupControl.png" /> |
| | | <BundleResource Include="Resources\Phone\LogicIcon\SeriesIcon.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\UserRightsManagement\NfcIcon.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\UserRightsManagement\DigitalPasswordIcon.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\UserRightsManagement\FingerprintIcon.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\UserRightsManagement\DigitalPasswordOnIcon.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\UserRightsManagement\FingerprintOnIcon.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\UserRightsManagement\NfcOnIcon.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\UserRightsManagement\FaceOnIcon.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\UserRightsManagement\FaceIcon.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\peephole.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\securityipcamez.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\AutomaitcTriggerIcon_blue.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\AutomaitcTriggerIcon_white.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\FaceUnlockImage.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\ManualTriggerIcon_blue.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\ManualTriggerIcon_white.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\TouchUnlcokImage.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\DoorlockHelpImage1.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\DoorlockHelpImage2.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\DoorlockHelpImage3.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\DoorlockHelpImage4.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HorseRaceLampIcon.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\VideoDoorlockBatteryManagementBg.png" /> |
| | | <BundleResource Include="Resources\Phone\Classification\Room\HomePagebg.png" /> |
| | | <BundleResource Include="Resources\h5\index.html" /> |
| | | <BundleResource Include="Resources\h5\static\index.63b34199.css" /> |
| | | <BundleResource Include="Resources\h5\static\images\coal-save-ic.png" /> |
| | |
| | | <BundleResource Include="Resources\h5\static\img\equal-plant-ic.7ef6befa.png" /> |
| | | <BundleResource Include="Resources\h5\static\img\coal-save-ic.6c5fd125.png" /> |
| | | <BundleResource Include="Resources\h5\static\font\SourceHanSansCN-Normal.otf" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\DoorlockUserManager.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\groupControl.png" /> |
| | | <BundleResource Include="Resources\Phone\LogicIcon\SeriesIcon.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\UserRightsManagement\NfcIcon.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\UserRightsManagement\DigitalPasswordIcon.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\UserRightsManagement\FingerprintIcon.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\UserRightsManagement\DigitalPasswordOnIcon.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\UserRightsManagement\FingerprintOnIcon.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\UserRightsManagement\NfcOnIcon.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\UserRightsManagement\FaceOnIcon.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\UserRightsManagement\FaceIcon.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\peephole.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\securityipcamez.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\AutomaitcTriggerIcon_blue.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\AutomaitcTriggerIcon_white.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\FaceUnlockImage.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\ManualTriggerIcon_blue.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\ManualTriggerIcon_white.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\TouchUnlcokImage.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\DoorlockHelpImage1.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\DoorlockHelpImage2.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\DoorlockHelpImage3.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\DoorlockHelpImage4.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HorseRaceLampIcon.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\VideoDoorlockBatteryManagementBg.png" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ITunesArtwork Include="iTunesArtwork" /> |
| | |
| | | <key>CFBundleName</key> |
| | | <string>On Pro</string> |
| | | <key>CFBundleShortVersionString</key> |
| | | <string>1.8.1</string> |
| | | <string>1.9.0</string> |
| | | <key>CFBundleURLTypes</key> |
| | | <array> |
| | | <dict> |
| | |
| | | </dict> |
| | | </array> |
| | | <key>CFBundleVersion</key> |
| | | <string>1.8.1</string> |
| | | <string>1.9.0</string> |
| | | <key>LSApplicationQueriesSchemes</key> |
| | | <array> |
| | | <string>weixinULAPI</string> |
| | |
| | | 678=Current user data has been cleared, about to return to the previous page. |
| | | 679=Group control |
| | | 680=Colorful switch |
| | | 681=Test |
| | | 682=Group |
| | | 683=The time is invalid |
| | | 684=Length out of range |
| | | 685=note: User management can only manage added users. If you need to add a new user, please go to the lock end for relevant operations. |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | 676=中 |
| | | 677=高 |
| | | 678=当前用户数据已清空,即将返回上一页。 |
| | | 679=群控 |
| | | 679=组控 |
| | | 680=炫彩开关 |
| | | 681=自动炫彩测试 |
| | | 682=群组 |
| | | 683=该时间无效 |
| | | 684=长度超出范围 |
| | | 685=注:用户管理仅可对已添加用户进行管理。如需添加新用户,请前往锁端进行相关操作。 |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | 678=Current user data has been cleared, about to return to the previous page. |
| | | 679=Group control |
| | | 680=Colorful switch |
| | | 681=Test |
| | | 682=Group |
| | | 683=The time is invalid |
| | | 684=Length out of range |
| | | 685=note: User management can only manage added users. If you need to add a new user, please go to the lock end for relevant operations. |
| | | |
| | | |
| | | |
| | | |
| | |
| | | 678=Current user data has been cleared, about to return to the previous page. |
| | | 679=Group control |
| | | 680=Colorful switch |
| | | |
| | | 681=Test |
| | | 682=Group |
| | | 683=The time is invalid |
| | | 684=Length out of range |
| | | 685=note: User management can only manage added users. If you need to add a new user, please go to the lock end for relevant operations. |
| | | |
| | | |
| | | |
| | |
| | | 678=Current user data has been cleared, about to return to the previous page. |
| | | 679=Group control |
| | | 680=Colorful switch |
| | | 681=Test |
| | | 682=Group |
| | | 683=The time is invalid |
| | | 684=Length out of range |
| | | 685=note: User management can only manage added users. If you need to add a new user, please go to the lock end for relevant operations. |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | code = Ins.HttpRequest.RefreshToken(); |
| | | if (code != StateCode.SUCCESS) |
| | | { |
| | | if (waitPage != null) |
| | | { |
| | | waitPage.RemoveFromParent(); |
| | | waitPage = null; |
| | | } |
| | | MainPage.Log($"刷新token失败"); |
| | | return; |
| | | } |
| | |
| | | code = Ins.HttpRequest.GetHomePager(); |
| | | if (code != StateCode.SUCCESS) |
| | | { |
| | | if (waitPage != null) |
| | | { |
| | | waitPage.RemoveFromParent(); |
| | | waitPage = null; |
| | | } |
| | | MainPage.Log($"刷新住宅信息失败"); |
| | | return; |
| | | } |
| | |
| | | code = Ins.HttpRequest.GetUserInfo(); |
| | | if (code != StateCode.SUCCESS) |
| | | { |
| | | if (waitPage != null) |
| | | { |
| | | waitPage.RemoveFromParent(); |
| | | waitPage = null; |
| | | } |
| | | MainPage.Log($"刷新个人信息失败"); |
| | | return; |
| | | } |
| | |
| | | FunctionList.List.ClearDatas(); |
| | | //MainPage.Log($"============设备============开始" + FunctionList.List.Functions.Count); |
| | | //MainPage.Log($"读取设备信息成功"); |
| | | //MainPage.Log($"sid列表获取====" + deviceResult.Data.ToString()); |
| | | MainPage.Log($"sid列表获取====" + deviceResult.Data.ToString()); |
| | | var deviceList = JsonConvert.DeserializeObject<DevcieApiPack>(deviceResult.Data.ToString()); |
| | | if (deviceList == null) |
| | | { |
| | |
| | | case "464027401@qq.com": |
| | | case "13580507523": |
| | | case "15626203746": |
| | | case "18316672920": |
| | | return; |
| | | } |
| | | |
| | |
| | | public static class StringId |
| | | { |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 注:用户管理仅可对已添加用户进行管理。如需添加新用户,请前往锁端进行相关操作。 |
| | | /// </summary> |
| | | public const int VideoDoorlockManagerTip = 685; |
| | | /// <summary> |
| | | /// 长度超出范围 |
| | | /// </summary> |
| | | public const int LengthOutOfRange = 684; |
| | | /// <summary> |
| | | /// 该时间无效 |
| | | /// </summary> |
| | | public const int TimeInvalid = 683; |
| | | //public const int |
| | | /// <summary> |
| | | /// 群组(跑马灯分组) |
| | | /// </summary> |
| | | public const int HorseRaceLampGroup = 682; |
| | | /// <summary> |
| | | /// 自动炫彩测试 |
| | | /// </summary> |
| | | public const int CulorfulTest = 681; |
| | | /// <summary> |
| | | /// 炫彩开关 |
| | | /// </summary> |
| | | public const int ColorfulSwitch = 680; |
| | | /// <summary> |
| | | /// 群控 |
| | | /// 组控 |
| | | /// </summary> |
| | | public const int GroupControl = 679; |
| | | /// <summary> |
| | |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 视频门锁 |
| | | /// </summary> |
| | |
| | | else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appDeviceRefresh/up") |
| | | { |
| | | MainPage.Log("设备数据刷新通知"); |
| | | var deviceResult = new HttpServerRequest().GetDeviceList(); |
| | | if (deviceResult.Code == StateCode.SUCCESS) |
| | | { |
| | | MainPage.Log($"读取设备信息成功"); |
| | | var deviceList = Newtonsoft.Json.JsonConvert.DeserializeObject<DevcieApiPack>(deviceResult.Data.ToString()); |
| | | if (deviceList == null) |
| | | { |
| | | deviceList = new DevcieApiPack(); |
| | | } |
| | | string delFile = ""; |
| | | if (FunctionList.List.GetDeviceFunctionList().Count > 0) |
| | | { |
| | | for (int i = 0; i < FunctionList.List.GetDeviceFunctionList().Count;) |
| | | { |
| | | var localFunction = FunctionList.List.GetDeviceFunctionList()[i]; |
| | | if (SPK.MusicSpkList().Contains(localFunction.spk)) |
| | | { |
| | | i++; |
| | | continue; |
| | | } |
| | | var newFunction = deviceList.list.Find((obj) => obj.deviceId == localFunction.deviceId); |
| | | |
| | | if (delFile == localFunction.savePath) |
| | | { |
| | | i++; |
| | | continue; |
| | | } |
| | | delFile = localFunction.savePath; |
| | | FunctionList.List.DeleteFunction(localFunction); |
| | | } |
| | | } |
| | | //处理剩下的新增功能 |
| | | foreach (var newFunction in deviceList.list) |
| | | { |
| | | newFunction.SaveFunctionFile(); |
| | | FunctionList.List.IniFunctionList(newFunction.savePath); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | MainPage.Log($"读取云端设备数据失败:Code:{deviceResult.Code}; Msg:{deviceResult.message}"); |
| | | } |
| | | } |
| | | //网关密钥变化 |
| | | else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/custom/mqtt/secret/change") |
| | |
| | | //测试账号,不挤下线 |
| | | switch (UserInfo.Current.userMobileInfo) |
| | | { |
| | | case "18316672920": |
| | | case "15626203746": |
| | | case "464027401@qq.com": |
| | | return; |
| | |
| | | /// <summary> |
| | | /// 更改门锁用户备注名 |
| | | /// </summary> |
| | | public const string Api_Post_setDoorUserRemark = "/home-wisdom/platform/yingshi/lock/user/list"; |
| | | public const string Api_Post_setDoorUserRemark = "/home-wisdom/platform/yingshi/lock/setDoorUserRemark"; |
| | | /// <summary> |
| | | /// 删除用户数字密码 |
| | | /// </summary> |
| | |
| | | //先清空呼叫和监视设备信息 |
| | | if (clearCallInfo) |
| | | { |
| | | InitCallInfo(null); |
| | | //InitCallInfo(null);//造成接收呼叫时开锁开锁异常 |
| | | } |
| | | |
| | | HDLSipInfo mHDLSipInfo = GetHDLSipInfo(mHDLCallVideoInfo.HomeId); |
| | |
| | | { |
| | | instance = new DB_ResidenceData(); |
| | | instance.SaveResidenceData(); |
| | | instance.residenceImage = "Classification/Room/Roombg.png"; |
| | | instance.residenceImage = "Classification/Room/HomePagebg.png"; |
| | | instance.HomeGateway = new HomeGatewayInfo() |
| | | { |
| | | homeId = "1396717478877241345", |
| | |
| | | instance = new DB_ResidenceData { }; |
| | | return instance; |
| | | } |
| | | instance.residenceImage = "Classification/Room/Roombg.png"; |
| | | instance.residenceImage = "Classification/Room/HomePagebg.png"; |
| | | //初始化住宅功能数据 |
| | | SpatialInfo.CurrentSpatial.InitRoomListFunctions(); |
| | | |
| | |
| | | var list = new List<FunctionAttributes>(); |
| | | if (spk == SPK.GroupControl) |
| | | { |
| | | lock (list) |
| | | { |
| | | var gc = FunctionList.List.groupControls.Find((obj) => obj.sid == sid); |
| | | if (gc != null) |
| | | { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | else |
| | | { |
| | |
| | | /// 当前值 |
| | | /// </summary> |
| | | public object curValue = new object(); |
| | | /// <summary> |
| | | /// 属性单位 |
| | | /// </summary> |
| | | public string unit=string.Empty; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\VideoDoorlockFaceUnlockHelpPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\VideoDoorlockAudioSetupPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\VideoDoorlockBatteryManagementPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\2-Classification\SeriesFunctionListPage.cs" />
|
| | | </ItemGroup>
|
| | | <ItemGroup>
|
| | | <Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" />
|
| | |
| | | /// <summary> |
| | | /// 版本号 |
| | | /// </summary> |
| | | public static string VersionString = "1.8.1"; |
| | | public static string VersionString = "2.0.0"; |
| | | ///// <summary> |
| | | ///// 客户端类型 |
| | | ///// </summary> |
| | |
| | | SPK.AirSwitch, |
| | | SPK.PanelSocket,SPK.ElectricSocket, |
| | | SPK.MechanicalArm,SPK.IpCam_Imou, |
| | | SPK.GroupControl |
| | | SPK.GroupControl, |
| | | SPK.AvMusic,SPK.MusicStandard |
| | | }; |
| | | |
| | | |
| | |
| | | #if DEBUG |
| | | if (msg.Contains("收到数据") |
| | | || msg.Contains("发送") |
| | | || msg.Contains("接收到推送") |
| | | |
| | | ) |
| | | Console.WriteLine(msg); |
| | |
| | | { |
| | | public partial class PublicAssmebly |
| | | { |
| | | public Button btnTip; |
| | | |
| | | public int entryMaxLength = 40; |
| | | //public Action entrylistener; |
| | | |
| | | void EditParaterEvent(Button btnConfirm, int errorId_IsNullOrEmpty, int errorId_ContainsPar, List<string> list, EditText editText, Action<string> callBackAction, |
| | | FrameLayout contentView, Button btnLine, Button btnCancel, FrameLayout editView, Dialog dialog, int titleId) |
| | | { |
| | | |
| | | var btnTip = new Button() |
| | | btnTip = new Button() |
| | | { |
| | | X = editView.X, |
| | | Y = editView.Bottom, |
| | |
| | | |
| | | etParater.TextChangeEventHandler = (sender, e) => |
| | | { |
| | | if (etParater.Text.Length > 20) |
| | | if (System.Text.Encoding.Default.GetBytes(etParater.Text).Length > entryMaxLength) |
| | | { |
| | | etParater.Text = etParater.Text.Remove(20); |
| | | |
| | | #if __ANDROID__ |
| | | etParater.SetSelectionEnd(); |
| | | #endif |
| | | //entrylistener?.Invoke(); |
| | | } |
| | | }; |
| | | |
| | |
| | | break; |
| | | case SPK.MusicStandard: |
| | | case SPK.AvMusic: |
| | | //Music.A31MusicModel.Current= new Music.A31MusicModel { functionMusic = function };//当前播放器 |
| | | //var a31PlayMusicPage = new Music.A31PlayMusicPage(); |
| | | //MainPage.BasePageView.AddChidren(a31PlayMusicPage); |
| | | //a31PlayMusicPage.Show(); |
| | | //MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | Music.A31MusicModel.Current = new Music.A31MusicModel { functionMusic = function };//当前播放器 |
| | | var a31PlayMusicPage = new Music.A31PlayMusicPage(); |
| | | MainPage.BasePageView.AddChidren(a31PlayMusicPage); |
| | | a31PlayMusicPage.Show(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | break;
|
| | | case SPK.LightCCT: |
| | | var TureView = new ColorTureLampPage(function); |
| | |
| | | //etAccount.Text = "13143792049"; |
| | | etAccount.Text = "18688414428";//天河3楼 |
| | | //etAccount.Text = "18244942707"; |
| | | //etAccount.Text = "12345678904"; |
| | | //etAccount.Text = "13418062953"; |
| | | etAccount.Text = "13138683659"; |
| | | //etAccount.Text = "15217626103"; |
| | |
| | | //etAccount.Text = "18321091245"; |
| | | //etAccount.Text = "13751916353"; |
| | | etAccount.Text = "13549566666"; |
| | | etAccount.Text = "18316672920"; |
| | | etAccount.Text = "support7@hdlautomation.com"; |
| | | etAccount.Text = "13375012446";//测试服务器 |
| | | etAccount.Text = "15855403939"; |
| | | etAccount.Text = "15006564444"; |
| | | etAccount.Text = "13580507523"; |
| | | //etAccount.Text = "12345678904";//2.0 测试 萤石 |
| | | etAccount.Text = "18316672920"; |
| | | } |
| | | else |
| | | { |
| | |
| | | /// <summary> |
| | | /// 切换显示功能类型区域 |
| | | /// </summary> |
| | | FrameLayout changeView; |
| | | /// <summary> |
| | | /// 切换显示设备功能按钮 |
| | | /// </summary> |
| | | Button btnChangeFunction; |
| | | /// <summary> |
| | | /// 切换显示场景功能按钮 |
| | | /// </summary> |
| | | Button btnChangeScene; |
| | | /// <summary> |
| | | /// 切换显示场组控按钮 |
| | | /// </summary> |
| | | Button btnChangeGroupControl; |
| | | FrameLayout changeBaseView; |
| | | //FrameLayout changeView; |
| | | ///// <summary> |
| | | ///// 切换显示设备功能按钮 |
| | | ///// </summary> |
| | | //Button btnChangeFunction; |
| | | ///// <summary> |
| | | ///// 切换显示场景功能按钮 |
| | | ///// </summary> |
| | | //Button btnChangeScene; |
| | | ///// <summary> |
| | | ///// 切换显示场组控按钮 |
| | | ///// </summary> |
| | | //Button btnChangeGroupControl; |
| | | /// <summary> |
| | | /// 功能显示区域 |
| | | /// </summary> |
| | |
| | | #endregion |
| | | |
| | | #region 报警信息 |
| | | Button btnMsgBg; |
| | | Button btnMsgTime; |
| | | Button btnMsg; |
| | | //Button btnMsgBg; |
| | | //Button btnMsgTime; |
| | | //Button btnMsg; |
| | | Button btnMsgIcon; |
| | | #endregion |
| | | |
| | |
| | | }; |
| | | topView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(216), |
| | | Height = Application.GetRealHeight(113),//216), |
| | | BackgroundImagePath = DB_ResidenceData.Instance.residenceImage, |
| | | }; |
| | | bodyView.AddChidren(topView); |
| | | #else |
| | | VerticalRefreshLayout refreshLayout = new VerticalRefreshLayout() |
| | | { |
| | | Height = Application.GetRealHeight(216), |
| | | Height = Application.GetRealHeight(113),//216), |
| | | BackgroundImagePath = DB_ResidenceData.Instance.residenceImage, |
| | | }; |
| | | bodyView.AddChidren(refreshLayout); |
| | |
| | | }; |
| | | topView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(216), |
| | | Height = Application.GetRealHeight(113),//216), |
| | | }; |
| | | refreshLayout.AddChidren(topView); |
| | | #endif |
| | |
| | | |
| | | |
| | | #region msg |
| | | FrameLayout msgView; |
| | | msgView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(164), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealHeight(28), |
| | | }; |
| | | topView.AddChidren(msgView); |
| | | //FrameLayout msgView; |
| | | //msgView = new FrameLayout() |
| | | //{ |
| | | // Y = Application.GetRealHeight(164), |
| | | // Gravity = Gravity.CenterHorizontal, |
| | | // Width = Application.GetRealWidth(343), |
| | | // Height = Application.GetRealHeight(28), |
| | | //}; |
| | | //topView.AddChidren(msgView); |
| | | |
| | | btnMsgBg = new Button() |
| | | { |
| | | BackgroundColor = CSS_Color.MainColor,//0x3F4484F4, |
| | | Alpha = 0.4f, |
| | | }; |
| | | msgView.AddChidren(btnMsgBg); |
| | | //btnMsgBg = new Button() |
| | | //{ |
| | | // BackgroundColor = CSS_Color.MainColor,//0x3F4484F4, |
| | | // Alpha = 0.4f, |
| | | //}; |
| | | //msgView.AddChidren(btnMsgBg); |
| | | |
| | | |
| | | btnMsgIcon = new Button() |
| | | { |
| | | X = Application.GetRealWidth(12), |
| | | Gravity = Gravity.CenterVertical, |
| | | X = Application.GetRealWidth(290), |
| | | Y = Application.GetRealHeight(35), |
| | | Width = Application.GetMinRealAverage(24), |
| | | Height = Application.GetMinRealAverage(24), |
| | | UnSelectedImagePath = "Collection/MsgIcon.png", |
| | | SelectedImagePath = "Collection/MsgIconTip.png", |
| | | }; |
| | | msgView.AddChidren(btnMsgIcon); |
| | | topView.AddChidren(btnMsgIcon); |
| | | |
| | | |
| | | btnMsg = new Button() |
| | | { |
| | | X = Application.GetRealWidth(10) + btnMsgIcon.Right, |
| | | Width = Application.GetRealWidth(240), |
| | | Text = "...", |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | }; |
| | | msgView.AddChidren(btnMsg); |
| | | //btnMsg = new Button() |
| | | //{ |
| | | // X = Application.GetRealWidth(10) + btnMsgIcon.Right, |
| | | // Width = Application.GetRealWidth(240), |
| | | // Text = "...", |
| | | // TextColor = CSS_Color.MainBackgroundColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | // TextAlignment = TextAlignment.CenterLeft, |
| | | //}; |
| | | //msgView.AddChidren(btnMsg); |
| | | |
| | | |
| | | btnMsgTime = new Button() |
| | | { |
| | | X = Application.GetRealWidth(299), |
| | | Width = Application.GetRealWidth(44), |
| | | Text = "00:00", |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | }; |
| | | msgView.AddChidren(btnMsgTime); |
| | | //btnMsgTime = new Button() |
| | | //{ |
| | | // X = Application.GetRealWidth(299), |
| | | // Width = Application.GetRealWidth(44), |
| | | // Text = "00:00", |
| | | // TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | // TextAlignment = TextAlignment.CenterLeft, |
| | | //}; |
| | | //msgView.AddChidren(btnMsgTime); |
| | | |
| | | LoadEvent_GotoMessageCenterPage(); |
| | | |
| | |
| | | |
| | | bodyView.AddChidren(new Button() { Height = Application.GetRealHeight(20), BackgroundColor = 0x00000000 }); |
| | | |
| | | if (DB_ResidenceData.Instance.HomeGateway.isSupportGroupControl) |
| | | loadNavView(); |
| | | |
| | | #endregion |
| | | |
| | | #region ContextView |
| | | |
| | | |
| | | functionViews = new List<FrameLayout>(); |
| | | |
| | | LoadContentView(); |
| | | |
| | | #endregion |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | changeView = new FrameLayout() |
| | | MainPage.Log($"HomePage LoadPage Error : {ex.Message}"); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | void loadNavView() |
| | | { |
| | | if(changeBaseView == null) |
| | | { |
| | | changeBaseView = new FrameLayout() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Height = Application.GetRealHeight(62), |
| | | }; |
| | | bodyView.AddChidren(changeBaseView); |
| | | } |
| | | else |
| | | { |
| | | changeBaseView.RemoveAll(); |
| | | } |
| | | |
| | | if (contentView == null) |
| | | { |
| | | contentView = new PageLayout() |
| | | { |
| | | Height = Application.GetRealHeight(310 + 30 + 10 + 100), //20为超出部分 |
| | | IsShowPoint = false, |
| | | }; |
| | | bodyView.AddChidren(contentView); |
| | | } |
| | | |
| | | if (DB_ResidenceData.Instance.HomeGateway.isSupportGroupControl && FunctionList.List.groupControls.Count > 0) |
| | | { |
| | | var changeView = new FrameLayout() |
| | | { |
| | | //Y = Application.GetRealHeight(20) + topView.Bottom, |
| | | Gravity = Gravity.CenterHorizontal, |
| | |
| | | Height = Application.GetRealHeight(62), |
| | | BackgroundImagePath = "Collection/ChangeViewbg.png", |
| | | }; |
| | | bodyView.AddChidren(changeView); |
| | | changeBaseView.AddChidren(changeView); |
| | | |
| | | btnChangeFunction = new Button() |
| | | var btnChangeFunction = new Button() |
| | | { |
| | | X = Application.GetRealWidth(10), |
| | | Width = Application.GetRealWidth(114 - 10), |
| | |
| | | }; |
| | | changeView.AddChidren(btnLine); |
| | | |
| | | btnChangeScene = new Button() |
| | | var btnChangeScene = new Button() |
| | | { |
| | | X = btnLine.Right, |
| | | Width = Application.GetRealWidth(114 - 10), |
| | |
| | | }; |
| | | changeView.AddChidren(btnLine2); |
| | | |
| | | btnChangeGroupControl = new Button() |
| | | var btnChangeGroupControl = new Button() |
| | | { |
| | | X = btnLine2.Right, |
| | | Width = Application.GetRealWidth(114 - 10), |
| | |
| | | TextAlignment = TextAlignment.Center, |
| | | }; |
| | | changeView.AddChidren(btnChangeGroupControl); |
| | | |
| | | |
| | | |
| | | btnChangeGroupControl.MouseUpEventHandler = (sender, e) => { |
| | | btnChangeFunction.IsSelected = false; |
| | | btnChangeFunction.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeFunction.IsBold = false; |
| | | btnChangeScene.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeScene.IsSelected = false; |
| | | btnChangeScene.IsBold = false; |
| | | btnChangeGroupControl.IsSelected = true; |
| | | btnChangeGroupControl.TextSize = CSS.CSS_FontSize.HeadlineFontSize; |
| | | btnChangeGroupControl.IsBold = true; |
| | | CurShowTypeContent = 2; |
| | | contentView.PageIndex = 2; |
| | | }; |
| | | |
| | | btnChangeFunction.MouseUpEventHandler = (sender, e) => { |
| | | btnChangeFunction.IsSelected = true; |
| | | btnChangeFunction.TextSize = CSS.CSS_FontSize.HeadlineFontSize; |
| | | btnChangeFunction.IsBold = true; |
| | | btnChangeScene.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeScene.IsSelected = false; |
| | | btnChangeScene.IsBold = false; |
| | | CurShowTypeContent = 0; |
| | | contentView.PageIndex = 0; |
| | | |
| | | btnChangeGroupControl.IsSelected = false; |
| | | btnChangeGroupControl.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeGroupControl.IsBold = false; |
| | | }; |
| | | btnChangeScene.MouseUpEventHandler = (sender, e) => { |
| | | btnChangeScene.IsSelected = true; |
| | | btnChangeScene.TextSize = CSS.CSS_FontSize.HeadlineFontSize; |
| | | btnChangeScene.IsBold = true; |
| | | btnChangeFunction.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeFunction.IsSelected = false; |
| | | btnChangeFunction.IsBold = false; |
| | | CurShowTypeContent = 1; |
| | | contentView.PageIndex = 1; |
| | | |
| | | btnChangeGroupControl.IsSelected = false; |
| | | btnChangeGroupControl.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeGroupControl.IsBold = false; |
| | | }; |
| | | |
| | | contentView.PageChange = (sender, e) => |
| | | { |
| | | if (contentView.PageIndex == 0) |
| | | { |
| | | btnChangeFunction.IsSelected = true; |
| | | btnChangeFunction.TextSize = CSS.CSS_FontSize.HeadlineFontSize; |
| | | btnChangeFunction.IsBold = true; |
| | | btnChangeScene.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeScene.IsSelected = false; |
| | | btnChangeScene.IsBold = false; |
| | | btnChangeGroupControl.IsSelected = false; |
| | | btnChangeGroupControl.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeGroupControl.IsBold = false; |
| | | } |
| | | else if (contentView.PageIndex == 1) |
| | | { |
| | | btnChangeScene.IsSelected = true; |
| | | btnChangeScene.TextSize = CSS.CSS_FontSize.HeadlineFontSize; |
| | | btnChangeScene.IsBold = true; |
| | | btnChangeFunction.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeFunction.IsSelected = false; |
| | | btnChangeFunction.IsBold = false; |
| | | btnChangeGroupControl.IsSelected = false; |
| | | btnChangeGroupControl.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeGroupControl.IsBold = false; |
| | | } |
| | | else if (contentView.PageIndex == 2) |
| | | { |
| | | btnChangeFunction.IsSelected = false; |
| | | btnChangeFunction.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeFunction.IsBold = false; |
| | | btnChangeScene.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeScene.IsSelected = false; |
| | | btnChangeScene.IsBold = false; |
| | | btnChangeGroupControl.IsSelected = true; |
| | | btnChangeGroupControl.TextSize = CSS.CSS_FontSize.HeadlineFontSize; |
| | | btnChangeGroupControl.IsBold = true; |
| | | } |
| | | }; |
| | | |
| | | |
| | | } |
| | | else |
| | | { |
| | | changeView = new FrameLayout() |
| | | var changeView = new FrameLayout() |
| | | { |
| | | //Y = Application.GetRealHeight(20) + topView.Bottom, |
| | | Gravity = Gravity.CenterHorizontal, |
| | |
| | | Height = Application.GetRealHeight(62), |
| | | BackgroundImagePath = "Collection/ChangeViewbg.png", |
| | | }; |
| | | bodyView.AddChidren(changeView); |
| | | changeBaseView.AddChidren(changeView); |
| | | |
| | | btnChangeFunction = new Button() |
| | | var btnChangeFunction = new Button() |
| | | { |
| | | X = Application.GetRealWidth(10), |
| | | Width = Application.GetRealWidth(114 - 10), |
| | |
| | | }; |
| | | changeView.AddChidren(btnLine); |
| | | |
| | | btnChangeScene = new Button() |
| | | var btnChangeScene = new Button() |
| | | { |
| | | X = btnLine.Right, |
| | | Width = Application.GetRealWidth(114 - 10), |
| | |
| | | TextAlignment = TextAlignment.Center, |
| | | }; |
| | | changeView.AddChidren(btnChangeScene); |
| | | } |
| | | #endregion |
| | | |
| | | #region ContextView |
| | | contentView = new PageLayout() |
| | | |
| | | btnChangeFunction.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | //Y = changeView.Bottom, |
| | | Height = Application.GetRealHeight(310 + 30 + 10), //20为超出部分 |
| | | IsShowPoint = false, |
| | | |
| | | btnChangeFunction.IsSelected = true; |
| | | btnChangeFunction.TextSize = CSS.CSS_FontSize.HeadlineFontSize; |
| | | btnChangeFunction.IsBold = true; |
| | | btnChangeScene.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeScene.IsSelected = false; |
| | | btnChangeScene.IsBold = false; |
| | | CurShowTypeContent = 0; |
| | | contentView.PageIndex = 0; |
| | | }; |
| | | bodyView.AddChidren(contentView); |
| | | |
| | | functionViews = new List<FrameLayout>(); |
| | | |
| | | LoadContentView(); |
| | | |
| | | #endregion |
| | | } |
| | | catch (Exception ex) |
| | | btnChangeScene.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | MainPage.Log($"HomePage LoadPage Error : {ex.Message}"); |
| | | btnChangeScene.IsSelected = true; |
| | | btnChangeScene.TextSize = CSS.CSS_FontSize.HeadlineFontSize; |
| | | btnChangeScene.IsBold = true; |
| | | btnChangeFunction.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeFunction.IsSelected = false; |
| | | btnChangeFunction.IsBold = false; |
| | | CurShowTypeContent = 1; |
| | | contentView.PageIndex = 1; |
| | | }; |
| | | |
| | | contentView.PageChange = (sender, e) => |
| | | { |
| | | if (contentView.PageIndex == 0) |
| | | { |
| | | btnChangeFunction.IsSelected = true; |
| | | btnChangeFunction.TextSize = CSS.CSS_FontSize.HeadlineFontSize; |
| | | btnChangeFunction.IsBold = true; |
| | | btnChangeScene.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeScene.IsSelected = false; |
| | | btnChangeScene.IsBold = false; |
| | | } |
| | | else if (contentView.PageIndex == 1) |
| | | { |
| | | btnChangeScene.IsSelected = true; |
| | | btnChangeScene.TextSize = CSS.CSS_FontSize.HeadlineFontSize; |
| | | btnChangeScene.IsBold = true; |
| | | btnChangeFunction.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeFunction.IsSelected = false; |
| | | btnChangeFunction.IsBold = false; |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | contentView.PageIndex = CurShowTypeContent; |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 加载内容区域 |
| | | /// </summary> |
| | |
| | | { |
| | | if (contentView == null) |
| | | { |
| | | waitPage.Hide(); |
| | | return; |
| | | } |
| | | loadNavView(); |
| | | contentView.RemoveAll(); |
| | | deviceFunctionView = new VerticalScrolViewLayout(); |
| | | contentView.AddChidren(deviceFunctionView); |
| | |
| | | sceneFunctionView = new VerticalScrolViewLayout(); |
| | | contentView.AddChidren(sceneFunctionView); |
| | | LoadSceneFunctionControlZone(); |
| | | contentView.PageIndex = CurShowTypeContent; |
| | | if (DB_ResidenceData.Instance.HomeGateway.isSupportGroupControl) |
| | | { |
| | | gcFunctionView = new VerticalScrolViewLayout(); |
| | |
| | | GetUnreadPushMessages(); |
| | | RegisterGetPushMessageAction(); |
| | | |
| | | contentView.PageIndex = CurShowTypeContent; |
| | | if (waitPage != null) |
| | | { |
| | | waitPage.RemoveFromParent(); |
| | |
| | | foreach (var function in list) |
| | | { |
| | | //音乐模块有主从关系,需要特殊处理 |
| | | if (SPK.MusicSpkList().Contains( function.spk)) |
| | | { |
| | | continue; |
| | | } |
| | | else |
| | | //if (SPK.MusicSpkList().Contains( function.spk)) |
| | | //{ |
| | | // continue; |
| | | //} |
| | | //else |
| | | { |
| | | if (!function.collect) |
| | | continue; |
| | |
| | | /// </summary> |
| | | void LoadGroupControlFunctionControlZone() |
| | | { |
| | | |
| | | #region ContextView |
| | | gcFunctionView.RemoveAll(); |
| | | functionViews.Clear(); |
| | |
| | | if (index == 0) |
| | | { |
| | | var view = new FrameLayout(); |
| | | deviceFunctionView.AddChidren(view); |
| | | gcFunctionView.AddChidren(view); |
| | | |
| | | var btnNoCollectionBg = new Button() |
| | | { |
| | |
| | | { |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/Music/MusicIcon.png"; |
| | | btnIcon.SelectedImagePath = "FunctionIcon/Music/MusicOnIcon.png"; |
| | | btnCollection.Visible = false; |
| | | //btnCollection.Visible = false; |
| | | Button btnPower; |
| | | btnPower = new Button() |
| | | { |
| | |
| | | btnName.MouseUpEventHandler = skipControlPageEvent; |
| | | btnIcon.MouseUpEventHandler = skipControlPageEvent; |
| | | btnState.MouseUpEventHandler = skipControlPageEvent; |
| | | //不需要更新状态的动能列表 |
| | | //不需要更新状态的功能列表 |
| | | if(!SPK.NotStatusSpkList.Contains(function.spk) || function.spk != SPK.IpCam_Imou) |
| | | { |
| | | UpdataFunctionStates(function); |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 更新功能组控主页 |
| | | /// </summary> |
| | | public static void RefreshGroupControlView() |
| | | { |
| | | if (bodyView != null) |
| | | { |
| | | |
| | | if (FunctionList.List.groupControls.Count == 0) |
| | | { |
| | | bodyView.loadNavView(); |
| | | bodyView.contentView.PageIndex = 0; |
| | | } |
| | | bodyView.LoadGroupControlFunctionControlZone(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 更新连接状态图标 |
| | | /// </summary> |
| | | void CheckLinkStatus() |
| | |
| | | /// </summary> |
| | | void LoadEvent_ChangeShowedFunctionType() |
| | | { |
| | | btnChangeFunction.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | |
| | | btnChangeFunction.IsSelected = true; |
| | | btnChangeFunction.TextSize = CSS.CSS_FontSize.HeadlineFontSize; |
| | | btnChangeFunction.IsBold = true; |
| | | btnChangeScene.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeScene.IsSelected = false; |
| | | btnChangeScene.IsBold = false; |
| | | CurShowTypeContent = 0; |
| | | contentView.PageIndex = 0; |
| | | }; |
| | | |
| | | btnChangeScene.MouseUpEventHandler = (sender, e) => |
| | | if (DB_ResidenceData.Instance.HomeGateway.isSupportGroupControl && FunctionList.List.groupControls.Count>0) |
| | | { |
| | | btnChangeScene.IsSelected = true; |
| | | btnChangeScene.TextSize = CSS.CSS_FontSize.HeadlineFontSize; |
| | | btnChangeScene.IsBold = true; |
| | | btnChangeFunction.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeFunction.IsSelected = false; |
| | | btnChangeFunction.IsBold = false; |
| | | CurShowTypeContent = 1; |
| | | contentView.PageIndex = 1; |
| | | }; |
| | | |
| | | contentView.PageChange = (sender, e) => |
| | | { |
| | | if (contentView.PageIndex == 0) |
| | | { |
| | | btnChangeFunction.IsSelected = true; |
| | | btnChangeFunction.TextSize = CSS.CSS_FontSize.HeadlineFontSize; |
| | | btnChangeFunction.IsBold = true; |
| | | btnChangeScene.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeScene.IsSelected = false; |
| | | btnChangeScene.IsBold = false; |
| | | } |
| | | else if (contentView.PageIndex == 1) |
| | | { |
| | | btnChangeScene.IsSelected = true; |
| | | btnChangeScene.TextSize = CSS.CSS_FontSize.HeadlineFontSize; |
| | | btnChangeScene.IsBold = true; |
| | | btnChangeFunction.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeFunction.IsSelected = false; |
| | | btnChangeFunction.IsBold = false; |
| | | } |
| | | }; |
| | | |
| | | if (DB_ResidenceData.Instance.HomeGateway.isSupportGroupControl) |
| | | { |
| | | btnChangeGroupControl.MouseUpEventHandler = (sender, e) => { |
| | | btnChangeFunction.IsSelected = false; |
| | | btnChangeFunction.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeFunction.IsBold = false; |
| | | btnChangeScene.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeScene.IsSelected = false; |
| | | btnChangeScene.IsBold = false; |
| | | btnChangeGroupControl.IsSelected = true; |
| | | btnChangeGroupControl.TextSize = CSS.CSS_FontSize.HeadlineFontSize; |
| | | btnChangeGroupControl.IsBold = true; |
| | | CurShowTypeContent = 2; |
| | | contentView.PageIndex = 2; |
| | | }; |
| | | |
| | | btnChangeFunction.MouseUpEventHandler = (sender, e) => { |
| | | btnChangeFunction.IsSelected = true; |
| | | btnChangeFunction.TextSize = CSS.CSS_FontSize.HeadlineFontSize; |
| | | btnChangeFunction.IsBold = true; |
| | | btnChangeScene.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeScene.IsSelected = false; |
| | | btnChangeScene.IsBold = false; |
| | | CurShowTypeContent = 0; |
| | | contentView.PageIndex = 0; |
| | | |
| | | btnChangeGroupControl.IsSelected = false; |
| | | btnChangeGroupControl.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeGroupControl.IsBold = false; |
| | | }; |
| | | btnChangeScene.MouseUpEventHandler = (sender, e) => { |
| | | btnChangeScene.IsSelected = true; |
| | | btnChangeScene.TextSize = CSS.CSS_FontSize.HeadlineFontSize; |
| | | btnChangeScene.IsBold = true; |
| | | btnChangeFunction.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeFunction.IsSelected = false; |
| | | btnChangeFunction.IsBold = false; |
| | | CurShowTypeContent = 1; |
| | | contentView.PageIndex = 1; |
| | | |
| | | btnChangeGroupControl.IsSelected = false; |
| | | btnChangeGroupControl.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeGroupControl.IsBold = false; |
| | | }; |
| | | |
| | | contentView.PageChange = (sender, e) => |
| | | { |
| | | if (contentView.PageIndex == 0) |
| | | { |
| | | btnChangeFunction.IsSelected = true; |
| | | btnChangeFunction.TextSize = CSS.CSS_FontSize.HeadlineFontSize; |
| | | btnChangeFunction.IsBold = true; |
| | | btnChangeScene.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeScene.IsSelected = false; |
| | | btnChangeScene.IsBold = false; |
| | | btnChangeGroupControl.IsSelected = false; |
| | | btnChangeGroupControl.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeGroupControl.IsBold = false; |
| | | } |
| | | else if (contentView.PageIndex == 1) |
| | | { |
| | | btnChangeScene.IsSelected = true; |
| | | btnChangeScene.TextSize = CSS.CSS_FontSize.HeadlineFontSize; |
| | | btnChangeScene.IsBold = true; |
| | | btnChangeFunction.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeFunction.IsSelected = false; |
| | | btnChangeFunction.IsBold = false; |
| | | btnChangeGroupControl.IsSelected = false; |
| | | btnChangeGroupControl.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeGroupControl.IsBold = false; |
| | | } |
| | | else if (contentView.PageIndex == 2) |
| | | { |
| | | btnChangeFunction.IsSelected = false; |
| | | btnChangeFunction.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeFunction.IsBold = false; |
| | | btnChangeScene.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeScene.IsSelected = false; |
| | | btnChangeScene.IsBold = false; |
| | | btnChangeGroupControl.IsSelected = true; |
| | | btnChangeGroupControl.TextSize = CSS.CSS_FontSize.HeadlineFontSize; |
| | | btnChangeGroupControl.IsBold = true; |
| | | } |
| | | }; |
| | | |
| | | } |
| | | } |
| | |
| | | // } |
| | | // Control.Ins.SendWriteCommand(function, d); |
| | | //} |
| | | else if (function.spk == SPK.GroupControl) |
| | | { |
| | | d.Add("on_off", function.trait_on_off.curValue.ToString()); |
| | | (function as GroupControl).Control(d); |
| | | } |
| | | else |
| | | { |
| | | d.Add("on_off", function.trait_on_off.curValue.ToString()); |
| | |
| | | skipPage.LoadPage(backAction); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | btnMsgBg.MouseUpEventHandler = eventHandler; |
| | | btnMsgTime.MouseUpEventHandler = eventHandler; |
| | | btnMsg.MouseUpEventHandler = eventHandler; |
| | | //btnMsgBg.MouseUpEventHandler = eventHandler; |
| | | //btnMsgTime.MouseUpEventHandler = eventHandler; |
| | | //btnMsg.MouseUpEventHandler = eventHandler; |
| | | btnMsgIcon.MouseUpEventHandler = eventHandler; |
| | | } |
| | | |
| | |
| | | void ShowMesBtnState(PushMessageInfo pushMessageInfo, bool allRead) |
| | | { |
| | | if (bodyView == null) return; |
| | | btnMsg.Text = pushMessageInfo.messageTitle + ": " + pushMessageInfo.messageContent; |
| | | btnMsgTime.Text = GetUnixToDateTime(pushMessageInfo.createTime); |
| | | //btnMsg.Text = pushMessageInfo.messageTitle + ": " + pushMessageInfo.messageContent; |
| | | //btnMsgTime.Text = GetUnixToDateTime(pushMessageInfo.createTime); |
| | | btnMsgIcon.IsSelected = !allRead; |
| | | } |
| | | |
| | |
| | | void ResetMesBtnRead() |
| | | { |
| | | if (bodyView == null) return; |
| | | btnMsg.Text = "..."; |
| | | btnMsgTime.Text = "00:00"; |
| | | //btnMsg.Text = "..."; |
| | | //btnMsgTime.Text = "00:00"; |
| | | btnMsgIcon.IsSelected = false; |
| | | } |
| | | |
| | |
| | | { |
| | | case ShowFunction.Series: |
| | | functionCount = FunctionList.List.GetSeries().Count; |
| | | functionOnCount = FunctionList.List.GetSeries().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | //functionOnCount = FunctionList.List.GetSeries().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | break; |
| | | case ShowFunction.IpCam: |
| | | functionCount = FunctionList.List.GetIpCamImouList().Count; |
| | |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = "/" + functionCount, |
| | | }; |
| | | if (item == ShowFunction.Series) |
| | | { |
| | | btnFunctionCount.Text = functionCount.ToString(); |
| | | } |
| | | functionView.AddChidren(btnFunctionCount); |
| | | |
| | | if (item != ShowFunction.Series) |
| | | { |
| | | Button btnOpenCount = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | |
| | | BorderWidth = 0, |
| | | }; |
| | | functionView.AddChidren(btnOpenCount); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | case ShowFunction.Series: |
| | | btnName.TextID = StringId.HorseRaceLamp; |
| | | functionPageTitleId = StringId.HorseRaceLamp; |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => { |
| | | var page2 = new UI2.Classification.SeriesFunctionListPage(); |
| | | MainPage.BasePageView.AddChidren(page2); |
| | | page2.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | break; |
| | | case ShowFunction.Light: |
| | | #region Light |
| | |
| | | && item != ShowFunction.SecurityMonitoring |
| | | && item != ShowFunction.DoorLock |
| | | && ShowFunction.EnergyMonitoring != item |
| | | && ShowFunction.VideoIntercom != item && |
| | | ShowFunction.SecurityCenter != item |
| | | && ShowFunction.VideoIntercom != item |
| | | && ShowFunction.SecurityCenter != item |
| | | && ShowFunction.Series != item |
| | | && ShowFunction.Acst != item) |
| | | { |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => |
| | |
| | | |
| | | Inverter.Ins.H5Page.JSToNativeAction = (dictionary) => |
| | | { |
| | | //var jObj = dictionary; |
| | | //JObject jObj = JObject.Parse(Newtonsoft.Json.JsonConvert.SerializeObject(dictionary)); |
| | | |
| | | #if __IOS__ |
| | | JObject jObj = JObject.Parse(Newtonsoft.Json.JsonConvert.SerializeObject(dictionary)); |
| | | #else |
| | | var valuePairs = ""; |
| | | dictionary.TryGetValue("method", out valuePairs); |
| | | JObject jObj = JObject.Parse(valuePairs); |
| | | |
| | | #endif |
| | | |
| | | if (!jObj.ContainsKey("method") || !jObj.ContainsKey("data")) |
| | | { |
| | |
| | | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | |
| | | |
| | | var list = room.GetRoomFunctions(false); |
| | | |
| | | |
| | | foreach (var function in list) |
| | | { |
| | | if (MainPage.RoomNotSupportFunctionList.Contains(function.spk)) |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | | namespace HDL_ON.UI.UI2.Classification |
| | | { |
| | | /// <summary> |
| | | /// 跑马灯页面 |
| | | /// 序列页面 |
| | | /// </summary> |
| | | public class SeriesFunctionListPage : FrameLayout |
| | | { |
| | | FrameLayout bodyView; |
| | | public SeriesFunctionListPage() |
| | | { |
| | | bodyView = this; |
| | | } |
| | | |
| | | public void LoadPage() |
| | | { |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.HorseRaceLamp)).LoadTopView(); |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | |
| | | var functionListView = new VerticalScrolViewLayout() |
| | | { |
| | | Y = Application.GetRealHeight(64), |
| | | Height = Application.GetRealHeight(603 - 12), |
| | | }; |
| | | bodyView.AddChidren(functionListView); |
| | | |
| | | var waitPage = new Loading(); |
| | | bodyView.AddChidren(waitPage); |
| | | waitPage.Hide(); |
| | | |
| | | Dictionary<string, List<Button>> dicGroupButtons = new Dictionary<string, List<Button>>(); |
| | | |
| | | List<string> oidList = new List<string>(); |
| | | |
| | | foreach(var rgb in FunctionList.List.GetLightList()) |
| | | { |
| | | //if(rgb.spk == SPK.LightRGB) |
| | | { |
| | | var oid = rgb.sid.Substring(0, 16); |
| | | if (oidList.Contains(oid)) |
| | | { |
| | | continue; |
| | | } |
| | | var seriesList = FunctionList.List.GetSeries().FindAll((obj) => obj.sid.StartsWith(oid)); |
| | | if (seriesList.Count == 0) |
| | | { |
| | | continue; |
| | | } |
| | | oidList.Add(oid); |
| | | var list = new List<Function>(); |
| | | List<Button> groupButtons = new List<Button>(); |
| | | list.AddRange(seriesList); |
| | | var groupView = new VerticalScrolViewLayout() |
| | | { |
| | | Height = Application.GetRealHeight(44 + 51 * list.Count), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | ScrollEnabled = false, |
| | | }; |
| | | functionListView.AddChidren(groupView); |
| | | |
| | | #region title |
| | | var titleView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(44), |
| | | }; |
| | | groupView.AddChidren(titleView); |
| | | |
| | | var btnTitle = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.MainColor, |
| | | Text =Language.StringByID( StringId.HorseRaceLampGroup )+ " "+ oidList.Count.ToString(), |
| | | }; |
| | | if(Language.CurrentLanguage == "Chinese") |
| | | { |
| | | btnTitle.Text = Language.StringByID(StringId.HorseRaceLampGroup) + oidList.Count.ToString(); |
| | | } |
| | | titleView.AddChidren(btnTitle); |
| | | |
| | | #endregion |
| | | |
| | | foreach (var series in list) |
| | | { |
| | | groupView.AddChidren(new Button |
| | | { |
| | | Height = 1, |
| | | BackgroundColor = CSS_Color.DividingLineColor, |
| | | }); |
| | | |
| | | var rgbColorfulView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(50), |
| | | }; |
| | | groupView.AddChidren(rgbColorfulView); |
| | | |
| | | var btnRgbColorfulTitle = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | Text = series.name == rgb.name ? Language.StringByID(StringId.AutomaticColoring) : series.name, |
| | | }; |
| | | rgbColorfulView.AddChidren(btnRgbColorfulTitle); |
| | | |
| | | var btnColorfulSwitch = new Button() |
| | | { |
| | | X = Application.GetRealWidth(320), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(48), |
| | | Height = Application.GetMinRealAverage(36), |
| | | UnSelectedImagePath = "Public/Switch.png", |
| | | SelectedImagePath = "Public/SwitchOn.png", |
| | | Tag = series.sid, |
| | | }; |
| | | rgbColorfulView.AddChidren(btnColorfulSwitch); |
| | | |
| | | groupButtons.Add(btnColorfulSwitch); |
| | | |
| | | btnColorfulSwitch.MouseUpEventHandler = (sener, e) => { |
| | | btnColorfulSwitch.IsSelected = !btnColorfulSwitch.IsSelected; |
| | | var state = btnColorfulSwitch.IsSelected ? "on" : "off"; |
| | | waitPage.Start(""); |
| | | new System.Threading.Thread(() => |
| | | { |
| | | try |
| | | { |
| | | var d = new Dictionary<string, string>(); |
| | | d.Add("on_off", state); |
| | | DriverLayer.Control.Ins.SendWriteCommand(series, d); |
| | | if (state == "on") |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | List<Button> updataList = new List<Button>(); |
| | | dicGroupButtons.TryGetValue(((Button)sener).Tag.ToString().Substring(0, 16), out updataList); |
| | | foreach (var updataTemp in updataList) |
| | | { |
| | | updataTemp.IsSelected = false; |
| | | } |
| | | btnColorfulSwitch.IsSelected = true; |
| | | }); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log($"序列控制异常:{ex.Message}"); |
| | | } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => { |
| | | waitPage.Hide(); |
| | | }); |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }; |
| | | |
| | | |
| | | } |
| | | Console.WriteLine("oid: " + oid); |
| | | dicGroupButtons.TryAdd(oid, groupButtons); |
| | | |
| | | functionListView.AddChidren(new Button |
| | | { |
| | | Height = Application.GetRealHeight(8), |
| | | BackgroundColor = CSS_Color.DividingLineColor, |
| | | }); |
| | | |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | case SPK.Peephole: |
| | | LogicView.FunTypeView viewPeephole = new LogicView.FunTypeView(); |
| | | viewPeephole.btnText.TextID = StringId.ActivityDetection; |
| | | viewPeephole.btnText.Name = Language.StringByID(StringId.shipinmensuo); |
| | | //viewPeephole.btnText.Name = Language.StringByID(StringId.shipinmensuo); |
| | | fLayout.AddChidren(viewPeephole.FLayoutView()); |
| | | viewPeephole.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | |
| | | case SPK.Ev_Ipcam: |
| | | LogicView.FunTypeView viewEzIpcam = new LogicView.FunTypeView(); |
| | | viewEzIpcam.btnText.TextID = StringId.ActivityDetection; |
| | | viewEzIpcam.btnText.Name = Language.StringByID(StringId.shipinmensuo); |
| | | //viewEzIpcam.btnText.Name = Language.StringByID(StringId.shipinmensuo); |
| | | fLayout.AddChidren(viewEzIpcam.FLayoutView()); |
| | | viewEzIpcam.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | |
| | | //猫眼-人体感应告警 |
| | | inputDevice.condition_type = "9"; |
| | | inputDevice.identifier = this.identifier; |
| | | inputDevice.condition = new List<Dictionary<string, string>>(); |
| | | } |
| | | else if(device.spk == SPK.Ev_Ipcam) |
| | | { |
| | | //萤石摄像头-移动监测告警 |
| | | inputDevice.condition_type = "9"; |
| | | inputDevice.identifier = this.identifier; |
| | | inputDevice.condition = new List<Dictionary<string, string>>(); |
| | | } |
| | | else if (device.spk == SPK.VideoDoorLock) |
| | | { |
| | |
| | | //有数据重新赋值 |
| | | dicSateteList.AddRange(dicList); |
| | | } |
| | | //事件专用 |
| | | switch (device.spk) |
| | | { |
| | | case SPK.IpCam_Imou: |
| | | { |
| | | if (inputs.identifier == "ipcam_region_alram_event") |
| | | { |
| | | button1.Text = Language.StringByID(StringId.shi); |
| | | } |
| | | |
| | | } |
| | | break; |
| | | case SPK.Peephole: |
| | | if (inputs.identifier == "pir_event") |
| | | { |
| | | button1.Text = Language.StringByID(StringId.shi ); |
| | | } |
| | | break; |
| | | case SPK.Ev_Ipcam: |
| | | if (inputs.identifier == "motiondetect_event") |
| | | { |
| | | button1.Text = Language.StringByID(StringId.shi); |
| | | } |
| | | break; |
| | | } |
| | | InpOrOutLogicMethod.Current.EditDeviceState(device, dicList, button1, button2, button3, button4,""); |
| | | } |
| | | /// <summary> |
| | |
| | | /// <returns></returns> |
| | | public bool IsContainsAll(List<Dictionary<string, string>> dictionaryA, List<Dictionary<string, string>> dictionaryB) |
| | | { |
| | | |
| | | if (dictionaryA.Count == 0 || dictionaryB.Count == 0) { |
| | | //萤石猫眼,摄像头,大华摄像头只有事件,没有输入条件 |
| | | return true; |
| | | } |
| | | for (int i = 0; i < dictionaryA.Count; i++) |
| | | { |
| | | var dic = dictionaryA[i]; |
| | |
| | | break; |
| | | case SPK.IpCam_Imou: |
| | | { |
| | | if (inputCondition.identifier == "door_caipcam_region_alram_eventll_cloud_event") |
| | | if (inputCondition.identifier == "ipcam_region_alram_event") |
| | | { |
| | | inputView.btnState.Text = Language.StringByID(StringId.quyuruqingaojing); |
| | | } |
| | |
| | | } |
| | | break; |
| | | case SPK.Ev_Ipcam: |
| | | if (inputCondition.identifier == "motiondetect_event") |
| | | { |
| | | inputView.btnState.Text = Language.StringByID(StringId.shi); |
| | | } |
| | | break; |
| | | case SPK.Peephole: |
| | | if (inputCondition.identifier == "pir_event") |
| | | { |
| | | inputView.btnState.Text = Language.StringByID(StringId.On); |
| | | inputView.btnState.Text = Language.StringByID(StringId.shi); |
| | | } |
| | | break; |
| | | case SPK.SensorPirHold: |
| | |
| | | string on_off = GetKeyValue("on_off", dicList); |
| | | string brightness = GetKeyValue("brightness", dicList); |
| | | string cct = GetKeyValue(FunctionAttributeKey.CCT, dicList); |
| | | string colorful = GetKeyValue(FunctionAttributeKey.Colorful, dicList); |
| | | //自动化组控 炫彩功能 |
| | | //string colorful = GetKeyValue(FunctionAttributeKey.Colorful, dicList); |
| | | string rgb = GetKeyValue("rgb", dicList); |
| | | |
| | | |
| | |
| | | stateStr += "," + Language.StringByID(StringId.ColorTemperature) + cct + "k"; |
| | | } |
| | | |
| | | if (!string.IsNullOrEmpty(colorful)) |
| | | { |
| | | stateStr += "," + Language.StringByID(StringId.ColorfulFunction); |
| | | if (colorful == "on") |
| | | { |
| | | stateStr += Language.StringByID(StringId.onLogic); |
| | | } |
| | | else if (colorful == "off") |
| | | { |
| | | stateStr += Language.StringByID(StringId.offLogic); |
| | | } |
| | | |
| | | } |
| | | //if (!string.IsNullOrEmpty(colorful)) |
| | | //{ |
| | | // stateStr += "," + Language.StringByID(StringId.ColorfulFunction); |
| | | // if (colorful == "on") |
| | | // { |
| | | // stateStr += Language.StringByID(StringId.onLogic); |
| | | // } |
| | | // else if (colorful == "off") |
| | | // { |
| | | // stateStr += Language.StringByID(StringId.offLogic); |
| | | // } |
| | | //} |
| | | |
| | | if (!string.IsNullOrEmpty(rgb) && rgb.Length > 6) |
| | | { |
| | |
| | | button1.Tag = tag; |
| | | } |
| | | break; |
| | | |
| | | |
| | | case SPK.MusicStandard: |
| | | case SPK.AvMusic: |
| | | { |
| | |
| | | public string GetTemperatureUnit(Entity.Function device) |
| | | { |
| | | string unit = string.Empty; |
| | | if (device.GetAttribute("temperature_type") != null && device.GetAttribute("temperature_type").value.Count > 0) |
| | | if (device.GetAttribute("temperature_type") != null) |
| | | { |
| | | unit = device.GetAttribute("temperature_type").value[0]; |
| | | unit = device.GetAttribute("temperature_type").unit; |
| | | } |
| | | if (string.IsNullOrEmpty(unit)) |
| | | { |
| | |
| | | // new Entity.Function { sid = "1234567899", name = "门磁传感器", spk = Entity.SPK.SensorDoorWindow }, |
| | | // new Entity.Function { sid = "12345678991234", name = "HDL机械手", spk = Entity.SPK.MechanicalArm }, |
| | | // new Entity.Function { sid = "123456789912345", name = "海曼机械手", spk = Entity.SPK.MechanicalArm }, |
| | | new Entity.Function { sid = "123456789912345668", name = "AC", spk = Entity.SPK.AcIr }, |
| | | new Entity.Function { sid = "12345678991234566844", name = "大华摄像头", spk = Entity.SPK.IpCam_Imou }, |
| | | new Entity.Function { sid = "12345678991234567", name = "RGB", spk = Entity.SPK.LightRGB }, |
| | | new Entity.Function { sid = "123456789912345678", name = "RGBW", spk = Entity.SPK.LightRGBW }, |
| | | }; |
| | |
| | | if(perColorful != null) |
| | | { |
| | | if(perColorful.value == "on") |
| | | { |
| | | sceneFunctionInfo += " " + Language.StringByID(StringId.HorseRaceLamp); |
| | | } |
| | | else |
| | | { |
| | | if (sceneFunction.localFunction.spk == SPK.GroupControl) |
| | | { |
| | | sceneFunctionInfo += " " + Language.StringByID(StringId.Close) + " " + Language.StringByID(StringId.HorseRaceLamp); |
| | | } |
| | | else |
| | | { |
| | | sceneFunctionInfo = Language.StringByID(StringId.Close) + " " + Language.StringByID(StringId.HorseRaceLamp); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return sceneFunctionInfo; |
| | | } |
| | |
| | | |
| | | if (sceneFunction.localFunction.spk == SPK.LightRGB || sceneFunction.localFunction.spk == SPK.GroupControl) |
| | | { |
| | | var colorfulStatus = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Colorful); |
| | | if (colorfulStatus != null) |
| | | { |
| | | isColorful = true; |
| | | LoadColorfulRow(colorfulStatus); |
| | | isColorful = colorfulStatus.value == "on"; |
| | | } |
| | | //var colorfulStatus = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Colorful); |
| | | //if (colorfulStatus != null) |
| | | //{ |
| | | // isColorful = true; |
| | | // LoadColorfulRow(colorfulStatus); |
| | | // isColorful = colorfulStatus.value == "on"; |
| | | //} |
| | | } |
| | | foreach (var attr in sceneFunction.status) |
| | | { |
| | |
| | | |
| | | btnConfrim.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | if (sceneFunction.localFunction.spk == SPK.GroupControl) { } |
| | | if (sceneFunction.localFunction.spk == SPK.GroupControl) { |
| | | var colorBegin = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.ColorfulBegin); |
| | | if (colorBegin != null) |
| | | { |
| | | sceneFunction.status.Remove(colorBegin); |
| | | } |
| | | var colorEnd = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.ColorfulEnd); |
| | | if (colorEnd != null) |
| | | { |
| | | sceneFunction.status.Remove(colorEnd); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (isOnStatus) |
| | |
| | | /// <param name="btn"></param> |
| | | void LoadEditDialog_CCT(SceneFunctionStatus trait, Button btn) |
| | | { |
| | | if (trait.min == 0) |
| | | { |
| | | switch (trait.key) |
| | | { |
| | | case FunctionAttributeKey.SetTemp: |
| | | trait.min = 16; |
| | | break; |
| | | case FunctionAttributeKey.CCT: |
| | | trait.min = 2700; |
| | | break; |
| | | } |
| | | } |
| | | if (trait.max == 0) |
| | | { |
| | | switch (trait.key) |
| | | { |
| | | case FunctionAttributeKey.SetTemp: |
| | | trait.max = 30; |
| | | break; |
| | | case FunctionAttributeKey.CCT: |
| | | trait.max = 6500; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | double temp = trait.min; |
| | | |
| | | double.TryParse(trait.value, out temp); |
| | | trait.value = temp.ToString(); |
| | | |
| | |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | if (isAdd) |
| | | { |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.CombinedDimming)).LoadTopView(); |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.GroupControl)).LoadTopView(); |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | if (pack.Code == StateCode.SUCCESS) |
| | | { |
| | | FunctionList.List.groupControls.Remove(groupControl); |
| | | var delTemp = FunctionList.List.groupControls.Find((obj) => groupControl.sid == obj.sid); |
| | | FunctionList.List.groupControls.Remove(delTemp); |
| | | //list.Remove(groupControl); |
| | | this.RemoveFromParent(); |
| | | delAction?.Invoke(); |
| | |
| | | { |
| | | try |
| | | { |
| | | var newEditDataString = Newtonsoft.Json.JsonConvert.SerializeObject(this.groupControl); |
| | | //没有更新数据则直接退出 |
| | | if (newEditDataString == editDataString) |
| | | { |
| | | this.RemoveFromParent(); |
| | | return; |
| | | } |
| | | //var newEditDataString = Newtonsoft.Json.JsonConvert.SerializeObject(this.groupControl); |
| | | //var newEditDataString1 = Newtonsoft.Json.JsonConvert.SerializeObject(groupControlLightList); |
| | | //var newEditDataString2 = Newtonsoft.Json.JsonConvert.SerializeObject(this.groupControl.sids); |
| | | ////没有更新数据则直接退出 |
| | | //if (newEditDataString == editDataString && newEditDataString1 == newEditDataString2) |
| | | //{ |
| | | // this.RemoveFromParent(); |
| | | // return; |
| | | //} |
| | | groupControl.sids.Clear(); |
| | | foreach (var light in groupControlLightList) |
| | | { |
| | |
| | | public void LoadPage() |
| | | { |
| | | |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.CombinedDimming)).LoadTopView_AddIcon("CombinedDimming", |
| | | (s,c)=>{ |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.GroupControl)).LoadTopView_AddIcon("CombinedDimming", |
| | | (s, c) => |
| | | { |
| | | try |
| | | { |
| | | var page = new AddGroupControlPage(null, |
| | | (newGC)=> { |
| | | (newGC) => |
| | | { |
| | | ReadGroupControlList(); |
| | | },()=> { }); |
| | | MainPage.BasePageView.AddChidren(page); |
| | |
| | | private void ReadGroupControlList() |
| | | { |
| | | |
| | | new System.Threading.Thread(() => { |
| | | new System.Threading.Thread(() => |
| | | { |
| | | var pack = ApiUtlis.Ins.HttpRequest.GetGroupControlList(); |
| | | if (pack != null) |
| | | { |
| | |
| | | { |
| | | try |
| | | { |
| | | var groupControlList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<GroupControl>>(pack.Data.ToString()); |
| | | FunctionList.List.groupControls.Clear(); |
| | | FunctionList.List.groupControls = Newtonsoft.Json.JsonConvert.DeserializeObject<List<GroupControl>>(pack.Data.ToString()); |
| | | |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | LoadGroupControlView(groupControlList); |
| | | LoadGroupControlView(); |
| | | }); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | } |
| | | |
| | | |
| | | private void LoadGroupControlView(List<GroupControl> list) |
| | | { |
| | | #if DEBUG |
| | | if (list.Count == 0) |
| | | { |
| | | list.Add(new GroupControl() |
| | | { |
| | | name = "组合调光1", |
| | | roomIds = new List<string> {}, |
| | | sid = "00000000000000001", |
| | | type = "light", |
| | | }); |
| | | |
| | | list.Add(new GroupControl() |
| | | { |
| | | name = "组合调光2", |
| | | roomIds = new List<string> { },//Room.CurrentSpatial.RoomList[0].roomId |
| | | sid = "00000000000000002", |
| | | type = "light", |
| | | }); |
| | | } |
| | | |
| | | #endif |
| | | |
| | | if (list.Count == 0) |
| | | { |
| | | |
| | | } |
| | | else |
| | | private void LoadGroupControlView() |
| | | { |
| | | contentView.RemoveAll(); |
| | | |
| | | foreach (var groupControl in list) |
| | | foreach (var groupControl in FunctionList.List.groupControls) |
| | | { |
| | | var functionRow = new RowLayout() |
| | | { |
| | |
| | | BackgroundColor = CSS_Color.DividingLineColor, |
| | | }); |
| | | |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => { |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | | var page = new AddGroupControlPage(groupControl, |
| | | (newGC) => { |
| | | (newGC) => |
| | | { |
| | | try |
| | | { |
| | | if (newGC != null) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | groupControl.roomIds = newGC.uids; |
| | | //groupControl.roomIds = newGC.roomIds; |
| | | //groupControl.uids = newGC.uids; |
| | | var localTemp = FunctionList.List.groupControls.Find((obj) => obj.deviceId == newGC.deviceId); |
| | | localTemp.roomIds = newGC.roomIds; |
| | | localTemp.uids = newGC.uids; |
| | | localTemp.sids = newGC.sids; |
| | | |
| | | btnFunctionLocationInfo.Text = newGC.GetUidListName(); |
| | | }); |
| | | } |
| | | }catch(Exception ex) |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log($"刷新群控房间信息异常:{ex.Message}"); |
| | | } |
| | | },()=> { |
| | | LoadGroupControlView(FunctionList.List.groupControls); |
| | | }, () => |
| | | { |
| | | LoadGroupControlView(); |
| | | }); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | |
| | | TextAlignment = TextAlignment.Center, |
| | | }; |
| | | functionRow.AddRightView(btnDelGroupControl); |
| | | btnDelGroupControl.MouseUpEventHandler = (sender1, e1) => { |
| | | btnDelGroupControl.MouseUpEventHandler = (sender1, e1) => |
| | | { |
| | | var waitPage = new Loading(); |
| | | this.AddChidren(waitPage); |
| | | waitPage.Start(""); |
| | |
| | | { |
| | | if (pack.Code == StateCode.SUCCESS) |
| | | { |
| | | list.Remove(groupControl); |
| | | LoadGroupControlView(list); |
| | | var delTemp = FunctionList.List.groupControls.Find((obj) => groupControl.sid == obj.sid); |
| | | FunctionList.List.groupControls.Remove(delTemp); |
| | | LoadGroupControlView(); |
| | | } |
| | | else |
| | | { |
| | | IMessageCommon.Current.ShowErrorInfoAlter(pack.Code); |
| | | } |
| | | }catch(Exception ex) |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log($"刷新组控数据异常:{ex.Message}"); |
| | | } |
| | | }); |
| | | } |
| | | }catch(Exception ex) |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log($"删除组控异常:{ex.Message}"); |
| | | } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | if (waitPage != null) |
| | | { |
| | | waitPage.Hide(); |
| | |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | { |
| | | Y = btnResidenceManageIcon.Bottom, |
| | | Height = Application.GetRealHeight(29), |
| | | TextID = StringId.CombinedDimming, |
| | | TextID = StringId.GroupControl, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextID = StringId.ColorfulFunction, |
| | | TextID = StringId.CulorfulTest, |
| | | }; |
| | | viewSwitch.AddChidren(btnSwitchText); |
| | | |
| | |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }; |
| | | |
| | | contentView.AddChidren(new Button |
| | | { |
| | | Height = Application.GetRealHeight(10), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | }); |
| | | |
| | | #endregion |
| | | |
| | |
| | | btnStartColor.MouseUpEventHandler = (sender, e) => { |
| | | Action<uint> action = (color) => { |
| | | btnStartColor.BackgroundColor = color; |
| | | function.SetAttrState(FunctionAttributeKey.ColorfulBegin, color); |
| | | //function.SetAttrState(FunctionAttributeKey.ColorfulBegin, color); |
| | | }; |
| | | var rgbView = new ColorfulSettingPage(function, action,true); |
| | | MainPage.BasePageView.AddChidren(rgbView); |
| | |
| | | }; |
| | | workHoursView.AddChidren(btnWorkHours); |
| | | |
| | | var time = Convert.ToInt32( function.GetAttrState(FunctionAttributeKey.ColorfulTime)); |
| | | |
| | | |
| | | btnWorkHours.Text = time/ 360 + Language.StringByID(StringId.h); |
| | | btnWorkHours.Text += time / 60 + Language.StringByID(StringId.m); |
| | | btnWorkHours.Text += time % 60 + Language.StringByID(StringId.s); |
| | | |
| | | var waitPage = new Loading(); |
| | | this.AddChidren(waitPage); |
| | | |
| | |
| | | { |
| | | LoadEditDialog(() => |
| | | { |
| | | if(hour == 0 && minute == 0 && second == 0) |
| | | { |
| | | new PublicAssmebly().TipMsg(StringId.Tip, StringId.TimeInvalid); |
| | | return; |
| | | } |
| | | btnWorkHours.Text = hour + "时"; |
| | | btnWorkHours.Text += minute + "分"; |
| | | btnWorkHours.Text += second + "秒"; |
| | | new System.Threading.Thread(() => { |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | var d = new Dictionary<string, string>(); |
| | | function.SetAttrState(FunctionAttributeKey.ColorfulTime, (hour * 360 + minute * 60 + second).ToString()); |
| | | d.Add(FunctionAttributeKey.ColorfulTime, (hour * 360 + minute * 60 + second).ToString()); |
| | | Control.Ins.SendWriteCommand(function, d); |
| | | }) { IsBackground = true }.Start(); |
| | |
| | | btnWorkHours.MouseUpEventHandler = eventHandler; |
| | | workHoursView.MouseUpEventHandler = eventHandler; |
| | | btnWorkHoursRight.MouseUpEventHandler = eventHandler; |
| | | |
| | | |
| | | #endregion |
| | | |
| | | |
| | |
| | | btnConfrim.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | backAction?.Invoke(curColor) ; |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | var d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | if (isSatrtColor) |
| | | { |
| | | d.Add(FunctionAttributeKey.ColorfulBegin, redColor + "," + greenColor + "," + blueColor); |
| | | function.SetAttrState(FunctionAttributeKey.ColorfulBegin, redColor + "," + greenColor + "," + blueColor); |
| | | var color = function.GetAttrState(FunctionAttributeKey.ColorfulEnd).Split(","); |
| | | var sendColorString = color[0] + "," + color[1] + "," + color[2]; |
| | | d.Add(FunctionAttributeKey.ColorfulEnd, sendColorString); |
| | | d.Add(FunctionAttributeKey.ColorfulTime, function.GetAttrState(FunctionAttributeKey.ColorfulTime)); |
| | | |
| | | //var color = function.GetAttrState(FunctionAttributeKey.ColorfulEnd).Split(","); |
| | | //var sendColorString = color[0] + "," + color[1] + "," + color[2]; |
| | | //d.Add(FunctionAttributeKey.ColorfulEnd, sendColorString); |
| | | //d.Add(FunctionAttributeKey.ColorfulTime, function.GetAttrState(FunctionAttributeKey.ColorfulTime)); |
| | | } |
| | | else |
| | | { |
| | | var color = function.GetAttrState(FunctionAttributeKey.ColorfulBegin).Split(","); |
| | | var sendColorString = color[0] + "," + color[1] + "," + color[2]; |
| | | d.Add(FunctionAttributeKey.ColorfulBegin, sendColorString); |
| | | d.Add(FunctionAttributeKey.ColorfulTime, function.GetAttrState(FunctionAttributeKey.ColorfulTime)); |
| | | //var color = function.GetAttrState(FunctionAttributeKey.ColorfulBegin).Split(","); |
| | | //var sendColorString = color[0] + "," + color[1] + "," + color[2]; |
| | | //d.Add(FunctionAttributeKey.ColorfulBegin, sendColorString); |
| | | //d.Add(FunctionAttributeKey.ColorfulTime, function.GetAttrState(FunctionAttributeKey.ColorfulTime)); |
| | | d.Add(FunctionAttributeKey.ColorfulEnd, redColor + "," + greenColor + "," + blueColor); |
| | | function.SetAttrState(FunctionAttributeKey.ColorfulEnd, redColor + "," + greenColor + "," + blueColor); |
| | | } |
| | | //d.Add(FunctionAttributeKey.Colorful, "off"); |
| | | Control.Ins.SendWriteCommand(function, d); |
| | | this.RemoveFromParent(); |
| | | }; |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using HDL_ON.Common; |
| | | using HDL_ON.DriverLayer; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | |
| | | } |
| | | } |
| | | |
| | | public override void RemoveFromParent() |
| | | { |
| | | base.RemoveFromParent(); |
| | | } |
| | | |
| | | public void LoadPage(Button btnCollectionIcon, Button btnFunctionNameOut, Button btnFromFloorOut) |
| | | { |
| | | bodyView.RemoveAll(); |
| | | |
| | | btnCollection_Out = btnCollectionIcon; |
| | | btnFunctionName_Out = btnFunctionNameOut; |
| | | btnFromFloor_Out = btnFromFloorOut; |
| | |
| | | |
| | | |
| | | |
| | | |
| | | //回退刷新信息事件 |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.CombinedDimming)).LoadTopView_SettingIcon( () => { |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.GroupControl)).LoadTopView_SettingIcon( () => { |
| | | var page = new AddGroupControlPage(function, |
| | | (newGC) => { |
| | | try |
| | |
| | | { |
| | | if (newGC != null) |
| | | { |
| | | btnFunctionName.Text = btnFunctionName_Out.Text = function.name; |
| | | function.roomIds = newGC.uids; |
| | | btnFromFloor_Out.Text = btnFromFoorAndRoom.Text = newGC.GetUidListName(); |
| | | var localTemp = FunctionList.List.groupControls.Find((obj) => obj.deviceId == newGC.deviceId); |
| | | if(localTemp!= null) |
| | | { |
| | | try |
| | | { |
| | | localTemp.sids = newGC.sids; |
| | | localTemp.name = newGC.name; |
| | | localTemp.roomIds = newGC.roomIds; |
| | | localTemp.uids = newGC.uids; |
| | | } |
| | | catch { } |
| | | function = newGC; |
| | | btnFunctionName_Out.Text = function.name; |
| | | btnFromFloor_Out.Text = function.GetRoomListName(); |
| | | LoadPage(btnCollection, btnFunctionName, btnFunctionName); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | |
| | | try |
| | | { |
| | | this.RemoveFromParent(); |
| | | UI.HomePage.RefreshFunctionView(); |
| | | UI.HomePage.RefreshGroupControlView(); |
| | | UI.RoomPage.bodyView?.ReLoadPage(); |
| | | UI.FunctionPage.bodyView?.ReLoadPage(); |
| | | } |
| | |
| | | } |
| | | } |
| | | hadRGB = true; |
| | | hadDimming = true; |
| | | } |
| | | else if (temp.spk == SPK.LightCCT) |
| | | { |
| | | hadCCT = true; |
| | | hadDimming = true; |
| | | } |
| | | else if (temp.spk == SPK.LightDimming) |
| | | { |
| | |
| | | } |
| | | |
| | | //属性设置区域 |
| | | var attrView = new VerticalScrolViewLayout() |
| | | VerticalScrolViewLayout attrView = new VerticalScrolViewLayout() |
| | | { |
| | | Y = Application.GetRealHeight(52), |
| | | Width = Application.GetRealWidth(343), |
| | | ScrollEnabled = false, |
| | | }; |
| | | //属性设置区域高度 |
| | | int attrViewHight = Application.GetRealHeight(18 + 22); |
| | | |
| | | |
| | | controlView.AddChidren(attrView); |
| | | |
| | | attrView.AddChidren(new Button() { Height = Application.GetRealHeight(18) }); |
| | | |
| | | |
| | | if (hadRGB) |
| | | { |
| | | hadCCT = true; |
| | | LoadRgbAttrView(hadCCT,hadColorful); |
| | | } |
| | | else if (hadCCT) |
| | | { |
| | | LoadCctAttrView(attrView); |
| | | } |
| | | else if (hadDimming) |
| | | { |
| | | LoadDimmingAttrView(attrView); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | var btnSwitch = new Button() |
| | | btnSwitch = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(466), |
| | |
| | | }; |
| | | |
| | | |
| | | if (hadRGB) |
| | | { |
| | | LoadRgbAttrView(hadCCT,hadColorful); |
| | | } |
| | | else if (hadCCT) |
| | | { |
| | | LoadCctAttrView(attrView); |
| | | } |
| | | else if (hadDimming) |
| | | { |
| | | LoadDimmingAttrView(attrView); |
| | | } |
| | | else |
| | | { |
| | | attrView.AddChidren(new Button() { Height = Application.GetRealHeight(30) }); |
| | | var btnSwitchIcon = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(102), |
| | | Width = Application.GetRealWidth(168), |
| | | Height = Application.GetRealWidth(288), |
| | | UnSelectedImagePath = "FunctionIcon/Light/RelayBg.png", |
| | | SelectedImagePath = "FunctionIcon/Light/RelayOnBg.png", |
| | | IsSelected = function.trait_on_off.curValue.ToString() == "on" |
| | | }; |
| | | attrView.AddChidren(btnSwitchIcon); |
| | | |
| | | btnSwitchIcon.MouseUpEventHandler = (sender, e) => { |
| | | if (btnSwitchIcon.IsSelected) |
| | | { |
| | | btnSwitchIcon.IsSelected = btnSwitch.IsSelected = false; |
| | | var d = new Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.OnOff, "off"); |
| | | function.Control(d); |
| | | } |
| | | else |
| | | { |
| | | btnSwitchIcon.IsSelected = btnSwitch.IsSelected = true; |
| | | var d = new Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.OnOff, "on"); |
| | | function.Control(d); |
| | | } |
| | | }; |
| | | btnSwitch.MouseUpEventHandler += (sender, e) => { |
| | | btnSwitchIcon.IsSelected = btnSwitch.IsSelected; |
| | | }; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | Button btnSwitch; |
| | | |
| | | /// <summary> |
| | | /// 加载调光属性设置控件 |
| | |
| | | /// <param name="attrView"></param> |
| | | void LoadDimmingAttrView(VerticalScrolViewLayout attrView) |
| | | { |
| | | var dimmingView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(54 + 11) |
| | | }; |
| | | attrView.AddChidren(dimmingView); |
| | | |
| | | #region 亮度调节 |
| | | |
| | | |
| | | attrView.AddChidren(new Button |
| | | { |
| | | Height = Application.GetRealHeight(50), |
| | | }); |
| | | |
| | | var dimmerView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(280) |
| | | }; |
| | | attrView.AddChidren(dimmerView); |
| | | |
| | | var dimmerBar = new WaveSeekBarOn() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(168 - 40), |
| | | Height = Application.GetRealHeight(288 - 16 - 16), |
| | | BorderColor = 0x00000000, |
| | | CornerRadius = Application.GetRealWidth(30), |
| | | BorderWidth = 0, |
| | | Progress = Convert.ToInt32(function.GetAttrState(FunctionAttributeKey.Brightness)), |
| | | IsProgressTextShow = false, |
| | | }; |
| | | dimmerView.AddChidren(dimmerBar); |
| | | |
| | | var btnBrightnessText = new Button() |
| | | { |
| | | X = Application.GetRealWidth(35), |
| | | Y = Application.GetRealHeight(1), |
| | | Width = Application.GetRealWidth(224), |
| | | Height = Application.GetRealHeight(25), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = ((100 - Convert.ToInt32(function.GetAttrState(FunctionAttributeKey.Brightness))) * Application.GetRealHeight(222 - 16) / 100), |
| | | Width = Application.GetRealWidth(56), |
| | | Height = Application.GetRealWidth(46), |
| | | UnSelectedImagePath = "FunctionIcon/Light/BrightnessBg.png", |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | TextID = StringId.Brightness, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | Text = Convert.ToInt32(function.GetAttrState(FunctionAttributeKey.Brightness)) + "%", |
| | | }; |
| | | btnBrightnessText.Text = Language.StringByID(StringId.Brightness) + " " + function.GetAttrState(FunctionAttributeKey.Brightness) + "%"; |
| | | dimmingView.AddChidren(btnBrightnessText); |
| | | dimmerView.AddChidren(btnBrightnessText); |
| | | |
| | | |
| | | var btnMinValuesText = new Button() |
| | | { |
| | | X = Application.GetRealWidth(35), |
| | | Y = btnBrightnessText.Bottom, |
| | | Width = Application.GetRealWidth(40), |
| | | Height = Application.GetRealHeight(21), |
| | | Text = "0%", |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | }; |
| | | dimmingView.AddChidren(btnMinValuesText); |
| | | |
| | | var dimmerBar = new DiyImageSeekBar() |
| | | { |
| | | X = Application.GetRealWidth(45 + 10), |
| | | Y = Application.GetRealHeight(11), |
| | | Width = Application.GetRealWidth(220), |
| | | Height = Application.GetRealHeight(54), |
| | | SeekBarViewHeight = Application.GetRealHeight(8), |
| | | ThumbImagePath = "Public/ThumbImage.png", |
| | | ThumbImageHeight = Application.GetRealHeight(54), |
| | | ProgressTextColor = CSS_Color.FirstLevelTitleColor, |
| | | ProgressTextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | ProgressBarColor = CSS_Color.AuxiliaryColor1, |
| | | MaxValue = 100, |
| | | SeekBarPadding = Application.GetRealWidth(20), |
| | | IsProgressTextShow = false, |
| | | ProgressChangeDelayTime = 0, |
| | | }; |
| | | dimmingView.AddChidren(dimmerBar); |
| | | dimmerBar.OnProgressChangedEvent = (sender, e) => |
| | | { |
| | | btnBrightnessText.Text = Language.StringByID(StringId.Brightness) + " " + e + "%"; |
| | | }; |
| | | dimmerBar.OnStopTrackingTouchEvent = (sender, e) => |
| | | if (e == 0 && lastBrightness != 0) |
| | | { |
| | | btnBrightnessText.Text = Language.StringByID(StringId.Brightness) + " " + e + "%"; |
| | | |
| | | btnSwitch.IsSelected = false; |
| | | lastBrightness = 0; |
| | | } |
| | | else |
| | | { |
| | | if (lastBrightness == 0) |
| | | lastBrightness = e; |
| | | btnSwitch.IsSelected = true; |
| | | } |
| | | if (e == 0 || e == 100) |
| | | { |
| | | var d = new Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.Brightness, e.ToString()); |
| | | function.Control(d); |
| | | }; |
| | | |
| | | |
| | | var btnMaxValuesText = new Button() |
| | | } |
| | | else |
| | | { |
| | | X = dimmerBar.Right, |
| | | Y = btnBrightnessText.Bottom, |
| | | Width = Application.GetRealWidth(55), |
| | | Height = Application.GetRealHeight(21), |
| | | Text = "100%", |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | if (350 < (DateTime.Now - function.refreshTime).TotalMilliseconds) |
| | | { |
| | | function.refreshTime = DateTime.Now; |
| | | new System.Threading.Thread(() => |
| | | { |
| | | var d = new Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.Brightness, e.ToString()); |
| | | function.Control(d); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | } |
| | | |
| | | |
| | | btnBrightnessText.Y = ((100 - dimmerBar.Progress) * Application.GetRealHeight(222 - 16) / 100); |
| | | btnBrightnessText.Text = dimmerBar.Progress + "%"; |
| | | }; |
| | | dimmingView.AddChidren(btnMaxValuesText); |
| | | #endregion |
| | | |
| | | btnSwitch.MouseUpEventHandler += (sender, e) => { |
| | | if (btnSwitch.IsSelected) |
| | | { |
| | | dimmerBar.Progress = 100; |
| | | } |
| | | else |
| | | { |
| | | dimmerBar.Progress = 0; |
| | | } |
| | | btnBrightnessText.Y = ((100 - dimmerBar.Progress) * Application.GetRealHeight(222 - 16) / 100); |
| | | btnBrightnessText.Text = dimmerBar.Progress + "%"; |
| | | }; |
| | | |
| | | } |
| | | int lastBrightness = 0; |
| | | |
| | | /// <summary> |
| | | /// 加载cct属性设置控件 |
| | |
| | | /// <param name="attrView"></param> |
| | | void LoadCctAttrView(VerticalScrolViewLayout attrView) |
| | | { |
| | | attrView.AddChidren(new Button |
| | | { |
| | | Height = Application.GetRealHeight(20), |
| | | }); |
| | | |
| | | var dimmerView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(280) |
| | | }; |
| | | attrView.AddChidren(dimmerView); |
| | | |
| | | var dimmerBar = new WaveSeekBarOn() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(168 - 40), |
| | | Height = Application.GetRealHeight(288 - 16 - 16), |
| | | BorderColor = 0x00000000, |
| | | CornerRadius = Application.GetRealWidth(30), |
| | | BorderWidth = 0, |
| | | Progress = Convert.ToInt32(function.GetAttrState(FunctionAttributeKey.Brightness)), |
| | | IsProgressTextShow = false, |
| | | }; |
| | | dimmerView.AddChidren(dimmerBar); |
| | | |
| | | var btnBrightnessText = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = ((100 - Convert.ToInt32(function.GetAttrState(FunctionAttributeKey.Brightness))) * Application.GetRealHeight(222 - 16) / 100), |
| | | Width = Application.GetRealWidth(56), |
| | | Height = Application.GetRealWidth(46), |
| | | UnSelectedImagePath = "FunctionIcon/Light/BrightnessBg.png", |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | Text = Convert.ToInt32(function.GetAttrState(FunctionAttributeKey.Brightness)) + "%", |
| | | }; |
| | | dimmerView.AddChidren(btnBrightnessText); |
| | | |
| | | dimmerBar.OnProgressChangedEvent = (sender, e) => |
| | | { |
| | | if (e == 0 && lastBrightness != 0) |
| | | { |
| | | btnSwitch.IsSelected = false; |
| | | lastBrightness = 0; |
| | | } |
| | | else |
| | | { |
| | | if (lastBrightness == 0) |
| | | lastBrightness = e; |
| | | btnSwitch.IsSelected = true; |
| | | } |
| | | |
| | | if (e == 0 || e == 100) |
| | | { |
| | | var d = new Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.Brightness, e.ToString()); |
| | | function.Control(d); |
| | | } |
| | | else |
| | | { |
| | | if (350 < (DateTime.Now - function.refreshTime).TotalMilliseconds) |
| | | { |
| | | function.refreshTime = DateTime.Now; |
| | | new System.Threading.Thread(() => |
| | | { |
| | | var d = new Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.Brightness, e.ToString()); |
| | | function.Control(d); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | } |
| | | |
| | | |
| | | btnBrightnessText.Y = ((100 - dimmerBar.Progress) * Application.GetRealHeight(222 - 16) / 100); |
| | | btnBrightnessText.Text = dimmerBar.Progress + "%"; |
| | | }; |
| | | |
| | | btnSwitch.MouseUpEventHandler += (sender, e) => { |
| | | if (btnSwitch.IsSelected) |
| | | { |
| | | dimmerBar.Progress = 100; |
| | | } |
| | | else |
| | | { |
| | | dimmerBar.Progress = 0; |
| | | } |
| | | btnBrightnessText.Y = ((100 - dimmerBar.Progress) * Application.GetRealHeight(222 - 16) / 100); |
| | | btnBrightnessText.Text = dimmerBar.Progress + "%"; |
| | | }; |
| | | |
| | | //attrView.AddChidren(new Button() { Height = Application.GetRealHeight(10) }); |
| | | |
| | | #region 色温 |
| | | var cctView = new FrameLayout() |
| | | { |
| | |
| | | Y = Application.GetRealHeight(11), |
| | | Width = Application.GetRealWidth(220), |
| | | Height = Application.GetRealHeight(54), |
| | | Progress = 38, |
| | | }; |
| | | barColorTemplatrue.MinValue = 27; |
| | | barColorTemplatrue.MaxValue = 65; |
| | |
| | | btnWhiteRound.Visible = false; |
| | | framePickerBack.AddChidren(btnWhiteRound); |
| | | |
| | | |
| | | //当前点击的【点】是否正确 |
| | | bool pointIsRight = false; |
| | | //圆的半径(考虑边界,需要设置它的半径比较小一点) |
| | | int circleR = colorPicker.Width / 2 - Application.GetRealWidth(12); |
| | | string rgbString = "255,255,255"; |
| | | var rgbTemp = new Light(); |
| | | colorPicker.MouseUpEventHandler = (sender2, e2) => |
| | | { |
| | | var d = new Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.RGB, rgbString); |
| | | function.Control(d); |
| | | }; |
| | | colorPicker.ColorChaged += (sender2, e2) => |
| | | { |
| | | rgbString = (e2[0] + "," + e2[1] + "," + e2[2]).ToString(); |
| | | btnCurColor.BackgroundColor = (uint)(0xFF000000 + rgbTemp.GetRGBcolor(rgbString)); |
| | | var d = new Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.RGB, rgbString); |
| | | function.Control(d); |
| | | }; |
| | | colorPicker.MouseDownEventHandler += (sender, e) => |
| | | { |
| | | pointIsRight = this.CheckPoint(circleR, colorPicker.Width / 2, colorPicker.Height / 2, (int)e.X, (int)e.Y); |
| | | if (pointIsRight == false) |
| | | { |
| | | //点的区域不是圆盘内 |
| | | return; |
| | | } |
| | | //显示白点 |
| | | btnWhiteRound.X = (int)e.X - btnWhiteRound.Width / 2; |
| | | btnWhiteRound.Y = (int)e.Y - btnWhiteRound.Height / 2; |
| | | if (btnWhiteRound.Visible == false) |
| | | { |
| | | btnWhiteRound.Visible = true; |
| | | } |
| | | }; |
| | | |
| | | colorPicker.MouseMoveEventHandler += (sender, e) => |
| | | { |
| | | //当鼠标点下事件处理 |
| | | colorPicker.MouseDownEventHandler(sender, e); |
| | | }; |
| | | |
| | | |
| | | |
| | | #region 亮度调节 |
| | | var btnBrightnessText = new Button() |
| | | { |
| | |
| | | }; |
| | | controlView.AddChidren(dimmerBar); |
| | | |
| | | |
| | | dimmerBar.OnProgressChangedEvent = (sender, e) => |
| | | { |
| | | if (e == 0 && lastBrightness != 0) |
| | | { |
| | | btnSwitch.IsSelected = false; |
| | | lastBrightness = 0; |
| | | } |
| | | else |
| | | { |
| | | if (lastBrightness == 0) |
| | | lastBrightness = e; |
| | | btnSwitch.IsSelected = true; |
| | | } |
| | | if (e == 0 || e == 100) |
| | | { |
| | | var d = new Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.Brightness, e.ToString()); |
| | | function.Control(d); |
| | | } |
| | | else |
| | | { |
| | | if (350 < (DateTime.Now - function.refreshTime).TotalMilliseconds) |
| | | { |
| | | function.refreshTime = DateTime.Now; |
| | | new System.Threading.Thread(() => |
| | | { |
| | | var d = new Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.Brightness, e.ToString()); |
| | | function.Control(d); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | } |
| | | }; |
| | | |
| | | |
| | | var btnMaxValuesText = new Button() |
| | | { |
| | | X = dimmerBar.Right, |
| | |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | }; |
| | | controlView.AddChidren(btnMaxValuesText); |
| | | |
| | | btnSwitch.MouseUpEventHandler += (sender, e) => { |
| | | if (btnSwitch.IsSelected) |
| | | { |
| | | dimmerBar.Progress = 100; |
| | | } |
| | | else |
| | | { |
| | | dimmerBar.Progress = 0; |
| | | } |
| | | }; |
| | | #endregion |
| | | |
| | | int heightMore = 375 - magriHeight-20; |
| | |
| | | }; |
| | | barColorTemplatrue.MinValue = 27; |
| | | barColorTemplatrue.MaxValue = 65; |
| | | barColorTemplatrue.Progress = 38; |
| | | barColorTemplatrue.ProgressBarColor = 0x00000000;//全部透明 |
| | | barColorTemplatrue.ProgressBarUnEnableColor = 0x00000000; |
| | | barColorTemplatrue.SeekBarBackgroundColor = 0x00000000; |
| | |
| | | //6500K |
| | | var btnTempClolorMax = new Button(); |
| | | btnTempClolorMax.Y = btnTempClolorMin.Y; |
| | | btnTempClolorMax.X = barColorTemplatrue.Right - Application.GetRealWidth(30); |
| | | btnTempClolorMax.X = barColorTemplatrue.Right - Application.GetRealWidth(15); |
| | | btnTempClolorMax.Width = Application.GetRealWidth(54); |
| | | btnTempClolorMax.Height = Application.GetRealHeight(21); |
| | | btnTempClolorMax.Text = "6500K"; |
| | |
| | | var btnGradualChangeText = new Button() |
| | | { |
| | | X = Application.GetRealWidth(35), |
| | | Y = Application.GetRealHeight(375 + heightMore - magriHeight), |
| | | Y = hadCCT ? Application.GetRealHeight(375 + heightMore - magriHeight) : Application.GetRealHeight(heightMore+10), |
| | | Width = Application.GetRealWidth(224), |
| | | Height = Application.GetRealHeight(21), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | |
| | | }; |
| | | controlView.AddChidren(btnGradualChangeText); |
| | | |
| | | var btnGradualChangeMinValuesText = new Button() |
| | | var btnColorfulEdit = new Button() |
| | | { |
| | | X = Application.GetRealWidth(35), |
| | | Y = btnGradualChangeText.Bottom + Application.GetRealHeight(10), |
| | | Width = Application.GetRealWidth(22), |
| | | Height = Application.GetRealHeight(21), |
| | | UnSelectedImagePath = "Public/Edit.png", |
| | | Visible = false, |
| | | }; |
| | | controlView.AddChidren(btnGradualChangeMinValuesText); |
| | | btnGradualChangeMinValuesText.MouseUpEventHandler = (sender, e) => { |
| | | controlView.AddChidren(btnColorfulEdit); |
| | | btnColorfulEdit.MouseUpEventHandler = (sender, e) => { |
| | | var rgbView = new ColorfulInfoPage(function); |
| | | MainPage.BasePageView.AddChidren(rgbView); |
| | | rgbView.LoadPage(); |
| | |
| | | |
| | | var barColorful = new FrameLayout() |
| | | { |
| | | X = btnGradualChangeMinValuesText.Right + Application.GetRealWidth(15+5), |
| | | Y = Application.GetRealHeight(412 + heightMore - magriHeight), |
| | | X = btnColorfulEdit.Right + Application.GetRealWidth(15 + 5), |
| | | Width = Application.GetRealWidth(170), |
| | | //X = Application.GetRealWidth(35), |
| | | //Width = Application.GetRealWidth(170 + 41), |
| | | Y = hadCCT ? Application.GetRealHeight(412 + heightMore - magriHeight) : Application.GetRealHeight(heightMore + 50), |
| | | Height = Application.GetRealHeight(8), |
| | | BackgroundImagePath = "FunctionIcon/Light/ColorfulBar.png", |
| | | }; |
| | | controlView.AddChidren(barColorful); |
| | | |
| | | var btnGradualChangeMaxValuesText = new Button() |
| | | var btnColorfulSwitch = new Button() |
| | | { |
| | | X = barColorful.Right + Application.GetRealWidth(8), |
| | | Y = btnGradualChangeText.Bottom + Application.GetRealHeight(10), |
| | | Width = Application.GetRealWidth(38), |
| | | Height = Application.GetRealHeight(24), |
| | | UnSelectedImagePath = "Public/Switch.png" |
| | | UnSelectedImagePath = "Public/Switch.png", |
| | | SelectedImagePath = "Public/SwitchOn.png" |
| | | }; |
| | | controlView.AddChidren(btnGradualChangeMaxValuesText); |
| | | controlView.AddChidren(btnColorfulSwitch); |
| | | |
| | | |
| | | btnColorfulSwitch.MouseUpEventHandler = (sender, e) => { |
| | | btnColorfulSwitch.IsSelected = !btnColorfulSwitch.IsSelected; |
| | | new System.Threading.Thread(() => |
| | | { |
| | | try |
| | | { |
| | | var controlColorfulState = btnColorfulSwitch.IsSelected ? "on" : "off"; |
| | | function.SetAttrState(FunctionAttributeKey.Colorful, controlColorfulState); |
| | | var d = new Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.Colorful, controlColorfulState); |
| | | function.Control(d); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log($"控制炫彩开关异常:{ex.Message}"); |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }; |
| | | |
| | | #endregion |
| | | |
| | | |
| | |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | #endregion |
| | | |
| | | #region ---界面点击事件--- |
| | | playView.collectIconBtn.Visible = false;//先暂时隐藏收藏功能 |
| | | //playView.collectIconBtn.Visible = false;//先暂时隐藏收藏功能 |
| | | //收藏图标事件 |
| | | playView.collectIconBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | |
| | | { |
| | | A31MusicModel.Current.functionMusic.collect = false; |
| | | } |
| | | |
| | | A31MusicModel.Current.functionMusic.CollectFunction(); |
| | | }; |
| | | ///切换播放模式点击事件; |
| | | playView.playOrderBtn.MouseUpEventHandler += (sender, e) => |
| | |
| | | musicView.singerBtn.Text = player.functionMusic.GetAttrState(KeyProperty.song_name); |
| | | musicView.songNameBtn.Text = player.functionMusic.GetAttrState(KeyProperty.song_name); |
| | | musicView.musicNameBtn.Text = player.functionMusic.name; |
| | | musicView.collectIconBtn.Visible = false;//先暂时隐藏收藏功能 |
| | | //musicView.collectIconBtn.Visible = false;//先暂时隐藏收藏功能 |
| | | ///收藏事件 |
| | | musicView.collectIconBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | |
| | | { |
| | | player.functionMusic.collect = false; |
| | | } |
| | | player.functionMusic.CollectFunction(); |
| | | }; |
| | | |
| | | |
| | |
| | | /// <param name="api_Url">请求地址(不是绝对地址)</param> |
| | | /// <param name="tag">标记->描述接口(自定义)</param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew RequestServerhomeId(object o, string api_Url, string tag, int mTimeout = 5) |
| | | public ResponsePackNew RequestServerhomeId(object o, string api_Url, string tag, int mTimeout = 15) |
| | | { |
| | | JObject jobject = JObject.Parse(Newtonsoft.Json.JsonConvert.SerializeObject(o)); |
| | | return UI2.Intelligence.Automation.Send.Current.RequestServerhomeId(jobject, api_Url, tag, mTimeout); |
| | |
| | | bodyView.AddChidren(waitPage); |
| | | waitPage.Start(""); |
| | | |
| | | #endregion |
| | | |
| | | contentView.AddChidren(new Button() |
| | | { |
| | | Height = Application.GetRealHeight(8), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | }); |
| | | |
| | | var view = new VerticalScrolViewLayout() |
| | | { |
| | | Height = Application.GetRealHeight(300), |
| | | }; |
| | | contentView.AddChidren(view); |
| | | |
| | | |
| | | btnFaceUnlockSwitchIcon.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | waitPage.Start(""); |
| | |
| | | { |
| | | //更新界面 |
| | | btnFaceUnlockSwitchIcon.IsSelected = changeState; |
| | | loadSubView(view, faceUnlockSetup); |
| | | }); |
| | | } |
| | | else |
| | |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }; |
| | | #endregion |
| | | |
| | | contentView.AddChidren(new Button() |
| | | { |
| | | Height = Application.GetRealHeight(8), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | }); |
| | | |
| | | var view = new VerticalScrolViewLayout() |
| | | { |
| | | Height = Application.GetRealHeight(300), |
| | | }; |
| | | contentView.AddChidren(view); |
| | | |
| | | new System.Threading.Thread(() => { |
| | | try |
| | |
| | | recordFL.GetImageButton().UnSelectedImagePath = "FunctionIcon/DoorLock/HistoryList.png"; |
| | | recordFL.GetTextButton().TextID = StringId.lishijilu; |
| | | |
| | | if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare) |
| | | { |
| | | //用户管理 |
| | | CustomFrameLayout userManagerView = new CustomFrameLayout(CustomFrameLayout.widthFrameLayout, CustomFrameLayout.heightFrameLayout); |
| | | whiteFl.AddChidren(userManagerView); |
| | |
| | | userManagerView.GetImageButton().UnSelectedImagePath = "FunctionIcon/DoorLock/DoorlockUserManager.png"; |
| | | userManagerView.GetTextButton().TextID = StringId.UserManagement; |
| | | |
| | | userManagerView.SetClickListener((fl, btnImage, btnText) => { |
| | | userManagerView.SetClickListener((fl, btnImage, btnText) => |
| | | { |
| | | var page = new VideoDoorlockUserListPage(device); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | |
| | | }); |
| | | |
| | | } |
| | | #endregion |
| | | |
| | | |
| | |
| | | //MainPage.BasePageView.AddChidren(historyPage); |
| | | //historyPage.LoadPage(); |
| | | //MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | var waitPage = new Loading(); |
| | | this.AddChidren(waitPage); |
| | | waitPage.Start(""); |
| | | new System.Threading.Thread(() => |
| | | { |
| | | try |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | CommonMethod.Current.SkipRecordActivity(this.device.deviceId); |
| | | }); |
| | | }catch(Exception ex) |
| | | { |
| | | |
| | | } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => { |
| | | waitPage.Hide(); |
| | | }); |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }); |
| | | |
| | | |
| | | } |
| | |
| | | FrameLayout bodyView; |
| | | |
| | | Function device; |
| | | |
| | | /// <summary> |
| | | /// 门铃系统音量 |
| | | /// 门锁系统音量 |
| | | /// </summary> |
| | | int doorlockSystemSound = 0; |
| | | DoorLockSystemSound doorLockSystemSound; |
| | | /// <summary> |
| | | /// 门铃音量 |
| | | /// </summary> |
| | | int doorbelVol = 0; |
| | | int doorbellVol = 0; |
| | | public VideoDoorlockAudioSetupPage(Function function) |
| | | { |
| | | doorLockSystemSound = new DoorLockSystemSound(); |
| | | device = function; |
| | | bodyView = this; |
| | | } |
| | |
| | | |
| | | btnDoorlockSystemVolumeText.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | LoadEditDialog(StringId.DoorlockSystemVolume, 3-doorlockSystemSound, btnDoorlockSystemVolumeStateText); |
| | | LoadEditDialog(StringId.DoorlockSystemVolume, btnDoorlockSystemVolumeStateText,true); |
| | | }; |
| | | #endregion |
| | | |
| | |
| | | |
| | | btnDoorbellVolumeText.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | LoadEditDialog(StringId.DoorbellVolume, doorbelVol, btnDoorbellVolumeStateText); |
| | | LoadEditDialog(StringId.DoorbellVolume, btnDoorbellVolumeStateText,false); |
| | | |
| | | }; |
| | | #endregion |
| | |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | //更新界面 |
| | | var doorLockSystemSound = Newtonsoft.Json.JsonConvert.DeserializeObject<DoorLockSystemSound>(pack.Data.ToString()); |
| | | doorLockSystemSound = Newtonsoft.Json.JsonConvert.DeserializeObject<DoorLockSystemSound>(pack.Data.ToString()); |
| | | if(doorLockSystemSound != null) |
| | | { |
| | | switch (doorLockSystemSound.sound) |
| | | { |
| | | case 0: |
| | | doorlockSystemSound = 0; |
| | | btnDoorlockSystemVolumeStateText.TextID = StringId.Mute; |
| | | break; |
| | | case 1: |
| | | doorlockSystemSound = 1; |
| | | btnDoorlockSystemVolumeStateText.TextID = StringId.Low; |
| | | break; |
| | | case 2: |
| | | doorlockSystemSound = 2; |
| | | btnDoorlockSystemVolumeStateText.TextID = StringId.Moderate; |
| | | break; |
| | | case 3: |
| | | doorlockSystemSound = 3; |
| | | btnDoorlockSystemVolumeStateText.TextID = StringId.High; |
| | | break; |
| | | } |
| | |
| | | { |
| | | if (doorbellTone.volume == 0) |
| | | { |
| | | doorbelVol = 3; |
| | | doorbellVol = 0; |
| | | btnDoorbellVolumeStateText.TextID = StringId.Mute; |
| | | } |
| | | else if (doorbellTone.volume > 0 && doorbellTone.volume < 35) |
| | | { |
| | | doorbelVol = 2; |
| | | doorbellVol = 1; |
| | | btnDoorbellVolumeStateText.TextID = StringId.Low; |
| | | } |
| | | else if (doorbellTone.volume > 35 && doorbellTone.volume < 70) |
| | | { |
| | | doorbelVol = 1; |
| | | doorbellVol = 2; |
| | | btnDoorbellVolumeStateText.TextID = StringId.Moderate; |
| | | } |
| | | else if (doorbellTone.volume > 70) |
| | | { |
| | | doorbelVol = 0; |
| | | doorbellVol = 3; |
| | | btnDoorbellVolumeStateText.TextID = StringId.High; |
| | | } |
| | | } |
| | |
| | | /// <summary> |
| | | /// 加载功能属性数据选择弹窗 |
| | | /// </summary> |
| | | void LoadEditDialog(int titleId, int index, Button btn) |
| | | void LoadEditDialog(int titleId, Button btn,bool isDoorlockSystemVolume) |
| | | { |
| | | Button lastButton = new Button(); |
| | | var lastData = ""; |
| | | |
| | | var lastText = ""; |
| | | Dialog dialog = new Dialog(); |
| | | |
| | |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextAlignment = TextAlignment.Center, |
| | | Width = Application.GetRealWidth(100), |
| | | Width = Application.GetRealWidth(150), |
| | | TextID = titleId, |
| | | IsBold = true, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | |
| | | TextID = StringId.Complete, |
| | | }; |
| | | topView.AddChidren(btnConfrim); |
| | | int hei = 1; |
| | | int index = 1; |
| | | var statusList = new List<string> |
| | | { |
| | | Language.StringByID(StringId.High), |
| | |
| | | { |
| | | var row = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(50 * hei), |
| | | Y = Application.GetRealHeight(50 * index), |
| | | Height = Application.GetRealHeight(50), |
| | | }; |
| | | optionBaseView.AddChidren(row); |
| | | if (statusList.Count > hei) |
| | | if (statusList.Count > index) |
| | | { |
| | | optionBaseView.AddChidren(new Button() |
| | | { |
| | |
| | | Height = Application.GetMinRealAverage(28), |
| | | UnSelectedImagePath = "Public/ChooseIcon.png", |
| | | SelectedImagePath = "Public/ChooseOnIcon.png", |
| | | |
| | | Tag = index - 1, |
| | | }; |
| | | row.AddChidren(btnChoose); |
| | | if (index == hei - 1) |
| | | if (isDoorlockSystemVolume) {//设置门锁系统音量 |
| | | switch (doorLockSystemSound.sound) |
| | | { |
| | | case 0: |
| | | if (index == 3 + 1) |
| | | { |
| | | lastButton = btnChoose; |
| | | btnChoose.IsSelected = true; |
| | | } |
| | | break; |
| | | case 1: |
| | | if (index == 2 + 1) |
| | | { |
| | | lastButton = btnChoose; |
| | | btnChoose.IsSelected = true; |
| | | } |
| | | break; |
| | | case 2: |
| | | if (index == 1 + 1) |
| | | { |
| | | lastButton = btnChoose; |
| | | btnChoose.IsSelected = true; |
| | | } |
| | | break; |
| | | case 3: |
| | | if (index == 0 + 1) |
| | | { |
| | | lastButton = btnChoose; |
| | | btnChoose.IsSelected = true; |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | else//设置门铃音量 |
| | | { |
| | | switch (doorbellVol) |
| | | { |
| | | case 0: |
| | | if (index == 3 + 1) |
| | | { |
| | | lastButton = btnChoose; |
| | | btnChoose.IsSelected = true; |
| | | } |
| | | break; |
| | | case 1: |
| | | if (index == 2 + 1) |
| | | { |
| | | lastButton = btnChoose; |
| | | btnChoose.IsSelected = true; |
| | | } |
| | | break; |
| | | case 2: |
| | | if (index == 1 + 1) |
| | | { |
| | | lastButton = btnChoose; |
| | | btnChoose.IsSelected = true; |
| | | } |
| | | break; |
| | | case 3: |
| | | if (index == 0 + 1) |
| | | { |
| | | lastButton = btnChoose; |
| | | btnChoose.IsSelected = true; |
| | | } |
| | | break; |
| | | } |
| | | |
| | | } |
| | | var btnPropertyTitle = new Button() |
| | | { |
| | |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | Tag = hei-1, |
| | | Text = m |
| | | }; |
| | | row.AddChidren(btnPropertyTitle); |
| | | |
| | | btnPropertyTitle.MouseUpEventHandler = (sender, e) => { |
| | | if (btnChoose.IsSelected) |
| | | { |
| | | return; |
| | | } |
| | | btnChoose.IsSelected = true; |
| | | if (lastButton != null) |
| | | { |
| | | lastButton.IsSelected = false; |
| | | } |
| | | lastButton = btnChoose; |
| | | lastData = btnPropertyTitle.Tag.ToString(); |
| | | lastText = btnPropertyTitle.Text; |
| | | }; |
| | | hei++; |
| | | index++; |
| | | } |
| | | |
| | | |
| | |
| | | }; |
| | | btnConfrim.MouseUpEventHandler = (sender, e) => { |
| | | dialog.Close(); |
| | | if(titleId == StringId.DoorlockSystemVolume) |
| | | var lastData = lastButton.Tag.ToString(); |
| | | |
| | | if (isDoorlockSystemVolume) |
| | | { |
| | | |
| | | var waitPage = new Loading(); |
| | | bodyView.AddChidren(waitPage); |
| | | waitPage.Start(""); |
| | | |
| | | new System.Threading.Thread(() => { |
| | | try |
| | | { |
| | |
| | | switch (sound) |
| | | { |
| | | case 0: |
| | | doorLockSystemSound.sound = 0; |
| | | btn.TextID = StringId.Mute; |
| | | break; |
| | | case 1: |
| | | doorLockSystemSound.sound = 1; |
| | | btn.TextID = StringId.Low; |
| | | break; |
| | | case 2: |
| | | doorLockSystemSound.sound = 2; |
| | | btn.TextID = StringId.Moderate; |
| | | break; |
| | | case 3: |
| | | doorLockSystemSound.sound = 3; |
| | | btn.TextID = StringId.High; |
| | | break; |
| | | } |
| | |
| | | switch (lastData) |
| | | { |
| | | case "0": |
| | | doorbellVol = 3; |
| | | btn.TextID = StringId.High; |
| | | break; |
| | | case "1": |
| | | doorbellVol = 2; |
| | | btn.TextID = StringId.Moderate; |
| | | break; |
| | | case "2": |
| | | doorbellVol = 1; |
| | | btn.TextID = StringId.Low; |
| | | break; |
| | | case "3": |
| | | doorbellVol = 0; |
| | | btn.TextID = StringId.Mute; |
| | | break; |
| | | } |
| | |
| | | |
| | | public void LoadPage() |
| | | { |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.AudioSetup)).LoadTopView(); |
| | | bodyView.BackgroundColor = CSS_Color.MainBackgroundColor; |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.BatteryManagement)).LoadTopView(); |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | |
| | | |
| | | var view1 = new FrameLayout() |
| | |
| | | Y = Application.GetRealHeight(64), |
| | | Height = Application.GetRealHeight(276), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | BackgroundImagePath = "FunctionIcon/Doorlock/VideoDoorlockBatteryManagementBg.png" |
| | | BackgroundImagePath = "FunctionIcon/DoorLock/VideoDoorlockBatteryManagementBg.png"//VideoDoorlockBatteryManagementBg |
| | | }; |
| | | bodyView.AddChidren(view1); |
| | | |
| | |
| | | TextSize = CSS_FontSize.HeadlineFontSize, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | Text = "低电量说明", |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | view2.AddChidren(btnTitle2); |
| | | |
| | |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | TextID = StringId.FaceUnlockNote, |
| | | IsMoreLines = true, |
| | | }; |
| | | automaitcTipView.AddChidren(btnAutomaitcNote); |
| | | |
| | |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | |
| | | |
| | | |
| | | contentView = new VerticalScrolViewLayout() |
| | | { |
| | | Y = Application.GetRealHeight(64), |
| | | Height = Application.GetRealHeight(667 - 70), |
| | | Height = Application.GetRealHeight(607 - 70), |
| | | }; |
| | | bodyView.AddChidren(contentView); |
| | | |
| | | var btnTip = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(667 - 70), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealHeight(60), |
| | | TextAlignment = TextAlignment.TopLeft, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextID = StringId.VideoDoorlockManagerTip, |
| | | IsMoreLines = true, |
| | | }; |
| | | bodyView.AddChidren(btnTip); |
| | | |
| | | var waitPage = new Loading(); |
| | | bodyView.AddChidren(waitPage); |
| | | waitPage.Start(""); |
| | |
| | | VerticalScrolViewLayout contentView; |
| | | FrameLayout userPermissionsView; |
| | | |
| | | Button btnUserName; |
| | | //Button btnUserName; |
| | | |
| | | Function device; |
| | | VideoDoorlockUser doorlockUser; |
| | |
| | | }; |
| | | bodyView.AddChidren(contentView); |
| | | |
| | | |
| | | |
| | | #region 用户名称 |
| | | var userNameView = new FrameLayout() |
| | | { |
| | |
| | | }; |
| | | userNameView.AddChidren(btnEditUserNameIcon); |
| | | |
| | | btnUserName = new Button() |
| | | var btnUserName = new Button() |
| | | { |
| | | X = Application.GetRealWidth(100), |
| | | Width = Application.GetRealWidth(230), |
| | |
| | | contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) }); |
| | | |
| | | initOptionView(false); |
| | | |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | | Action<string> callBack = (str) => |
| | | { |
| | | if (string.IsNullOrEmpty(str)) |
| | | { |
| | | new Tip() |
| | | { |
| | | CloseTime = 1, |
| | | Text = Language.StringByID(StringId.UesrNameCannotBeEmpty), |
| | | Direction = AMPopTipDirection.None, |
| | | }.Show(bodyView); |
| | | return; |
| | | } |
| | | if (str == UserInfo.Current.userName) |
| | | { |
| | | return; |
| | | } |
| | | if (System.Text.Encoding.Default.GetBytes(str).Length > 20) |
| | | { |
| | | new Tip() |
| | | { |
| | | CloseTime = 1, |
| | | Text = Language.StringByID(StringId.LengthOutOfRange), |
| | | Direction = AMPopTipDirection.None, |
| | | }.Show(bodyView); |
| | | return; |
| | | } |
| | | waitPage.Start(Language.StringByID(StringId.PleaseWait)); |
| | | new System.Threading.Thread(() => |
| | | { |
| | | try |
| | | { |
| | | var resultObj = ApiUtlis.Ins.HttpRequest.EditDoorlockUserName(device.deviceId, doorlockUser.extUserId, str); |
| | | if (resultObj.Code == StateCode.SUCCESS) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | btnUserName.Text = str; |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | //失败提示 |
| | | IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log($"update user name error : {ex.Message}"); |
| | | } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | waitPage.Hide(); |
| | | }); |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }; |
| | | var pa = new PublicAssmebly(); |
| | | pa.entryMaxLength = 20; |
| | | pa.LoadDialog_EditParater(StringId.ChangeName, "", callBack, StringId.UesrNameCannotBeEmpty, 0, new List<string>()); |
| | | }; |
| | | btnUserName.MouseUpEventHandler = eventHandler; |
| | | btnEditUserNameIcon.MouseUpEventHandler = eventHandler; |
| | | userNameView.MouseUpEventHandler = eventHandler; |
| | | |
| | | } |
| | | |
| | | void initOptionView(bool isEdit) |
| | | { |
| | | if(doorlockUser.faceCount == 0&& |
| | | doorlockUser.faceCount == 0 && |
| | | doorlockUser.fingerCount == 0 && |
| | | doorlockUser.pwdCount == 0 && |
| | | doorlockUser.cardCount == 0) |
| | | { |
| | |
| | | |
| | | |
| | | int childrenViewHeight = Application.GetRealWidth(116); |
| | | int permissionsViewHeight = Application.GetRealHeight(291 + 92); |
| | | int permissionsViewHeight = Application.GetRealHeight(291 + 92 + 100); |
| | | if (userPermissionsView!= null) |
| | | { |
| | | userPermissionsView.RemoveAll(); |
| | | |
| | | if (isEdit) |
| | | { |
| | | permissionsViewHeight = Application.GetRealHeight(391 + 50); |
| | | permissionsViewHeight = Application.GetRealHeight(391 + 50 + 100); |
| | | childrenViewHeight = Application.GetRealWidth(156); |
| | | } |
| | | userPermissionsView.Height = permissionsViewHeight; |
| | |
| | | var delUserView = new FrameLayout() |
| | | { |
| | | Y = unlockOptionView.Bottom, |
| | | Height = Application.GetRealHeight(110), |
| | | Height = Application.GetRealHeight(310), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | }; |
| | | userPermissionsView.AddChidren(delUserView); |
| | |
| | | /// </summary> |
| | | void LoadEvent_EditUserName() |
| | | { |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | | Action<string> callBack = (str) => |
| | | { |
| | | if (string.IsNullOrEmpty(str)) |
| | | { |
| | | new Tip() |
| | | { |
| | | CloseTime = 1, |
| | | Text = Language.StringByID(StringId.UesrNameCannotBeEmpty), |
| | | Direction = AMPopTipDirection.None, |
| | | }.Show(bodyView); |
| | | return; |
| | | } |
| | | if (str == UserInfo.Current.userName) |
| | | { |
| | | return; |
| | | } |
| | | waitPage.Start(Language.StringByID(StringId.PleaseWait)); |
| | | new System.Threading.Thread(() => |
| | | { |
| | | try |
| | | { |
| | | var resultObj = ApiUtlis.Ins.HttpRequest.EditDoorlockUserName(device.deviceId, doorlockUser.extUserId,str); |
| | | if (resultObj.Code == StateCode.SUCCESS) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | btnUserName.Text = str; |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | //失败提示 |
| | | IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log($"update user name error : {ex.Message}"); |
| | | } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | waitPage.Hide(); |
| | | }); |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }; |
| | | new PublicAssmebly().LoadDialog_EditParater(StringId.ChangeName, doorlockUser.lockUserName, callBack, StringId.UesrNameCannotBeEmpty, 0, new System.Collections.Generic.List<string>()); |
| | | }; |
| | | btnUserName.MouseUpEventHandler = eventHandler; |
| | | //btnUserName.MouseUpEventHandler = eventHandler; |
| | | } |
| | | |
| | | |
| | |
| | | /// 固定域名,正式环境 |
| | | /// 公共域名就近解析 |
| | | /// </summary> |
| | | public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; |
| | | //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; |
| | | const string APP_KEY = "HDL-HOME-APP-TEST"; |
| | | const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss"; |
| | | //public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//mmmm |
| | |
| | | <MtouchArch>ARM64</MtouchArch>
|
| | | <MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
|
| | | <MtouchVerbosity></MtouchVerbosity>
|
| | | <CodesignProvision>OnProSiri230605-1-Dev</CodesignProvision>
|
| | | <CodesignProvision>OnProSiri230630-1-Dev</CodesignProvision>
|
| | | </PropertyGroup>
|
| | | <ItemGroup>
|
| | | <Reference Include="System" />
|
| | |
| | | <MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
|
| | | <MtouchVerbosity></MtouchVerbosity>
|
| | | <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
| | | <CodesignProvision>OnProSiriUI230605-1-Dev</CodesignProvision>
|
| | | <CodesignProvision>OnProSiriUI230630-1-Dev</CodesignProvision>
|
| | | </PropertyGroup>
|
| | | <ItemGroup>
|
| | | <Reference Include="System" />
|