Merge branch 'temp-wxr' into NewFilePath
2 文件已复制
2个文件已添加
55个文件已删除
41个文件已修改
3 文件已重命名
| | |
| | | bld/ |
| | | [Bb]in/ |
| | | [Oo]bj/ |
| | | .vs/ |
| | | .DS_Store |
| | | .gitignore |
| | | |
| | | # Roslyn cache directories |
| | | *.ide/ |
| | |
| | | <Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default"> |
| | | <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-000404163432002E" /> |
| | | <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs"> |
| | | <Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default"> |
| | | <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget" /> |
| | | <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs"> |
| | | <Files> |
| | | <File FileName="HDL_ON/UI/UI2/2-Classification/RoomPage.cs" Line="80" Column="68" /> |
| | | <File FileName="HDL_ON/Entity/Room.cs" /> |
| | | <File FileName="HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs" Line="417" Column="60" /> |
| | | <File FileName="HDL_ON/UI/MainPage.cs" /> |
| | | <File FileName="HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs" Line="186" Column="38" /> |
| | | <File FileName="HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs" Line="148" Column="70" /> |
| | | <File FileName="HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs" Line="388" Column="54" /> |
| | | <File FileName="HDL_ON/UI/UI1-Login/LoginPage.cs" /> |
| | | <File FileName="HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPage.cs" /> |
| | | <File FileName="HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs" /> |
| | | <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePage.cs" Line="863" Column="51" /> |
| | | <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs" Line="369" Column="13" /> |
| | | <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" Line="750" Column="1" /> |
| | | <File FileName="HDL_ON/UI/UI0-Stan/Logic/HdlThreadLogic.cs" Line="97" Column="1" /> |
| | | <File FileName="HDL_ON/UI/UI2/2-Classification/FunctionPage.cs" Line="1" Column="1" /> |
| | | <File FileName="HDL_ON/UI/UI2/2-Classification/FunctionPageBLL.cs" Line="13" Column="56" /> |
| | | <File FileName="HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs" Line="78" Column="52" /> |
| | | <File FileName="HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs" Line="340" Column="22" /> |
| | | <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" Line="743" Column="75" /> |
| | | <File FileName="HDL_ON/DAL/Mqtt/MqttClient.cs" Line="249" Column="69" /> |
| | | <File FileName="HDL_ON/UI/MainPage.cs" Line="29" Column="55" /> |
| | | <File FileName="HDL-ON_iOS/Info.plist" /> |
| | | <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs" Line="340" Column="42" /> |
| | | </Files> |
| | | <Pads> |
| | | <Pad Id="ProjectPad"> |
| | | <State name="__root__"> |
| | | <Node name="HDL_APP_Project" expanded="True"> |
| | | <Node name="HDL_ON" expanded="True"> |
| | | <Node name="Common" expanded="True" /> |
| | | <Node name="DAL" expanded="True"> |
| | | <Node name="DriverLayer" expanded="True" /> |
| | | <Node name="Mqtt" expanded="True" /> |
| | | <Node name="Server" expanded="True" /> |
| | | </Node> |
| | | <Node name="Entity" expanded="True"> |
| | | <Node name="Function" expanded="True" /> |
| | | </Node> |
| | | <Node name="UI" expanded="True"> |
| | | <Node name="UI0-Public" expanded="True" /> |
| | | <Node name="UI0-Stan" expanded="True"> |
| | | <Node name="Logic" expanded="True" /> |
| | | </Node> |
| | | <Node name="UI0-Stan" expanded="True" /> |
| | | <Node name="UI1-Login" expanded="True" /> |
| | | <Node name="UI2" expanded="True"> |
| | | <Node name="1-HomePage" expanded="True" /> |
| | | <Node name="2-Classification" expanded="True" /> |
| | | <Node name="FuntionControlView" expanded="True"> |
| | | <Node name="ArmSensor" expanded="True" /> |
| | | <Node name="Electrical" expanded="True"> |
| | | <Node name="ClothesHangerPage.cs" selected="True" /> |
| | | <Node name="3-Intelligence" expanded="True"> |
| | | <Node name="Automation" expanded="True"> |
| | | <Node name="ConditionDeviceFunList.cs" selected="True" /> |
| | | </Node> |
| | | </Node> |
| | | </Node> |
| | | </Node> |
| | | </Node> |
| | | <Node name="HDL-ON_Android" expanded="True"> |
| | | <Node name="Assets" expanded="True"> |
| | | <Node name="Phone" expanded="True"> |
| | | <Node name="FunctionIcon" expanded="True"> |
| | | <Node name="Electrical" expanded="True"> |
| | | <Node name="ClothesHanger" expanded="True" /> |
| | | </Node> |
| | | <Node name="4-PersonalCenter" expanded="True" /> |
| | | <Node name="FuntionControlView" expanded="True"> |
| | | <Node name="Curtain" expanded="True" /> |
| | | <Node name="Electrical" expanded="True" /> |
| | | </Node> |
| | | </Node> |
| | | </Node> |
| | | </Node> |
| | | <Node name="HDL-ON_iOS" expanded="True"> |
| | | <Node name="Resources" expanded="True"> |
| | | <Node name="Phone" expanded="True"> |
| | | <Node name="FunctionIcon" expanded="True"> |
| | | <Node name="Electrical" expanded="True"> |
| | | <Node name="ClothesHanger" expanded="True" /> |
| | | </Node> |
| | | </Node> |
| | | </Node> |
| | | </Node> |
| | | <Node name="Resources" expanded="True" /> |
| | | </Node> |
| | | <Node name="ys" expanded="True" /> |
| | | </Node> |
| | | </State> |
| | | </Pad> |
| | |
| | | <String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String> |
| | | <String>Shared.IOS/Shared.IOS.csproj</String> |
| | | </DisabledProjects> |
| | | <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" /> |
| | | <MonoDevelop.Ide.Workspace ActiveConfiguration="Release|iPhone" /> |
| | | <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" /> |
| | | <MonoDevelop.Ide.DebuggingService.Breakpoints> |
| | | <BreakpointStore /> |
copy from CommonLib/.DS_Store
copy to DLL/.DS_Store
Binary files differ
copy from CommonLib/.DS_Store
copy to HDL-ON_Android/.DS_Store
Binary files differ
| | |
| | | 414=Controller on |
| | | 415=Someone |
| | | 416=Log |
| | | 417=Water Leakage |
| | | 418=In Alarm |
| | | 419=Normal |
| | | 420=Hot dry |
| | | 421=Air dry |
| | | 422=Disinfect |
| | | 423=Lighting |
| | | 424=Time |
| | | 425=Hot dry time |
| | | 426=Air dry time |
| | | 427=Disinfect time |
| | | 428=Anion Time |
| | | |
| | | |
| | | 1002=Anion |
| | | |
| | | 5000=Music |
| | | 5001=Group |
| | |
| | | 413=æ§å¶å¨æªå¼å¯ |
| | | 414=æ§å¶å¨å·²å¼å¯ |
| | | 415=æäºº |
| | | 516=æ¥å¿ |
| | | 416=æ¥å¿ |
| | | 417=æ¼æ°´ |
| | | 418=æ¥è¦ |
| | | 419=æ£å¸¸ |
| | | 420=çå¹² |
| | | 421=é£å¹² |
| | | 422=æ¶æ¯ |
| | | 423=ç
§æ |
| | | 424=æ¶é´ |
| | | 425=çå¹²æ¶é´ |
| | | 426=é£å¹²æ¶é´ |
| | | 427=æ¶æ¯æ¶é´ |
| | | 428=è´ç¦»åæ¶é´ |
| | | |
| | | |
| | | 1000=室å
湿度 |
| | | 1001=ç«¥é |
| | |
| | | 1033=èæç®¡ç |
| | | 1034=åå²è®°å½ |
| | | 1035=èªå¨æ¸
æ« |
| | | 1036=å®ç¹æ¸
æ« |
| | | 1036=éæºæ¸
æ« |
| | | 1037=æ²¿å¢æ¸
æ« |
| | | 1038=åºåæ¸
æ« |
| | | 1038=èºææ¸
æ« |
| | | 1039=æ»æ¸
æ´é¢ç§¯ |
| | | 1040=æ»æ¸
æ´æ¶é´ |
| | | 1041=è¾¹å·å©ä½å¯¿å½ |
| | |
| | | 5047=ä½ ææºææªå®è£
"QQé³ä¹"{\r\n}请å徿æºååºå®è£
|
| | | |
| | | |
| | | |
| | | 6000=æ£å¸¸ |
| | | 6001=设å¤ç¶æ |
| | | 6002=个 |
| | |
| | | 6012=红å¤é¥æ§ |
| | | 6013=设å¤ç®¡ç |
| | | 6014=æ·»å 饿§å¨ |
| | | 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=éè¯ |
| | | |
| | | |
| | | |
| | | 7000=æ°å»ºèªå¨å |
| | | 7001=ç¼è¾èªå¨å |
| | |
| | | <AndroidResource Include="Resources\mipmap-anydpi-v26\ic_launcher.xml" /> |
| | | <AndroidResource Include="Resources\mipmap-anydpi-v26\ic_launcher_round.xml" /> |
| | | <AndroidResource Include="Resources\drawable\Loading.png"> |
| | | <SubType></SubType> |
| | | <Generator></Generator> |
| | | <SubType> |
| | | </SubType> |
| | | <Generator> |
| | | </Generator> |
| | | </AndroidResource> |
| | | <AndroidResource Include="Resources\drawable\Icon.png"> |
| | | <SubType></SubType> |
| | | <Generator></Generator> |
| | | <SubType> |
| | | </SubType> |
| | | <Generator> |
| | | </Generator> |
| | | </AndroidResource> |
| | | <AndroidResource Include="Resources\mipmap-xxhdpi\Icon.png"> |
| | | <SubType></SubType> |
| | | <Generator></Generator> |
| | | <SubType> |
| | | </SubType> |
| | | <Generator> |
| | | </Generator> |
| | | </AndroidResource> |
| | | <AndroidResource Include="Resources\xml\network_security_config.xml"> |
| | | <SubType></SubType> |
| | | <Generator></Generator> |
| | | <SubType> |
| | | </SubType> |
| | | <Generator> |
| | | </Generator> |
| | | </AndroidResource> |
| | | <AndroidResource Include="Resources\xml\file_paths.xml"> |
| | | <SubType></SubType> |
| | | <Generator></Generator> |
| | | <SubType> |
| | | </SubType> |
| | | <Generator> |
| | | </Generator> |
| | | </AndroidResource> |
| | | <AndroidResource Include="Resources\layout\zxing_layout.xml"> |
| | | <SubType></SubType> |
| | | <Generator></Generator> |
| | | <SubType> |
| | | </SubType> |
| | | <Generator> |
| | | </Generator> |
| | | </AndroidResource> |
| | | <AndroidResource Include="Resources\mipmap-xhdpi\Icon.png"> |
| | | <SubType></SubType> |
| | | <Generator></Generator> |
| | | <SubType> |
| | | </SubType> |
| | | <Generator> |
| | | </Generator> |
| | | </AndroidResource> |
| | | <AndroidResource Include="Resources\mipmap-mdpi\Icon.png"> |
| | | <SubType></SubType> |
| | | <Generator></Generator> |
| | | <SubType> |
| | | </SubType> |
| | | <Generator> |
| | | </Generator> |
| | | </AndroidResource> |
| | | <AndroidResource Include="Resources\mipmap-hdpi\Icon.png"> |
| | | <SubType></SubType> |
| | | <Generator></Generator> |
| | | <SubType> |
| | | </SubType> |
| | | <Generator> |
| | | </Generator> |
| | | </AndroidResource> |
| | | <AndroidResource Include="Resources\mipmap-anydpi-v26\Icon.png"> |
| | | <SubType></SubType> |
| | | <Generator></Generator> |
| | | <SubType> |
| | | </SubType> |
| | | <Generator> |
| | | </Generator> |
| | | </AndroidResource> |
| | | <AndroidResource Include="Resources\mipmap-xxxhdpi\Icon.png"> |
| | | <SubType></SubType> |
| | | <Generator></Generator> |
| | | <SubType> |
| | | </SubType> |
| | | <Generator> |
| | | </Generator> |
| | | </AndroidResource> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | |
| | | <Folder Include="Assets\Phone\FunctionIcon\Electrical\ClothesHanger\" /> |
| | | <Folder Include="Assets\Phone\PirIcon\" /> |
| | | </ItemGroup> |
| | | <ItemGroup /> |
| | | <ItemGroup> |
| | | <PackageReference Include="Xamarin.Android.Support.Design" Version="28.0.0.3" /> |
| | | <PackageReference Include="Xamarin.Android.Support.Core.Utils" Version="28.0.0.3" /> |
| | |
| | | <AndroidAsset Include="Assets\Phone\LogicIcon\-.png" /> |
| | | <AndroidAsset Include="Assets\Phone\LogicIcon\+.png" /> |
| | | <AndroidAsset Include="Assets\Phone\LogicIcon\point.png" /> |
| | | <AndroidAsset Include="Assets\Phone\LogicIcon\ selected+.png" /> |
| | | <AndroidAsset Include="Assets\Phone\LogicIcon\selected-.png" /> |
| | | <AndroidAsset Include="Assets\Phone\LogicIcon\link.png" /> |
| | | <AndroidAsset Include="Assets\Phone\LogicIcon\selectTheFun.png" /> |
| | |
| | | <AndroidAsset Include="Assets\Phone\PirIcon\icon1.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PirIcon\icon2.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PirIcon\succeed.png" /> |
| | | <AndroidAsset Include="Assets\Phone\LogicIcon\selected+.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="202102252" android:versionName="1.1.202102252" package="com.hdl.onpro"> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202103021" android:versionName="1.1.202103021" package="com.hdl.onpro"> |
| | | <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="26" /> |
| | | <!-- å®ä½æé--> |
| | | <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> |
| | |
| | | <!-- Required. AppKey copied from Portal --> |
| | | <meta-data android:name="JPUSH_APPKEY" android:value="cbd90743ac45cbca06c8118b" /> |
| | | <!-- æå
æ¨éç»æ --> |
| | | |
| | | |
| | | |
| | | </application> |
| | | </manifest> |
| | |
| | | <BundleResource Include="Resources\Phone\LogicIcon\-.png" /> |
| | | <BundleResource Include="Resources\Phone\LogicIcon\+.png" /> |
| | | <BundleResource Include="Resources\Phone\LogicIcon\point.png" /> |
| | | <BundleResource Include="Resources\Phone\LogicIcon\ selected+.png" /> |
| | | <BundleResource Include="Resources\Phone\LogicIcon\selected-.png" /> |
| | | <BundleResource Include="Resources\Phone\oRobot.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Light\ColorWheelGray.png" /> |
| | |
| | | <BundleResource Include="Resources\Phone\PirIcon\online.png" /> |
| | | <BundleResource Include="Resources\Phone\PirIcon\adddevice.png" /> |
| | | <BundleResource Include="Resources\Phone\PirIcon\next.png" /> |
| | | <BundleResource Include="Resources\Phone\LogicIcon\selected+.png" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ITunesArtwork Include="iTunesArtwork" /> |
| | |
| | | <key>UIStatusBarStyle</key> |
| | | <string>UIStatusBarStyleLightContent</string> |
| | | <key>CFBundleShortVersionString</key> |
| | | <string>1.1.202102242</string> |
| | | <string>1.1.202103021</string> |
| | | <key>CFBundleVersion</key> |
| | | <string>202102242</string> |
| | | <string>202103021</string> |
| | | <key>NSLocationWhenInUseUsageDescription</key> |
| | | <string>Use geographic location to provide services such as weather</string> |
| | | <key>NSAppleMusicUsageDescription</key> |
| | |
| | | 417=Water Leakage |
| | | 418=In Alarm |
| | | 419=Normal |
| | | 420=Hot Dry |
| | | 421=Air Dry |
| | | 420=Hot dry |
| | | 421=Air dry |
| | | 422=Disinfect |
| | | 423=Lighting |
| | | 424=Time |
| | | 425=Hot dry time |
| | | 426=Air dry time |
| | | 427=Disinfect time |
| | | 428=Anion Time |
| | | 429=h |
| | | 430=m |
| | | |
| | | |
| | | 1002=Anion |
| | | |
| | | 5000=Music |
| | | 5001=Group |
| | |
| | | 421=é£å¹² |
| | | 422=æ¶æ¯ |
| | | 423=ç
§æ |
| | | 424=æ¶é´ |
| | | 425=çå¹²æ¶é´ |
| | | 426=é£å¹²æ¶é´ |
| | | 427=æ¶æ¯æ¶é´ |
| | | 428=è´ç¦»åæ¶é´ |
| | | 429=å°æ¶ |
| | | 430=åé |
| | | |
| | | |
| | | 1000=室å
湿度 |
| | |
| | | 1033=èæç®¡ç |
| | | 1034=åå²è®°å½ |
| | | 1035=èªå¨æ¸
æ« |
| | | 1036=å®ç¹æ¸
æ« |
| | | 1036=éæºæ¸
æ« |
| | | 1037=æ²¿å¢æ¸
æ« |
| | | 1038=åºåæ¸
æ« |
| | | 1038=èºææ¸
æ« |
| | | 1039=æ»æ¸
æ´é¢ç§¯ |
| | | 1040=æ»æ¸
æ´æ¶é´ |
| | | 1041=è¾¹å·å©ä½å¯¿å½ |
| | |
| | | { |
| | | public static class StringId |
| | | { |
| | | public const int Lightint = 433; |
| | | public const int MinuteUint = 430; |
| | | public const int HourUint = 429; |
| | | public const int AnionTime = 428; |
| | | public const int DisinfectTime = 427; |
| | | public const int WindDryTime = 426; |
| | | public const int HotDryTime = 425; |
| | | public const int Time = 424; |
| | | public const int Lightint = 423; |
| | | public const int Disinfect = 422; |
| | | public const int WindDry = 421; |
| | | public const int HotDry = 420; |
| | |
| | | /// </summary> |
| | | public const int AutoClean = 1035; |
| | | /// <summary> |
| | | /// å®ç¹æ¸
æ« |
| | | /// éæºæ¸
æ« |
| | | /// </summary> |
| | | public const int FixedPointClean = 1036; |
| | | public const int RandomClean = 1036; |
| | | /// <summary> |
| | | /// æ²¿å¢æ¸
æ« |
| | | /// </summary> |
| | | public const int WallClean = 1037; |
| | | /// <summary> |
| | | /// åºåæ¸
æ« |
| | | /// èºææ¸
æ« |
| | | /// </summary> |
| | | public const int AreaClean = 1038; |
| | | public const int SpiralClean = 1038; |
| | | /// <summary> |
| | | /// æ»æ¸
æ´é¢ç§¯ |
| | | /// </summary> |
| | |
| | | /// Aåè®®æ°æ® |
| | | /// </summary> |
| | | /// <param name="updateBytes"></param> |
| | | public void UpdataFunctionStatus(string revString, byte[] usefulBytes) |
| | | public void UpdataFunctionStatus(string revString, byte[] usefulBytes,bool isCloudData = false) |
| | | { |
| | | MainPage.Log($"Aåè®®æ´æ°ç¶æ:{revString}"); |
| | | |
| | | if (Ins.GatewayOnline_Local && isCloudData)//æ¬å°é¾æ¥ï¼é¤äºæ¶é¸¦è®¾å¤æ°æ®ä¹å¤çäºç«¯æ°æ®ä¸å¤ç |
| | | { |
| | | if (FunctionList.List.GetDeviceFunctionList(SPK.BrandType.Tuya).Count == 0) |
| | | { |
| | | //MainPage.Log($"Aåè®®æ´æ°ç¶æ:æ¬å°é¾æ¥ï¼é¤äºæ¶é¸¦è®¾å¤æ°æ®ä¹å¤çäºç«¯æ°æ®ä¸å¤ç..."); |
| | | return; |
| | | } |
| | | } |
| | | var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<AlinkFunctionStatusObj>(revString); |
| | | if (temp != null) |
| | | { |
| | |
| | | { |
| | | try |
| | | { |
| | | //bool hadChange = false;//ç¶ææåååæ´æ°çé¢ |
| | | var localFunction = allLocalFuntion.Find((obj) => obj.sid == updateTemp.sid); |
| | | if (Ins.GatewayOnline_Local && isCloudData)//æ¬å°é¾æ¥ï¼é¤äºæ¶é¸¦è®¾å¤æ°æ®ä¹å¤çäºç«¯æ°æ®ä¸å¤ç |
| | | { |
| | | if(!SPK.Get3tySpk(SPK.BrandType.All3tyBrand).Contains(localFunction.spk)) |
| | | { |
| | | //MainPage.Log($"Aåè®®æ´æ°ç¶æ:æ¬å°é¾æ¥ï¼é¤äºæ¶é¸¦è®¾å¤æ°æ®ä¹å¤çäºç«¯æ°æ®ä¸å¤ç........"); |
| | | return; |
| | | } |
| | | } |
| | | //MainPage.Log($"Aåè®®æ´æ°ç¶æ:{revString}"); |
| | | foreach (var attr in updateTemp.status) |
| | | { |
| | | var attrState = localFunction.status.Find((func) => func.key == attr.key); |
| | | if(attrState!= null) |
| | | { |
| | | attrState.value = attr.value; |
| | | } |
| | | } |
| | | |
| | | if (localFunction != null) |
| | | { |
| | | //æ´æ°çé¢ç¶æ |
| | |
| | | try |
| | | { |
| | | var topic = e.ApplicationMessage.Topic; |
| | | MainPage.Log($"æ¶å°mqtt主é¢:{topic}"); |
| | | //MainPage.Log($"æ¶å°mqtt主é¢:{topic}"); |
| | | //ä¸ç«¯å£ä¸»é¢å¤ç |
| | | if (DB_ResidenceData.Instance.GatewayType == 0 && !DB_ResidenceData.Instance.CheckWhetherGatewayIdIsNull()) |
| | | { |
| | |
| | | { |
| | | var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey); |
| | | var revString = Encoding.UTF8.GetString(bytes); |
| | | Control.Ins.UpdataFunctionStatus(revString, null); |
| | | Control.Ins.UpdataFunctionStatus(revString, null,true); |
| | | } |
| | | //ä¸ç«¯å£æ°æ®è§£æ |
| | | else |
| | |
| | | { |
| | | public class NewAPI |
| | | { |
| | | #region æ°å¾®æå¡æ¥å£ |
| | | //#region æ°å¾®æå¡æ¥å£ |
| | | //*********************************************** |
| | | //注æï¼åä½å®
ç¸å
³çæ¥å£è¦è¯·æ±ä½å®
æå¨åºåçåå regionUrl |
| | | //*********************************************** |
| | |
| | | /// æ¶æ¯å©ä½æ¶é´ |
| | | /// </summary> |
| | | public const string DisinfectTimeLeft = "disinfect_time_surplus"; |
| | | /// <summary> |
| | | /// è´ç¦»å |
| | | /// </summary> |
| | | public const string Anion = "anion"; |
| | | /// <summary> |
| | | /// è´ç¦»åæ¶é´ |
| | | /// </summary> |
| | | public const string AnionTime = "anion_time"; |
| | | /// <summary> |
| | | /// è´ç¦»åå©ä½æ¶é´ |
| | | /// </summary> |
| | | public const string AnionTimeLeft = "anion_time_surplus"; |
| | | |
| | | |
| | | |
| | | |
| | |
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\WeatherCondition.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\1-test-\TestDialog.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddFunction\ThirdPartyBrandListPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\EmptyClass.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddFunction\AddThirdPartyBrandListpage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Entity\Integratedbrand\IntegratedBrand.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Entity\Function\AirCleaner.cs" />
|
| | |
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\Method.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\FailView.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\ReplicationView.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Electrical\ClothesHangerSetTimePage.cs" />
|
| | | </ItemGroup>
|
| | | <ItemGroup>
|
| | | <Folder Include="$(MSBuildThisFileDirectory)UI\" />
|
| | |
| | | /// <summary> |
| | | /// çæ¬å· |
| | | /// </summary> |
| | | public static string VersionString = "1.1.0225"; |
| | | public static string VersionString = "1.1.0302"; |
| | | ///// <summary> |
| | | ///// 客æ·ç«¯ç±»å |
| | | ///// </summary> |
old mode 100755
new mode 100644
| | |
| | |
|
| | | var dialogBody = new NormalFrameLayout();
|
| | | FrameDialog.AddChidren(dialogBody);
|
| | | FrameDialog.Show();
|
| | | dialogBody.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | if (ClickBackClose == true && this.btnCancel != null)
|
| | |
| | | //ç½è²èæ¯
|
| | | var frameWhiteBack = new NormalFrameLayout();
|
| | | frameWhiteBack.Width = Application.GetRealWidth(343);
|
| | | frameWhiteBack.Height = RowHeight * (RowCount + 1);
|
| | | frameWhiteBack.Height = RowHeight * (RowCount + 1);
|
| | | frameWhiteBack.Radius = (uint)Application.GetRealWidth(12);
|
| | | frameWhiteBack.Gravity = Gravity.CenterHorizontal;
|
| | | frameWhiteBack.Y = dialogBody.Height - RowHeight * (RowCount + 1) - Application.GetRealHeight(20);
|
| | |
| | | btnConfirm.TextSize = CSS_FontSize.TextFontSize;
|
| | | frameWhiteBack.AddChidren(btnConfirm);
|
| | |
|
| | | FrameDialog.Show();
|
| | |
|
| | | return frameWhiteBack;
|
| | | }
|
| | |
|
| | |
| | | /// ç»æäºä»¶(0:ç¹å»äºåæ¶ 1:ç¹å»äºç¡®å®,第äº,ä¸åæ°ä¸ºæ¶åå)
|
| | | /// </summary>
|
| | | public Action<int, int, int> FinishEvent = null;
|
| | | /// <summary> |
| | | /// å°æ¶åå¼èå´ |
| | | /// </summary>
|
| | | List<int> hRange = new List<int>();
|
| | | /// <summary> |
| | | /// åéåå¼èå´ |
| | | /// </summary>
|
| | | List<int> mRange = new List<int>(); |
| | | /// <summary> |
| | | /// æ¶é´æ§ä»¶ |
| | | /// </summary> |
| | | UIPickerView pickerView; |
| | | //éæ©çæ¶ä¸å |
| | | int selectHour = 0; |
| | | int selectMinute = 0; |
| | | //XXæ¶ |
| | | List<string> listHour ; |
| | | //XXå |
| | | List<string> listMinute;
|
| | |
|
| | |
|
| | | #endregion
|
| | |
|
| | |
| | | public BottomTimeSelectControl(string i_title = "", bool clickBackClose = true)
|
| | | {
|
| | | base.ClickBackClose = clickBackClose;
|
| | | base.StrTitle = i_title; |
| | | |
| | | |
| | | for (int i = 0; i <= 23; i++)
|
| | | {
|
| | | hRange.Add(i);
|
| | | }
|
| | | for (int i = 0; i <= 59; i++)
|
| | | {
|
| | | mRange.Add(i);
|
| | | }
|
| | | } |
| | | |
| | | |
| | | /// <summary>
|
| | | /// åºé¨æ¶é´éæ©æ§ä»¶
|
| | | /// </summary>
|
| | | /// <param name="i_title">æ é¢</param>
|
| | | /// <param name="clickBackClose">ç¹å»èæ¯æ¶,æ¯å¦å
³éå¼¹çª</param>
|
| | | public BottomTimeSelectControl(List<int> hoursRange,List<int> minuteRange ,int rowCount, string i_title = "", bool clickBackClose = true)
|
| | | {
|
| | | base.ClickBackClose = clickBackClose;
|
| | | base.StrTitle = i_title;
|
| | |
|
| | | hRange = hoursRange; |
| | | mRange = minuteRange; |
| | | |
| | | base.RowCount = rowCount; |
| | |
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | |
| | | /// </summary>
|
| | | /// <param name="i_hour">é»è®¤éæ©æ¶</param>
|
| | | /// <param name="i_minute">é»è®¤éæ©å</param>
|
| | | public void InitControl(int i_hour, int i_minute)
|
| | | /// <param name="contentView">éæ©åºåé«åº¦</param>
|
| | | public void InitControl(int i_hour, int i_minute,int contentView = 297)
|
| | | {
|
| | | //å·²ç»åå§å
|
| | | if (base.btnCancel != null) { return; }
|
| | |
|
| | | //åå§ååºå±æ§ä»¶
|
| | | var frameWhiteBack = base.InitBaseControl();
|
| | | frameWhiteBack.Height = Application.GetRealHeight(297);
|
| | | frameWhiteBack.Y = frameWhiteBack.Parent.Height - Application.GetRealHeight(297 + 20);
|
| | |
|
| | | //éæ©çæ¶ä¸å
|
| | | int selectHour = 0;
|
| | | int selectMinute = 0;
|
| | | frameWhiteBack.Height = Application.GetRealHeight(contentView);
|
| | | //frameWhiteBack.Y = frameWhiteBack.Parent.Height - Application.GetRealHeight(297 + 20);
|
| | |
|
| | | //åæ¶
|
| | | base.btnCancel.ButtonClickEvent += (sender, e) =>
|
| | |
| | | frameWhiteBack.AddChidren(btnLine);
|
| | |
|
| | | //æ¶é´æ§ä»¶
|
| | | var pickerView = new UIPickerView();
|
| | | pickerView = new UIPickerView();
|
| | | //æ¶
|
| | | var strhour = Language.StringByID(StringId.h);
|
| | | //å
|
| | | var strMinute = Language.StringByID(StringId.m);
|
| | | //XXæ¶
|
| | | var listHour = new List<string> { "00" + strhour };
|
| | | listHour = new List<string>();// { "00" + strhour };
|
| | | //XXå
|
| | | var listMinute = new List<string> { "00" + strMinute };
|
| | | for (int i = 1; i <= 23; i++)
|
| | | listMinute = new List<string>();// { "00" + strMinute }; |
| | | //for (int i = 1; i <= 23; i++) |
| | | foreach(var hItem in hRange) |
| | | {
|
| | | listHour.Add(i.ToString().PadLeft(2, '0') + strhour);
|
| | | }
|
| | | for (int i = 1; i <= 59; i++)
|
| | | listHour.Add(hItem.ToString().PadLeft(2, '0') + strhour);
|
| | | } |
| | | //for (int i = 1; i <= 59; i++) |
| | | foreach (var mItem in mRange) |
| | | {
|
| | | listMinute.Add(i.ToString().PadLeft(2, '0') + strMinute);
|
| | | listMinute.Add(mItem.ToString().PadLeft(2, '0') + strMinute);
|
| | | }
|
| | | pickerView.Height = frameWhiteBack.Height - btnLine.Bottom;
|
| | | pickerView.Width = frameWhiteBack.Width - Application.GetRealWidth(8) * 2;
|
| | |
| | | };
|
| | | }
|
| | |
|
| | | /// <summary> |
| | | /// ç¹æ®çéåéæ©äºä»¶ï¼å鏿¶é´è®¾ç½®ä½¿ç¨ |
| | | /// </summary>
|
| | | public void ChangePickerEvent() |
| | | { |
| | | pickerView.OnSelectChangeEvent = (value1, value2, value3) =>
|
| | | { |
| | | if (value1 == 0 && value2 == 0) |
| | | { |
| | | value2 = 1; |
| | | pickerView.setCurrentItems(value1, value2, 0); |
| | | } |
| | | else if (value1 == 4 && value2 == 1) |
| | | { |
| | | value2 = 0; |
| | | pickerView.setCurrentItems(value1, value2, 0); |
| | | } |
| | | else |
| | | { |
| | | //æ´æ¹ç´¢å¼ |
| | | selectHour = Convert.ToInt32(listHour[value1].Substring(0, 2)); |
| | | selectMinute = Convert.ToInt32(listMinute[value2].Substring(0, 2)); |
| | | }
|
| | | }; |
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region â ä¸è¬æ¹æ³___________________________
|
old mode 100755
new mode 100644
| | |
| | | //return; |
| | | if (b) |
| | | { |
| | | etAccount.Text = "18316672920";//hzx;// "13415629083"//cf;//tujie"18316120654";// "15622703419";// "18824864143";//"464027401@qq.com"; //"2791308028@qq.com";//13697499568 |
| | | etAccount.Text = "18666455392";//"18316120654";//lcg "18316672920";//hzx;// "13415629083"//cf;//tujie"18316120654"; |
| | | // "15622703419";// "18824864143";//"464027401@qq.com"; //"2791308028@qq.com";//13697499568 |
| | | } |
| | | else |
| | | { |
| | | etAccount.Text = "18666455392";//13375012446//13602944661//tzy 18778381374 |
| | | etAccount.Text = "18316672920";//åé¸"18666455392";//13375012446//13602944661//tzy 18778381374 |
| | | } |
| | | b = !b; |
| | | etPassword.Text = "123456"; |
| | |
| | | { |
| | | if (view.Tag.ToString() == function.sid) |
| | | { |
| | | var state = function.trait_on_off.curValue.ToString() == "on"; |
| | | var state = false; |
| | | if (function.spk == SPK.CurtainRoller || function.spk == SPK.CurtainShades || function.spk == SPK.CurtainTrietex || |
| | | function.spk == SPK.CurtainSwitch)//çªå¸è®¾å¤æ ¹æ®ç¾åæ¯å¤æå¼å
³ç¶æ |
| | | { |
| | | state = function.GetAttrState(FunctionAttributeKey.Percent) != "0"; |
| | | } |
| | | else |
| | | { |
| | | state = function.trait_on_off.curValue.ToString() == "on"; |
| | | } |
| | | for (int i = 0; i < view.ChildrenCount; i++) |
| | | { |
| | | if (view.GetChildren(i).GetType() == typeof(Button)) |
| | |
| | | /// </summary> |
| | | void LoadEvent_ControlCurtain(Curtain curtain, Button btnClose, Button btnOpen) |
| | | { |
| | | btnClose.MouseDownEventHandler = (sender, e) => |
| | | { |
| | | btnClose.IsSelected = true; |
| | | }; |
| | | btnClose.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | btnClose.IsSelected = false; |
| | | btnClose.IsSelected = true; |
| | | curtain.trait_on_off.curValue = "off"; |
| | | curtain.percent = 0; |
| | | Dictionary<string, string> d = new Dictionary<string, string>(); |
| | |
| | | Control.Ins.SendWriteCommand(curtain, d); |
| | | }; |
| | | |
| | | btnOpen.MouseDownEventHandler = (sender, e) => |
| | | { |
| | | btnOpen.IsSelected = true; |
| | | }; |
| | | btnOpen.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | btnOpen.IsSelected = false; |
| | | btnOpen.IsSelected = true; |
| | | curtain.trait_on_off.curValue = "on"; |
| | | curtain.percent = 100; |
| | | Dictionary<string, string> d = new Dictionary<string, string>(); |
| | |
| | | case FunctionCategory.Light: |
| | | case FunctionCategory.AC: |
| | | case FunctionCategory.FloorHeat: |
| | | case FunctionCategory.Electric: |
| | | #region æé®ç¶ææ´æ° |
| | | if (cTag == updataFunction.sid + "_Switch") |
| | | { |
| | |
| | | #endregion |
| | | case FunctionCategory.Curtain: |
| | | #region çªå¸æ´æ° |
| | | var uCurtain = updataFunction as Curtain; |
| | | switch (uCurtain.trait_on_off.curValue.ToString()) |
| | | //var uCurtain = updataFunction as Curtain; |
| | | var percentString = updataFunction.GetAttrState(FunctionAttributeKey.Percent); |
| | | if (percentString != null) |
| | | { |
| | | case "off": |
| | | int percent = 0; |
| | | int.TryParse(percentString, out percent); |
| | | if (percent == 0) |
| | | { |
| | | if (cTag == updataFunction.sid + "_off") |
| | | { |
| | | try |
| | |
| | | { |
| | | (fcView.GetChildren(j) as Button).IsSelected = false; |
| | | } |
| | | break; |
| | | case "on": |
| | | } |
| | | else |
| | | { |
| | | if (cTag == updataFunction.sid + "_on") |
| | | { |
| | | try |
| | |
| | | { |
| | | (fcView.GetChildren(j) as Button).IsSelected = false; |
| | | } |
| | | break; |
| | | case "stop": |
| | | if (cTag == updataFunction.sid + "_stop") |
| | | { |
| | | try |
| | | { |
| | | (fcView.GetChildren(j) as Button).IsSelected = true; |
| | | } |
| | | catch { } |
| | | } |
| | | else |
| | | { |
| | | (fcView.GetChildren(j) as Button).IsSelected = false; |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | #endregion |
| | | break; |
| | |
| | | Height = Application.GetMinRealAverage(32), |
| | | UnSelectedImagePath = "FunctionIcon/Curtain/CurtainCloseIcon.png", |
| | | SelectedImagePath = "FunctionIcon/Curtain/CurtainCloseOnIcon.png", |
| | | IsSelected = function.trait_on_off.curValue.ToString() == "off", |
| | | IsSelected = function.GetAttrState(FunctionAttributeKey.Percent) == "0", |
| | | Tag = function.sid + "_off" |
| | | }; |
| | | bodyDiv.AddChidren(btnCurtainClose); |
| | |
| | | UnSelectedImagePath = "FunctionIcon/Curtain/CurtainStopIcon.png", |
| | | SelectedImagePath = "FunctionIcon/Curtain/CurtainStopOnIcon.png", |
| | | Tag = function.sid + "_stop", |
| | | IsSelected = function.trait_on_off.curValue.ToString() == "stop" |
| | | }; |
| | | bodyDiv.AddChidren(btnCurtainStop); |
| | | |
| | |
| | | UnSelectedImagePath = "FunctionIcon/Curtain/CurtainOpenIcon.png", |
| | | SelectedImagePath = "FunctionIcon/Curtain/CurtainOpenOnIcon.png", |
| | | Tag = function.sid + "_on", |
| | | IsSelected = function.trait_on_off.curValue.ToString() == "on" |
| | | IsSelected = function.GetAttrState(FunctionAttributeKey.Percent) != "0" |
| | | }; |
| | | bodyDiv.AddChidren(btnCurtainOpen); |
| | | LoadEvent_ControlCurtain(btnCurtainStop, btnCurtainOpen, btnCurtainClose, function as Curtain); |
| | |
| | | onDimmerBar = false; |
| | | (bodyDiv.Parent as VerticalScrolViewLayout).ScrollEnabled = true; |
| | | light.brightness = dimmerControlBar.Progress; |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | Dictionary<string, string> d = new Dictionary<string, string>(); |
| | | d.Add("brightness", light.brightness.ToString()); |
| | | Control.Ins.SendWriteCommand(light, d); |
| | | }; |
| | |
| | | btnOpen.IsSelected = false; |
| | | curtain.trait_on_off.curValue = "off"; |
| | | curtain.percent = 0; |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | Dictionary<string, string> d = new Dictionary<string, string>(); |
| | | d.Add("on_off", curtain.trait_on_off.curValue.ToString()); |
| | | Control.Ins.SendWriteCommand(curtain, d); |
| | | }; |
| | |
| | | btnClose.IsSelected = false; |
| | | btnOpen.IsSelected = false; |
| | | curtain.trait_on_off.curValue = "stop"; |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | Dictionary<string, string> d = new Dictionary<string, string>(); |
| | | d.Add("on_off", curtain.trait_on_off.curValue.ToString()); |
| | | Control.Ins.SendWriteCommand(curtain, d); |
| | | }; |
| | |
| | | btnStop.IsSelected = false; |
| | | curtain.trait_on_off.curValue = "on"; |
| | | curtain.percent = 100; |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | Dictionary<string, string> d = new Dictionary<string, string>(); |
| | | d.Add("on_off", curtain.trait_on_off.curValue.ToString()); |
| | | Control.Ins.SendWriteCommand(curtain, d); |
| | | }; |
| | |
| | | { |
| | | |
| | | string value = dic["value"]; |
| | | if (value == "true") |
| | | if (value == "open") |
| | | { |
| | | inputView.btnState.Text = Language.StringByID(StringId.kaiqi); |
| | | |
| | |
| | | foreach (var dic in dicList) |
| | | { |
| | | string value = dic["value"]; |
| | | if (value == "true") |
| | | if (value == "open") |
| | | { |
| | | button1.Text = Language.StringByID(StringId.kaiqi); |
| | | } |
| | |
| | | { |
| | | if (uCurtain.trait_on_off.curValue.ToString() == "stop") |
| | | { |
| | | bodyView.btnCurtainOpen.IsSelected = false; |
| | | bodyView.btnCurtainClose.IsSelected = false; |
| | | bodyView.btnCurtainStop.IsSelected = true; |
| | | //bodyView.btnCurtainOpen.IsSelected = false; |
| | | //bodyView.btnCurtainClose.IsSelected = false; |
| | | //bodyView.btnCurtainStop.IsSelected = true; |
| | | } |
| | | else if (uCurtain.trait_on_off.curValue.ToString() == "on") |
| | | { |
| | | bodyView.btnCurtainOpen.IsSelected = true; |
| | | bodyView.btnCurtainClose.IsSelected = false; |
| | | bodyView.btnCurtainStop.IsSelected = false; |
| | | //bodyView.btnCurtainOpen.IsSelected = true; |
| | | //bodyView.btnCurtainClose.IsSelected = false; |
| | | //bodyView.btnCurtainStop.IsSelected = false; |
| | | bodyView.btnCurtainBgIcon.IsSelected = true; |
| | | } |
| | | else if (uCurtain.trait_on_off.curValue.ToString() == "off") |
| | | { |
| | | bodyView.btnCurtainOpen.IsSelected = false; |
| | | bodyView.btnCurtainClose.IsSelected = true; |
| | | bodyView.btnCurtainStop.IsSelected = false; |
| | | //bodyView.btnCurtainOpen.IsSelected = false; |
| | | //bodyView.btnCurtainClose.IsSelected = true; |
| | | //bodyView.btnCurtainStop.IsSelected = false; |
| | | bodyView.btnCurtainBgIcon.IsSelected = false; |
| | | } |
| | | } |
| | |
| | | void LoadEvent_ControlEvent() |
| | | { |
| | | btnCurtainClose.MouseUpEventHandler = (sender, e) => { |
| | | btnCurtainClose.IsSelected = true; |
| | | btnCurtainStop.IsSelected = false; |
| | | btnCurtainOpen.IsSelected = false; |
| | | new System.Threading.Thread(() => { |
| | | System.Threading.Thread.Sleep(2000); |
| | | Application.RunOnMainThread(() => { |
| | | btnCurtainClose.IsSelected = false; |
| | | }); |
| | | }) { IsBackground = true }.Start(); |
| | | btnCurtainBgIcon.IsSelected = false; |
| | | curtain.trait_on_off.curValue = "off"; |
| | | //Control.Send(CommandType_A.write,curtain); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add("on_off", curtain.trait_on_off.curValue.ToString()); |
| | | Control.Ins.SendWriteCommand(curtain, d); |
| | | }; |
| | | |
| | | //btnCurtainStop.MouseDownEventHandler = (sender, e) => |
| | | //{ |
| | | // btnCurtainStop.IsSelected = true; |
| | | // //btnCurtainClose.IsSelected = false; |
| | | // //btnCurtainOpen.IsSelected = false; |
| | | //}; |
| | | //btnCurtainOpen.MouseDownEventHandler = (sender, e) => { |
| | | // btnCurtainOpen.IsSelected = true; |
| | | //}; |
| | | //btnCurtainClose.MouseDownEventHandler = (sender, e) => { |
| | | // btnCurtainClose.IsSelected = true; |
| | | //}; |
| | | btnCurtainStop.MouseDownEventHandler = (sender, e) => |
| | | { |
| | | btnCurtainStop.IsSelected = true; |
| | | }; |
| | | btnCurtainOpen.MouseDownEventHandler = (sender, e) => |
| | | { |
| | | btnCurtainOpen.IsSelected = true; |
| | | }; |
| | | btnCurtainClose.MouseDownEventHandler = (sender, e) => |
| | | { |
| | | btnCurtainClose.IsSelected = true; |
| | | }; |
| | | btnCurtainStop.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | btnCurtainOpen.IsSelected = false; |
| | | btnCurtainClose.IsSelected = false; |
| | | btnCurtainStop.IsSelected = true; |
| | | new System.Threading.Thread(() => { |
| | | System.Threading.Thread.Sleep(2000); |
| | | Application.RunOnMainThread(() => { |
| | | btnCurtainStop.IsSelected = false; |
| | | }); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | curtain.trait_on_off.curValue = "stop"; |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add("on_off", curtain.trait_on_off.curValue.ToString()); |
| | |
| | | }; |
| | | btnCurtainOpen.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | btnCurtainOpen.IsSelected = true; |
| | | btnCurtainClose.IsSelected = false; |
| | | btnCurtainStop.IsSelected = false; |
| | | new System.Threading.Thread(() => { |
| | | System.Threading.Thread.Sleep(2000); |
| | | Application.RunOnMainThread(() => { |
| | | btnCurtainOpen.IsSelected = false; |
| | | }); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | btnCurtainBgIcon.IsSelected = true; |
| | | curtain.trait_on_off.curValue = "on"; |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | |
| | | Height = Application.GetRealWidth(177), |
| | | Progress = curtain.percent, |
| | | ProgressTextColor =0x00000000, |
| | | IsInvertedProgress = true, |
| | | //IsInvertedProgress = true, |
| | | }; |
| | | controlView.AddChidren(curtainSeekBar); |
| | | |
| | |
| | | Height = Application.GetMinRealAverage(32), |
| | | UnSelectedImagePath = "FunctionIcon/Curtain/CurtainCloseIcon.png", |
| | | SelectedImagePath = "FunctionIcon/Curtain/CurtainCloseOnIcon.png", |
| | | IsSelected = curtain.GetAttrState(FunctionAttributeKey.Percent) == "0" |
| | | }; |
| | | controlView.AddChidren(btnCurtainClose); |
| | | |
| | |
| | | Height = Application.GetMinRealAverage(32), |
| | | UnSelectedImagePath = "FunctionIcon/Curtain/CurtainOpenIcon.png", |
| | | SelectedImagePath = "FunctionIcon/Curtain/CurtainOpenOnIcon.png", |
| | | IsSelected = curtain.GetAttrState(FunctionAttributeKey.Percent) != "0" |
| | | }; |
| | | controlView.AddChidren(btnCurtainOpen); |
| | | |
| | |
| | | return; |
| | | if (uCurtain.spk == bodyView.curtain.spk && uCurtain.sid == bodyView.curtain.sid) |
| | | { |
| | | if (uCurtain.trait_on_off.curValue.ToString() == "stop") |
| | | var percentString = uCurtain.GetAttrState(FunctionAttributeKey.Percent); |
| | | if (percentString != null) |
| | | { |
| | | bodyView.btnCurtainOpen.IsSelected = false; |
| | | bodyView.btnCurtainClose.IsSelected = false; |
| | | bodyView.btnCurtainStop.IsSelected = true; |
| | | } |
| | | else if (uCurtain.trait_on_off.curValue.ToString() == "on") |
| | | { |
| | | bodyView.btnCurtainOpen.IsSelected = true; |
| | | bodyView.btnCurtainClose.IsSelected = false; |
| | | bodyView.btnCurtainStop.IsSelected = false; |
| | | } |
| | | else if (uCurtain.trait_on_off.curValue.ToString() == "off") |
| | | { |
| | | bodyView.btnCurtainOpen.IsSelected = false; |
| | | bodyView.btnCurtainClose.IsSelected = true; |
| | | bodyView.btnCurtainStop.IsSelected = false; |
| | | int percent = 0; |
| | | int.TryParse(percentString, out percent); |
| | | bodyView.btnCurtainOpen.IsSelected = percent > 0; |
| | | bodyView.btnCurtainClose.IsSelected = percent == 0; |
| | | } |
| | | try |
| | | { |
| | |
| | | { |
| | | btnCurtainClose.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | btnCurtainClose.IsSelected = true; |
| | | btnCurtainOpen.IsSelected = false; |
| | | btnCurtainStop.IsSelected = false; |
| | | //new System.Threading.Thread(() => { |
| | | // System.Threading.Thread.Sleep(2000); |
| | | // Application.RunOnMainThread(() => { |
| | | // btnCurtainClose.IsSelected = false; |
| | | // }); |
| | | //}) |
| | | //{ IsBackground = true }.Start(); |
| | | curtain.trait_on_off.curValue = "off"; |
| | | curtain.percent = 100; |
| | | curtain.percent = 0; |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.OnOff, curtain.trait_on_off.curValue.ToString()); |
| | | DriverLayer.Control.Ins.SendWriteCommand(curtain, d); |
| | |
| | | |
| | | btnCurtainStop.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | |
| | | btnCurtainStop.IsSelected = true; |
| | | btnCurtainClose.IsSelected = false; |
| | | btnCurtainOpen.IsSelected = false; |
| | | onCurtainAnimation = false; |
| | | new System.Threading.Thread(() => |
| | | { |
| | | System.Threading.Thread.Sleep(2000); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | btnCurtainStop.IsSelected = false; |
| | | }); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | curtain.trait_on_off.curValue = "stop"; |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.OnOff, curtain.trait_on_off.curValue.ToString()); |
| | | DriverLayer.Control.Ins.SendWriteCommand(curtain, d); |
| | | onCurtainAnimation = false; |
| | | }; |
| | | |
| | | btnCurtainOpen.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | |
| | | btnCurtainClose.IsSelected = false; |
| | | btnCurtainStop.IsSelected = false; |
| | | btnCurtainOpen.IsSelected = true; |
| | | //new System.Threading.Thread(() => { |
| | | // System.Threading.Thread.Sleep(2000); |
| | | // Application.RunOnMainThread(() => { |
| | | // btnCurtainOpen.IsSelected = false; |
| | | // }); |
| | | //}) |
| | | //{ IsBackground = true }.Start(); |
| | | curtain.trait_on_off.curValue = "on"; |
| | | curtain.percent = 0; |
| | | curtain.percent = 100; |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.OnOff, curtain.trait_on_off.curValue.ToString()); |
| | | DriverLayer.Control.Ins.SendWriteCommand(curtain, d); |
| | | CurtainAnimation(curtain.percent); |
| | | }; |
| | | |
| | | |
| | | btnCurtainStop.MouseDownEventHandler = (sender, e) => |
| | | { |
| | | btnCurtainStop.IsSelected = true; |
| | | }; |
| | | btnCurtainOpen.MouseDownEventHandler = (sender, e) => |
| | | { |
| | | btnCurtainOpen.IsSelected = true; |
| | | btnCurtainClose.IsSelected = false; |
| | | }; |
| | | btnCurtainClose.MouseDownEventHandler = (sender, e) => |
| | | { |
| | | btnCurtainClose.IsSelected = true; |
| | | btnCurtainOpen.IsSelected = false; |
| | | }; |
| | | |
| | | //btnMinusSignIcon.MouseUpEventHandler = (sender, e) => |
| | | //{ |
| | | // curtain.percent--; |
| | |
| | | Height = Application.GetMinRealAverage(32), |
| | | UnSelectedImagePath = "FunctionIcon/Curtain/CurtainCloseIcon.png", |
| | | SelectedImagePath = "FunctionIcon/Curtain/CurtainCloseOnIcon.png", |
| | | IsSelected = curtain.GetAttrState(FunctionAttributeKey.Percent) == "0", |
| | | }; |
| | | controlView.AddChidren(btnCurtainClose); |
| | | |
| | |
| | | Height = Application.GetMinRealAverage(32), |
| | | UnSelectedImagePath = "FunctionIcon/Curtain/CurtainOpenIcon.png", |
| | | SelectedImagePath = "FunctionIcon/Curtain/CurtainOpenOnIcon.png", |
| | | IsSelected = curtain.GetAttrState(FunctionAttributeKey.Percent) != "0", |
| | | }; |
| | | controlView.AddChidren(btnCurtainOpen); |
| | | |
| | |
| | | return; |
| | | if (uCurtain.spk == bodyView.curtain.spk && uCurtain.sid == bodyView.curtain.sid) |
| | | { |
| | | if (uCurtain.trait_on_off.curValue.ToString() == "stop") |
| | | { |
| | | bodyView.btnCurtainOpen.IsSelected = false; |
| | | bodyView.btnCurtainClose.IsSelected = false; |
| | | bodyView.btnCurtainStop.IsSelected = true; |
| | | } |
| | | else if (uCurtain.trait_on_off.curValue.ToString() == "on") |
| | | { |
| | | bodyView.btnCurtainOpen.IsSelected = true; |
| | | bodyView.btnCurtainClose.IsSelected = false; |
| | | bodyView.btnCurtainStop.IsSelected = false; |
| | | } |
| | | else if (uCurtain.trait_on_off.curValue.ToString() == "off") |
| | | { |
| | | bodyView.btnCurtainOpen.IsSelected = false; |
| | | bodyView.btnCurtainClose.IsSelected = true; |
| | | bodyView.btnCurtainStop.IsSelected = false; |
| | | } |
| | | var percentString = uCurtain.GetAttrState(FunctionAttributeKey.Percent); |
| | | int percent = 0; |
| | | int.TryParse(percentString, out percent); |
| | | bodyView.btnCurtainOpen.IsSelected = percent > 0; |
| | | bodyView.btnCurtainClose.IsSelected = percent == 0; |
| | | try |
| | | { |
| | | if (!bodyView.onCurtainAnimation) |
| | |
| | | { |
| | | btnCurtainClose.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | btnCurtainOpen.IsSelected = false; |
| | | btnCurtainClose.IsSelected = true; |
| | | btnCurtainStop.IsSelected = false; |
| | | //new System.Threading.Thread(() => { |
| | | // System.Threading.Thread.Sleep(2000); |
| | | // Application.RunOnMainThread(() => { |
| | | // btnCurtainClose.IsSelected = false; |
| | | // }); |
| | | //}) |
| | | //{ IsBackground = true }.Start(); |
| | | curtain.trait_on_off.curValue = "off"; |
| | | curtain.percent = 100; |
| | | curtain.percent = 0; |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.OnOff, curtain.trait_on_off.curValue.ToString()); |
| | | DriverLayer.Control.Ins.SendWriteCommand(curtain, d); |
| | |
| | | |
| | | btnCurtainStop.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | btnCurtainStop.IsSelected = true; |
| | | btnCurtainClose.IsSelected = false; |
| | | btnCurtainOpen.IsSelected = false; |
| | | new System.Threading.Thread(() => { |
| | | System.Threading.Thread.Sleep(2000); |
| | | Application.RunOnMainThread(() => { |
| | | btnCurtainStop.IsSelected = false; |
| | | }); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | curtain.trait_on_off.curValue = "stop"; |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.OnOff, curtain.trait_on_off.curValue.ToString()); |
| | |
| | | |
| | | btnCurtainOpen.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | btnCurtainClose.IsSelected = false; |
| | | btnCurtainStop.IsSelected = false; |
| | | btnCurtainOpen.IsSelected = true; |
| | | //new System.Threading.Thread(() => { |
| | | // System.Threading.Thread.Sleep(2000); |
| | | // Application.RunOnMainThread(() => { |
| | | // btnCurtainOpen.IsSelected = false; |
| | | // }); |
| | | //}) |
| | | //{ IsBackground = true }.Start(); |
| | | curtain.trait_on_off.curValue = "on"; |
| | | curtain.percent = 0; |
| | | curtain.percent = 100; |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.OnOff, curtain.trait_on_off.curValue.ToString()); |
| | | DriverLayer.Control.Ins.SendWriteCommand(curtain, d); |
| | |
| | | DriverLayer.Control.Ins.SendWriteCommand(curtain, d); |
| | | }; |
| | | |
| | | |
| | | btnCurtainStop.MouseDownEventHandler = (sender, e) => |
| | | { |
| | | btnCurtainStop.IsSelected = true; |
| | | }; |
| | | btnCurtainOpen.MouseDownEventHandler = (sender, e) => |
| | | { |
| | | btnCurtainOpen.IsSelected = true; |
| | | btnCurtainClose.IsSelected = false; |
| | | }; |
| | | btnCurtainClose.MouseDownEventHandler = (sender, e) => |
| | | { |
| | | btnCurtainClose.IsSelected = true; |
| | | btnCurtainOpen.IsSelected = false; |
| | | }; |
| | | |
| | | |
| | | //curtainSeekBar.OnProgressChangedEvent = (sender, e) => |
| | | //{ |
| | | // controlBar.Progress = curtainSeekBar.Progress; |
| | |
| | | FrameWhiteCentet1.AddChidren(hotDryView); |
| | | |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => { |
| | | device.SetAttrState(FunctionAttributeKey.HotDry, "true"); |
| | | string onoff = hotDryView.Lighting ? "false" : "true"; |
| | | device.SetAttrState(FunctionAttributeKey.HotDry, onoff); |
| | | Dictionary<string, string> d = new Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.HotDry, "true"); |
| | | d.Add(FunctionAttributeKey.HotDry, onoff); |
| | | Control.Ins.SendWriteCommand(device, d); |
| | | }; |
| | | hotDryView.SetThouchEvent(eventHandler); |
| | |
| | | FrameWhiteCentet1.AddChidren(windDryView); |
| | | |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => { |
| | | device.SetAttrState(FunctionAttributeKey.WindDry, "true"); |
| | | string onoff = windDryView.Lighting ? "false" : "true"; |
| | | device.SetAttrState(FunctionAttributeKey.WindDry, onoff); |
| | | Dictionary<string, string> d = new Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.WindDry, "true"); |
| | | d.Add(FunctionAttributeKey.WindDry, onoff); |
| | | Control.Ins.SendWriteCommand(device, d); |
| | | }; |
| | | windDryView.SetThouchEvent(eventHandler); |
| | |
| | | FrameWhiteCentet1.AddChidren(disinfectView); |
| | | |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => { |
| | | device.SetAttrState(FunctionAttributeKey.Disinfect, "true"); |
| | | string onoff = disinfectView.Lighting ? "false" : "true"; |
| | | device.SetAttrState(FunctionAttributeKey.Disinfect, onoff); |
| | | Dictionary<string, string> d = new Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.Disinfect, "true"); |
| | | d.Add(FunctionAttributeKey.Disinfect, onoff); |
| | | Control.Ins.SendWriteCommand(device, d); |
| | | }; |
| | | disinfectView.SetThouchEvent(eventHandler); |
| | |
| | | |
| | | index++; |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region æ¶é´è®¾ç½® |
| | | var timeSetView = new ClothesHangerControl( |
| | | "FunctionIcon/Electrical/ClothesHanger/ClothesHangerTimeIcon.png", |
| | | "FunctionIcon/Electrical/ClothesHanger/ClothesHangerTimeIconOn.png", |
| | | Language.StringByID(StringId.Time), |
| | | ""); |
| | | timeSetView.Width = Application.GetRealWidth(96); |
| | | timeSetView.Height = Application.GetRealHeight(74); |
| | | timeSetView.Y = Application.GetRealHeight(409); |
| | | timeSetView.X = Application.GetRealWidth(266 - 33); |
| | | |
| | | |
| | | EventHandler<MouseEventArgs> eventHandler_timeSetView = (sender, e) => |
| | | { |
| | | var setTimePage = new ClothesHangerSetTimePage(device); |
| | | MainPage.BasePageView.AddChidren(setTimePage); |
| | | setTimePage.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | timeSetView.SetThouchEvent(eventHandler_timeSetView); |
| | | |
| | | FrameWhiteCentet1.AddChidren(timeSetView); |
| | | |
| | | #endregion |
| | | } |
| | |
| | | if (hotDryTimeLeftTemp != null) |
| | | { |
| | | hotDryView.ChangeTime(hotDryTimeLeftTemp.value); |
| | | MainPage.Log($"çå¹²å©ä½æ¶é´{hotDryTimeLeftTemp.value}"); |
| | | } |
| | | var windDryTimeLeftTemp = device.status.Find((sta) => sta.key == FunctionAttributeKey.WindDryTimeLeft); |
| | | if (windDryTimeLeftTemp != null) |
| | | { |
| | | windDryView.ChangeTime(windDryTimeLeftTemp.value); |
| | | MainPage.Log($"é£å¹²å©ä½æ¶é´{windDryTimeLeftTemp.value}"); |
| | | } |
| | | var disinfectTimeLeftTemp = device.status.Find((sta) => sta.key == FunctionAttributeKey.DisinfectTimeLeft); |
| | | if (disinfectTimeLeftTemp != null) |
| | | { |
| | | disinfectView.ChangeTime(disinfectTimeLeftTemp.value); |
| | | MainPage.Log($"æ¶æ¯å©ä½æ¶é´{disinfectTimeLeftTemp.value}"); |
| | | } |
| | | #endregion |
| | | |
| | |
| | | private Button btnTitle; |
| | | private Button btnTime; |
| | | /// <summary> |
| | | /// åè®¡æ¶æ¶é´ |
| | | /// </summary> |
| | | private int leftTime = 0; |
| | | /// <summary> |
| | | /// æ§ä»¶æ¯å¦ç¹äº® |
| | | /// </summary> |
| | | public bool Lighting = false; |
| | | |
| | | |
| | | |
| | | public ClothesHangerControl(string iconPath1, string iconPath2,string title,string time) |
| | | { |
| | |
| | | /// <param name="newTime"></param> |
| | | public void ChangeTime (string newTime) |
| | | { |
| | | if(newTime == "0") |
| | | { |
| | | newTime = ""; |
| | | } |
| | | |
| | | int time = 0; |
| | | int.TryParse(newTime, out time); |
| | | time = time * 60; |
| | | |
| | | int.TryParse(newTime, out leftTime); |
| | | leftTime *= 60; |
| | | if (countdownThread == null) |
| | | { |
| | | countdownThread = new System.Threading.Thread(() => { |
| | | while(true) |
| | | { |
| | | if(time>1) |
| | | if(leftTime > 1) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | btnTime.Text = new TimeSpan(0, 0, time).ToString(); |
| | | btnTime.Text = new TimeSpan(0, 0, leftTime).ToString(); |
| | | }); |
| | | System.Threading.Thread.Sleep(1000); |
| | | time--; |
| | | leftTime--; |
| | | }else |
| | | { |
| | | Application.RunOnMainThread(() => |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using HDL_ON.DriverLayer; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.Stan; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | | public partial class ClothesHangerSetTimePage : FrameLayout |
| | | { |
| | | FrameLayout bodyView; |
| | | |
| | | Function device; |
| | | |
| | | public ClothesHangerSetTimePage(Function function) |
| | | { |
| | | device = function; |
| | | bodyView = this; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// å è½½çé¢ |
| | | /// </summary> |
| | | public void LoadPage() |
| | | { |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.Time)).LoadTopView(); |
| | | |
| | | VerticalScrolViewLayout functionListView = new VerticalScrolViewLayout() |
| | | { |
| | | Y = Application.GetRealHeight(64), |
| | | Height = Application.GetRealHeight(530), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | ScrollEnabled = false, |
| | | }; |
| | | bodyView.AddChidren(functionListView); |
| | | |
| | | |
| | | /// <summary> |
| | | /// å°æ¶åå¼èå´ |
| | | /// </summary> |
| | | List<int> hRange = new List<int> { 0, 1, 2, 3, 4 }; |
| | | /// <summary> |
| | | /// åéåå¼èå´ |
| | | /// </summary> |
| | | List<int> mRange = new List<int> { 0, 30 }; |
| | | |
| | | var menu = new List<string>() { |
| | | FunctionAttributeKey.HotDryTime, |
| | | FunctionAttributeKey.WindDryTime, |
| | | FunctionAttributeKey.DisinfectTime, |
| | | FunctionAttributeKey.AnionTime |
| | | }; |
| | | List<string> attrs = device.GetAttributes(); |
| | | |
| | | #region çå¹²æ¶é´ |
| | | ListCellView hotDryTimeCell; |
| | | hotDryTimeCell = new ListCellView() |
| | | { |
| | | Height = Application.GetRealHeight(50), |
| | | }; |
| | | hotDryTimeCell.BtnTilte.TextID = StringId.HotDryTime; |
| | | |
| | | if (attrs.Contains(menu[0])) |
| | | { |
| | | |
| | | var hotDryTime = 0; |
| | | int.TryParse(device.GetAttrState(FunctionAttributeKey.HotDryTime), out hotDryTime); |
| | | hotDryTimeCell.BtnSubtitle.Text = hotDryTime / 60 + Language.StringByID(StringId.HourUint) + hotDryTime % 60 + Language.StringByID(StringId.MinuteUint); |
| | | |
| | | functionListView.AddChidren(hotDryTimeCell); |
| | | hotDryTimeCell.GoAction = () => |
| | | { |
| | | BottomTimeSelectControl timeControl = new BottomTimeSelectControl(hRange, mRange,3, Language.StringByID(StringId.HotDryTime)); |
| | | timeControl.RowHeight = Application.GetRealHeight(50); |
| | | timeControl.InitControl(0, 1, 162); |
| | | timeControl.ChangePickerEvent(); |
| | | timeControl.FinishEvent = (type, hours, min) => |
| | | { |
| | | if (type == 1)//0:åæ¶ï¼1:ç¡®å® |
| | | { |
| | | HdlThreadLogic.Current.RunThread(() => |
| | | { |
| | | var time = hours * 60 + min; |
| | | var dic = new Dictionary<string, string>(); |
| | | dic.Add(FunctionAttributeKey.HotDryTime, time.ToString()); |
| | | Control.Ins.SendWriteCommand(this.device, dic); |
| | | HdlThreadLogic.Current.RunMain(() => |
| | | { |
| | | hotDryTimeCell.BtnSubtitle.Text = time / 60 + Language.StringByID(StringId.HourUint) + time % 60 + Language.StringByID(StringId.MinuteUint); |
| | | }); |
| | | }); |
| | | } |
| | | }; |
| | | }; |
| | | } |
| | | |
| | | |
| | | #endregion |
| | | |
| | | #region é£å¹²æ¶é´ |
| | | ListCellView windDryCell; |
| | | windDryCell = new ListCellView() |
| | | { |
| | | Height = Application.GetRealHeight(50), |
| | | }; |
| | | windDryCell.BtnTilte.TextID = StringId.WindDryTime; |
| | | |
| | | windDryCell.BtnSubtitle.Text = device.GetAttrState(FunctionAttributeKey.WindDryTime); |
| | | |
| | | if (attrs.Contains(menu[1])) |
| | | { |
| | | var windDryTime = 0; |
| | | int.TryParse(device.GetAttrState(FunctionAttributeKey.WindDryTime), out windDryTime); |
| | | windDryCell.BtnSubtitle.Text = windDryTime / 60 + Language.StringByID(StringId.HourUint) + windDryTime % 60 + Language.StringByID(StringId.MinuteUint); |
| | | |
| | | functionListView.AddChidren(windDryCell); |
| | | windDryCell.GoAction = () => |
| | | { |
| | | BottomTimeSelectControl timeControl = new BottomTimeSelectControl(hRange, mRange,3,Language.StringByID(StringId.WindDryTime)); |
| | | timeControl.RowHeight = Application.GetRealHeight(50); |
| | | timeControl.InitControl(0, 1, 162); |
| | | timeControl.ChangePickerEvent(); |
| | | timeControl.FinishEvent = (type, hours, min) => |
| | | { |
| | | if (type == 1)//0:åæ¶ï¼1:ç¡®å® |
| | | { |
| | | HdlThreadLogic.Current.RunThread(() => |
| | | { |
| | | var time = hours * 60 + min; |
| | | var dic = new Dictionary<string, string>(); |
| | | dic.Add(FunctionAttributeKey.WindDryTime, time.ToString()); |
| | | Control.Ins.SendWriteCommand(this.device, dic); |
| | | HdlThreadLogic.Current.RunMain(() => |
| | | { |
| | | windDryCell.BtnSubtitle.Text = time / 60 + Language.StringByID(StringId.HourUint) + time % 60 + Language.StringByID(StringId.MinuteUint); |
| | | }); |
| | | }); |
| | | } |
| | | }; |
| | | }; |
| | | } |
| | | else |
| | | { |
| | | hotDryTimeCell.LineView.RemoveFromParent(); |
| | | } |
| | | #endregion |
| | | |
| | | #region æ¶æ¯æ¶é´ |
| | | ListCellView disinfectTimeCell; |
| | | disinfectTimeCell = new ListCellView() |
| | | { |
| | | Height = Application.GetRealHeight(50), |
| | | }; |
| | | disinfectTimeCell.BtnTilte.TextID = StringId.DisinfectTime; |
| | | |
| | | disinfectTimeCell.BtnSubtitle.Text = device.GetAttrState(FunctionAttributeKey.DisinfectTime); |
| | | |
| | | if (attrs.Contains(menu[2])) |
| | | { |
| | | var disinfectTime = 0; |
| | | int.TryParse(device.GetAttrState(FunctionAttributeKey.DisinfectTime), out disinfectTime); |
| | | disinfectTimeCell.BtnSubtitle.Text = disinfectTime / 60 + Language.StringByID(StringId.HourUint) + disinfectTime % 60 + Language.StringByID(StringId.MinuteUint); |
| | | |
| | | functionListView.AddChidren(disinfectTimeCell); |
| | | disinfectTimeCell.GoAction = () => { |
| | | BottomTimeSelectControl timeControl = new BottomTimeSelectControl(hRange, mRange,3, Language.StringByID(StringId.DisinfectTime)); |
| | | timeControl.RowHeight = Application.GetRealHeight(50); |
| | | timeControl.InitControl(0, 1, 162); |
| | | timeControl.ChangePickerEvent(); |
| | | timeControl.FinishEvent = (type, hours, min) => { |
| | | if (type == 1)//0:åæ¶ï¼1:ç¡®å® |
| | | { |
| | | HdlThreadLogic.Current.RunThread(() => |
| | | { |
| | | var time = hours * 60 + min; |
| | | var dic = new Dictionary<string, string>(); |
| | | dic.Add(FunctionAttributeKey.DisinfectTime, time.ToString()); |
| | | Control.Ins.SendWriteCommand(this.device, dic); |
| | | HdlThreadLogic.Current.RunMain(() => |
| | | { |
| | | disinfectTimeCell.BtnSubtitle.Text = time / 60 + Language.StringByID(StringId.HourUint) + time % 60 + Language.StringByID(StringId.MinuteUint); |
| | | }); |
| | | }); |
| | | } |
| | | }; |
| | | }; |
| | | } |
| | | else |
| | | { |
| | | windDryCell.LineView.RemoveFromParent(); |
| | | } |
| | | #endregion |
| | | |
| | | #region è´ç¦»åæ¶é´ |
| | | ListCellView anionTimeCell; |
| | | anionTimeCell = new ListCellView() |
| | | { |
| | | Height = Application.GetRealHeight(50), |
| | | }; |
| | | anionTimeCell.BtnTilte.TextID = StringId.AnionTime; |
| | | |
| | | anionTimeCell.BtnSubtitle.Text = device.GetAttrState(FunctionAttributeKey.AnionTime); |
| | | |
| | | if (attrs.Contains(menu[3])) |
| | | { |
| | | var anionTime = 0; |
| | | int.TryParse(device.GetAttrState(FunctionAttributeKey.HotDryTime), out anionTime); |
| | | anionTimeCell.BtnSubtitle.Text = anionTime / 60 + Language.StringByID(StringId.HourUint) + anionTime % 60 + Language.StringByID(StringId.MinuteUint); |
| | | |
| | | functionListView.AddChidren(anionTimeCell); |
| | | anionTimeCell.LineView.RemoveFromParent(); |
| | | |
| | | anionTimeCell.GoAction = () => { |
| | | BottomTimeSelectControl timeControl = new BottomTimeSelectControl(hRange, mRange,3,Language.StringByID(StringId.AnionTime)); |
| | | |
| | | |
| | | timeControl.RowHeight = Application.GetRealHeight(50); |
| | | timeControl.InitControl(0, 1, 162); |
| | | |
| | | timeControl.ChangePickerEvent(); |
| | | |
| | | timeControl.FinishEvent = (type, hours, min) => { |
| | | if (type == 1)//0:åæ¶ï¼1:ç¡®å® |
| | | { |
| | | HdlThreadLogic.Current.RunThread(() => |
| | | { |
| | | var time = hours * 60 + min; |
| | | var dic = new Dictionary<string, string>(); |
| | | dic.Add(FunctionAttributeKey.AnionTime, time.ToString()); |
| | | Control.Ins.SendWriteCommand(this.device, dic); |
| | | HdlThreadLogic.Current.RunMain(() => |
| | | { |
| | | anionTimeCell.BtnSubtitle.Text = time / 60 + Language.StringByID(StringId.HourUint) + time % 60 + Language.StringByID(StringId.MinuteUint); |
| | | }); |
| | | }); |
| | | } |
| | | }; |
| | | }; |
| | | } |
| | | else |
| | | { |
| | | disinfectTimeCell.LineView.RemoveFromParent(); |
| | | } |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | | |
| | | //--------------------------------------- |
| | | public partial class ClothesHangerSetTimePage |
| | | { |
| | | |
| | | } |
| | | |
| | | //======================================== |
| | | |
| | | |
| | | } |
| | |
| | | /// </summary>
|
| | | private void RefreshNowDeviceStatuMemory(Function i_LocalDevice)
|
| | | {
|
| | | foreach (var data in i_LocalDevice.status)
|
| | | for (int i = 0; i < i_LocalDevice.status.Count; i++)
|
| | | {
|
| | | var data = i_LocalDevice.status[i];
|
| | | //模å¼
|
| | | if (data.key == "mode") { this.airCleanerData.Mode = data.value; }
|
| | | //é£éæ¡£ä½
|
| | |
| | | /// </summary>
|
| | | private void RefreshNowDeviceStatuMemory(Function i_LocalDevice)
|
| | | {
|
| | | foreach (var data in i_LocalDevice.status)
|
| | | for (int i = 0; i < i_LocalDevice.status.Count; i++)
|
| | | {
|
| | | var data = i_LocalDevice.status[i];
|
| | | //å¼å
³
|
| | | if (data.key == "on_off") { this.fanData.Open = data.value == "on"; }
|
| | | //é£éæ¡£ä½
|
old mode 100755
new mode 100644
| | |
| | | dialogBody.AddChidren(menuContr);
|
| | |
|
| | | //èªå¨æ¸
æ«
|
| | | var iconPath = this.weepRobotData.Mode == "random" ? "FunctionIcon/Electrical/WeepRobot/AutoModeSelect.png" : "FunctionIcon/Electrical/WeepRobot/AutoMode.png";
|
| | | menuContr.AddRowMenu(Language.StringByID(StringId.AutoClean), iconPath, this.weepRobotData.Mode == "random", () =>
|
| | | {
|
| | | frameBack.Close();
|
| | | //å鿍¡å¼å½ä»¤
|
| | | this.SendComand("mode", "random");
|
| | | });
|
| | |
|
| | | //å®ç¹æ¸
æ«
|
| | | iconPath = this.weepRobotData.Mode == "smart" ? "FunctionIcon/Electrical/WeepRobot/FixedPointModeSelect.png" : "FunctionIcon/Electrical/WeepRobot/FixedPointMode.png";
|
| | | menuContr.AddRowMenu(Language.StringByID(StringId.FixedPointClean), iconPath, this.weepRobotData.Mode == "smart", () =>
|
| | | var iconPath = this.weepRobotData.Mode == "smart" ? "FunctionIcon/Electrical/WeepRobot/AutoModeSelect.png" : "FunctionIcon/Electrical/WeepRobot/AutoMode.png";
|
| | | menuContr.AddRowMenu(Language.StringByID(StringId.AutoClean), iconPath, this.weepRobotData.Mode == "smart", () =>
|
| | | {
|
| | | frameBack.Close();
|
| | | //å鿍¡å¼å½ä»¤
|
| | | this.SendComand("mode", "smart");
|
| | | });
|
| | |
|
| | | //åºåæ¸
æ«
|
| | | //éæºæ¸
æ«
|
| | | 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";
|
| | | menuContr.AddRowMenu(Language.StringByID(StringId.AreaClean), iconPath, this.weepRobotData.Mode == "spiral", () =>
|
| | | menuContr.AddRowMenu(Language.StringByID(StringId.SpiralClean), iconPath, this.weepRobotData.Mode == "spiral", () =>
|
| | | {
|
| | | frameBack.Close();
|
| | | //å鿍¡å¼å½ä»¤
|
| | |
| | | }
|
| | | 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.FixedPointClean;
|
| | | this.btnModeView.TextID = StringId.RandomClean;
|
| | | }
|
| | | else if (this.weepRobotData.Mode == "wall_follow")
|
| | | {
|
| | |
| | | }
|
| | | else if (this.weepRobotData.Mode == "spiral")
|
| | | {
|
| | | //åºåæ¸
æ«
|
| | | //èºææ¸
æ«
|
| | | this.btnModeIcon.UnSelectedImagePath = "FunctionIcon/Electrical/WeepRobot/AreaMode.png";
|
| | | this.btnModeIcon.SelectedImagePath = "FunctionIcon/Electrical/WeepRobot/AreaModeSelect.png";
|
| | | this.btnModeView.TextID = StringId.AreaClean;
|
| | | this.btnModeView.TextID = StringId.SpiralClean;
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | /// </summary>
|
| | | public string Suction = string.Empty;
|
| | | /// <summary>
|
| | | /// 工使¨¡å¼(random:èªå¨æ¸
æ« smart:å®ç¹æ¸
æ« wall_follow:æ²¿å¢æ¸
æ« spiral:åºåæ¸
æ« chargego:å
çµ)
|
| | | /// 工使¨¡å¼(smart:èªå¨æ¸
æ« random:éæºæ¸
æ« wall_follow:æ²¿å¢æ¸
æ« spiral:èºææ¸
æ« chargego:å
çµ)
|
| | | /// </summary>
|
| | | public string Mode = string.Empty;
|
| | | /// <summary>
|