From 88b0bfe8a27e15717395e643db5814f34e3fc22f Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期五, 09 十二月 2022 16:30:48 +0800 Subject: [PATCH] 1.1 --- ON/Resources/values-zh/Styles.xml | 12 ++++ SmartHome/HDL/Operation/MyEnum.cs | 5 + ON/Resources/values/Strings.xml | 3 SmartHome/UI/SimpleControl/CommonPage.cs | 2 ON/Properties/AndroidManifest.xml | 2 ON/Resources/Resource.designer.cs | 81 +++++++++++++-------------- ON/Application.cs | 3 + ON/ON.Droid.csproj | 11 +++ ON/Resources/values-zh/Strings.xml | 7 ++ 9 files changed, 80 insertions(+), 46 deletions(-) diff --git a/ON/Application.cs b/ON/Application.cs index d043589..d0228a7 100644 --- a/ON/Application.cs +++ b/ON/Application.cs @@ -63,6 +63,7 @@ base.OnCreate (); initAll (); + Language.CurrentLanguage = "Chinese"; Locale locale1 = Locale.Default; @@ -70,6 +71,8 @@ Console.WriteLine ("褰撳墠璇█锛�" + localeList.Language); if (localeList.Language == "zh") { Language.CurrentLanguage = "Chinese"; + + } else { Language.CurrentLanguage = "English"; } diff --git a/ON/ON.Droid.csproj b/ON/ON.Droid.csproj index c703c61..12dd995 100644 --- a/ON/ON.Droid.csproj +++ b/ON/ON.Droid.csproj @@ -175,6 +175,17 @@ <SubType></SubType> <Generator></Generator> </AndroidResource> + <AndroidResource Include="Resources\values-zh\Strings.xml"> + <SubType></SubType> + <Generator></Generator> + </AndroidResource> + <AndroidResource Include="Resources\values-zh\Styles.xml"> + <SubType></SubType> + <Generator></Generator> + </AndroidResource> + </ItemGroup> + <ItemGroup> + <Folder Include="Resources\values-zh\" /> </ItemGroup> <Import Project="..\SmartHome\SmartHome.projitems" Label="Shared" Condition="Exists('..\SmartHome\SmartHome.projitems')" /> <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" /> diff --git a/ON/Properties/AndroidManifest.xml b/ON/Properties/AndroidManifest.xml index 62f68fc..8286764 100644 --- a/ON/Properties/AndroidManifest.xml +++ b/ON/Properties/AndroidManifest.xml @@ -4,7 +4,7 @@ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.INTERNET" /> - <application android:allowBackup="true" android:networkSecurityConfig="@xml/network_security_config" android:icon="@drawable/Icon" android:largeHeap="true" android:label="杩佺Щ宸ュ叿"> + <application android:allowBackup="true" android:networkSecurityConfig="@xml/network_security_config" android:icon="@drawable/Icon" android:largeHeap="true" android:name="@string/app_name" android:label="Migration Tools"> <provider android:name="android.support.v4.content.FileProvider" android:authorities="com.hdl.crabtree.fileProvider" android:grantUriPermissions="true" android:exported="false"> <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths" /> </provider> diff --git a/ON/Resources/Resource.designer.cs b/ON/Resources/Resource.designer.cs index 7dbb37d..70ab943 100644 --- a/ON/Resources/Resource.designer.cs +++ b/ON/Resources/Resource.designer.cs @@ -1368,124 +1368,121 @@ { // aapt resource value: 0x7F0C0000 - public const int ApplicationName = 2131492864; + public const int app_name = 2131492864; // aapt resource value: 0x7F0C0001 - public const int app_name = 2131492865; + public const int gd_activity_title = 2131492865; // aapt resource value: 0x7F0C0002 - public const int gd_activity_title = 2131492866; + public const int gd_cancel = 2131492866; // aapt resource value: 0x7F0C0003 - public const int gd_cancel = 2131492867; + public const int gd_myhome = 2131492867; // aapt resource value: 0x7F0C0004 - public const int gd_myhome = 2131492868; + public const int gd_notifyMsg = 2131492868; // aapt resource value: 0x7F0C0005 - public const int gd_notifyMsg = 2131492869; + public const int gd_notifyTitle = 2131492869; // aapt resource value: 0x7F0C0006 - public const int gd_notifyTitle = 2131492870; + public const int gd_save = 2131492870; // aapt resource value: 0x7F0C0007 - public const int gd_save = 2131492871; + public const int gd_search_tip = 2131492871; // aapt resource value: 0x7F0C0008 - public const int gd_search_tip = 2131492872; + public const int gd_select_distance = 2131492872; // aapt resource value: 0x7F0C0009 - public const int gd_select_distance = 2131492873; + public const int gd_setting = 2131492873; // aapt resource value: 0x7F0C000A - public const int gd_setting = 2131492874; + public const int hello = 2131492874; // aapt resource value: 0x7F0C000B - public const int hello = 2131492875; + public const int not_recognized_fingerprint_hint = 2131492875; // aapt resource value: 0x7F0C000C - public const int not_recognized_fingerprint_hint = 2131492876; + public const int pickerview_cancel = 2131492876; // aapt resource value: 0x7F0C000D - public const int pickerview_cancel = 2131492877; + public const int pickerview_day = 2131492877; // aapt resource value: 0x7F0C000E - public const int pickerview_day = 2131492878; + public const int pickerview_hours = 2131492878; // aapt resource value: 0x7F0C000F - public const int pickerview_hours = 2131492879; + public const int pickerview_minutes = 2131492879; // aapt resource value: 0x7F0C0010 - public const int pickerview_minutes = 2131492880; + public const int pickerview_month = 2131492880; // aapt resource value: 0x7F0C0011 - public const int pickerview_month = 2131492881; + public const int pickerview_seconds = 2131492881; // aapt resource value: 0x7F0C0012 - public const int pickerview_seconds = 2131492882; + public const int pickerview_submit = 2131492882; // aapt resource value: 0x7F0C0013 - public const int pickerview_submit = 2131492883; + public const int pickerview_year = 2131492883; // aapt resource value: 0x7F0C0014 - public const int pickerview_year = 2131492884; + public const int srl_component_falsify = 2131492884; // aapt resource value: 0x7F0C0015 - public const int srl_component_falsify = 2131492885; + public const int srl_content_empty = 2131492885; // aapt resource value: 0x7F0C0016 - public const int srl_content_empty = 2131492886; + public const int srl_footer_failed = 2131492886; // aapt resource value: 0x7F0C0017 - public const int srl_footer_failed = 2131492887; + public const int srl_footer_finish = 2131492887; // aapt resource value: 0x7F0C0018 - public const int srl_footer_finish = 2131492888; + public const int srl_footer_loading = 2131492888; // aapt resource value: 0x7F0C0019 - public const int srl_footer_loading = 2131492889; + public const int srl_footer_nothing = 2131492889; // aapt resource value: 0x7F0C001A - public const int srl_footer_nothing = 2131492890; + public const int srl_footer_pulling = 2131492890; // aapt resource value: 0x7F0C001B - public const int srl_footer_pulling = 2131492891; + public const int srl_footer_refreshing = 2131492891; // aapt resource value: 0x7F0C001C - public const int srl_footer_refreshing = 2131492892; + public const int srl_footer_release = 2131492892; // aapt resource value: 0x7F0C001D - public const int srl_footer_release = 2131492893; + public const int srl_header_failed = 2131492893; // aapt resource value: 0x7F0C001E - public const int srl_header_failed = 2131492894; + public const int srl_header_finish = 2131492894; // aapt resource value: 0x7F0C001F - public const int srl_header_finish = 2131492895; + public const int srl_header_loading = 2131492895; // aapt resource value: 0x7F0C0020 - public const int srl_header_loading = 2131492896; + public const int srl_header_pulling = 2131492896; // aapt resource value: 0x7F0C0021 - public const int srl_header_pulling = 2131492897; + public const int srl_header_refreshing = 2131492897; // aapt resource value: 0x7F0C0022 - public const int srl_header_refreshing = 2131492898; + public const int srl_header_release = 2131492898; // aapt resource value: 0x7F0C0023 - public const int srl_header_release = 2131492899; + public const int srl_header_secondary = 2131492899; // aapt resource value: 0x7F0C0024 - public const int srl_header_secondary = 2131492900; + public const int srl_header_update = 2131492900; // aapt resource value: 0x7F0C0025 - public const int srl_header_update = 2131492901; + public const int status_bar_notification_info_overflow = 2131492901; // aapt resource value: 0x7F0C0026 - public const int status_bar_notification_info_overflow = 2131492902; - - // aapt resource value: 0x7F0C0027 - public const int touch_fingerprint_sensor_hint = 2131492903; + public const int touch_fingerprint_sensor_hint = 2131492902; static String() { diff --git a/ON/Resources/values-zh/Strings.xml b/ON/Resources/values-zh/Strings.xml new file mode 100644 index 0000000..35aee3d --- /dev/null +++ b/ON/Resources/values-zh/Strings.xml @@ -0,0 +1,7 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="hello">Hello World, Click Me!</string> + <string name="app_name">杩佺Щ宸ュ叿</string> + +<!-- <string name="FilePath">/sdcard/APP_DownLoads/</string>--> +</resources> diff --git a/ON/Resources/values-zh/Styles.xml b/ON/Resources/values-zh/Styles.xml new file mode 100755 index 0000000..cc2ee0c --- /dev/null +++ b/ON/Resources/values-zh/Styles.xml @@ -0,0 +1,12 @@ +锘�<?xml version="1.0" encoding="UTF-8" ?> +<resources> + <!-- 鍏朵腑parent鍙互涓� android:Theme 鎴� android:Theme.NoTitleBar; android:windowBackground鍙互涓鸿儗鏅浘 --> + <style name="MyTheme" parent="@android:style/Theme.NoTitleBar.Fullscreen"> + <item name="android:windowBackground">@drawable/Loading</item> + <!-- 闅愯棌鐘舵�佹爮 --> + <item name="android:windowFullscreen">false</item> + <!-- 闅愯棌鏍囬鏍� --> + <item name="android:windowNoTitle">true</item> + <item name="android:windowTranslucentStatus">true</item> + </style> +</resources> diff --git a/ON/Resources/values/Strings.xml b/ON/Resources/values/Strings.xml old mode 100755 new mode 100644 index 7e24563..1dd0c6d --- a/ON/Resources/values/Strings.xml +++ b/ON/Resources/values/Strings.xml @@ -1,8 +1,7 @@ 锘�<?xml version="1.0" encoding="utf-8"?> <resources> <string name="hello">Hello World, Click Me!</string> - <string name="app_name">ON</string> - <string name="ApplicationName">HDL ON</string> + <string name="app_name">Migration Tools</string> <!-- <string name="FilePath">/sdcard/APP_DownLoads/</string>--> </resources> diff --git a/SmartHome/HDL/Operation/MyEnum.cs b/SmartHome/HDL/Operation/MyEnum.cs index a76f253..01e6e38 100644 --- a/SmartHome/HDL/Operation/MyEnum.cs +++ b/SmartHome/HDL/Operation/MyEnum.cs @@ -139,6 +139,11 @@ RCU = 0xFE04, SuperWireless = 0xFE05, DMX48 = 0xFD04, + Gateway1 = 0xFE02, + Gateway5 = 0xFE03, + Gateway4 = 0xFE06, + Gateway2 = 0xFE07, + Gateway3 = 0xFE08, /// <summary> /// 鎸夐敭闈㈡澘 /// </summary> diff --git a/SmartHome/UI/SimpleControl/CommonPage.cs b/SmartHome/UI/SimpleControl/CommonPage.cs index 4910531..7036563 100644 --- a/SmartHome/UI/SimpleControl/CommonPage.cs +++ b/SmartHome/UI/SimpleControl/CommonPage.cs @@ -88,7 +88,7 @@ return; } DeviceType deviceType = (DeviceType)(usefullBytes [2] * 256 + usefullBytes [3]); - if (usefullBytes [2] == 254 && usefullBytes [3] < 7) { + if (usefullBytes [2] == 254 && usefullBytes [3] < 8) { GatewayBase gatewayBase = new GatewayBase (); gatewayBase.DeviceTypeNumber = deviceTypeNumber; gatewayBase.SubnetID = subnetID; -- Gitblit v1.8.0