2020-07-17 1.修复在大屏幕手机,部分界面图标会变形问题.
| | |
| | | <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"> |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <?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" /> |
| | | <!-- 在安卓P版本之后,必须要授予FOREGROUND_SERVICE权限,才能够使用前台服务 --> |
| | | <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> |
| | |
| | | //public static Button LogoButton = new Button (); |
| | | |
| | | |
| | | public static string RequestVersion = "2.507091"; |
| | | public static string RequestVersion = "2.507171"; |
| | | public static UserInfo LoginUser; |
| | | /// <summary> |
| | | /// 是否是管理员权限(变更了,成员的时候,这个也为ture。为什么会声明这样变量,因为有些接口必须使用原来的Token) |
| | |
| | | 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); |
| | |
| | | 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); |
| | |
| | | deviceList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<UpdateDeviceObj>> (revertObj.ResponseData.ToString ()); |
| | | } else { |
| | | //2020-06-29 弹窗提示错误 |
| | | |
| | | ShowErrorInfo (revertObj.StateCode); |
| | | |
| | | } |
| | | return deviceList; |
| | |
| | | }); |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <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); |
| | | }); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | return true; |
| | | } else { |
| | | //2020-06-29 弹窗提示错误 |
| | | |
| | | ShowErrorInfo (revertObj.StateCode); |
| | | } |
| | | return false; |
| | | } |
| | |
| | | sceneList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<SceneByRegion>> (revertObj.ResponseData.ToString ()); |
| | | } else { |
| | | //2020-06-29 弹窗提示错误 |
| | | ShowErrorInfo (revertObj.StateCode); |
| | | } |
| | | return sceneList; |
| | | } |
| | |
| | | return true; |
| | | } else { |
| | | //2020-06-29 弹窗提示错误 |
| | | |
| | | ShowErrorInfo (revertObj.StateCode); |
| | | } |
| | | return false; |
| | | } |
| | |
| | | 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, |
| | |
| | | |
| | | 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", |
| | |
| | | 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 |
| | |
| | | }; |
| | | |
| | | 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", |
| | |
| | | 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", |
| | |
| | | |
| | | 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, |
| | |
| | | }; |
| | | 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", |
| | |
| | | }; |
| | | 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, |
| | |
| | | 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", |
| | |
| | | }; |
| | | //开关按键 |
| | | 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", |
| | |
| | | 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, |
| | |
| | | #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", |
| | |
| | | |
| | | }; |
| | | #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); |
| | |
| | | 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, |
| | |
| | | }; |
| | | 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", |
| | | }; |
| | |
| | | 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), |
| | |
| | | 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", |
| | | }; |
| | |
| | | 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, |
| | |
| | | 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, |
| | |
| | | |
| | | 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", |
| | |
| | | |
| | | 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", |
| | |
| | | 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", |
| | |
| | | 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, |
| | |
| | | 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); |
| | |
| | | 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); |
| | |
| | | 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; |
| | |
| | | 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), |
| | |
| | | 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), |
| | |
| | | }; |
| | | 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; |
| | |
| | | }; |
| | | 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, |
| | |
| | | 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, |
| | |
| | | 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); |
| | |
| | | |
| | | 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 |
| | | }; |
| | | |
| | |
| | | |
| | | 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, |
| | | }; |
| | | |
| | |
| | | subView.ShowSubaccountListView (); |
| | | UserMiddle.SettingPageView.PageIndex += 1; |
| | | }); |
| | | } else { |
| | | ShowGetSubAccountByDistributedMarkErrorInfo (revertObj.StateCode); |
| | | } |
| | | } catch (Exception ex) { |
| | | MainPage.FailureToServer (); |
| | |
| | | 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 (); |
| | | }); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | | } |