Revert "Merge branch 'WJC' of http://172.16.1.23:6688/r/~wxr/HDL_APP_Project into WJC"
This reverts commit 794b0967171bd975bb454287616aca170546f8e1, reversing
changes made to b8c77b26878bfb4fb130753cf698ad5f143187e7.
| | |
| | | 426=Air dry time |
| | | 427=Disinfect time |
| | | 428=Anion Time |
| | | 429=H |
| | | 430=Min |
| | | 431=You are currently adding any platform devices to |
| | | 432=Other platform equipment is supported by third party service provider |
| | | 433=Water valve |
| | | 434=Time switch |
| | | 435=Remote control |
| | | |
| | | 1000=Indoor Humidity |
| | | 1001=V-chip |
| | | 1002=Anion |
| | | 1003=Sterilization |
| | | 1004=Humidification |
| | | 1005=Filter Element Reset |
| | | 1006=Lighting |
| | | 1007=Automatic |
| | | 1008=Manual |
| | | 1009=Strong |
| | | 1010=Sleep |
| | | 1011=Timing |
| | | 1012=Wind Speed |
| | | 1013=Gear |
| | | 1014=Please confirm whether the filter element has been reset and operate the equipment according to the instruction manual for the filter element life to be timed again |
| | | 1015=Low Gear |
| | | 1016=Mid Gear |
| | | 1017=High Gear |
| | | 1018=Timing Setting |
| | | 1019=Hour |
| | | 1020=Filter Element Time: |
| | | 1021=Air Cleaner |
| | | 1022=Current wind speed |
| | | 1023=Cancel Timing |
| | | 1024=Floor Sweeping Robot |
| | | 1025=Suction |
| | | 1026=1st Gear |
| | | 1027=2nd Gear |
| | | 1028=3rd Gear |
| | | 1029=Charge |
| | | 1030=Voice |
| | | 1031=Mute |
| | | 1032=Cleaning Mode |
| | | 1033=Consumables Management |
| | | 1034=History |
| | | 1035=Automatic |
| | | 1036=Random |
| | | 1037=Wall |
| | | 1038=Spiral |
| | | 1039=Total Clean Area |
| | | 1040=Total Clean Time |
| | | 1041=Remaining life of side brush |
| | | 1042=Residual life of roller brush |
| | | 1043=Remaining life of filter screen |
| | | 1044=Reset edge brush |
| | | 1045=Reset roll brush |
| | | 1046=Reset screen |
| | | 1047=Confirm to Reset edge brush? |
| | | 1048=Confirm to Reset roll brush? |
| | | 1049=Confirm to Reset screen? |
| | | 1050=Add Device |
| | | 1051=Mini Intelligent Remote Control |
| | | 1052=Add Infrared Remote Control |
| | | 1053=Press the infrared remote control button{0}for 10 seconds and the indicator light{0}flashes blue quickly |
| | | 1054=Please make sure your Bluetooth{0}is on and searchable |
| | | 1055=Next Step |
| | | 1056=Device searching... |
| | | 1057=No infrared remote control found |
| | | 1058=1.Please check whether the device is{0} powered on normally{0}2.Please check whether the Bluetooth{0} function is turned on normally{0}3.Please check whether the indicator{0} light is flashing blue |
| | | 1059=Search Again |
| | | 1060=Connect WiFi |
| | | 1061=At present,it only supports 2.4G WiFi network{0}and does not support WiFi names{0}with Chinese characters |
| | | 1062=Password |
| | | 1063=Connecting... |
| | | 1064=Please make infrared remote control{0}as close as possible to WiFi router |
| | | 1065=Network Link |
| | | 1066=Upload to cloud |
| | | 1067=Connect success |
| | | 1068=1.Please check whether the device is{0} powered on normally{0}2.Please turn on the Bluetooth function{0}3.Press the button for 10s and the indicator{0} light will be on |
| | | 1069=Add Fail |
| | | 1070=Add Success |
| | | 1071=You can start using the infrared{0}remote control! |
| | | 1072=Start using |
| | | 1073=Please turn on Bluetooth |
| | | 1074=Location information(GBS) unavailable |
| | | 1075=Network unavailable |
| | | 1076=Select infrared remote control |
| | | |
| | | 1002=Anion |
| | | |
| | | 5000=Music |
| | | 5001=Group |
| | | 5002=Setting |
| | |
| | | 426=风干时间 |
| | | 427=消毒时间 |
| | | 428=负离子时间 |
| | | 429=小时 |
| | | 430=分钟 |
| | | 431=你当前还为添加任何平台设备 |
| | | 432=其他平台设备均由第三方服务商提供支持 |
| | | 433=水阀 |
| | | 434=定时开关 |
| | | 435=遥控器 |
| | | |
| | | |
| | | 1000=室内湿度 |
| | |
| | | 1044=重置边刷 |
| | | 1045=重置滚刷 |
| | | 1046=重置滤网 |
| | | 1047=是否重置边刷? |
| | | 1048=是否重置滚刷? |
| | | 1049=是否重置滤网? |
| | | 1050=添加设备 |
| | | 1051=mini智能遥控器 |
| | | 1052=添加红外遥控 |
| | | 1053=长按红外遥控器按钮10秒,指示灯蓝色快闪 |
| | | 1054=请确保您的蓝牙已开启并处于可以被搜索状态 |
| | | 1055=下一步 |
| | | 1056=设备搜索中... |
| | | 1057=没有发现红外遥控器 |
| | | 1058=1、请检查设备是否正常通电{0}2、请检查蓝牙功能是否正常开启{0}3、请检查指示灯是否蓝色快闪状态 |
| | | 1059=重新搜索 |
| | | 1060=连接WiFi |
| | | 1061=目前只支持2.4G WiFi网络{0}暂不支持带有中文字符的WiFi名称 |
| | | 1062=密码 |
| | | 1063=正在连接中... |
| | | 1064=请让红外遥控尽量接近WIFI路由器 |
| | | 1065=网络链接中 |
| | | 1066=上传到云 |
| | | 1067=连接成功 |
| | | 1068=1、请检查设备是否正常通电{0}2、请开启蓝牙功能{0}3、并长按按钮10s,指示灯常亮 |
| | | 1069=添加失败 |
| | | 1070=添加成功 |
| | | 1071=可以开始使用红外遥控功能! |
| | | 1072=开始使用 |
| | | 1073=请打开蓝牙 |
| | | 1074=位置信息(GBS)不可用 |
| | | 1075=网络不可用 |
| | | 1076=选择红外遥控器 |
| | | 1047=是否重置边刷 |
| | | 1048=是否重置滚刷 |
| | | 1049=是否重置滤网 |
| | | |
| | | 5000=音乐 |
| | | 5001=组合 |
| | |
| | | 6076=编辑信息 |
| | | |
| | | |
| | | 6015=在线 |
| | | 6016=离线 |
| | | 6017=版本号 |
| | | 6018=请输入遥控器名称 |
| | | 6019=提示:遥控器创建后可在功能-电器分类{\r\n}查找使用 |
| | | 6020=推荐按键 |
| | | 6021=请输入按键名称 |
| | | 6022=下一步 |
| | | 6023=电源 |
| | | 6024=音量+ |
| | | 6025=音量- |
| | | 6026=频道+ |
| | | 6027=频道- |
| | | 6028=上 |
| | | 6029=下 |
| | | 6030=左 |
| | | 6031=右 |
| | | 6032=静音 |
| | | 6034=确认 |
| | | 6035=播放 |
| | | 6037=退出 |
| | | 6038=菜单 |
| | | 6039=暂停 |
| | | 6040=返回 |
| | | 6041=停止 |
| | | 6042=主页 |
| | | 6043=快进 |
| | | 6044=快退 |
| | | 6045=定时 |
| | | 6046=复制遥控功能 |
| | | 6047=对准遥控器中心按下相同按键 |
| | | 6048=智能遥控器 |
| | | 6049=添加按键 |
| | | 6050=*长按可进行自定义排序 |
| | | 6051=完成 |
| | | 6052=添加成功 |
| | | 6053=可到分类-功能-电器操作使用 |
| | | 6054=所属分类 |
| | | 6055=遥控器名称 |
| | | 6056=所属区域 |
| | | 6057=继续添加 |
| | | 6058=电器 |
| | | 6059=添加失败 |
| | | 6060=重试 |
| | | 6061=匹配遥控器 |
| | | 6062=请点击以下按钮 |
| | | 6063=确认设备是否有响应 |
| | | 6064=控制失败 |
| | | 6065=控制成功 |
| | | 6066=电源开 |
| | | 6067=模式制冷 |
| | | 6068=风速中风 |
| | | 6069=温度26℃ |
| | | 6070=删除设备 |
| | | 6071=修改名字 |
| | | 6072=确认删除 |
| | | 6073=取消 |
| | | |
| | | 7000=新建自动化 |
| | | 7001=编辑自动化 |
| | |
| | | <Reference Include="Shared.Droid.JLCountryCode"> |
| | | <HintPath>..\DLL\Android\Shared.Droid.JLCountryCode.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="AndriodBluetoothLibrary"> |
| | | <HintPath>..\DLL\Android\AndriodBluetoothLibrary.dll</HintPath> |
| | | </Reference> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <Compile Include="MainActivity.cs" /> |
| | |
| | | <AndroidAsset Include="Assets\Phone\PirIcon\icon2.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PirIcon\succeed.png" /> |
| | | <AndroidAsset Include="Assets\Phone\LogicIcon\selected+.png" /> |
| | | <AndroidAsset Include="Assets\Phone\Public\ProgressMsg.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PersonalCenter\AddDevice\UploadToClound.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PersonalCenter\AddDevice\NetConnectSelect.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PersonalCenter\AddDevice\ConnectSuccess.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PersonalCenter\AddDevice\ConnectSuccessSelect.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PersonalCenter\AddDevice\MiniRemoteControlBigPictrue.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PersonalCenter\AddDevice\UploadToCloundSelect.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PersonalCenter\AddDevice\MiniRemoteControlMenuIcon.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PersonalCenter\AddDevice\WifiAndPhoneConnect.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\sensortvoc.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\irmodule.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\sensorpir.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\electricalai6HtccKFIw3dxo3.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\lightrgb.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\airFreshstandard.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\electricalracks.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\electricalfan.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\sensorpm25.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\acstandard.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\electricalsocket.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\sensorgas.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\sensorhumidity.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\electricalkoiGhMKwLf2ZP81g.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\lightcct.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\curtainroller.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\irlearn.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\lightdimming.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\sensorco2.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\electricaltv.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\floorHeatstandard.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\curtainswitch.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\curtainshades.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\electricaltyqborgovyzytytz.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\musicstandard.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\sensordoorwindow.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\lightrgbw.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\sensortemperature.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\curtaintrietex.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\sensorsmoke.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\electricalQ1RsefNf91tIXyyQ.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\irac.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\sensorwater.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\lightswitch.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\irtv.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\lightrgbw_blue.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\irac_white.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\electricaltv_white.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\electricalai6HtccKFIw3dxo3_white.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\curtaintrietex_white.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\floorHeatstandard_blue.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\musicstandard_blue.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\electricalfan_white.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\curtainswitch_blue.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\lightdimming_white.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\lightrgbw_white.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\electricaltyqborgovyzytytz_white.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\airFreshstandard_white.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\lightrgb_white.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\irtv_blue.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\irlearn_blue.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\musicstandard_white.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\electricalfan_blue.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\curtainshades_white.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\electricalkoiGhMKwLf2ZP81g_white.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\irac_blue.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\electricalkoiGhMKwLf2ZP81g_blue.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\acstandard_white.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\lightcct_white.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\electricalracks_blue.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\electricalai6HtccKFIw3dxo3_blue.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\lightswitch_blue.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\curtaintrietex_blue.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\airFreshstandard_blue.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\floorHeatstandard_white.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\curtainshades_blue.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\electricalQ1RsefNf91tIXyyQ_white.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\electricaltyqborgovyzytytz_blue.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\lightcct_blue.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\lightrgb_blue.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\curtainroller_white.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\curtainroller_blue.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\electricalQ1RsefNf91tIXyyQ_blue.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\irtv_white.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\electricalsocket_white.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\lightswitch_white.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\lightdimming_blue.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\electricaltv_blue.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\electricalsocket_blue.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\acstandard_blue.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\irlearn_white.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\curtainswitch_white.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\electricalracks_white.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PirIcon\1.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PirIcon\2.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PirIcon\3.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PirIcon\4.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PirIcon\left.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PirIcon\right.png" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <AndroidNativeLibrary Include="libs\armeabi-v7a\libelianjni.so" /> |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202103101" android:versionName="1.1.202103101" package="com.hdl.onpro"> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202103051" android:versionName="1.1.202103051" package="com.hdl.onpro"> |
| | | <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="26" /> |
| | | <!-- 定位权限--> |
| | | <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> |
| | |
| | | //------------------------------------------------------------------------------ |
| | | // <auto-generated> |
| | | // This code was generated by a tool. |
| | | // Runtime Version:4.0.30319.42000 |
| | | // |
| | | // Changes to this file may cause incorrect behavior and will be lost if |
| | | // the code is regenerated. |
| | |
| | | { |
| | | |
| | | |
| | | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")] |
| | | [System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")] |
| | | public partial class Resource |
| | | { |
| | | |
| | |
| | | namespace HDL_ON |
| | | { |
| | | |
| | | public class MyBlufiClient |
| | | public class MyBlufiClient |
| | | { |
| | | |
| | | HdlBluWi share; |
| | |
| | | |
| | | //public string GetPer() |
| | | //{ |
| | | //share. |
| | | //share. |
| | | //} |
| | | |
| | | |
| | |
| | | /// <summary> |
| | | /// 设备搜索到蓝牙设备之后到代理事件 |
| | | /// </summary> |
| | | public void SetBlufiDeviceDelegate(Action<string, string> action) |
| | | public void SetBlufiDeviceDelegate(Action<string,string> action) |
| | | { |
| | | getBlufiDeviceDelegate = new FBYBleDeviceBackBlock((arg0) => |
| | | { |
| | | action?.Invoke(arg0.Name, arg0.Uuid.ToString()); |
| | | if (!string.IsNullOrEmpty(arg0.Name) && arg0.Name.Contains("BLU")) |
| | | getBlufiDeviceDelegate = new FBYBleDeviceBackBlock((arg0) => { |
| | | action?.Invoke(arg0.Name,arg0.Uuid.ToString()); |
| | | if (!string.IsNullOrEmpty(arg0.Name)&& arg0.Name.Contains("BLU")) |
| | | { |
| | | Console.WriteLine($"{arg0.Name} : {arg0.Uuid}"); |
| | | } |
| | |
| | | |
| | | public override void Blufi_gattPrepared(HdlBlufi.BlufiClient client, BlufiStatusCode status, CBService service, CBCharacteristic writeChar, CBCharacteristic notifyChar) |
| | | { |
| | | if (status == BlufiStatusCode.Success) |
| | | if(status == BlufiStatusCode.Success) |
| | | { |
| | | MainPage.Log("蓝牙连接成功"); |
| | | } |
| | |
| | | { |
| | | public override void UpdatedState(CBCentralManager central) |
| | | { |
| | | |
| | | |
| | | //throw new NotImplementedException(); |
| | | } |
| | | //public override void |
| | |
| | | <BundleResource Include="Resources\Phone\PirIcon\adddevice.png" /> |
| | | <BundleResource Include="Resources\Phone\PirIcon\next.png" /> |
| | | <BundleResource Include="Resources\Phone\LogicIcon\selected+.png" /> |
| | | <BundleResource Include="Resources\Phone\Public\ProgressMsg.png" /> |
| | | <BundleResource Include="Resources\Phone\PersonalCenter\AddDevice\UploadToClound.png" /> |
| | | <BundleResource Include="Resources\Phone\PersonalCenter\AddDevice\NetConnectSelect.png" /> |
| | | <BundleResource Include="Resources\Phone\PersonalCenter\AddDevice\ConnectSuccess.png" /> |
| | | <BundleResource Include="Resources\Phone\PersonalCenter\AddDevice\ConnectSuccessSelect.png" /> |
| | | <BundleResource Include="Resources\Phone\PersonalCenter\AddDevice\MiniRemoteControlBigPictrue.png" /> |
| | | <BundleResource Include="Resources\Phone\PersonalCenter\AddDevice\UploadToCloundSelect.png" /> |
| | | <BundleResource Include="Resources\Phone\PersonalCenter\AddDevice\MiniRemoteControlMenuIcon.png" /> |
| | | <BundleResource Include="Resources\Phone\PersonalCenter\AddDevice\WifiAndPhoneConnect.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\sensortvoc.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\sensorpir.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\electricalai6HtccKFIw3dxo3.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\lightrgb.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\airFreshstandard.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\electricalracks.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\electricalfan.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\sensorpm25.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\acstandard.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\electricalsocket.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\sensorgas.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\sensorhumidity.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\electricalkoiGhMKwLf2ZP81g.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\lightcct.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\curtainroller.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\irlearn.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\lightdimming.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\sensorco2.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\electricaltv.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\floorHeatstandard.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\curtainswitch.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\curtainshades.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\electricaltyqborgovyzytytz.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\musicstandard.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\sensordoorwindow.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\lightrgbw.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\sensortemperature.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\curtaintrietex.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\sensorsmoke.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\electricalQ1RsefNf91tIXyyQ.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\irac.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\sensorwater.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\lightswitch.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\irtv.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\lightrgbw_blue.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\irac_white.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\electricaltv_white.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\electricalai6HtccKFIw3dxo3_white.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\curtaintrietex_white.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\floorHeatstandard_blue.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\musicstandard_blue.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\electricalfan_white.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\curtainswitch_blue.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\lightdimming_white.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\lightrgbw_white.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\electricaltyqborgovyzytytz_white.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\airFreshstandard_white.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\lightrgb_white.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\irtv_blue.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\irlearn_blue.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\musicstandard_white.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\electricalfan_blue.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\curtainshades_white.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\electricalkoiGhMKwLf2ZP81g_white.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\irac_blue.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\electricalkoiGhMKwLf2ZP81g_blue.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\acstandard_white.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\lightcct_white.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\electricalracks_blue.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\electricalai6HtccKFIw3dxo3_blue.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\lightswitch_blue.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\curtaintrietex_blue.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\airFreshstandard_blue.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\floorHeatstandard_white.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\curtainshades_blue.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\electricalQ1RsefNf91tIXyyQ_white.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\electricaltyqborgovyzytytz_blue.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\lightcct_blue.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\lightrgb_blue.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\curtainroller_white.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\curtainroller_blue.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\electricalQ1RsefNf91tIXyyQ_blue.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\irtv_white.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\electricalsocket_white.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\lightswitch_white.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\lightdimming_blue.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\electricaltv_blue.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\electricalsocket_blue.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\acstandard_blue.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\irlearn_white.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\curtainswitch_white.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\electricalracks_white.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\irmodule.png" /> |
| | | <BundleResource Include="Resources\Phone\PirIcon\1.png" /> |
| | | <BundleResource Include="Resources\Phone\PirIcon\2.png" /> |
| | | <BundleResource Include="Resources\Phone\PirIcon\3.png" /> |
| | | <BundleResource Include="Resources\Phone\PirIcon\4.png" /> |
| | | <BundleResource Include="Resources\Phone\PirIcon\failed.png" /> |
| | | <BundleResource Include="Resources\Phone\PirIcon\icon1.png" /> |
| | | <BundleResource Include="Resources\Phone\PirIcon\icon2.png" /> |
| | | <BundleResource Include="Resources\Phone\PirIcon\left.png" /> |
| | | <BundleResource Include="Resources\Phone\PirIcon\right.png" /> |
| | | <BundleResource Include="Resources\Phone\PirIcon\succeed.png" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ITunesArtwork Include="iTunesArtwork" /> |
| | | <ITunesArtwork Include="iTunesArtwork%402x" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\HdlBluWi\Blufi.csproj"> |
| | | <Project>{2DDF4C3C-6998-432E-9F43-6786D82F0630}</Project> |
| | | <Name>Blufi</Name> |
| | | </ProjectReference> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Contents.json" /> |
| | |
| | | <ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\320480.png" /> |
| | | <ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\640960-1.png" /> |
| | | <ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\6401136-1.png" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\HdlBluWi\Blufi.csproj"> |
| | | <Project>{2DDF4C3C-6998-432E-9F43-6786D82F0630}</Project> |
| | | <Name>Blufi</Name> |
| | | </ProjectReference> |
| | | </ItemGroup> |
| | | <Import Project="..\HDL_ON\HDL_ON.projitems" Label="Shared" Condition="Exists('..\HDL_ON\HDL_ON.projitems')" /> |
| | | <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" /> |
| | |
| | | <key>UISupportedInterfaceOrientations</key> |
| | | <array> |
| | | <string>UIInterfaceOrientationPortrait</string> |
| | | <string>UIInterfaceOrientationLandscapeLeft</string> |
| | | <string>UIInterfaceOrientationLandscapeRight</string> |
| | | </array> |
| | | <key>UIAppFonts</key> |
| | | <array> |
| | |
| | | <key>UIStatusBarStyle</key> |
| | | <string>UIStatusBarStyleLightContent</string> |
| | | <key>CFBundleShortVersionString</key> |
| | | <string>1.1.202103101</string> |
| | | <string>1.1.202103051</string> |
| | | <key>CFBundleVersion</key> |
| | | <string>202103101</string> |
| | | <string>202103051</string> |
| | | <key>NSLocationWhenInUseUsageDescription</key> |
| | | <string>Use geographic location to provide services such as weather</string> |
| | | <key>NSAppleMusicUsageDescription</key> |
| | |
| | | 426=Air dry time |
| | | 427=Disinfect time |
| | | 428=Anion Time |
| | | 429=h |
| | | 430=m |
| | | |
| | | 429=H |
| | | 430=Min |
| | | 431=You are currently adding any platform devices to |
| | | 432=Other platform equipment is supported by third party service provider |
| | | 433=Water valve |
| | | 434=Time switch |
| | | 435=Remote control |
| | | |
| | | 1000=Indoor Humidity |
| | | 1001=V-chip |
| | | 1002=Anion |
| | | 1003=Sterilization |
| | | 1004=Humidification |
| | | 1005=Filter Element Reset |
| | | 1006=Lighting |
| | | 1007=Automatic |
| | | 1008=Manual |
| | | 1009=Strong |
| | | 1010=Sleep |
| | | 1011=Timing |
| | | 1012=Wind Speed |
| | | 1013=Gear |
| | | 1014=Please confirm whether the filter element has been reset and operate the equipment according to the instruction manual for the filter element life to be timed again |
| | | 1015=Low Gear |
| | | 1016=Mid Gear |
| | | 1017=High Gear |
| | | 1018=Timing Setting |
| | | 1019=Hour |
| | | 1020=Filter Element Time: |
| | | 1021=Air Cleaner |
| | | 1022=Current wind speed |
| | | 1023=Cancel Timing |
| | | 1024=Floor Sweeping Robot |
| | | 1025=Suction |
| | | 1026=1st Gear |
| | | 1027=2nd Gear |
| | | 1028=3rd Gear |
| | | 1029=Charge |
| | | 1030=Voice |
| | | 1031=Mute |
| | | 1032=Cleaning Mode |
| | | 1033=Consumables Management |
| | | 1034=History |
| | | 1035=Automatic |
| | | 1036=Random |
| | | 1037=Wall |
| | | 1038=Spiral |
| | | 1039=Total Clean Area |
| | | 1040=Total Clean Time |
| | | 1041=Remaining life of side brush |
| | | 1042=Residual life of roller brush |
| | | 1043=Remaining life of filter screen |
| | | 1044=Reset edge brush |
| | | 1045=Reset roll brush |
| | | 1046=Reset screen |
| | | 1047=Confirm to Reset edge brush? |
| | | 1048=Confirm to Reset roll brush? |
| | | 1049=Confirm to Reset screen? |
| | | 1050=Add Device |
| | | 1051=Mini Intelligent Remote Control |
| | | 1052=Add Infrared Remote Control |
| | | 1053=Press the infrared remote control button{0}for 10 seconds and the indicator light{0}flashes blue quickly |
| | | 1054=Please make sure your Bluetooth{0}is on and searchable |
| | | 1055=Next Step |
| | | 1056=Device searching... |
| | | 1057=No infrared remote control found |
| | | 1058=1.Please check whether the device is{0} powered on normally{0}2.Please check whether the Bluetooth{0} function is turned on normally{0}3.Please check whether the indicator{0} light is flashing blue |
| | | 1059=Search Again |
| | | 1060=Connect WiFi |
| | | 1061=At present,it only supports 2.4G WiFi network{0}and does not support WiFi names{0}with Chinese characters |
| | | 1062=Password |
| | | 1063=Connecting... |
| | | 1064=Please make infrared remote control{0}as close as possible to WiFi router |
| | | 1065=Network Link |
| | | 1066=Upload to cloud |
| | | 1067=Connect success |
| | | 1068=1.Please check whether the device is{0} powered on normally{0}2.Please turn on the Bluetooth function{0}3.Press the button for 10s and the indicator{0} light will be on |
| | | 1069=Add Fail |
| | | 1070=Add Success |
| | | 1071=You can start using the infrared{0}remote control! |
| | | 1072=Start using |
| | | 1073=Please turn on Bluetooth |
| | | 1074=Location information(GBS) unavailable |
| | | 1075=Network unavailable |
| | | 1076=Select infrared remote control |
| | | |
| | | 1002=Anion |
| | | |
| | | 5000=Music |
| | | 5001=Group |
| | | 5002=Setting |
| | |
| | | 428=负离子时间 |
| | | 429=小时 |
| | | 430=分钟 |
| | | 431=你当前还为添加任何平台设备 |
| | | 432=其他平台设备均由第三方服务商提供支持 |
| | | 433=水阀 |
| | | 434=定时开关 |
| | | 435=遥控器 |
| | | |
| | | |
| | | 1000=室内湿度 |
| | |
| | | 1044=重置边刷 |
| | | 1045=重置滚刷 |
| | | 1046=重置滤网 |
| | | 1047=是否重置边刷? |
| | | 1048=是否重置滚刷? |
| | | 1049=是否重置滤网? |
| | | 1050=添加设备 |
| | | 1051=mini智能遥控器 |
| | | 1052=添加红外遥控 |
| | | 1053=长按红外遥控器按钮10秒,指示灯蓝色快闪 |
| | | 1054=请确保您的蓝牙已开启并处于可以被搜索状态 |
| | | 1055=下一步 |
| | | 1056=设备搜索中... |
| | | 1057=没有发现红外遥控器 |
| | | 1058=1、请检查设备是否正常通电{0}2、请检查蓝牙功能是否正常开启{0}3、请检查指示灯是否蓝色快闪状态 |
| | | 1059=重新搜索 |
| | | 1060=连接WiFi |
| | | 1061=目前只支持2.4G WiFi网络{0}暂不支持带有中文字符的WiFi名称 |
| | | 1062=密码 |
| | | 1063=正在连接中... |
| | | 1064=请让红外遥控尽量接近WIFI路由器 |
| | | 1065=网络链接中 |
| | | 1066=上传到云 |
| | | 1067=连接成功 |
| | | 1068=1、请检查设备是否正常通电{0}2、请开启蓝牙功能{0}3、并长按按钮10s,指示灯常亮 |
| | | 1069=添加失败 |
| | | 1070=添加成功 |
| | | 1071=可以开始使用红外遥控功能! |
| | | 1072=开始使用 |
| | | 1073=请打开蓝牙 |
| | | 1074=位置信息(GBS)不可用 |
| | | 1075=网络不可用 |
| | | 1076=选择红外遥控器 |
| | | 1047=是否重置边刷 |
| | | 1048=是否重置滚刷 |
| | | 1049=是否重置滤网 |
| | | |
| | | 5000=音乐 |
| | | 5001=组合 |
| | |
| | | 6076=编辑信息 |
| | | |
| | | |
| | | 6015=在线 |
| | | 6016=离线 |
| | | 6017=版本号 |
| | | 6018=请输入遥控器名称 |
| | | 6019=提示:遥控器创建后可在功能-电器分类{\r\n}查找使用 |
| | | 6020=推荐按键 |
| | | 6021=请输入按键名称 |
| | | 6022=下一步 |
| | | 6023=电源 |
| | | 6024=音量+ |
| | | 6025=音量- |
| | | 6026=频道+ |
| | | 6027=频道- |
| | | 6028=上 |
| | | 6029=下 |
| | | 6030=左 |
| | | 6031=右 |
| | | 6032=静音 |
| | | 6034=确认 |
| | | 6035=播放 |
| | | 6037=退出 |
| | | 6038=菜单 |
| | | 6039=暂停 |
| | | 6040=返回 |
| | | 6041=停止 |
| | | 6042=主页 |
| | | 6043=快进 |
| | | 6044=快退 |
| | | 6045=定时 |
| | | 6046=复制遥控功能 |
| | | 6047=对准遥控器中心按下相同按键 |
| | | 6048=智能遥控器 |
| | | 6049=添加按键 |
| | | 6050=*长按可进行自定义排序 |
| | | 6051=完成 |
| | | 6052=添加成功 |
| | | 6053=可到分类-功能-电器操作使用 |
| | | 6054=所属分类 |
| | | 6055=遥控器名称 |
| | | 6056=所属区域 |
| | | 6057=继续添加 |
| | | 6058=电器 |
| | | 6059=添加失败 |
| | | 6060=重试 |
| | | 6061=匹配遥控器 |
| | | 6062=请点击以下按钮 |
| | | 6063=确认设备是否有响应 |
| | | 6064=控制失败 |
| | | 6065=控制成功 |
| | | 6066=电源开 |
| | | 6067=模式制冷 |
| | | 6068=风速中风 |
| | | 6069=温度26℃ |
| | | 6070=删除设备 |
| | | 6071=修改名字 |
| | | 6072=确认删除 |
| | | 6073=取消 |
| | | |
| | | 7000=新建自动化 |
| | | 7001=编辑自动化 |
| | |
| | | catch { } |
| | | finally |
| | | { |
| | | if (DB_ResidenceData.Instance.CurrentRegion != null) |
| | | { |
| | | #region 读取本地数据 |
| | | //读取音乐信息 |
| | | UI.Music.A31MusicModel.ReadMusicStates(); |
| | | //搜索网关 |
| | | DriverLayer.Control.Ins.SearchLoaclGateway(); |
| | | #endregion |
| | | } |
| | | #region 读取本地数据 |
| | | //读取音乐信息 |
| | | UI.Music.A31MusicModel.ReadMusicStates(); |
| | | //搜索网关 |
| | | DriverLayer.Control.Ins.SearchLoaclGateway(); |
| | | #endregion |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | |
| | | { |
| | | get |
| | | { |
| | | if(DB_ResidenceData.Instance.CurrentRegion == null || DB_ResidenceData.Instance.CurrentRegion.RegionID == null) |
| | | { |
| | | return AccountPath; |
| | | } |
| | | if (string.IsNullOrEmpty(regionPath) || !regionPath.Contains(DB_ResidenceData.Instance.CurrentRegion.RegionID )) |
| | | { |
| | | regionPath = Path.Combine(AccountPath, DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | |
| | | } |
| | | } |
| | | }); |
| | | }else |
| | | { |
| | | action?.Invoke(); |
| | | } |
| | | } |
| | | |
| | |
| | | if (b) |
| | | { |
| | | Android.Content.Intent intent = new Android.Content.Intent(); |
| | | var bundle = new Android.OS.Bundle(); |
| | | //传递name参数为tinyphp |
| | | bundle.PutString("Token", ezChildAccessToken.accessToken); |
| | | bundle.PutString("HdlToken", UserInfo.Current.LoginTokenString); |
| | | bundle.PutString("Url", OnAppConfig.Instance.RequestHttpsHost); |
| | | intent.PutExtras(bundle); |
| | | intent.SetComponent(new Android.Content.ComponentName(Shared.Application.Activity, "com.videogo.MainActivity")); |
| | | Shared.Application.Activity.StartActivity(intent); |
| | | } |
| | |
| | | { |
| | | public static class StringId |
| | | { |
| | | public const int RemoteControl = 435; |
| | | public const int TimeSwitch = 434; |
| | | public const int WaterValve = 433; |
| | | public const int Use3tyBrandListTip = 432; |
| | | public const int Not3tyBrandListTip = 431; |
| | | public const int MinuteUint = 430; |
| | | public const int HourUint = 429; |
| | | public const int AnionTime = 428; |
| | |
| | | /// <summary> |
| | | /// 是否重置滤网 |
| | | /// </summary> |
| | | public const int ResetFilterScreenMsg = 1049;
|
| | | /// <summary> |
| | | /// 添加设备 |
| | | /// </summary> |
| | | public const int AddDevice = 1050; |
| | | /// <summary>
|
| | | /// mini智能遥控器
|
| | | /// </summary> |
| | | public const int MiniIntelligentRemoteControl = 1051;
|
| | | /// <summary>
|
| | | /// 添加红外遥控
|
| | | /// </summary> |
| | | public const int AddInfraredRemoteControl = 1052;
|
| | | /// <summary>
|
| | | /// 长按红外遥控器按钮10秒,指示灯蓝色快闪
|
| | | /// </summary> |
| | | public const int AddInfraredRemoteControlMsg1 = 1053;
|
| | | /// <summary>
|
| | | /// 请确保您的蓝牙已开启并处于可以被搜索状态
|
| | | /// </summary> |
| | | public const int AddInfraredRemoteControlMsg2 = 1054;
|
| | | /// <summary>
|
| | | /// 下一步
|
| | | /// </summary> |
| | | public const int Next = 1055; |
| | | /// <summary>
|
| | | /// 设备搜索中...
|
| | | /// </summary> |
| | | public const int SearchingDevice = 1056;
|
| | | /// <summary>
|
| | | /// 没有发现红外遥控器
|
| | | /// </summary> |
| | | public const int NoInfraredRemoteControlFound = 1057;
|
| | | /// <summary>
|
| | | /// 1、请检查设备是否正常通电{0}2、请检查蓝牙功能是否正常开启{0}3、请检查指示灯是否蓝色快闪状态
|
| | | /// </summary> |
| | | public const int AddInfraredRemoteControlMsg3 = 1058; |
| | | /// <summary>
|
| | | /// 重新搜索
|
| | | /// </summary> |
| | | public const int ReSearch = 1059;
|
| | | /// <summary>
|
| | | /// 连接WiFi
|
| | | /// </summary> |
| | | public const int ConnectWiFi = 1060;
|
| | | /// <summary>
|
| | | /// 目前只支持2.4G WiFi网络{0}暂不支持带有中文字符的WiFi名称
|
| | | /// </summary> |
| | | public const int AddInfraredRemoteControlMsg4 = 1061;
|
| | | /// <summary>
|
| | | /// 密码
|
| | | /// </summary> |
| | | public const int Password = 1062; |
| | | /// <summary>
|
| | | /// 正在连接中...
|
| | | /// </summary> |
| | | public const int NowConnectting = 1063;
|
| | | /// <summary>
|
| | | /// 请让红外遥控尽量接近WIFI路由器
|
| | | /// </summary> |
| | | public const int AddInfraredRemoteControlMsg5 = 1064;
|
| | | /// <summary>
|
| | | /// 网络链接中
|
| | | /// </summary> |
| | | public const int InTheNetworkLink = 1065;
|
| | | /// <summary>
|
| | | /// 上传到云
|
| | | /// </summary> |
| | | public const int UploadToCloud = 1066;
|
| | | /// <summary>
|
| | | /// 连接成功
|
| | | /// </summary> |
| | | public const int ConnectSuccess = 1067;
|
| | | /// <summary>
|
| | | /// 1、请检查设备是否正常通电{0}2、请开启蓝牙功能{0}3、并长按按钮10s,指示灯常亮
|
| | | /// </summary> |
| | | public const int AddInfraredRemoteControlMsg6 = 1068; |
| | | /// <summary>
|
| | | /// 添加失败
|
| | | /// </summary> |
| | | public const int AddFail = 1069;
|
| | | /// <summary>
|
| | | /// 添加成功
|
| | | /// </summary> |
| | | public const int AddSuccess = 1070;
|
| | | /// <summary>
|
| | | /// 可以开始使用红外遥控功能!
|
| | | /// </summary> |
| | | public const int AddInfraredRemoteControlMsg7 = 1071; |
| | | /// <summary>
|
| | | /// 开始使用
|
| | | /// </summary> |
| | | public const int StartUse = 1072; |
| | | /// <summary>
|
| | | /// 请打开蓝牙
|
| | | /// </summary> |
| | | public const int PleaseTurnOnBluetooth = 1073; |
| | | /// <summary>
|
| | | /// 位置信息(GBS)不可用
|
| | | /// </summary> |
| | | public const int GbsIsNotAvailable = 1074;
|
| | | /// <summary>
|
| | | /// 网络不可用
|
| | | /// </summary> |
| | | public const int NetworkIsNotAvailable = 1075; |
| | | /// <summary>
|
| | | /// 选择红外遥控器
|
| | | /// </summary> |
| | | public const int ChooseInfraredRemoteControl = 1076; |
| | | public const int ResetFilterScreenMsg = 1049; |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | Text = mes, |
| | | CloseTime = closeTime, |
| | | MaxWidth = Application.GetRealWidth(300), |
| | | Direction = AMPopTipDirection.None |
| | | }; |
| | | tip.Show(MainPage.BaseView); |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 时间戳转时间字符串 |
| | | /// |
| | | /// </summary> |
| | | /// <param name="unixTimeStamp"></param> |
| | | /// <param name="format"></param> |
| | |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 本地控制红外设备功能主题 |
| | | /// </summary> |
| | | public string ControlIrFunctionTopic |
| | | { |
| | | get |
| | | { |
| | | return $"/base/${Control.Ins.GatewayId}/thing/property/down"; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 读取功能状态 |
| | | /// </summary> |
| | | public string ReadStatus |
| | |
| | | return _msg_id++; |
| | | } |
| | | } |
| | | ///// <summary> |
| | | ///// 获取13位时间戳 |
| | | ///// </summary> |
| | | ///// <returns></returns> |
| | | //public string Get_TimeStamp() |
| | | //{ |
| | | // long t = DateTime.Now.Ticks / 10000; |
| | | // return t.ToString(); |
| | | //} |
| | | /// <summary> |
| | | /// 获取13位时间戳 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public string Get_TimeStamp() |
| | | { |
| | | long t = DateTime.Now.Ticks / 10000; |
| | | return t.ToString(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 是否搜索本地网关成功 |
| | |
| | | public void SearchLoaclGateway() |
| | | { |
| | | //2021-01-15 : 住宅没有绑定网关的时候不用搜索,并且不能链接mqtt |
| | | if(DB_ResidenceData.Instance.HomeGateway == null || string.IsNullOrEmpty(DB_ResidenceData.Instance.HomeGateway.gatewayId)) |
| | | if(DB_ResidenceData.Instance.HomeGateway == null) |
| | | { |
| | | return; |
| | | } |
| | |
| | | } |
| | | |
| | | MainPage.Log($"局域网信息: {receiveObj.Topic}"); |
| | | MainPage.Log($"内容: {res[1]}"); |
| | | |
| | | |
| | | //验证有效数据长度 |
| | |
| | | //} |
| | | receiveObj.BodyDataString = res[1]; |
| | | |
| | | var bodyJObj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResponsePack>(res[1]); |
| | | if (bodyJObj == null) |
| | | { |
| | | return receiveObj; |
| | | } |
| | | if (receiveObj.Topic == CommunicationTopic.SearchLoaclGatewayReply) |
| | | { |
| | | var bodyJObj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResponsePack>(res[1]); |
| | | if (bodyJObj == null) |
| | | { |
| | | return receiveObj; |
| | | } |
| | | |
| | | var device = Newtonsoft.Json.JsonConvert.DeserializeObject<DeviceModule>(bodyJObj.objects.ToString()); |
| | | if (device.device_mac == DB_ResidenceData.Instance.residenceGatewayMAC) |
| | | { |
| | |
| | | { |
| | | //TODO 暂时不传正确的数据上去,如果后面要优化前面这些代码 |
| | | UpdataFunctionStatus(receiveObj.BodyDataString, null); |
| | | } |
| | | else |
| | | { |
| | | //一些特殊的主题处理(为了执行速度,尽可能的别加耗时的操作) |
| | | Stan.HdlCloudReceiveLogic.Current.CloudOverallMsgReceiveEx(receiveObj.Topic, receiveObj.BodyDataString); |
| | | } |
| | | } |
| | | return receiveObj; |
| | |
| | | MainPage.Log($"A协议更新状态:{revString}"); |
| | | foreach (var attr in updateTemp.status) |
| | | { |
| | | localFunction.time_stamp = temp.time_stamp; |
| | | localFunction.SetAttrState(attr.key, attr.value); |
| | | } |
| | | |
| | |
| | | { |
| | | try |
| | | { |
| | | var sendJob = new JObject { { "id", Control.Ins.msg_id.ToString() }, { "time_stamp", Utlis.GetTimestamp ()} }; |
| | | var sendJob = new JObject { { "id", Control.Ins.msg_id.ToString() }, { "time_stamp", (DateTime.Now.Ticks / 100000).ToString() } }; |
| | | var bodyString = JsonConvert.SerializeObject(sendJob); |
| | | |
| | | var sendBytes = Control.Ins.ConvertSendBodyData(CommunicationTopic.SearchLoaclGateway, bodyString); |
| | |
| | | using HDL_ON.DriverLayer; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI; |
| | | using HDL_ON.DAL.Server; |
| | | |
| | | namespace HDL_ON.DAL.Mqtt |
| | | { |
| | |
| | | QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce |
| | | }; |
| | | //App订阅遥控器自学按键学习成功通知 |
| | | var pirStudy = new MqttTopicFilter() |
| | | var study = new MqttTopicFilter() |
| | | { |
| | | Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/irCodeStudyDone/up", |
| | | QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce |
| | | }; |
| | | #region 数据更新推送主题 |
| | | //appHomeRefresh:住宅数据刷新通知 |
| | | var appHomeRefresh = new MqttTopicFilter() |
| | | { |
| | | Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/appHomeRefresh/up", |
| | | QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce |
| | | }; |
| | | //appRoomRefresh:房间数据刷新通知 |
| | | var appRoomRefresh = new MqttTopicFilter() |
| | | { |
| | | Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/appRoomRefresh/up", |
| | | QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce |
| | | }; |
| | | //appDeviceRefresh:设备数据刷新通知 |
| | | var appDeviceRefresh = new MqttTopicFilter() |
| | | { |
| | | Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/appDeviceRefresh/up", |
| | | QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce |
| | | }; |
| | | #endregion |
| | | |
| | | |
| | | Utlis.WriteLine("开始订阅!"); |
| | | var result = await RemoteMqttClient.SubscribeAsync(new MqttTopicFilter[] { |
| | | pirStatus,pirStudy, |
| | | appDeviceRefresh,appHomeRefresh,appRoomRefresh, |
| | | pirStatus, |
| | | study, |
| | | topicFilterPush2, topicAlinkStatus }); |
| | | if (result.Items[0].ResultCode == MQTTnet.Client.Subscribing.MqttClientSubscribeResultCode.GrantedQoS0) |
| | | { |
| | |
| | | } |
| | | |
| | | if (!UserInfo.Current.IsLogin) |
| | | { |
| | | return; |
| | | } |
| | | if(DB_ResidenceData.Instance.CurrentRegion == null || DB_ResidenceData.Instance.CurrentRegion.RegionID == null) |
| | | { |
| | | return; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | //一些特殊的主题处理(为了执行速度,尽可能的别加耗时的操作 true:执行了特殊处理 false:没有执行特殊处理) |
| | | if (Stan.HdlCloudReceiveLogic.Current.CloudOverallMsgReceiveEx(topic, e.ApplicationMessage.Payload, mqttEncryptKey, tuyaEncryptKey) == true) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | if (topic == $"/BusGateWayToClient/{UserInfo.Current.ID}" + PushNotifySqueeze) |
| | | { |
| | | var mMes = Encoding.UTF8.GetString(e.ApplicationMessage.Payload); |
| | |
| | | var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey); |
| | | var revString = Encoding.UTF8.GetString(bytes); |
| | | HDL_ON.UI.UI2.PersonalCenter.PirDevice.Method.controldata = revString; |
| | | //ReceiveCheckGateway(ss); |
| | | //return; |
| | | } |
| | | //App订阅遥控器自学按键学习成功通知 |
| | | else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/irCodeStudyDone/up") |
| | | { |
| | | var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey); |
| | | var revString = Encoding.UTF8.GetString(bytes); |
| | | UI.UI2.PersonalCenter.PirDevice.Method.controldata = revString; |
| | | HDL_ON.UI.UI2.PersonalCenter.PirDevice.Method.buttondata = revString; |
| | | //ReceiveCheckGateway(ss); |
| | | //return; |
| | | } |
| | | #region 数据更新推送主题 |
| | | //appHomeRefresh:住宅数据刷新通知 |
| | | else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/appHomeRefresh/up") { |
| | | MainPage.Log("住宅数据刷新通知"); |
| | | new HttpServerRequest().GetHomePager(); |
| | | } |
| | | //appRoomRefresh:房间数据刷新通知 |
| | | else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/appRoomRefresh/up"){ |
| | | MainPage.Log("房间数据刷新通知"); |
| | | var roomResult = new HttpServerRequest().GetRoomList(); |
| | | if (roomResult.Code == StateCode.SUCCESS) |
| | | { |
| | | MainPage.Log($"读取房间信息成功"); |
| | | var revData = Newtonsoft.Json.JsonConvert.DeserializeObject<SpatialApiPack>(roomResult.Data.ToString()); |
| | | if (revData == null) |
| | | { |
| | | revData = new SpatialApiPack(); |
| | | } |
| | | { |
| | | SpatialInfo.CurrentSpatial.UpdateSpatialList(revData.list); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | MainPage.Log($"读取房间数据失败:Code:{roomResult.Code}; msg:{roomResult.message}"); |
| | | } |
| | | } |
| | | //appDeviceRefresh:设备数据刷新通知 |
| | | else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/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 (localFunction.Spk_Prefix == FunctionCategory.Music || string.IsNullOrEmpty(localFunction.Spk_Prefix)) |
| | | { |
| | | 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}"); |
| | | } |
| | | } |
| | | #endregion |
| | | //A网关设备状态-包含涂鸦设备 |
| | | else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/property/send") |
| | | { |
| | |
| | | else |
| | | { |
| | | //SetGatewayOnlineResetCheck(); |
| | | //var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, mqttEncryptKey); |
| | | var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, mqttEncryptKey); |
| | | //bus数据解析 |
| | | var packet = new Packet(); |
| | | |
| | |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetDevcieList, requestJson); |
| | | } |
| | | /// <summary> |
| | | /// 获取指定第三方品牌的绑定过的设备列表 |
| | | /// </summary> |
| | | /// <param name="productPlatform"></param> |
| | | /// <param name="productBrand"></param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew Get3TyBrandBindDeviceList(string productPlatform, string productBrand) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("productPlatform", productPlatform); |
| | | d.Add("productBrand", productBrand); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetDevcieList, requestJson); |
| | | } |
| | | /// <summary> |
| | | /// 获取指定第三方品牌的设备列表 |
| | | /// </summary> |
| | | /// <param name="productPlatform"></param> |
| | | /// <param name="productBrand"></param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew Get3TyBrandDeviceList(string productPlatform,string productBrand) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("categoryType", 1); |
| | | d.Add("productPlatform", productPlatform); |
| | | d.Add("productBrand", productBrand); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_Get3tyBrandDevcieList, requestJson); |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取设备详情列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | |
| | | /// </summary> |
| | | public const string Api_Post_GetDevcieList = "/home-wisdom/app/device/list"; |
| | | /// <summary> |
| | | /// 获取第三方品牌设备列表 |
| | | /// </summary> |
| | | public const string Api_Post_Get3tyBrandDevcieList = "/home-wisdom/app/product/list"; |
| | | /// <summary> |
| | | /// 获取设备详情 |
| | | /// </summary> |
| | | public const string Api_Post_GetDevcieInfoList = "/home-wisdom/app/device/info"; |
| | |
| | | |
| | | #region 优化区域 2021-02-25 |
| | | /// <summary> |
| | | /// 更新的最后时间 |
| | | /// </summary> |
| | | public string time_stamp = "1615261019796"; |
| | | |
| | | public string GeteTime() |
| | | { |
| | | try |
| | | { |
| | | DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1)); // 当地时区 |
| | | return startTime.AddMilliseconds(Convert.ToDouble(time_stamp)).ToString("s"); |
| | | } |
| | | catch { |
| | | return DateTime.MinValue.ToString("s"); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 获取属性列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | |
| | | return true; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// icon文件名称 |
| | | /// </summary> |
| | | public string IconName |
| | | { |
| | | get |
| | | { |
| | | return spk.Replace(".",""); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 上一次打开的亮度 |
| | |
| | | { |
| | | var sendDataObj = new AlinkFunctionStatusObj(); |
| | | sendDataObj.id = Control.Ins.msg_id.ToString(); |
| | | sendDataObj.time_stamp = Utlis.GetTimestamp(); |
| | | sendDataObj.time_stamp = Control.Ins.Get_TimeStamp(); |
| | | |
| | | |
| | | var acd = new AlinkStatusData(); |
| | | acd.sid = sid; |
| | | foreach (var dic in commandDictionary) |
| | |
| | | aca.value = dic.Value; |
| | | acd.status.Add(aca); |
| | | } |
| | | |
| | | sendDataObj.objects.Add(acd); |
| | | |
| | | return sendDataObj; |
| | | } |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | public const string FanSpeed = "fan"; |
| | | /// <summary> |
| | | /// 手动风向 |
| | | /// </summary> |
| | | public const string FanManual = "fan_manual"; |
| | | /// <summary> |
| | | /// 自动风向 |
| | | /// </summary> |
| | | public const string FanAuto = "fan_auto"; |
| | | |
| | | /// <summary> |
| | | /// 设置温度 |
| | | /// </summary> |
| | | public const string SetTemp = "set_temp"; |
| | | /// <summary> |
| | | /// 温度加减 |
| | | /// </summary> |
| | | public const string SetTempStep = "set_temp_step"; |
| | | /// <summary> |
| | | /// 温度模式 |
| | | /// 空调、地热//app自加 |
| | |
| | | /// 打开登记(风扇) |
| | | /// </summary> |
| | | public const string OpenLevel = "openLevel"; |
| | | /// <summary> |
| | | /// 红外按键 |
| | | /// </summary> |
| | | public const string Key = "key"; |
| | | |
| | | |
| | | #region tuya |
| | |
| | | /// </summary> |
| | | public const string ElectricTV = "electrical.tv"; |
| | | /// <summary> |
| | | /// 红外、电视 |
| | | /// </summary> |
| | | public const string TvIr = "ir.tv"; |
| | | /// <summary> |
| | | /// 家电、风扇 |
| | | /// </summary> |
| | | public const string ElectricFan = "electrical.fan"; |
| | | public const string ElectricFan = "electrical.fan";
|
| | | /// <summary> |
| | | /// 家电、涂鸦空气净化器 |
| | | /// </summary> |
| | |
| | | /// <summary> |
| | | /// 家电、涂鸦电风扇 |
| | | /// </summary> |
| | | public const string ElectricTuyaFan = "electrical.tyqborgovyzytytz"; |
| | | public const string ElectricTuyaFan = "electrical.tyqborgovyzytytz";
|
| | | /// <summary> |
| | | /// 家电、涂鸦扫地机器人 |
| | | /// </summary> |
| | |
| | | /// </summary> |
| | | public const string IrModule = "ir.module"; |
| | | /// <summary> |
| | | /// 红外遥控器 |
| | | /// 红外电视 |
| | | /// </summary> |
| | | public const string IrLearn = "ir.learn"; |
| | | public const string TvIr = "ir.tv"; |
| | | |
| | | |
| | | /// <summary> |
| | |
| | | /// 家电 |
| | | /// </summary> |
| | | public const string Electric = "electrical"; |
| | | /// <summary> |
| | | /// 红外设备 |
| | | /// </summary> |
| | | public const string IR = "ir"; |
| | | |
| | | |
| | | //Music = 0x09, |
| | | |
| | | |
| | | } |
| | |
| | | /// <returns></returns> |
| | | public List<Function> GetAcList() |
| | | { |
| | | return Functions.FindAll((obj) => obj.spk == SPK.AcStandard || obj.spk == SPK.AcIr); |
| | | return Functions.FindAll((obj) => obj.spk == SPK.AcStandard); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | |
| | | return Functions.FindAll((obj) => obj.spk == SPK.ElectricFan || obj.spk == SPK.ElectricTuyaFan |
| | | || obj.spk == SPK.ElectricSocket |
| | | || obj.spk == SPK.IrLearn
|
| | | || obj.spk == SPK.TvIr
|
| | | || obj.spk == SPK.ElectricTV
|
| | | || obj.spk == SPK.ElectricTuyaAirCleaner
|
| | | || obj.spk == SPK.ElectricTuyaWeepRobot |
| | | || obj.spk == SPK.ElectricTuyaWaterValve |
| | | || obj.spk == SPK.ClothesHanger); |
| | | } |
| | | /// <summary> |
| | | /// 遥控器列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<Function> GetIrLearinList() |
| | | { |
| | | return Functions.FindAll((obj) => obj.spk == SPK.IrLearn); |
| | | } |
| | | /// <summary> |
| | | /// 风扇列表 |
| | |
| | | /// </summary> |
| | | public List<Function> GetTVList() |
| | | { |
| | | return Functions.FindAll((obj) => obj.spk == SPK.ElectricTV || obj.spk == SPK.TvIr); |
| | | return Functions.FindAll((obj) => obj.spk == SPK.ElectricTV); |
| | | } |
| | | /// <summary> |
| | | /// 家电插座列表 |
| | |
| | | /// 加载功能列表 |
| | | /// </summary> |
| | | /// <param name="filePath"></param> |
| | | /// <param name="checkRepeat"> |
| | | /// <para>考虑到性能问题追加此变量,是否检测重复,只对function有效</para> |
| | | /// <para>true:当重复存在时,替换掉</para> |
| | | /// <para>false:直接无条件添加</para></param> |
| | | public void IniFunctionList(string filePath, bool checkRepeat = false) |
| | | public void IniFunctionList(string filePath) |
| | | { |
| | | // todo 增加设备,增加功能进功能列表 |
| | | if (filePath.StartsWith("FunctionData_")) |
| | |
| | | FileUtlis.Files.DeleteFile(filePath); |
| | | return; |
| | | } |
| | | if (checkRepeat == true)
|
| | | {
|
| | | //检测重复
|
| | | for (int i = 0; i < Functions.Count; i++)
|
| | | {
|
| | | if (Functions[i].deviceId == tempFunction.deviceId)
|
| | | {
|
| | | //先移除掉再加
|
| | | Functions.RemoveAt(i);
|
| | | Functions.Add(tempFunction);
|
| | | return;
|
| | | }
|
| | | }
|
| | | } |
| | | |
| | | |
| | | Functions.Add(tempFunction); |
| | | |
| | | } |
| | | if (filePath.StartsWith("SceneData_")) |
| | | { |
| | |
| | | /// 平台标识 |
| | | /// </summary> |
| | | public string productPlatform; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 第三方设备信息 |
| | | /// </summary> |
| | | public class IntegratedBrandDevice |
| | | { |
| | | |
| | | /// <summary> |
| | | /// 产品唯一标识 |
| | | /// </summary> |
| | | public string productId; |
| | | |
| | | /// <summary> |
| | | /// 产品名称 |
| | | /// </summary> |
| | | public string productName; |
| | | |
| | | /// <summary> |
| | | /// 产品厂商 |
| | | /// </summary> |
| | | public string productSupplier; |
| | | |
| | | /// <summary> |
| | | /// 产品品牌(品牌标识) |
| | | /// </summary> |
| | | public string productBrand; |
| | | |
| | | /// <summary> |
| | | /// 产品类型 |
| | | /// </summary> |
| | | public string productType; |
| | | |
| | | /// <summary> |
| | | /// 第二品类名 |
| | | /// </summary> |
| | | public string categorySecondName; |
| | | |
| | | /// <summary> |
| | | /// 第二品类code |
| | | /// </summary> |
| | | public string categorySecondCode; |
| | | |
| | | /// <summary> |
| | | /// 第一品类code |
| | | /// </summary> |
| | | public string categoryFirstCode; |
| | | |
| | | /// <summary> |
| | | /// 第一品类名称 |
| | | /// </summary> |
| | | public string categoryFirstName; |
| | | /// <summary> |
| | | /// 产品型号 |
| | | /// </summary> |
| | | public string productVersion; |
| | | |
| | | /// <summary> |
| | | /// 产品平台(平台标识) |
| | | /// </summary> |
| | | public string productPlatform; |
| | | |
| | | /// <summary> |
| | | /// 产品图片 |
| | | /// </summary> |
| | | public string productPic; |
| | | |
| | | /// <summary> |
| | | /// 功能类型Key |
| | | /// </summary> |
| | | public string spk; |
| | | |
| | | /// <summary> |
| | | /// 设备绑定方式 WIFI、QRSCAN、ZIG_BEE、ETHERNET |
| | | /// </summary> |
| | | public string bindType; |
| | | } |
| | | |
| | | } |
| | |
| | | <Compile Include="$(MSBuildThisFileDirectory)Entity\Function\Function.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Public\PublicAssmebly.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\CSS\CSS.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Stan\Logic\HdlBluetoothAndroidLogic.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Stan\Logic\HdlBluetoothIOSLogic.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\UserPageBLL.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\UserPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\2-Classification\ClassificationPage.cs" />
|
| | |
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Electrical\ClothesHangerSetTimePage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\ArmSensor\ArmSensorHistroyPaging.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\AC\AcControlPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Stan\Logic\HdlCloudReceiveLogic.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Stan\Logic\HdlWifiLogic.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Stan\Controls\CompoundControls\ProgressRowBar.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddDevice\AddMiniRemoteControlDirection3Page.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddDevice\AddMiniRemoteControlDirection1Page.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddDevice\AddMiniRemoteControlDirection2Page.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddDevice\AddMiniRemoteControlDirection4Page.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddDevice\AddThirdPartyDeviceMenuListPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\Matching.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\PirNameView.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddFunction\BrandListPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Electrical\IrLearnPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\EditControl.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\FrameLayout50.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\PirView.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\ControlView.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddFunction\AddDevciePage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddFunction\DeviceListPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\MainView.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\HeigthChangeView.cs" />
|
| | | </ItemGroup>
|
| | | <ItemGroup>
|
| | | <Folder Include="$(MSBuildThisFileDirectory)UI\" />
|
| | | <Folder Include="$(MSBuildThisFileDirectory)DAL\" />
|
| | | <Folder Include="$(MSBuildThisFileDirectory)DAL\Mqtt\" />
|
| | | <Folder Include="$(MSBuildThisFileDirectory)Common\" />
|
| | |
| | | <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\" />
|
| | | <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\" />
|
| | | </ItemGroup>
|
| | | </Project> |
| | | </Project>
|
| | |
| | | /// <summary> |
| | | /// 版本号 |
| | | /// </summary> |
| | | public static string VersionString = "1.1.0310"; |
| | | public static string VersionString = "1.1.0305"; |
| | | ///// <summary> |
| | | ///// 客户端类型 |
| | | ///// </summary> |
| | |
| | | /// 是否进入后台 |
| | | /// </summary> |
| | | public static bool IsEnterBackground = false; |
| | | /// <summary> |
| | | /// 当前分页索引 |
| | | /// 0:收藏 |
| | | /// 1:分类 |
| | | /// 2:智能 |
| | | /// 3:个人 |
| | | /// </summary> |
| | | public static int CurPageIndex = 9999; |
| | | |
| | | ///// <summary> |
| | | ///// 公司代码 |
| | |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | break; |
| | | case SPK.ElectricTV: |
| | | case SPK.TvIr: |
| | | var tvView = new TVPage(function); |
| | | MainPage.BasePageView.AddChidren(tvView); |
| | | tvView.LoadPage(btnCollectionIcon, btnName, btnFromFloor); |
| | |
| | | case SPK.AcStandard: |
| | | var acPage = new AcControlPage(); |
| | | acPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor); |
| | | break; |
| | | case SPK.IrLearn: |
| | | var irLearinPage = new IrLearnPage(); |
| | | irLearinPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor); |
| | | break; |
| | | } |
| | | }; |
| | |
| | | |
| | | btnAddIcon.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | if (type == "floors") |
| | | { |
| | | Action<string> callBackAction = (floorName) => |
| | | { |
| | | callBack("add", floorName); |
| | | }; |
| | | string newFloorName = "1F"; |
| | | for (int i = 0; i < SpatialInfo.CurrentSpatial.FloorList.Count + 1;) |
| | | { |
| | | newFloorName = ++i + "F"; |
| | | if (null == SpatialInfo.CurrentSpatial.FloorList.Find((obj) => obj.roomName == newFloorName)) |
| | | { |
| | | break; |
| | | } |
| | | } |
| | | var fs = new List<string>(); |
| | | foreach (var f in SpatialInfo.CurrentSpatial.FloorList) |
| | | { |
| | | fs.Add(f.roomName); |
| | | } |
| | | new PublicAssmebly().LoadDialog_EditParater(StringId.AddFloors, newFloorName, callBackAction, StringId.FloorNameCannotBeEmpty, |
| | | StringId.AddFloorFailed_FloorAlreadyExist, fs); |
| | | } |
| | | else |
| | | { |
| | | callBack("", ""); |
| | | } |
| | | LoadEvent_AddEvent(type, callBack); |
| | | }; |
| | | } |
| | | |
| | |
| | | /// <param name="type">添加按钮的功能类型</param> |
| | | void LoadEvent_AddEvent(string type,Action <string,string> callBack) |
| | | { |
| | | //switch (type) |
| | | //{ |
| | | switch (type) |
| | | { |
| | | case "floors": |
| | | Action<string> callBackAction = (floorName) => |
| | | { |
| | | callBack("add", floorName); |
| | | }; |
| | | string newFloorName = "1F"; |
| | | for (int i = 0; i < SpatialInfo.CurrentSpatial.FloorList.Count + 1; ) |
| | | { |
| | | newFloorName = ++i + "F"; |
| | | if (null == SpatialInfo.CurrentSpatial.FloorList.Find((obj)=>obj.roomName == newFloorName)) |
| | | { |
| | | break; |
| | | } |
| | | } |
| | | var fs = new List<string>(); |
| | | foreach(var f in SpatialInfo.CurrentSpatial.FloorList) |
| | | { |
| | | fs.Add(f.roomName); |
| | | } |
| | | new PublicAssmebly().LoadDialog_EditParater(StringId.AddFloors,newFloorName , callBackAction,StringId.FloorNameCannotBeEmpty, |
| | | StringId.AddFloorFailed_FloorAlreadyExist,fs); |
| | | break; |
| | | case "rooms": |
| | | callBack("", ""); |
| | | break; |
| | | case "Member": |
| | | callBack("",""); |
| | | break; |
| | | |
| | | |
| | | //} |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | namespace HDL_ON.Stan
|
| | | {
|
| | | /// <summary>
|
| | | /// 输入框控件的最初原型(不建议修改和直接使用):标准字体颜色(0xFF798394),文字向左靠齐,14号字
|
| | | /// 输入框控件的最初原型(不建议修改和直接使用):标准字体颜色,文字向左靠齐,14号字
|
| | | /// </summary>
|
| | | public class TextInputBase : EditText
|
| | | {
|
| | |
| | | /// <param name="i_width">有些界面很特殊,不统一按键宽度,所以预留此参数</param> |
| | | public BottomClickButton(int i_width = 188) |
| | | {
|
| | | this.Yaxis = Application.GetRealHeight(543);
|
| | | this.Yaxis = Application.GetRealHeight(539);
|
| | |
|
| | | //这个是一般位置
|
| | | this.Y = this.Yaxis;
|
| | |
| | | this.Gravity = Gravity.CenterHorizontal;
|
| | | this.Radius = (uint)Application.GetRealHeight(44) / 2; |
| | | this.TextSize = CSS_FontSize.SubheadingFontSize; |
| | | this.BackgroundColor = CSS_Color.MainColor; |
| | | this.IsBold = true;
|
| | | }
|
| | | }
|
| | |
| | | /// 添加菜单行
|
| | | /// </summary>
|
| | | /// <param name="i_listText">显示的列表文字</param>
|
| | | /// <param name="i_listSelect">默认选择(请勿设置为null)</param>
|
| | | /// <param name="i_listSelect">默认选择</param>
|
| | | public void AddRowMenu(List<string> i_listText, List<int> i_listSelect)
|
| | | {
|
| | | foreach (var index in i_listSelect)
|
| | |
| | | btnTemp.Text = msgText.Replace("\r\n", string.Empty);
|
| | | //获取这个显示的内容的高度
|
| | | int rowCount = btnTemp.GetRealRowCountByText();
|
| | | //再看看它原来按换行符分割为几行
|
| | | var myArry = msgText.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
|
| | | //看看谁的行数多,就用谁的
|
| | | if (myArry.Length > rowCount)
|
| | | {
|
| | | rowCount = myArry.Length;
|
| | | }
|
| | | int contentHeight = rowCount * Application.GetRealHeight(18);
|
| | | if (rowCount <= 2)
|
| | | {
|
| | |
| | | public class NormalViewControl : ButtonCtrBase
|
| | | {
|
| | | /// <summary> |
| | | /// 平凡普通的控件,基本只是用来显示(正常文本字体颜色(0xFF798394),文字向左靠齐) |
| | | /// 平凡普通的控件,基本只是用来显示(正常文本字体颜色,文字向左靠齐) |
| | | /// </summary> |
| | | /// <param name="i_Width">宽度</param> |
| | | /// <param name="i_Height">高度</param> |
| | |
| | | return;
|
| | | }
|
| | |
|
| | | /// <summary> |
| | | /// 添加指定画面,并移除当前画面,启动参数由指定画面的ShowForm函数所指定 |
| | | /// </summary> |
| | | /// <param name="form">目标界面</param> |
| | | /// <param name="parameter">启动参数:参数由指定画面的ShowForm函数所指定</param> |
| | | public void AddFormAndCloseNowForm(CommonFormBase form, params object[] parameter) |
| | | { |
| | | //移除当前画面 |
| | | this.CloseForm(); |
| | | //添加画面 |
| | | form.AddForm(parameter); |
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 关闭界面___________________________
|
| | |
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 添加列表消息显示控件_______________
|
| | |
|
| | | /// <summary>
|
| | | /// 添加列表消息显示控件,返回的是最后一个控件的底部坐标
|
| | | /// </summary>
|
| | | /// <param name="frameTable">桌布容器控件</param>
|
| | | /// <param name="i_msg">显示的消息(换行请使用【{0}】进行分割)</param>
|
| | | /// <param name="i_fontSize">字体大小</param>
|
| | | /// <param name="i_fontColor">字体颜色</param>
|
| | | /// <param name="i_height">控件高度(真实值)</param>
|
| | | /// <param name="i_yy">Y轴初始坐标(真实值)</param>
|
| | | /// <param name="alignment">文字对齐方式</param>
|
| | | /// <param name="special">
|
| | | /// <para>注:除了新建这个函数的开发者以外,都不建议把这个值不设置为true</para>
|
| | | /// <para>说明:以最长的控件的X轴为基准,所有控件的X轴都变成一致</para>
|
| | | /// </param>
|
| | | /// <returns></returns>
|
| | | public int AddListMsgControls(FrameLayout frameTable, string i_msg, int i_fontSize, uint i_fontColor, int i_height,
|
| | | int i_yy, TextAlignment alignment = TextAlignment.Center, bool special = false)
|
| | | {
|
| | | var listMsg = i_msg.Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries);
|
| | | int defultWidth = this.bodyFrameLayout.Width - HdlControlResourse.XXLeft * 2;
|
| | |
|
| | | var listContr = new List<NormalViewControl>();
|
| | | int minXX = 10086;//控件集合最小的X轴
|
| | | foreach (var strMsg in listMsg)
|
| | | {
|
| | | //消息显示控件
|
| | | var btnMsg = new NormalViewControl(defultWidth, i_height, false);
|
| | | btnMsg.Y = i_yy;
|
| | | btnMsg.Gravity = Gravity.CenterHorizontal;
|
| | | btnMsg.TextAlignment = alignment;
|
| | | btnMsg.TextColor = i_fontColor;
|
| | | btnMsg.TextSize = i_fontSize;
|
| | | btnMsg.Text = strMsg;
|
| | |
|
| | | //特殊处理
|
| | | if (special == true && alignment == TextAlignment.Center)
|
| | | {
|
| | | //设置它的真实宽度(对special变量有用)
|
| | | int realWidth = btnMsg.GetRealWidthByText();
|
| | | btnMsg.Width = realWidth > defultWidth ? defultWidth : realWidth;
|
| | | }
|
| | | frameTable.AddChidren(btnMsg);
|
| | |
|
| | | //收集控件
|
| | | listContr.Add(btnMsg);
|
| | |
|
| | | //记录控件集合X轴最小的值
|
| | | if (btnMsg.X < minXX) { minXX = btnMsg.X; }
|
| | |
|
| | | //两行之间的间距为4
|
| | | i_yy = btnMsg.Bottom + Application.GetRealHeight(4);
|
| | | }
|
| | | //特殊处理
|
| | | if (special == true && alignment == TextAlignment.Center)
|
| | | {
|
| | | foreach (var contr in listContr)
|
| | | {
|
| | | //以最长的控件的X轴为基准,所有控件的X轴都变成一致
|
| | | contr.X = minXX;
|
| | | }
|
| | | }
|
| | |
|
| | | return i_yy - Application.GetRealHeight(4);
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 添加底部点击按钮控件_______________
|
| | |
|
| | | /// <summary>
|
| | | /// 添加底部点击按钮控件
|
| | | /// </summary>
|
| | | /// <param name="i_text">显示的文本</param>
|
| | | /// <returns></returns>
|
| | | public BottomClickButton AddBottomClickButton(string i_text)
|
| | | {
|
| | | //容器控件
|
| | | var frameBack = new FrameLayout();
|
| | | frameBack.Height = Application.GetRealHeight(76);
|
| | | frameBack.Gravity = Gravity.BottomCenter;
|
| | | bodyFrameLayout.AddChidren(frameBack);
|
| | | //然后在顶部添加一个有边框的东西
|
| | | var frameLine = new FrameLayout();
|
| | | frameLine.Height = Application.GetRealHeight(50);
|
| | | frameLine.BorderWidth = 1;
|
| | | frameLine.BackgroundColor = UI.CSS.CSS_Color.MainBackgroundColor;
|
| | | frameLine.BorderColor = UI.CSS.CSS_Color.DividingLineColor;
|
| | | frameLine.SetCornerWithSameRadius(Application.GetRealHeight(24), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
|
| | | frameBack.AddChidren(frameLine);
|
| | | //最后再整个白色的东西遮住它的下部
|
| | | var frameWite = new FrameLayout();
|
| | | frameWite.Height = frameBack.Height - Application.GetRealHeight(24 - 10);//需要超过它
|
| | | frameWite.Width = frameBack.Width + Application.GetRealWidth(6);
|
| | | frameWite.X = -Application.GetRealWidth(3);
|
| | | frameWite.Y = Application.GetRealHeight(24);
|
| | | frameWite.BackgroundColor = UI.CSS.CSS_Color.MainBackgroundColor;
|
| | | frameBack.AddChidren(frameWite);
|
| | |
|
| | | //按钮
|
| | | var btnOk = new BottomClickButton(220);
|
| | | btnOk.Gravity = Gravity.Center;
|
| | | btnOk.Text = i_text;
|
| | | frameBack.AddChidren(btnOk);
|
| | |
|
| | | return btnOk;
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 一般的方法_________________________ |
| | |
|
| | | /// <summary> |
| | |
| | | { |
| | | CloseTime = 1, |
| | | Direction = AMPopTipDirection.None, |
| | | MaxWidth = Application.GetRealWidth(300), |
| | | Text = Language.StringByID(StringId.IncorrectRepeatPassword) |
| | | }.Show(bodyView); |
| | | } |
| | |
| | | } |
| | | else |
| | | { |
| | | etAccount.Text = "15622703419";//凉霸"18666455392";//13375012446//13602944661//tzy 18778381374 |
| | | etAccount.Text = "15971583093";//凉霸"18666455392";//13375012446//13602944661//tzy 18778381374 |
| | | //15971583093 gs |
| | | } |
| | | b = !b; |
| | |
| | | { |
| | | CloseTime = 1, |
| | | Direction = AMPopTipDirection.None, |
| | | Text = Language.StringByID(StringId.IncorrectRepeatPassword), |
| | | MaxWidth = Application.GetRealWidth(300), |
| | | Text = Language.StringByID(StringId.IncorrectRepeatPassword) |
| | | }.Show(bodyView); |
| | | } |
| | | else |
| | |
| | | }; |
| | | view.AddChidren(btnSwitch); |
| | | |
| | | |
| | | btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_blue.png"; |
| | | btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_white.png"; |
| | | |
| | | //switch (function.Spk_Prefix) |
| | | //{ |
| | | // //todo 增加设备,主页收藏图标 |
| | | // case FunctionCategory.Light: |
| | | // #region 灯光 Light |
| | | // btnIcon.UnSelectedImagePath = "FunctionIcon/Light/LightIcon.png"; |
| | | // btnIcon.SelectedImagePath = "FunctionIcon/Light/LightOnIcon.png"; |
| | | // UpdataFunctionStates(function); |
| | | // #endregion |
| | | // break; |
| | | // case FunctionCategory.AC: |
| | | // #region 空调 AC |
| | | // btnIcon.UnSelectedImagePath = "FunctionIcon/AC/AcIcon.png"; |
| | | // btnIcon.SelectedImagePath = "FunctionIcon/AC/AcOnIcon.png"; |
| | | // #endregion |
| | | // break; |
| | | // case FunctionCategory.FloorHeat: |
| | | // #region 地热 |
| | | // btnIcon.UnSelectedImagePath = "FunctionIcon/FloorHeating/FloorHeatingIcon.png"; |
| | | // btnIcon.SelectedImagePath = "FunctionIcon/FloorHeating/FloorHeatingOnIcon.png"; |
| | | // #endregion |
| | | // break; |
| | | // case FunctionCategory.Electric: |
| | | // switch (function.spk) |
| | | // { |
| | | // case SPK.ElectricSocket: |
| | | // btnIcon.UnSelectedImagePath = "FunctionIcon/Socket/SocketIcon.png"; |
| | | // btnIcon.SelectedImagePath = "FunctionIcon/Socket/SocketOnIcon.png"; |
| | | // break; |
| | | // case SPK.ElectricFan: |
| | | // btnIcon.UnSelectedImagePath = "FunctionIcon/Electrical/FanIcon.png"; |
| | | // btnIcon.SelectedImagePath = "FunctionIcon/Electrical/FanOnIcon.png"; |
| | | // break; |
| | | // case SPK.ElectricTuyaAirCleaner: |
| | | // btnIcon.SelectedImagePath = "FunctionIcon/HomePageIcon/AirCleanerIcon.png"; |
| | | // btnIcon.UnSelectedImagePath = "FunctionIcon/HomePageIcon/AirCleanerIconOn.png"; |
| | | // break; |
| | | // case SPK.ElectricTuyaFan: |
| | | // btnIcon.SelectedImagePath = "FunctionIcon/HomePageIcon/FanIcon.png"; |
| | | // btnIcon.UnSelectedImagePath = "FunctionIcon/HomePageIcon/FanIconOn.png"; |
| | | // break; |
| | | // case SPK.ElectricTuyaWaterValve: |
| | | // btnIcon.SelectedImagePath = "FunctionIcon/HomePageIcon/WaterValveIcon.png"; |
| | | // btnIcon.UnSelectedImagePath = "FunctionIcon/HomePageIcon/WaterValveIconOn.png"; |
| | | // break; |
| | | // case SPK.ElectricTuyaWeepRobot: |
| | | // btnIcon.SelectedImagePath = "FunctionIcon/HomePageIcon/WeepRobotIcon.png"; |
| | | // btnIcon.UnSelectedImagePath = "FunctionIcon/HomePageIcon/WeepRobotIconOn.png"; |
| | | // break; |
| | | // } |
| | | // break; |
| | | //} |
| | | switch (function.Spk_Prefix) |
| | | { |
| | | //todo 增加设备,主页收藏图标 |
| | | case FunctionCategory.Light: |
| | | #region 灯光 Light |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/Light/LightIcon.png"; |
| | | btnIcon.SelectedImagePath = "FunctionIcon/Light/LightOnIcon.png"; |
| | | UpdataFunctionStates(function); |
| | | #endregion |
| | | break; |
| | | case FunctionCategory.AC: |
| | | #region 空调 AC |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/AC/AcIcon.png"; |
| | | btnIcon.SelectedImagePath = "FunctionIcon/AC/AcOnIcon.png"; |
| | | #endregion |
| | | break; |
| | | case FunctionCategory.FloorHeat: |
| | | #region 地热 |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/FloorHeating/FloorHeatingIcon.png"; |
| | | btnIcon.SelectedImagePath = "FunctionIcon/FloorHeating/FloorHeatingOnIcon.png"; |
| | | #endregion |
| | | break; |
| | | case FunctionCategory.Electric: |
| | | switch (function.spk) |
| | | { |
| | | case SPK.ElectricSocket: |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/Socket/SocketIcon.png"; |
| | | btnIcon.SelectedImagePath = "FunctionIcon/Socket/SocketOnIcon.png"; |
| | | break; |
| | | case SPK.ElectricFan: |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/Electrical/FanIcon.png"; |
| | | btnIcon.SelectedImagePath = "FunctionIcon/Electrical/FanOnIcon.png"; |
| | | break; |
| | | case SPK.ElectricTuyaAirCleaner: |
| | | btnIcon.SelectedImagePath = "FunctionIcon/HomePageIcon/AirCleanerIcon.png"; |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/HomePageIcon/AirCleanerIconOn.png"; |
| | | break; |
| | | case SPK.ElectricTuyaFan: |
| | | btnIcon.SelectedImagePath = "FunctionIcon/HomePageIcon/FanIcon.png"; |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/HomePageIcon/FanIconOn.png"; |
| | | break; |
| | | case SPK.ElectricTuyaWaterValve: |
| | | btnIcon.SelectedImagePath = "FunctionIcon/HomePageIcon/WaterValveIcon.png"; |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/HomePageIcon/WaterValveIconOn.png"; |
| | | break; |
| | | case SPK.ElectricTuyaWeepRobot: |
| | | btnIcon.SelectedImagePath = "FunctionIcon/HomePageIcon/WeepRobotIcon.png"; |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/HomePageIcon/WeepRobotIconOn.png"; |
| | | break; |
| | | } |
| | | break; |
| | | } |
| | | LoadEvent_SwitchFunction(function, btnSwitch); |
| | | } |
| | | //取消收藏事件 |
| | |
| | | /// </summary> |
| | | public static void RefreshFunctionView() |
| | | { |
| | | if (bodyView != null && MainPage.CurPageIndex==0) |
| | | if (bodyView != null) |
| | | { |
| | | bodyView.LoadDeviceFunctionControlZone(); |
| | | } |
| | |
| | | btnName.TextID = StringId.SecurityMonitoring; |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | |
| | | #if __IOS__ |
| | | EZSDK.IOS.EZSDK.Go2EZvizMonitor(); |
| | | #else //安卓摄像头 |
| | | HDLCommon.Current.Go2EZvizMonitor(bodyView); |
| | | #endif |
| | | }; |
| | | break; |
| | | case ShowFunction.Sensor: |
| | |
| | | } |
| | | LoadDiv(); |
| | | |
| | | //switch (function.spk) |
| | | //{ |
| | | // case SPK.CurtainSwitch: |
| | | // btnIcon.UnSelectedImagePath = "FunctionIcon/Curtain/CurtainThinIcon.png"; |
| | | // break; |
| | | // case SPK.CurtainTrietex: |
| | | // btnIcon.UnSelectedImagePath = "FunctionIcon/Curtain/MotorCurtainIcon.png"; |
| | | // break; |
| | | // case SPK.CurtainRoller: |
| | | // btnIcon.UnSelectedImagePath = "FunctionIcon/Curtain/RollingShutterIcon.png"; |
| | | // break; |
| | | // case SPK.SensorPir: |
| | | // btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/ArmSensorPirIcon.png"; |
| | | // break; |
| | | // case SPK.SensorWater: |
| | | // btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/ArmSensorWaterImmersionIcon.png"; |
| | | // break; |
| | | // case SPK.SensorSmoke: |
| | | // btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/ArmSensorSmokeIcon.png"; |
| | | // break; |
| | | // case SPK.SensorDoorWindow: |
| | | // btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/ArmSensorDoorIcon.png"; |
| | | // break; |
| | | // case SPK.MusicStandard: |
| | | // btnIcon.UnSelectedImagePath = "FunctionIcon/Music/MusicThinIcon.png"; |
| | | // break; |
| | | // case SPK.ClothesHanger: |
| | | // btnIcon.UnSelectedImagePath = "FunctionIcon/Electrical/ClothesHanger/ClothesHangerGrayIcon.png"; |
| | | // break; |
| | | // case SPK.ElectricSocket: |
| | | // btnIcon.UnSelectedImagePath = "FunctionIcon/Socket/SocketThinIcon.png"; |
| | | // break; |
| | | // case SPK.ElectricFan: |
| | | // case SPK.ElectricTuyaFan: |
| | | // btnIcon.UnSelectedImagePath = "FunctionIcon/Electrical/FanThinIcon.png"; |
| | | // break; |
| | | // case SPK.ElectricTV: |
| | | // btnIcon.UnSelectedImagePath = "FunctionIcon/Electrical/TVThinIcon.png"; |
| | | // break; |
| | | // case SPK.ElectricTuyaAirCleaner: |
| | | // btnIcon.UnSelectedImagePath = "FunctionIcon/Electrical/AirCleanerThiinIcon.png"; |
| | | // break; |
| | | // case SPK.ElectricTuyaWeepRobot: |
| | | // btnIcon.UnSelectedImagePath = "FunctionIcon/Electrical/WeepRobotThinIcon.png"; |
| | | // break; |
| | | // case SPK.ElectricTuyaWaterValve: |
| | | // btnIcon.UnSelectedImagePath = "FunctionIcon/Electrical/WaterValve/WaterValveIcon.png"; |
| | | // break; |
| | | // case SPK.AcStandard: |
| | | // btnIcon.UnSelectedImagePath = "FunctionIcon/AC/AcThinIcon1.png"; |
| | | // break; |
| | | // case SPK.AcIr: |
| | | // btnIcon.UnSelectedImagePath = "FunctionIcon/AC/AcThinIcon1.png"; |
| | | // break; |
| | | // case SPK.FloorHeatStandard: |
| | | // btnIcon.UnSelectedImagePath = "FunctionIcon/FloorHeating/FloorHeatingThinIcon.png"; |
| | | // break; |
| | | // default: |
| | | // btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/{function.IconName}.png"; |
| | | // break; |
| | | //} |
| | | btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/{function.IconName}.png"; |
| | | |
| | | if (function.Spk_Prefix == FunctionCategory.Curtain//窗帘没有开关按钮 |
| | | || function.Spk_Prefix == FunctionCategory.Music//音乐没有开关按钮 |
| | | || function.Spk_Prefix == FunctionCategory.Sensor//传感器没有开关按钮 |
| | |
| | | switch (function.Spk_Prefix) |
| | | { |
| | | case FunctionCategory.Curtain: |
| | | |
| | | switch (function.spk) |
| | | { |
| | | case SPK.CurtainSwitch: |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/Curtain/CurtainThinIcon.png"; |
| | | break; |
| | | case SPK.CurtainTrietex: |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/Curtain/MotorCurtainIcon.png"; |
| | | break; |
| | | case SPK.CurtainRoller: |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/Curtain/RollingShutterIcon.png"; |
| | | break; |
| | | } |
| | | CurtainFragment(); |
| | | break; |
| | | case FunctionCategory.Sensor: |
| | | switch (function.spk) |
| | | { |
| | | case SPK.SensorPir: |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/ArmSensorPirIcon.png"; |
| | | break; |
| | | case SPK.SensorWater: |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/ArmSensorWaterImmersionIcon.png"; |
| | | break; |
| | | case SPK.SensorSmoke: |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/ArmSensorSmokeIcon.png"; |
| | | break; |
| | | case SPK.SensorDoorWindow: |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/ArmSensorDoorIcon.png"; |
| | | break; |
| | | default: |
| | | |
| | | break; |
| | | } |
| | | var powerLowTipAttr = function.attributes.Find((obj) => obj.key == FunctionAttributeKey.BatteryState); |
| | | if (powerLowTipAttr != null) |
| | | { |
| | |
| | | |
| | | break; |
| | | case FunctionCategory.Music: |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/Music/MusicThinIcon.png"; |
| | | MusicFragment(); |
| | | break; |
| | | |
| | |
| | | { |
| | | if (function.spk == SPK.ClothesHanger)//晾衣架 |
| | | { |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/Electrical/ClothesHanger/ClothesHangerGrayIcon.png"; |
| | | ClothesHangerFragment(); |
| | | } |
| | | else |
| | |
| | | switch (function.Spk_Prefix) |
| | | { |
| | | case FunctionCategory.AC: |
| | | LoadLastStatesButton(); |
| | | break; |
| | | case FunctionCategory.IR: |
| | | LoadLastStatesButton(); |
| | | switch (function.spk) |
| | | { |
| | | case SPK.AcStandard: |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/AC/AcThinIcon1.png"; |
| | | LoadLastStatesButton(); |
| | | break; |
| | | } |
| | | break; |
| | | case FunctionCategory.FloorHeat: |
| | | LoadLastStatesButton(); |
| | | switch (function.spk) |
| | | { |
| | | case SPK.FloorHeatStandard: |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/FloorHeating/FloorHeatingThinIcon.png"; |
| | | LoadLastStatesButton(); |
| | | break; |
| | | } |
| | | break; |
| | | case FunctionCategory.Light: |
| | | //btnIcon.UnSelectedImagePath = "FunctionIcon/Light/LightThinIcon.png"; |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/Light/LightThinIcon.png"; |
| | | btnSwitch.IsSelected = function.trait_on_off.curValue.ToString() == "on"; |
| | | LoadLightControl(); |
| | | break; |
| | | case FunctionCategory.Electric: |
| | | switch (function.spk) |
| | | { |
| | | case SPK.ElectricSocket: |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/Socket/SocketThinIcon.png"; |
| | | break; |
| | | case SPK.ElectricFan: |
| | | case SPK.ElectricTuyaFan: |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/Electrical/FanThinIcon.png"; |
| | | break; |
| | | case SPK.ElectricTV: |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/Electrical/TVThinIcon.png"; |
| | | break; |
| | | case SPK.ElectricTuyaAirCleaner: |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/Electrical/AirCleanerThiinIcon.png"; |
| | | break; |
| | | case SPK.ElectricTuyaWeepRobot: |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/Electrical/WeepRobotThinIcon.png"; |
| | | break; |
| | | case SPK.ElectricTuyaWaterValve: |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/Electrical/WaterValve/WaterValveIcon.png"; |
| | | break; |
| | | } |
| | | btnSwitch.IsSelected = function.trait_on_off.curValue.ToString() == "on"; |
| | | break; |
| | | } |
| | |
| | | { |
| | | FrameLayout bodyView; |
| | | VerticalRefreshLayout contentView; |
| | | List<IntegratedBrand> brandList; |
| | | public AddThirdPartyBrandListpage(List<IntegratedBrand> list) |
| | | List<IntegratedBrand> brandList = new List<IntegratedBrand>(); |
| | | public AddThirdPartyBrandListpage() |
| | | { |
| | | bodyView = this; |
| | | brandList = list; |
| | | } |
| | | |
| | | public void LoadPage() |
| | |
| | | { |
| | | Y = Application.GetRealHeight(64), |
| | | Height = Application.GetRealHeight(667 - 64), |
| | | VerticalScrollBarEnabled = false, |
| | | }; |
| | | bodyView.AddChidren(contentView); |
| | | |
| | |
| | | Button btnLine = new Button() |
| | | { |
| | | X = Application.GetRealWidth(56), |
| | | Y = Application.GetRealHeight(49), |
| | | Width = Application.GetRealWidth(303), |
| | | Height = 1, |
| | | BackgroundColor = CSS_Color.DividingLineColor, |
| | |
| | | row.AddChidren(btnName); |
| | | //下载第三方品牌icon |
| | | ImageUtlis.Current.Load3tyBrandIconImages(brand.brandName, brand.brandIcon, btnIcon); |
| | | |
| | | btnName.MouseUpEventHandler = (sender, e) => { |
| | | var page = new AddDevciePage(brand); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | } |
| | | |
| | | } |
| | |
| | | Application.RunOnMainThread(() => { waitPage.Hide(); }); |
| | | } |
| | | }) { IsBackground = true }.Start(); |
| | | } |
| | | /// <summary> |
| | | /// 跳转添加设备界面 |
| | | /// </summary> |
| | | /// <param name="bandType">品牌类型</param> |
| | | void SkipPage_AddDevice() |
| | | { |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | //using System; |
| | | //using System.Collections.Generic; |
| | | //using HDL_ON.Entity; |
| | | //using HDL_ON.UI.CSS; |
| | | //using Shared; |
| | | //namespace HDL_ON.UI |
| | | //{ |
| | | // public class ThirdPartyBrandListPage : FrameLayout |
| | | // { |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | | namespace HDL_ON.UI |
| | | { |
| | | public class ThirdPartyBrandListPage : FrameLayout |
| | | { |
| | | |
| | | // FrameLayout bodyView; |
| | | // FrameLayout contentView; |
| | | // Button btnAdd; |
| | | FrameLayout bodyView; |
| | | FrameLayout contentView; |
| | | Button btnAdd; |
| | | |
| | | // public ThirdPartyBrandListPage() |
| | | // { |
| | | // bodyView = this; |
| | | // } |
| | | public ThirdPartyBrandListPage() |
| | | { |
| | | bodyView = this; |
| | | } |
| | | |
| | | // public void LoadPage() |
| | | // { |
| | | // new TopViewDiv(bodyView, Language.StringByID(StringId.FunctionBrand)).LoadTopView(); |
| | | public void LoadPage() |
| | | { |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.FunctionBrand)).LoadTopView(); |
| | | |
| | | // contentView = new FrameLayout() |
| | | // { |
| | | // Y = Application.GetRealHeight(64), |
| | | // Height = Application.GetRealHeight(667-64), |
| | | // BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | // }; |
| | | // bodyView.AddChidren(contentView); |
| | | contentView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(64), |
| | | Height = Application.GetRealHeight(667-64), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | bodyView.AddChidren(contentView); |
| | | |
| | | // AddEmptyTipView(); |
| | | AddEmptyTipView(); |
| | | |
| | | // Button btnTipMsg = new Button() |
| | | // { |
| | | // Height = Application.GetRealHeight(17 + 24), |
| | | // Y = Application.GetRealHeight(535 - 12), |
| | | // TextColor = CSS_Color.TextualColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextID = StringId.TipAddThirdPartyDeviceMsg, |
| | | // }; |
| | | // bodyView.AddChidren(btnTipMsg); |
| | | Button btnTipMsg = new Button() |
| | | { |
| | | Height = Application.GetRealHeight(17 + 24), |
| | | Y = Application.GetRealHeight(535 - 12), |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextID = StringId.TipAddThirdPartyDeviceMsg, |
| | | }; |
| | | bodyView.AddChidren(btnTipMsg); |
| | | |
| | | // btnAdd = new Button() |
| | | // { |
| | | // Gravity = Gravity.CenterHorizontal, |
| | | // Y = Application.GetRealHeight(564), |
| | | // Width = Application.GetRealWidth(220), |
| | | // Height = Application.GetRealWidth(44), |
| | | // Radius = (uint)Application.GetRealWidth(22), |
| | | // BackgroundColor = CSS_Color.MainColor, |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.MainBackgroundColor, |
| | | // TextID = StringId.Add, |
| | | // }; |
| | | // bodyView.AddChidren(btnAdd); |
| | | btnAdd = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(564), |
| | | Width = Application.GetRealWidth(220), |
| | | Height = Application.GetRealWidth(44), |
| | | Radius = (uint)Application.GetRealWidth(22), |
| | | BackgroundColor = CSS_Color.MainColor, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | TextID = StringId.Add, |
| | | }; |
| | | bodyView.AddChidren(btnAdd); |
| | | |
| | | // LoadEvent_SikpAddBrand(); |
| | | // } |
| | | LoadEvent_SikpAddBrand(); |
| | | } |
| | | |
| | | // /// <summary> |
| | | // /// 添加内容为空提示页面 |
| | | // /// </summary> |
| | | // void AddEmptyTipView() |
| | | // { |
| | | // var emptyTipView = new FrameLayout() |
| | | // { |
| | | // Height =Application.GetRealWidth(470), |
| | | // Width = contentView.Width, |
| | | // }; |
| | | // contentView.AddChidren(emptyTipView); |
| | | /// <summary> |
| | | /// 添加内容为空提示页面 |
| | | /// </summary> |
| | | void AddEmptyTipView() |
| | | { |
| | | var emptyTipView = new FrameLayout() |
| | | { |
| | | Height =Application.GetRealWidth(470), |
| | | Width = contentView.Width, |
| | | }; |
| | | contentView.AddChidren(emptyTipView); |
| | | |
| | | // var tipView = new EmptyTipView(Language.StringByID(StringId.TipNotThirdPartyDevice)) |
| | | // { |
| | | // Gravity = Gravity.Center |
| | | // }; |
| | | // emptyTipView.AddChidren(tipView); |
| | | // } |
| | | // /// <summary> |
| | | // /// 跳转绑定第三方品牌界面 |
| | | // /// </summary> |
| | | // void LoadEvent_SikpAddBrand() |
| | | // { |
| | | // btnAdd.MouseUpEventHandler = (sender, e) => { |
| | | // var page = new AddThirdPartyBrandListpage(); |
| | | // MainPage.BasePageView.AddChidren(page); |
| | | // page.LoadPage(); |
| | | // MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | // }; |
| | | // } |
| | | // } |
| | | //} |
| | | var tipView = new EmptyTipView(Language.StringByID(StringId.TipNotThirdPartyDevice)) |
| | | { |
| | | Gravity = Gravity.Center |
| | | }; |
| | | emptyTipView.AddChidren(tipView); |
| | | } |
| | | /// <summary> |
| | | /// 跳转绑定第三方品牌界面 |
| | | /// </summary> |
| | | void LoadEvent_SikpAddBrand() |
| | | { |
| | | btnAdd.MouseUpEventHandler = (sender, e) => { |
| | | var page = new AddThirdPartyBrandListpage(); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | } |
| | | } |
| | | } |
| | |
| | | userTypeView.AddChidren(btnUserTypeName); |
| | | #endregion |
| | | #region 住宅管理 |
| | | |
| | | |
| | | if (!DB_ResidenceData.Instance.CurrentRegion.IsOthreShare) |
| | | { |
| | | #region ---住宅管理区域 |
| | |
| | | { |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | | var page = new BrandListPage();// AddThirdPartyBrandListpage(); // BrandListPage(); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | // var page = new ThirdPartyBrandListPage(); |
| | | // MainPage.BasePageView.AddChidren(page); |
| | | // page.LoadPage(); |
| | | //获取列表 |
| | | //HDL_ON.UI.UI2.PersonalCenter.PirDevice.Method.GetPirDeviceList(this, () => |
| | | //{ |
| | | // Application.RunOnMainThread(() => |
| | | // { |
| | | // var page = new UI2.PersonalCenter.PirDevice.PirMain(); |
| | | // MainPage.BasePageView.AddChidren(page); |
| | | // page.Show(); |
| | | // MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | // }); |
| | | //}); |
| | | HDL_ON.UI.UI2.PersonalCenter.PirDevice.Method.GetPirDeviceList(this, () => |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | var page = new UI2.PersonalCenter.PirDevice.PirMain(); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.Show(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }); |
| | | }); |
| | | }; |
| | | btnResidenceAddFunctionIcon.MouseUpEventHandler = eventHandler; |
| | | btnResidenceAddFunctionText.MouseUpEventHandler = eventHandler; |
| | |
| | | { |
| | | CloseTime = 1, |
| | | Direction = AMPopTipDirection.None, |
| | | MaxWidth = Application.GetRealWidth(300), |
| | | Text = Language.StringByID(StringId.IncorrectRepeatPassword) |
| | | }.Show(bodyView); |
| | | |
| | |
| | | { |
| | | CloseTime = 1, |
| | | Direction = AMPopTipDirection.None, |
| | | MaxWidth = Application.GetRealWidth(300), |
| | | Text = Language.StringByID(StringId.IncorrectRepeatPassword) |
| | | }.Show(bodyView); |
| | | } |
| | |
| | | |
| | | LoadEvent_TempChange(); |
| | | LoadEvent_AcStatesChange(); |
| | | |
| | | LoadDiv_IrView(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | |
| | | dialog.Show(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 加载红外遥控器,额外按钮 |
| | | /// </summary> |
| | | void LoadDiv_IrView() |
| | | { |
| | | if (device.spk == SPK.AcIr) |
| | | { |
| | | var btnMore = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(334), |
| | | Width = Application.GetRealWidth(30), |
| | | Height = Application.GetRealWidth(30), |
| | | UnSelectedImagePath = "FunctionIcon/AC/More.png", |
| | | }; |
| | | FrameWhiteCentet1.AddChidren(btnMore); |
| | | |
| | | btnMore.MouseUpEventHandler = (sender, e) => { |
| | | LoadDialog_IrMoreView(); |
| | | }; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 加载额外对红外按钮界面 |
| | | /// </summary> |
| | | void LoadDialog_IrMoreView() |
| | | { |
| | | Dialog dialog = new Dialog(); |
| | | |
| | | var div = new FrameLayout(); |
| | | dialog.AddChidren(div); |
| | | div.MouseUpEventHandler = (sender, e) => { |
| | | dialog.Close(); |
| | | }; |
| | | |
| | | var bodyView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(463), |
| | | Height = Application.GetRealHeight(375), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | div.AddChidren(bodyView); |
| | | |
| | | var contentView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(16), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(296), |
| | | }; |
| | | bodyView.AddChidren(contentView); |
| | | |
| | | var row = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(60), |
| | | }; |
| | | contentView.AddChidren(row); |
| | | |
| | | int index = 0; |
| | | foreach (var attr in device.attributes) |
| | | { |
| | | if (attr.key == FunctionAttributeKey.Mode |
| | | || attr.key == FunctionAttributeKey.OnOff |
| | | || attr.key == FunctionAttributeKey.SetTemp |
| | | || attr.key == FunctionAttributeKey.SetTempStep |
| | | || attr.key == FunctionAttributeKey.FanSpeed |
| | | || attr.key == FunctionAttributeKey.FanManual |
| | | || attr.key == FunctionAttributeKey.FanAuto |
| | | ) |
| | | { |
| | | continue; |
| | | } |
| | | if (index != 0 && index % 3 == 0) |
| | | { |
| | | row = new FrameLayout() |
| | | { |
| | | Width = Application.GetRealWidth(200), |
| | | Height = Application.GetRealHeight(56), |
| | | }; |
| | | contentView.AddChidren(row); |
| | | } |
| | | |
| | | var btn = new Button() |
| | | { |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetRealWidth(88), |
| | | Height = Application.GetRealHeight(40), |
| | | Radius = (uint)Application.GetRealHeight(18), |
| | | BorderColor = CSS_Color.PromptingColor1, |
| | | BorderWidth = (uint)Application.GetRealWidth(2), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | SelectedTextColor = CSS_Color.MainBackgroundColor, |
| | | SelectedBackgroundColor = CSS_Color.MainColor, |
| | | }; |
| | | if (attr.value.Count > 0) |
| | | { |
| | | btn.Text = attr.value[0]; |
| | | } |
| | | if (index % 3 == 1) |
| | | { |
| | | btn.Gravity = Gravity.Center; |
| | | } |
| | | else if (index % 3 == 2) |
| | | { |
| | | btn.X = Application.GetRealWidth(208); |
| | | } |
| | | row.AddChidren(btn); |
| | | |
| | | btn.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.Key, attr.key); |
| | | Control.Ins.SendWriteCommand(device, d); |
| | | |
| | | new System.Threading.Thread(() => |
| | | { |
| | | System.Threading.Thread.Sleep(2000); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | btn.IsSelected = false; |
| | | }); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }; |
| | | |
| | | |
| | | |
| | | index++; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | dialog.Show(); |
| | | } |
| | | |
| | | |
| | | #endregion |
| | | |
| | |
| | | { |
| | | lightingView.SetViewStatus(lightTemp.state == "on"); |
| | | } |
| | | Console.WriteLine($"时间戳:{device.time_stamp} 时间:{device.GeteTime()} 烘干:{hotDryTemp.state} 风干:{windDryTemp.state} 消毒:{disinfectTemp.state} 灯光状态:{lightTemp.state}"); |
| | | #endregion |
| | | |
| | | #region 修改时间 |
| | |
| | | public void ChangeTime(string newTime) |
| | | { |
| | | int.TryParse(newTime, out leftTime); |
| | | if (leftTime > 0) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | btnTime.Text = new TimeSpan(0, leftTime, 0).ToString().Remove(5, 3); |
| | | }); |
| | | leftTime--; |
| | | } |
| | | else if (leftTime == 0) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | btnTime.Text = ""; |
| | | }); |
| | | } |
| | | if (countdownThread == null) |
| | | { |
| | | countdownThread = new System.Threading.Thread(() => |
| | | { |
| | | |
| | | while (true) |
| | | { |
| | | if (leftTime > 0) |
| | |
| | | /// </summary>
|
| | | private MostRightIconControl btnAnionSwitch = null;
|
| | | /// <summary>
|
| | | /// 滤芯复位开关控件 2021.03.09控件变更
|
| | | /// 滤芯复位开关控件
|
| | | /// </summary>
|
| | | //private MostRightIconControl btnResetSwitch = null;
|
| | | private MostRightIconControl btnResetSwitch = null;
|
| | | /// <summary>
|
| | | /// 空气质量数据
|
| | | /// </summary>
|
| | |
| | | rowReset.Height = Application.GetRealHeight(50);
|
| | | rowReset.Width = FrameWhiteCentet2.Width;
|
| | | rowReset.Y = rowAnion.Bottom;
|
| | | //FrameWhiteCentet2.AddChidren(rowReset);
|
| | | FrameWhiteCentet2.AddChidren(rowReset);
|
| | | rowReset.AddLeftCaption(Language.StringByID(StringId.FilterElementReset), 200);
|
| | | rowReset.AddBottomLine();
|
| | | rowReset.AddRightArrow();
|
| | | rowReset.ButtonClickEvent += (sender, e) =>
|
| | | this.btnResetSwitch = rowReset.AddMostRightSwitchIcon();
|
| | | btnResetSwitch.IsSelected = this.airCleanerData.FilterReset;
|
| | | btnResetSwitch.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | if (this.btnSwitch.IsSelected == false)
|
| | | {
|
| | |
| | | this.ShowMassage(ShowMsgType.Confirm, msg, () =>
|
| | | {
|
| | | //发送使能命令
|
| | | this.SendEnableComand(null, "filter_reset", "true");
|
| | | this.SendEnableComand(btnResetSwitch, "filter_reset", btnResetSwitch.IsSelected == true ? "false" : "true");
|
| | | });
|
| | | };
|
| | | }
|
| | |
| | | /// </summary>
|
| | | private void SendEnableComand(MostRightIconControl btnSwitch, string sendKey, string value)
|
| | | {
|
| | | if (btnSwitch != null)
|
| | | {
|
| | | btnSwitch.CanClick = false;
|
| | | }
|
| | | btnSwitch.CanClick = false;
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | var dic = new Dictionary<string, string>();
|
| | | dic.Add(sendKey, value);
|
| | | Control.Ins.SendWriteCommand(this.device, dic, true);
|
| | |
|
| | | if (btnSwitch == null) { return; }
|
| | |
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | btnSwitch.CanClick = true;
|
| | |
| | | this.btnAnionSwitch.IsSelected = this.airCleanerData.Anion;
|
| | | }
|
| | | //滤芯复位
|
| | | //if (this.btnResetSwitch.IsSelected != this.airCleanerData.FilterReset)
|
| | | //{
|
| | | // this.btnResetSwitch.IsSelected = this.airCleanerData.FilterReset;
|
| | | //}
|
| | | if (this.btnResetSwitch.IsSelected != this.airCleanerData.FilterReset)
|
| | | {
|
| | | this.btnResetSwitch.IsSelected = this.airCleanerData.FilterReset;
|
| | | }
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | /// </summary> |
| | | public override void InitFrameWhiteContent() |
| | | { |
| | | base.SetTitleText(Language.StringByID(StringId.WaterValve)); |
| | | base.SetTitleText(Language.StringByID(StringId.AirCleaner)); |
| | | |
| | | //初始化第一个索引页的内容 |
| | | this.InitFrameWhiteContent1(); |
| | | //刷新界面状态 |
| | | this.RefreshFormStatu(); |
| | | //读取状态 |
| | | new System.Threading.Thread(() => |
| | | { |
| | | Control.Ins.ReadFunctionsInfo(new List<string>() { device.deviceId}); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | btnTimeSet.ButtonClickEvent = (sender, e) => { |
| | | SetControlTime(); |
| | | }; |
| | | |
| | | |
| | | var btnTimeSetTip = new NormalViewControl(300, 30, true) |
| | | { |
| | | Y = btnTimeSet.Bottom , |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | //TextColor = 0x00000000, |
| | | SelectedTextColor = CSS_Color.TextualColor, |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextID = StringId.TimeSwitch, |
| | | }; |
| | | FrameWhiteCentet1.AddChidren(btnTimeSetTip); |
| | | |
| | | |
| | | //开关图标 |
| | | this.btnSwitch = new IconViewControl(40); |
| | |
| | | { |
| | | btnControlTip.TextID = StringId.ControllerNotOn; |
| | | } |
| | | this.btnSwitch.IsSelected = this.btnPictrue.IsSelected = onoffStatu.state.ToString() == "on"; |
| | | this.btnSwitch.IsSelected = this.btnPictrue.IsSelected = onoffStatu.value.ToString() == "on"; |
| | | } |
| | | if (timeStatu != null) |
| | | { |
| | |
| | | private void SetControlTime() |
| | | { |
| | | var timeControl = new BottomTimeSelectControl(); |
| | | timeControl.RowCount = 5; |
| | | timeControl.InitControl(0,0); |
| | | timeControl.FinishEvent = (type,hours,min) => { |
| | | if (type == 1)//0:取消;1:确定 |
| | |
| | | //吸力调节
|
| | | this.btnSuctionIcon = new IconViewControl(28);
|
| | | btnSuctionIcon.Y = ImageControl.Bottom + Application.GetRealHeight(64);
|
| | | //btnSuctionIcon.X = Application.GetRealWidth(33);
|
| | | btnSuctionIcon.X = Application.GetRealWidth(33);
|
| | | btnSuctionIcon.UnSelectedImagePath = "FunctionIcon/Electrical/WeepRobot/Suction.png";
|
| | | btnSuctionIcon.SelectedImagePath = "FunctionIcon/Electrical/WeepRobot/SuctionSelect.png";
|
| | | FrameWhiteCentet1.AddChidren(btnSuctionIcon);
|
| | |
| | | };
|
| | | this.btnSuctionView = new NormalViewControl(80, 54, true);
|
| | | btnSuctionView.Y = btnSuctionIcon.Bottom + Application.GetRealHeight(10);
|
| | | //btnSuctionView.X = btnSuctionIcon.X - (Application.GetRealWidth(80) - btnSuctionIcon.Width) / 2;
|
| | | btnSuctionView.X = btnSuctionIcon.X - (Application.GetRealWidth(80) - btnSuctionIcon.Width) / 2;
|
| | | btnSuctionView.TextAlignment = TextAlignment.TopCenter;
|
| | | btnSuctionView.TextSize = CSS_FontSize.PromptFontSize_FirstLevel;
|
| | | btnSuctionView.Text = Language.StringByID(StringId.SuctionAdjustment);
|
| | |
| | | this.btnChargeIcon = new IconViewControl(28);
|
| | | btnChargeIcon.UnSelectedImagePath = "FunctionIcon/Electrical/WeepRobot/ChargeSelect.png";
|
| | | btnChargeIcon.Y = btnSuctionIcon.Y;
|
| | | //btnChargeIcon.X = btnSuctionIcon.Right + Application.GetRealWidth(50);
|
| | | btnChargeIcon.Gravity = Gravity.CenterHorizontal;
|
| | | btnChargeIcon.X = btnSuctionIcon.Right + Application.GetRealWidth(50);
|
| | | FrameWhiteCentet1.AddChidren(btnChargeIcon);
|
| | | btnChargeIcon.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | |
| | | btnChargeView.TextID = StringId.Charge;
|
| | | FrameWhiteCentet1.AddChidren(btnChargeView);
|
| | |
|
| | | //2021.03.09 舍弃掉静音功能
|
| | | btnSuctionIcon.X = btnChargeIcon.X - btnSuctionIcon.IconSize - Application.GetRealWidth(50);
|
| | | btnSuctionView.X = btnSuctionIcon.X - (Application.GetRealWidth(80) - btnSuctionIcon.Width) / 2;
|
| | |
|
| | | //声音图标
|
| | | this.btnVoiceIcon = new IconViewControl(28);
|
| | | btnVoiceIcon.Y = btnSuctionIcon.Y;
|
| | |
| | | btnVoiceIcon.UnSelectedImagePath = "FunctionIcon/Electrical/WeepRobot/Voice.png";
|
| | | btnVoiceIcon.SelectedImagePath = "FunctionIcon/Electrical/WeepRobot/VoiceSelect.png";
|
| | | btnVoiceIcon.IsSelected = true;
|
| | | //FrameWhiteCentet1.AddChidren(btnVoiceIcon);
|
| | | FrameWhiteCentet1.AddChidren(btnVoiceIcon);
|
| | | btnVoiceIcon.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //发送静音命令
|
| | |
| | | btnVoiceView.TextAlignment = TextAlignment.TopCenter;
|
| | | btnVoiceView.TextSize = CSS_FontSize.PromptFontSize_FirstLevel;
|
| | | btnVoiceView.TextID = StringId.Mute;
|
| | | //FrameWhiteCentet1.AddChidren(btnVoiceView);
|
| | | FrameWhiteCentet1.AddChidren(btnVoiceView);
|
| | |
|
| | | //清扫模式图标
|
| | | this.btnModeIcon = new IconViewControl(28);
|
| | | btnModeIcon.Y = btnSuctionIcon.Y;
|
| | | //btnModeIcon.X = btnVoiceIcon.Right + Application.GetRealWidth(50);
|
| | | btnModeIcon.X = btnChargeIcon.Right + Application.GetRealWidth(50);
|
| | | btnModeIcon.X = btnVoiceIcon.Right + Application.GetRealWidth(50);
|
| | | btnModeIcon.UnSelectedImagePath = "FunctionIcon/Electrical/WeepRobot/Clean.png";
|
| | | FrameWhiteCentet1.AddChidren(btnModeIcon);
|
| | | btnModeIcon.ButtonClickEvent += (sender, e) =>
|
| | |
| | | btnTitleName.TextID = StringId.WeepRobot;
|
| | | FrameWhiteCentet2.AddChidren(btnTitleName);
|
| | |
|
| | | //2021.03.09 舍弃耗材管理
|
| | | //耗材管理
|
| | | //var rowManment = new FrameRowControl();
|
| | | //rowManment.Height = Application.GetRealHeight(50);
|
| | | //rowManment.Width = FrameWhiteCentet2.Width;
|
| | | //rowManment.Y = Application.GetRealHeight(75);
|
| | | //FrameWhiteCentet2.AddChidren(rowManment);
|
| | | //rowManment.AddLeftCaption(Language.StringByID(StringId.ConsumablesManagement), 200);
|
| | | //rowManment.AddBottomLine();
|
| | | //rowManment.AddRightArrow();
|
| | | //rowManment.ButtonClickEvent += (sender, e) =>
|
| | | //{
|
| | | // var form = new TuyaWeepRobotConsumablesMagPage();
|
| | | // form.AddForm(this.device, this.weepRobotData);
|
| | | //};
|
| | | var rowManment = new FrameRowControl();
|
| | | rowManment.Height = Application.GetRealHeight(50);
|
| | | rowManment.Width = FrameWhiteCentet2.Width;
|
| | | rowManment.Y = Application.GetRealHeight(75);
|
| | | FrameWhiteCentet2.AddChidren(rowManment);
|
| | | rowManment.AddLeftCaption(Language.StringByID(StringId.ConsumablesManagement), 200);
|
| | | rowManment.AddBottomLine();
|
| | | rowManment.AddRightArrow();
|
| | | rowManment.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var form = new TuyaWeepRobotConsumablesMagPage();
|
| | | form.AddForm(this.device, this.weepRobotData);
|
| | | };
|
| | |
|
| | | //历史记录
|
| | | var rowHistory = new FrameRowControl();
|
| | | rowHistory.Height = Application.GetRealHeight(50);
|
| | | rowHistory.Width = FrameWhiteCentet2.Width;
|
| | | //rowHistory.Y = rowManment.Bottom;
|
| | | rowHistory.Y = Application.GetRealHeight(75);
|
| | | rowHistory.Y = rowManment.Bottom;
|
| | | FrameWhiteCentet2.AddChidren(rowHistory);
|
| | | rowHistory.AddLeftCaption(Language.StringByID(StringId.HistoryLog), 200);
|
| | | rowHistory.AddBottomLine();
|
| | |
| | | };
|
| | | frameBack.Show();
|
| | |
|
| | | //2021.03.09 舍弃随机清扫
|
| | | //菜单控件(清扫模式)
|
| | | //var menuContr = new DialogTitleMenuControl(4, Language.StringByID(StringId.CleanMode));
|
| | | var menuContr = new DialogTitleMenuControl(3, Language.StringByID(StringId.CleanMode));
|
| | | var menuContr = new DialogTitleMenuControl(4, Language.StringByID(StringId.CleanMode));
|
| | | menuContr.X = Application.GetRealWidth(210);
|
| | | menuContr.Y = Application.GetRealHeight(197);
|
| | | menuContr.Width = Application.GetRealWidth(160);
|
| | | //menuContr.Height = Application.GetRealHeight(243);
|
| | | menuContr.Height = Application.GetRealHeight(203);
|
| | | menuContr.Height = Application.GetRealHeight(243);
|
| | | dialogBody.AddChidren(menuContr);
|
| | |
|
| | | //自动清扫
|
| | |
| | | });
|
| | |
|
| | | //随机清扫
|
| | | //iconPath = this.weepRobotData.Mode == "random" ? "FunctionIcon/Electrical/WeepRobot/FixedPointModeSelect.png" : "FunctionIcon/Electrical/WeepRobot/FixedPointMode.png";
|
| | | //menuContr.AddRowMenu(Language.StringByID(StringId.RandomClean), iconPath, this.weepRobotData.Mode == "random", () =>
|
| | | //{
|
| | | // frameBack.Close();
|
| | | // //发送模式命令
|
| | | // this.SendComand("mode", "random");
|
| | | //});
|
| | | iconPath = this.weepRobotData.Mode == "random" ? "FunctionIcon/Electrical/WeepRobot/FixedPointModeSelect.png" : "FunctionIcon/Electrical/WeepRobot/FixedPointMode.png";
|
| | | menuContr.AddRowMenu(Language.StringByID(StringId.RandomClean), iconPath, this.weepRobotData.Mode == "random", () =>
|
| | | {
|
| | | frameBack.Close();
|
| | | //发送模式命令
|
| | | this.SendComand("mode", "random");
|
| | | });
|
| | |
|
| | | //螺旋清扫
|
| | | iconPath = this.weepRobotData.Mode == "spiral" ? "FunctionIcon/Electrical/WeepRobot/AreaModeSelect.png" : "FunctionIcon/Electrical/WeepRobot/AreaMode.png";
|
| | |
| | | this.btnModeIcon.SelectedImagePath = "FunctionIcon/Electrical/WeepRobot/AutoModeSelect.png";
|
| | | this.btnModeView.TextID = StringId.AutoClean;
|
| | | }
|
| | | //2021.03.09 舍弃随机清扫
|
| | | //else if (this.weepRobotData.Mode == "smart")
|
| | | //{
|
| | | // //随机清扫
|
| | | // this.btnModeIcon.UnSelectedImagePath = "FunctionIcon/Electrical/WeepRobot/FixedPointMode.png";
|
| | | // this.btnModeIcon.SelectedImagePath = "FunctionIcon/Electrical/WeepRobot/FixedPointModeSelect.png";
|
| | | // this.btnModeView.TextID = StringId.RandomClean;
|
| | | //}
|
| | | else if (this.weepRobotData.Mode == "smart")
|
| | | {
|
| | | //随机清扫
|
| | | this.btnModeIcon.UnSelectedImagePath = "FunctionIcon/Electrical/WeepRobot/FixedPointMode.png";
|
| | | this.btnModeIcon.SelectedImagePath = "FunctionIcon/Electrical/WeepRobot/FixedPointModeSelect.png";
|
| | | this.btnModeView.TextID = StringId.RandomClean;
|
| | | }
|
| | | else if (this.weepRobotData.Mode == "wall_follow")
|
| | | {
|
| | | //沿墙清扫
|
| | |
| | | #endregion |
| | | #endregion |
| | | |
| | | /// <summary> |
| | | /// 当前动画效果 |
| | | /// 0:收藏 |
| | | /// 1:分类 |
| | | /// 2:智能 |
| | | /// 3:个人 |
| | | /// </summary> |
| | | int CurAnimationEffect = 0; |
| | | |
| | | public void LoadPage() |
| | | { |
| | |
| | | /// <summary> |
| | | /// 切换到收藏界面 |
| | | /// </summary> |
| | | void ChooseCollection() |
| | | void ChooseCollection(bool qiangzhishuaxin = false) |
| | | { |
| | | if (MainPage.CurPageIndex == 0) |
| | | if (CurAnimationEffect == 0 || qiangzhishuaxin) |
| | | { |
| | | return; |
| | | } |
| | |
| | | distance /= total; |
| | | new System.Threading.Thread(() => { |
| | | int index = 0; |
| | | MainPage.CurPageIndex = 0; |
| | | CurAnimationEffect = 0; |
| | | while (index < total+1) |
| | | { |
| | | if (MainPage.CurPageIndex != 0) |
| | | if (CurAnimationEffect != 0) |
| | | { |
| | | break; |
| | | } |
| | |
| | | /// </summary> |
| | | void ChooseClassification() |
| | | { |
| | | if (MainPage.CurPageIndex == 1) |
| | | if (CurAnimationEffect == 1) |
| | | { |
| | | return; |
| | | } |
| | |
| | | distance /= total; |
| | | new System.Threading.Thread(() => |
| | | { |
| | | if (MainPage.CurPageIndex == 1) |
| | | if (CurAnimationEffect == 1) |
| | | { |
| | | return; |
| | | } |
| | | MainPage.CurPageIndex = 1; |
| | | CurAnimationEffect = 1; |
| | | int index = 0; |
| | | while (index < total+1) |
| | | { |
| | | if (MainPage.CurPageIndex != 1) |
| | | if (CurAnimationEffect != 1) |
| | | { |
| | | break; |
| | | } |
| | |
| | | /// </summary> |
| | | void ChooseIntellectualization() |
| | | { |
| | | if (MainPage.CurPageIndex == 2) |
| | | if (CurAnimationEffect == 2) |
| | | { |
| | | return; |
| | | } |
| | |
| | | } |
| | | distance /= total; |
| | | new System.Threading.Thread(() => { |
| | | if (MainPage.CurPageIndex == 2) |
| | | if (CurAnimationEffect == 2) |
| | | { |
| | | return; |
| | | } |
| | | MainPage.CurPageIndex = 2; |
| | | CurAnimationEffect = 2; |
| | | int index = 0; |
| | | while (index < total+1) |
| | | { |
| | | if(MainPage.CurPageIndex!=2) |
| | | if(CurAnimationEffect!=2) |
| | | { |
| | | break; |
| | | } |
| | |
| | | return; |
| | | } |
| | | #endif |
| | | if (MainPage.CurPageIndex == 3) |
| | | if (CurAnimationEffect == 3) |
| | | { |
| | | return; |
| | | } |
| | |
| | | } |
| | | distance /= total; |
| | | new System.Threading.Thread(() => { |
| | | MainPage.CurPageIndex = 3; |
| | | CurAnimationEffect = 3; |
| | | int index = 0; |
| | | while (index < total+1) |
| | | { |
| | | if (MainPage.CurPageIndex != 3) |
| | | if (CurAnimationEffect != 3) |
| | | { |
| | | break; |
| | | } |