From b7591dba0127890e24eb1ae41e150a0ad8ee1a51 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期五, 17 七月 2020 11:49:21 +0800 Subject: [PATCH] 2020-07-17 1.修复在大屏幕手机,部分界面图标会变形问题. --- Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs | 4 Crabtree/SmartHome/UI/SimpleControl/Phone/Scene/UserAddSceneDevice.cs | 34 ++++-- Crabtree/.vs/SmartHome/xs/sqlite3/storage.ide-wal | 0 Crabtree/.vs/SmartHome/xs/sqlite3/storage.ide | 0 Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountRegistration.cs | 8 Crabtree/SmartHome/UI/SimpleControl/Phone/Scene/UserScenePage.cs | 3 Crabtree/SmartHome/UI/SimpleControl/MainPage.cs | 2 Crabtree/SmartHome/UI/SimpleControl/Phone/Fan/UserFan.cs | 4 Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountModifyPassword.cs | 19 ++- Crabtree/SmartHome/UI/SimpleControl/Phone/Alexa/AlexaDeviceListPage.cs | 27 ++++ Crabtree/SmartHome/UI/SimpleControl/Phone/Light/UserDeviceToLight.cs | 8 Crabtree/ON/Properties/AndroidManifest.xml | 2 Crabtree/SmartHome/UI/SimpleControl/Phone/Light/UserLightPage.cs | 18 +- Crabtree/SmartHome/UI/SimpleControl/Phone/Room/UserRoom.cs | 8 Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserMiddle.cs | 6 Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserSettingView.cs | 26 +++++ Crabtree/SmartHome/UI/SimpleControl/Phone/AC/UserDeviceToAC.cs | 8 Crabtree/SmartHome/UI/SimpleControl/Phone/Alexa/AlexaSettingPage.cs | 8 Crabtree/SmartHome/UI/SimpleControl/Phone/Register/ForgotPassword.cs | 7 Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/AddSchedule.cs | 2 Crabtree/.vs/SmartHome/xs/sqlite3/storage.ide-shm | 0 Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountLogin.cs | 8 Crabtree/SmartHome/UI/SimpleControl/Phone/Register/Databackup.cs | 8 Crabtree/.vs/SmartHome/xs/UserPrefs.xml | 30 ++++- Crabtree/SmartHome/UI/SimpleControl/Phone/Scene/UserDeviceToScene.cs | 3 25 files changed, 162 insertions(+), 81 deletions(-) diff --git a/Crabtree/.vs/SmartHome/xs/UserPrefs.xml b/Crabtree/.vs/SmartHome/xs/UserPrefs.xml index 1923ce1..9fa61ac 100644 --- a/Crabtree/.vs/SmartHome/xs/UserPrefs.xml +++ b/Crabtree/.vs/SmartHome/xs/UserPrefs.xml @@ -1,8 +1,11 @@ -锘�<Properties StartupConfiguration="{1D83BF28-BA88-4152-BA41-D7EFE90A5437}|Default"> - <MonoDevelop.Ide.ItemProperties.ON.Droid PreferredExecutionTarget="Android.Android_Accelerated_Oreo" /> - <MonoDevelop.Ide.Workbench ActiveDocument="SmartHome/UI/SimpleControl/Phone/Scene/UserAddSceneDevice.cs"> +锘�<Properties StartupConfiguration="{9D9EF20B-6E65-4A65-92BF-567EBF1E1443}|Default"> + <MonoDevelop.Ide.ItemProperties.ON.Droid PreferredExecutionTarget="Android.364c4b3158493098" /> + <MonoDevelop.Ide.Workbench> <Files> - <File FileName="SmartHome/UI/SimpleControl/Phone/Scene/UserAddSceneDevice.cs" Line="1" Column="1" /> + <File FileName="SmartHome/UI/SimpleControl/Phone/Light/UserLightPage.cs" Line="799" Column="25" /> + <File FileName="SmartHome/UI/SimpleControl/Phone/User/UserMiddle.cs" /> + <File FileName="SmartHome/UI/SimpleControl/Phone/Alexa/AlexaSceneEditPage.cs" Line="1" Column="1" /> + <File FileName="SmartHome/UI/SimpleControl/Phone/Alexa/AlexaDeviceListPage.cs" Line="1" Column="1" /> </Files> <Pads> <Pad Id="ProjectPad"> @@ -12,12 +15,25 @@ <Node name="Properties" expanded="True" /> </Node> <Node name="Shared" expanded="True"> + <Node name="HDL" expanded="True"> + <Node name="Operation" expanded="True" /> + </Node> <Node name="UI" expanded="True"> <Node name="SimpleControl" expanded="True"> <Node name="Phone" expanded="True"> - <Node name="Scene" expanded="True"> - <Node name="UserAddSceneDevice.cs" selected="True" /> + <Node name="AC" expanded="True" /> + <Node name="Alexa" expanded="True"> + <Node name="AlexaDeviceListPage.cs" selected="True" /> </Node> + <Node name="Curtain" expanded="True" /> + <Node name="Fan" expanded="True" /> + <Node name="Guide" expanded="True" /> + <Node name="Light" expanded="True" /> + <Node name="Register" expanded="True" /> + <Node name="Room" expanded="True" /> + <Node name="Scene" expanded="True" /> + <Node name="Schedule" expanded="True" /> + <Node name="User" expanded="True" /> </Node> </Node> </Node> @@ -35,7 +51,7 @@ <String>DroidLib/DroidLib.csproj</String> </DisabledProjects> <MonoDevelop.Ide.Workspace ActiveConfiguration="Release|iPhone" /> - <MonoDevelop.Ide.ItemProperties.ON.Ios automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.254b82433419c7ca1850b1dfb524c79b7aeb0640" /> + <MonoDevelop.Ide.ItemProperties.ON.Ios automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.446FF651-C1E0-4C68-805D-F62274849738" /> <MonoDevelop.Ide.DebuggingService.Breakpoints> <BreakpointStore /> </MonoDevelop.Ide.DebuggingService.Breakpoints> diff --git a/Crabtree/.vs/SmartHome/xs/sqlite3/storage.ide b/Crabtree/.vs/SmartHome/xs/sqlite3/storage.ide index b271681..b95ffe6 100644 --- a/Crabtree/.vs/SmartHome/xs/sqlite3/storage.ide +++ b/Crabtree/.vs/SmartHome/xs/sqlite3/storage.ide Binary files differ diff --git a/Crabtree/.vs/SmartHome/xs/sqlite3/storage.ide-shm b/Crabtree/.vs/SmartHome/xs/sqlite3/storage.ide-shm new file mode 100644 index 0000000..ac0bdc9 --- /dev/null +++ b/Crabtree/.vs/SmartHome/xs/sqlite3/storage.ide-shm Binary files differ diff --git a/Crabtree/.vs/SmartHome/xs/sqlite3/storage.ide-wal b/Crabtree/.vs/SmartHome/xs/sqlite3/storage.ide-wal new file mode 100644 index 0000000..78d0268 --- /dev/null +++ b/Crabtree/.vs/SmartHome/xs/sqlite3/storage.ide-wal Binary files differ diff --git a/Crabtree/ON/Properties/AndroidManifest.xml b/Crabtree/ON/Properties/AndroidManifest.xml index de66089..1f7fbb8 100644 --- a/Crabtree/ON/Properties/AndroidManifest.xml +++ b/Crabtree/ON/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@ 锘�<?xml version="1.0" encoding="utf-8"?> -<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.hdl.crabtreenew" android:versionName="2.507091" android:versionCode="202007091"> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.hdl.crabtreenew" android:versionName="2.507171" android:versionCode="202007171"> <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="28" /> <!-- 鍦ㄥ畨鍗揚鐗堟湰涔嬪悗锛屽繀椤昏鎺堜簣FOREGROUND_SERVICE鏉冮檺锛屾墠鑳藉浣跨敤鍓嶅彴鏈嶅姟 --> <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> diff --git a/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs b/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs index 3ced117..cceebea 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs @@ -38,7 +38,7 @@ //public static Button LogoButton = new Button (); - public static string RequestVersion = "2.507091"; + public static string RequestVersion = "2.507171"; public static UserInfo LoginUser; /// <summary> /// 鏄惁鏄鐞嗗憳鏉冮檺(鍙樻洿浜�,鎴愬憳鐨勬椂鍊�,杩欎釜涔熶负ture銆備负浠�涔堜細澹版槑杩欐牱鍙橀噺,鍥犱负鏈変簺鎺ュ彛蹇呴』浣跨敤鍘熸潵鐨凾oken) diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/AC/UserDeviceToAC.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/AC/UserDeviceToAC.cs index 2e406ce..a059f8a 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/AC/UserDeviceToAC.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/AC/UserDeviceToAC.cs @@ -209,8 +209,8 @@ Button btnMode = new Button () { X = Application.GetRealWidth (40), Y = Application.GetRealHeight (40), - Width = Application.GetRealWidth (100), - Height = Application.GetRealHeight (100), + Width = Application.GetMinRealAverage (100), + Height = Application.GetMinRealAverage (100), Tag = "Mode" }; acView.AddChidren (btnMode); @@ -220,8 +220,8 @@ Button btnWind = new Button () { X = btnMode.Right + Application.GetRealWidth (20), Y = Application.GetRealHeight (40), - Width = Application.GetRealWidth (100), - Height = Application.GetRealHeight (100), + Width = Application.GetMinRealAverage (100), + Height = Application.GetMinRealAverage (100), Tag = "Wind" }; acView.AddChidren (btnWind); diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Alexa/AlexaDeviceListPage.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Alexa/AlexaDeviceListPage.cs index b84d940..13c4fea 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Alexa/AlexaDeviceListPage.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Alexa/AlexaDeviceListPage.cs @@ -447,7 +447,7 @@ deviceList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<UpdateDeviceObj>> (revertObj.ResponseData.ToString ()); } else { //2020-06-29 寮圭獥鎻愮ず閿欒 - + ShowErrorInfo (revertObj.StateCode); } return deviceList; @@ -516,6 +516,26 @@ }); } + } + + /// <summary> + /// 閿欒鎻愰啋 + /// </summary> + /// <param name="stateCodeStr"></param> + void ShowErrorInfo (string stateCodeStr) + { + string mes = ""; + if (stateCodeStr == ErrorCode.NetworkError) { + mes = ErrorCode.NetworkError; + } else { + mes = ErrorCode.OperationFailed + ErrorCode.Reason + stateCodeStr; + + } + if (!string.IsNullOrEmpty (mes)) { + Application.RunOnMainThread (() => { + MainPage.AddTip (ErrorCode.AddFailed + " " + mes); + }); + } } @@ -531,7 +551,7 @@ return true; } else { //2020-06-29 寮圭獥鎻愮ず閿欒 - + ShowErrorInfo (revertObj.StateCode); } return false; } @@ -551,6 +571,7 @@ sceneList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<SceneByRegion>> (revertObj.ResponseData.ToString ()); } else { //2020-06-29 寮圭獥鎻愮ず閿欒 + ShowErrorInfo (revertObj.StateCode); } return sceneList; } @@ -608,7 +629,7 @@ return true; } else { //2020-06-29 寮圭獥鎻愮ず閿欒 - + ShowErrorInfo (revertObj.StateCode); } return false; } diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Alexa/AlexaSettingPage.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Alexa/AlexaSettingPage.cs index d4599bb..d8d9f65 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Alexa/AlexaSettingPage.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Alexa/AlexaSettingPage.cs @@ -84,8 +84,8 @@ chooseTypeView.AddChidren (btnEquipmentIcon); Button btnDrodIcon = new Button () { X = Application.GetRealWidth (540), - Height = Application.GetRealHeight (46), - Width = Application.GetRealWidth (47), + Height = Application.GetMinRealAverage (46), + Width = Application.GetMinRealAverage (47), UnSelectedImagePath = "Item/Down.png", SelectedImagePath = "Item/DownSelected.png", Gravity = Gravity.CenterVertical, @@ -453,8 +453,8 @@ var btnChoose = new Button () { X = Application.GetRealWidth (472 + 80), - Width = Application.GetRealWidth (75), - Height = Application.GetRealHeight (72), + Width = Application.GetMinRealAverage (75), + Height = Application.GetMinRealAverage (72), Gravity = Gravity.CenterVertical, UnSelectedImagePath = "CrabtreeAdd/Choose.png", SelectedImagePath = "CrabtreeAdd/ChooseOn.png", diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Fan/UserFan.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Fan/UserFan.cs index 594ed1d..abd1a13 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Fan/UserFan.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Fan/UserFan.cs @@ -220,8 +220,8 @@ btnBottomSwitch = new Button () { X = Application.GetRealWidth (212), Y = speedView.Bottom + Application.GetRealHeight (250), - Width = Application.GetRealWidth (215), - Height = Application.GetRealHeight (95), + Width = Application.GetMinRealAverage (215), + Height = Application.GetMinRealAverage (95), SelectedImagePath = "Fan/FanSwitchOn.png", UnSelectedImagePath = "Fan/FanSwitch.png", IsSelected = fanModule.Switch != 0 diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs index 16fba51..34288c5 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs @@ -97,8 +97,8 @@ }; var btnSearch = new Button () { - Width = Application.GetRealWidth (75), - Height = Application.GetRealHeight (75), + Width = Application.GetMinRealAverage (75), + Height = Application.GetMinRealAverage (75), X = Application.GetRealWidth (520), Y = Application.GetRealHeight (10), UnSelectedImagePath = "Item/Refresh.png", diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Light/UserDeviceToLight.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Light/UserDeviceToLight.cs index bea059b..ad804e0 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Light/UserDeviceToLight.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Light/UserDeviceToLight.cs @@ -516,8 +516,8 @@ roomView.AddChidren (btnNumber); Button btnLightIcon = new Button () { - Width = Application.GetRealWidth (100), - Height = Application.GetRealHeight (80), + Width = Application.GetMinRealAverage (100), + Height = Application.GetMinRealAverage (80), Gravity = Gravity.CenterVertical, UnSelectedImagePath = "Item/RH_Lights.png", SelectedImagePath = "Item/RH_LightsSelected.png", @@ -577,8 +577,8 @@ Button downSelectedButton = new Button () { X = Application.GetRealWidth (550), - Height = Application.GetRealHeight (50), - Width = Application.GetRealWidth (55), + Height = Application.GetMinRealAverage (50), + Width = Application.GetMinRealAverage (55), UnSelectedImagePath = "Item/Down.png", SelectedImagePath = "Item/DownSelected.png", Gravity = Gravity.CenterVertical, diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Light/UserLightPage.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Light/UserLightPage.cs index dad8fa1..cb95546 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Light/UserLightPage.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Light/UserLightPage.cs @@ -131,7 +131,7 @@ }; var btnAddLightScene = new Button () { Width = Application.GetRealWidth (100), - Height = Application.GetRealHeight (100), + Height = Application.GetRealWidth (100), X = Application.GetRealWidth (640 - 120), Y = Application.GetRealHeight (20), UnSelectedImagePath = "Light/UserLightAddScene.png", @@ -256,7 +256,7 @@ }; Button btnSIcon = new Button () { Width = Application.GetRealWidth(111), - Height = Application.GetRealHeight(110), + Height = Application.GetRealWidth(110), Gravity = Gravity.CenterVertical, UnSelectedImagePath = scene.SceneIconPath, SelectedImagePath = scene.SceneIconPath, @@ -670,8 +670,8 @@ lightView.AddChidren (tempLightName); var tempSiwtch = new Button () { - Width = Application.GetRealWidth (85), - Height = Application.GetRealHeight (53), + Width = Application.GetMinRealAverage (85), + Height = Application.GetMinRealAverage (53), X = Application.GetRealWidth (640 - 90 - 20), Gravity = Gravity.CenterVertical, UnSelectedImagePath = "Item/SwitchClose.png", @@ -1029,8 +1029,8 @@ }; //寮�鍏虫寜閿� var tempSwitch = new Button () { - Width = Application.GetRealWidth (90), - Height = Application.GetRealHeight (53), + Width = Application.GetMinRealAverage (90), + Height = Application.GetMinRealAverage (53), X = Application.GetRealWidth (640 - 90 - 20), Gravity = Gravity.CenterVertical, UnSelectedImagePath = "Item/SwitchClose.png", @@ -1194,7 +1194,7 @@ lightView.AddChidren (btnLightSetting); Button btnRGBSetting = new Button () { Width = Application.GetRealWidth (60), - Height = Application.GetRealHeight (60), + Height = Application.GetRealWidth (60), Radius = (uint)Application.GetRealHeight (30), X = tempLightSeekBar.Right + Application.GetRealWidth (20), Gravity = Gravity.CenterVertical, @@ -1567,8 +1567,8 @@ #endregion //寮�鍏虫寜閿� var tempSwitch = new Button () { - Width = Application.GetRealWidth (90), - Height = Application.GetRealHeight (53), + Width = Application.GetMinRealAverage (90), + Height = Application.GetMinRealAverage (53), X = Application.GetRealWidth (640 - 90 - 20), Gravity = Gravity.CenterVertical, UnSelectedImagePath = "Item/SwitchClose.png", diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountLogin.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountLogin.cs index dd9080a..ed63141 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountLogin.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountLogin.cs @@ -78,10 +78,10 @@ }; #if DEBUG - //etAccount.Text = "18926269190@189.cn"; + etAccount.Text = "18926269190@189.cn"; //etAccount.Text = "721343314@qq.com"; //etAccount.Text = "crabtreel12019@gmail.com"; - etAccount.Text = "2791308028@qq.com"; + //etAccount.Text = "2791308028@qq.com"; #endif accountView.AddChidren (etAccount); @@ -141,8 +141,8 @@ Button btnShowPassword = new Button () { X = etPasswrod.Right, Y = etPasswrod.Y + Application.GetRealHeight (12), - Width = Application.GetRealWidth (73), - Height = Application.GetRealHeight (60), + Width = Application.GetMinRealAverage (73), + Height = Application.GetMinRealAverage (60), UnSelectedImagePath = "CrabtreeAdd/HidePW.png", SelectedImagePath = "CrabtreeAdd/ShowPW.png", BorderColor = SkinStyle.Current.Transparent, diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountModifyPassword.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountModifyPassword.cs index 4f4b0be..9e869be 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountModifyPassword.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountModifyPassword.cs @@ -68,10 +68,11 @@ }; BodyView.AddChidren (ResetPasswrodView); + var viewX = (Application.GetRealWidth (640) - Application.GetMinRealAverage (500)) / 2; var curPasswordView = new FrameLayout () { - Width = Application.GetRealWidth (500), - Height = Application.GetRealHeight (90), - X = Application.GetRealWidth (70), + Width = Application.GetMinRealAverage (500), + Height = Application.GetMinRealAverage (90), + X = viewX, Y = Application.GetRealHeight (200), BackgroundImagePath = "Register/Register_Password_kuang.png", }; @@ -89,9 +90,9 @@ curPasswordView.AddChidren (etCurPassword); var newPasswordView = new FrameLayout () { - Width = Application.GetRealWidth (500), - Height = Application.GetRealHeight (90), - X = Application.GetRealWidth (70), + Width = Application.GetMinRealAverage (500), + Height = Application.GetMinRealAverage (90), + X = viewX, Y = curPasswordView.Bottom + Application.GetRealHeight (70), BackgroundImagePath = "Register/Register_Password_kuang.png", Radius = (uint)Application.GetRealHeight (0), @@ -110,9 +111,9 @@ newPasswordView.AddChidren (etNewPassword); var confrimFpasswordView = new FrameLayout () { - Width = Application.GetRealWidth (500), - Height = Application.GetRealHeight (90), - X = Application.GetRealWidth (70), + Width = Application.GetMinRealAverage (500), + Height = Application.GetMinRealAverage (90), + X = viewX, Y = newPasswordView.Bottom + Application.GetRealHeight (70), BackgroundImagePath = "Register/Register_Password_kuang.png", }; diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountRegistration.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountRegistration.cs index 1e7b07b..63d65c5 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountRegistration.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountRegistration.cs @@ -146,8 +146,8 @@ Button btnShowPassword = new Button () { X = etPasswrod.Right - Application.GetRealWidth (80), Y = etPasswrod.Y + Application.GetRealHeight (12), - Width = Application.GetRealWidth (73), - Height = Application.GetRealHeight (60), + Width = Application.GetMinRealAverage (73), + Height = Application.GetMinRealAverage (60), SelectedImagePath = "CrabtreeAdd/ShowPW.png", UnSelectedImagePath = "CrabtreeAdd/HidePW.png", BorderColor = SkinStyle.Current.Transparent, @@ -189,8 +189,8 @@ Button btnShowPassword2 = new Button () { X = etPasswrod.Right - Application.GetRealWidth (80), Y = etConfirmPassword.Y + Application.GetRealHeight (12), - Width = Application.GetRealWidth (73), - Height = Application.GetRealHeight (60), + Width = Application.GetMinRealAverage (73), + Height = Application.GetMinRealAverage (60), SelectedImagePath = "CrabtreeAdd/ShowPW.png", UnSelectedImagePath = "CrabtreeAdd/HidePW.png", BorderColor = SkinStyle.Current.Transparent, diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/Databackup.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/Databackup.cs index 3766068..1d87585 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/Databackup.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/Databackup.cs @@ -73,7 +73,7 @@ var btnPoint = new Button () { Width = Application.GetRealWidth (10), - Height = Application.GetRealHeight (10), + Height = Application.GetRealWidth (10), X = Application.GetRealWidth (50), Gravity = Gravity.CenterVertical, UnSelectedImagePath = "Item/Point.png", @@ -401,7 +401,7 @@ var btnPoint = new Button () { Width = Application.GetRealWidth (10), - Height = Application.GetRealHeight (10), + Height = Application.GetRealWidth (10), X = Application.GetRealWidth (25), Gravity = Gravity.CenterVertical, UnSelectedImagePath = "Item/Point.png", @@ -439,8 +439,8 @@ rowView.AddChidren (backupIcon); var Backup_restores = new Button () { - Width = Application.GetRealWidth (56), - Height = Application.GetRealHeight (57), + Width = Application.GetMinRealAverage (56), + Height = Application.GetMinRealAverage (57), X = backupIcon.Right + Application.GetRealWidth (20), UnSelectedImagePath = "Register/Backup_ restores.png", SelectedImagePath = "Register/Backup_ restores_on.png", diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/ForgotPassword.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/ForgotPassword.cs index 76a63f9..c1f0f72 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/ForgotPassword.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/ForgotPassword.cs @@ -139,10 +139,11 @@ void EmailForgot (FrameLayout FrameLayoutView) { FrameLayoutView.RemoveAll (); + var viewX = (Application.GetRealWidth (640) - Application.GetMinRealAverage (500)) / 2; EditText Register_Email_Address = new EditText () { - Width = Application.GetRealWidth (500), - Height = Application.GetRealHeight (85), - X = Application.GetRealWidth (70), + Width = Application.GetMinRealAverage (500), + Height = Application.GetMinRealAverage (85), + X = viewX, Y = Application.GetRealHeight (100), UnSelectedImagePath = "Register/Register_Email_Address.png", PlaceholderTextColor = SkinStyle.Current.PlaceholderTextColor, diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Room/UserRoom.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Room/UserRoom.cs index c8cfb7a..1fa0179 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Room/UserRoom.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Room/UserRoom.cs @@ -923,8 +923,8 @@ Button btnMode = new Button () { X = Application.GetRealWidth (20), Y = Application.GetRealHeight (40), - Width = Application.GetRealWidth (100), - Height = Application.GetRealHeight (100), + Width = Application.GetMinRealAverage (100), + Height = Application.GetMinRealAverage (100), Tag = "Mode" }; acRowView.AddChidren (btnMode); @@ -934,8 +934,8 @@ Button btnWind = new Button () { X = btnMode.Right + Application.GetRealWidth (0), Y = Application.GetRealHeight (40), - Width = Application.GetRealWidth (100), - Height = Application.GetRealHeight (100), + Width = Application.GetMinRealAverage (100), + Height = Application.GetMinRealAverage (100), Tag = "Wind" }; acRowView.AddChidren (btnWind); diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Scene/UserAddSceneDevice.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Scene/UserAddSceneDevice.cs index e2b225e..4e53bb6 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Scene/UserAddSceneDevice.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Scene/UserAddSceneDevice.cs @@ -1099,18 +1099,24 @@ btnOpenCurtain.IsSelected = false; btnStopCurtain.IsSelected = false; curtainmodel.Status = (CurtainStatus)2; + Control.ControlBytesSend (Command.UpdataCurtainModelStutas, curtainmodel.SubnetID, curtainmodel.DeviceID, + new byte [] { curtainmodel.LoopID, (byte)curtainmodel.Status }); }; btnOpenCurtain.MouseUpEventHandler += (sender3, e3) => { btnCloseCurtain.IsSelected = false; btnOpenCurtain.IsSelected = true; btnStopCurtain.IsSelected = false; curtainmodel.Status = (CurtainStatus)1; + Control.ControlBytesSend (Command.UpdataCurtainModelStutas, curtainmodel.SubnetID, curtainmodel.DeviceID, + new byte [] { curtainmodel.LoopID, (byte)curtainmodel.Status }); }; btnStopCurtain.MouseUpEventHandler += (sender3, e3) => { btnCloseCurtain.IsSelected = false; btnOpenCurtain.IsSelected = false; btnStopCurtain.IsSelected = true; curtainmodel.Status = (CurtainStatus)0; + Control.ControlBytesSend (Command.UpdataCurtainModelStutas, curtainmodel.SubnetID, curtainmodel.DeviceID, + new byte [] { curtainmodel.LoopID, (byte)curtainmodel.Status }); }; if (curtainmodel.Status == 0) { btnStopCurtain.IsSelected = true; @@ -1327,11 +1333,11 @@ Y = tempSeekBarFrame.Bottom + Application.GetRealHeight (40), }; dialogBodyLayout.AddChidren (btnOpenCurtain); - btnOpenCurtain.MouseUpEventHandler += (sender, e) => { - Control.ControlBytesSend (Command.UpdataCurtainModelStutas, curtainroller.SubnetID, curtainroller.DeviceID, new byte [] { 17, 100 }); - horizontalSeekBar.Progress = 100; - btnMaxBrightness.Text = "100%"; - }; + //btnOpenCurtain.MouseUpEventHandler += (sender, e) => { + // Control.ControlBytesSend (Command.UpdataCurtainModelStutas, curtainroller.SubnetID, curtainroller.DeviceID, new byte [] { 17, 100 }); + // horizontalSeekBar.Progress = 100; + // btnMaxBrightness.Text = "100%"; + //}; Button btnOpenLbl = new Button () { Width = Application.GetRealWidth (124), Height = Application.GetRealHeight (30), @@ -1370,11 +1376,11 @@ SelectedImagePath = "Curtain/CurtainRollerDownOn.png", }; dialogBodyLayout.AddChidren (btnCloseCurtain); - btnCloseCurtain.MouseUpEventHandler += (sender, e) => { - Control.ControlBytesSend (Command.UpdataCurtainModelStutas, curtainroller.SubnetID, curtainroller.DeviceID, new byte [] { 17, 0 }); - horizontalSeekBar.Progress = 0; - btnMaxBrightness.Text = "0%"; - }; + //btnCloseCurtain.MouseUpEventHandler += (sender, e) => { + // Control.ControlBytesSend (Command.UpdataCurtainModelStutas, curtainroller.SubnetID, curtainroller.DeviceID, new byte [] { 17, 0 }); + // horizontalSeekBar.Progress = 0; + // btnMaxBrightness.Text = "0%"; + //}; Button btnCloseLbl = new Button () { Width = Application.GetRealWidth (124), Height = Application.GetRealHeight (30), @@ -1386,16 +1392,24 @@ }; dialogBodyLayout.AddChidren (btnCloseLbl); btnCloseCurtain.MouseUpEventHandler += (sender3, e3) => { + Control.ControlBytesSend (Command.UpdataCurtainModelStutas, curtainroller.SubnetID, curtainroller.DeviceID, new byte [] { 17, 0 }); + horizontalSeekBar.Progress = 0; + btnMaxBrightness.Text = "0%"; btnCloseCurtain.IsSelected = true; btnOpenCurtain.IsSelected = false; btnStopCurtain.IsSelected = false; curtainroller.Status = (CurtainStatus)2; + }; btnOpenCurtain.MouseUpEventHandler += (sender3, e3) => { + Control.ControlBytesSend (Command.UpdataCurtainModelStutas, curtainroller.SubnetID, curtainroller.DeviceID, new byte [] { 17, 100 }); + horizontalSeekBar.Progress = 100; + btnMaxBrightness.Text = "100%"; btnCloseCurtain.IsSelected = false; btnOpenCurtain.IsSelected = true; btnStopCurtain.IsSelected = false; curtainroller.Status = (CurtainStatus)1; + }; btnStopCurtain.MouseUpEventHandler += (sender3, e3) => { btnCloseCurtain.IsSelected = false; diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Scene/UserDeviceToScene.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Scene/UserDeviceToScene.cs index 25a2a5d..a9ccc52 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Scene/UserDeviceToScene.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Scene/UserDeviceToScene.cs @@ -198,7 +198,8 @@ }; sceneView.AddChidren (btnSceneName); var btnBGC = new Button () { - UnSelectedImagePath = "Item/sss.png", + //UnSelectedImagePath = "Item/sss.png", + UnSelectedImagePath = "Item/Transparent.png", SelectedImagePath = "Item/SceneSettingBackground.png", TextAlignment = TextAlignment.BottomCenter, Text = scene.Name, diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Scene/UserScenePage.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Scene/UserScenePage.cs index 9545f8e..edebe33 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Scene/UserScenePage.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Scene/UserScenePage.cs @@ -137,7 +137,8 @@ sceneView.AddChidren (btnSceneName); var btnBGC = new Button () { - UnSelectedImagePath = "Item/sss.png", + //UnSelectedImagePath = "Item/sss.png", + UnSelectedImagePath = "Item/Transparent.png", SelectedImagePath = "Item/SceneSettingBackground.png", TextAlignment = TextAlignment.BottomCenter, Text = scene.Name, diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/AddSchedule.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/AddSchedule.cs index ccd468f..0682b47 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/AddSchedule.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/AddSchedule.cs @@ -125,7 +125,7 @@ X = btnTime.Right + Application.GetRealWidth (190), Gravity = Gravity.CenterVertical, Width = Application.GetRealWidth (75), - Height = Application.GetRealHeight (75), + Height = Application.GetRealWidth (75), UnSelectedImagePath = "CrabtreeAdd/Timer.png", }; timeView.AddChidren (btnTimeIcon); diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserMiddle.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserMiddle.cs index ba2bf5d..d3d72c7 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserMiddle.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserMiddle.cs @@ -89,7 +89,7 @@ public static FrameLayout UserMenuItem = new FrameLayout () { Y = Application.GetRealHeight (Application.DesignHeight - userMenuItemHeight), - Height = Application.GetRealHeight (userMenuItemHeight+5), + Height = Application.GetMinRealAverage (userMenuItemHeight+5), BackgroundColor = SkinStyle.Current.MainColor }; @@ -102,8 +102,8 @@ public static Button btnLinkStatus = new Button () { Y = Application.GetRealHeight (10), - Width = Application.GetRealWidth (131), - Height = Application.GetRealHeight (80), + Width = Application.GetMinRealAverage (131), + Height = Application.GetMinRealAverage (80), UnSelectedImagePath = MainPage.WiFiStatus, }; diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserSettingView.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserSettingView.cs index 7dea5d0..7a5d96f 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserSettingView.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserSettingView.cs @@ -431,6 +431,8 @@ subView.ShowSubaccountListView (); UserMiddle.SettingPageView.PageIndex += 1; }); + } else { + ShowGetSubAccountByDistributedMarkErrorInfo (revertObj.StateCode); } } catch (Exception ex) { MainPage.FailureToServer (); @@ -590,5 +592,29 @@ dialog.Show (); } + + + /// <summary> + /// + /// </summary> + /// <param name="stateCodeStr"></param> + static void ShowGetSubAccountByDistributedMarkErrorInfo (string stateCodeStr) + { + string mes = ""; + + if (stateCodeStr == ErrorCode.NetworkError) { + mes = ErrorCode.NetworkError; + } else { + mes = ErrorCode.OperationFailed + ErrorCode.Reason + stateCodeStr; + } + if (!string.IsNullOrEmpty (mes)) { + Application.RunOnMainThread (() => { + new Alert ("", mes, Language.StringByID (R.MyInternationalizationString.Close)).Show (); + }); + } + + + } + } } \ No newline at end of file -- Gitblit v1.8.0