| | |
| | | <Properties StartupConfiguration="{28EDE1FF-20EF-476B-8AF8-24A3EEB69F45}|Default"> |
| | | <MonoDevelop.Ide.ItemProperties.GateWay.Droid PreferredExecutionTarget="Android.M7BBB18B19152766" /> |
| | | <MonoDevelop.Ide.ItemProperties.GateWay.Droid PreferredExecutionTarget="Android.SelectDevice" /> |
| | | <MonoDevelop.Ide.ItemProperties.GateWay.Ios automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.8c0bdb303f25d82c2a42fb8bfca449bfaca00260" /> |
| | | <MonoDevelop.Ide.ItemProperties.ShardLib PreferredExecutionTarget="Android.M7BBB18B19152766" /> |
| | | <MonoDevelop.Ide.Workbench ActiveDocument="Shared/Phone/Device/CommonForm/RoomMainView.cs"> |
| | | <MonoDevelop.Ide.Workbench ActiveDocument="Shared/R.cs"> |
| | | <Files> |
| | | <File FileName="Shared/R.cs" Line="2042" Column="35" /> |
| | | <File FileName="Shared/R.cs" Line="808" Column="2" /> |
| | | <File FileName="GateWay.Droid/Assets/Language.ini" /> |
| | | <File FileName="Shared/Phone/Device/Category/Category.cs" Line="1617" Column="112" /> |
| | | <File FileName="Shared/Phone/Device/Category/Category.cs" /> |
| | | <File FileName="Shared/Phone/Device/Category/SelectDevice.cs" /> |
| | | <File FileName="Shared/Common/Device.cs" /> |
| | | <File FileName="Shared/Phone/Device/CommonForm/RoomButton.cs" Line="7" Column="15" /> |
| | | <File FileName="Shared/Phone/Device/Category/SelectScene.cs" /> |
| | | <File FileName="Shared/Common/DeviceUI.cs" Line="468" Column="99" /> |
| | | <File FileName="Shared/Phone/UserView/UserHomeView.cs" Line="699" Column="35" /> |
| | | <File FileName="Shared/Phone/Device/CommonForm/RoomView.cs" Line="260" Column="21" /> |
| | | <File FileName="Shared/Phone/Device/Room/RoomManagement.cs" Line="173" Column="45" /> |
| | | <File FileName="Shared/Phone/Device/CommonForm/RoomMainView.cs" Line="30" Column="16" /> |
| | | <File FileName="Shared/Phone/UserView/UserHomeView.cs" /> |
| | | <File FileName="Shared/Phone/Device/Category/CategoryAddScene.cs" /> |
| | | <File FileName="Shared/Phone/Device/CommonForm/DeviceInfoEditRow.cs" /> |
| | | <File FileName="Shared/Common/DeviceUI.cs" /> |
| | | <File FileName="Shared/Phone/Device/CommonForm/RoomView.cs" /> |
| | | <File FileName="Shared/Phone/Device/CommonForm/DeviceInfoRow.cs" /> |
| | | </Files> |
| | | <Pads> |
| | | <Pad Id="ProjectPad"> |
| | | <State name="__root__"> |
| | | <Node name="GateWay" expanded="True"> |
| | | <Node name="GateWay.Droid" expanded="True"> |
| | | <Node name="Assets" expanded="True" /> |
| | | </Node> |
| | | <Node name="Shared" expanded="True"> |
| | | <Node name="Common" expanded="True" /> |
| | | <Node name="Phone" expanded="True"> |
| | | <Node name="Device" expanded="True"> |
| | | <Node name="CommonForm" expanded="True"> |
| | | <Node name="RoomMainView.cs" selected="True" /> |
| | | </Node> |
| | | <Node name="Room" expanded="True" /> |
| | | </Node> |
| | | <Node name="UserCenter" expanded="True"> |
| | | <Node name="CommonBase" expanded="True"> |
| | | <Node name="Common" expanded="True" /> |
| | | <Node name="Controls" expanded="True"> |
| | | <Node name="BaseCommonControl" expanded="True"> |
| | | <Node name="Base" expanded="True" /> |
| | | </Node> |
| | | <Node name="ClickButtonControls" expanded="True" /> |
| | | </Node> |
| | | </Node> |
| | | </Node> |
| | | <Node name="UserView" expanded="True" /> |
| | | </Node> |
| | | <Node name="R.cs" selected="True" /> |
| | | </Node> |
| | | </Node> |
| | | </State> |
| | |
| | | 10108=搜索 |
| | | 10109=完成 |
| | | 10110=账号登录 |
| | | 10111=发送验证码 |
| | | 10111=获取验证码 |
| | | 10112=后重发 |
| | | 10113=请再次输入密码 |
| | | 10114=发送验证码成功,请注意查收 |
| | |
| | | 10140=请输入长度为6-13个字符的密码 |
| | | 10141=你已被强制下线! |
| | | 10142=新密码和原密码一致 |
| | | 10143=请先获取验证码 |
| | | 10144=忘记密码? |
| | | 10145=已有账号?登录 |
| | | |
| | | |
| | | |
| | |
| | | 10155=操作失败 |
| | | 10156=发送验证码失败 |
| | | 10157=网关不在线 |
| | | 10158=下一步 |
| | | |
| | | |
| | | 10160=已是最新版本 |
| | | 10161=更新最新版 |
| | |
| | | 13506=5挡 |
| | | 13511=请清洁滤网 |
| | | |
| | | 13600=没功能 {\r\n} 请先添加 |
| | | 13601=没场景 {\r\n} 请先添加 |
| | | 13600=还没有功能哦 |
| | | 13601=还没有场景哦 |
| | | 13602=无 |
| | | 13603=获取中... |
| | | 13604=当前 亮度 |
| | | |
| | | |
| | | 15000=密码长度为{0}个字符 |
| | |
| | | /// </summary> |
| | | public uint GXCSelectedLineColor = 0xFFFC744B; |
| | | /// <summary> |
| | | /// 浅色线条 0xFFF5F6FA; |
| | | /// 浅色线条 0x80CCCCCC |
| | | /// </summary> |
| | | public uint GXCGrayLineColor = 0xFFF5F6FA; |
| | | public uint GXCGrayLineColor = 0x80CCCCCC; |
| | | /// <summary> |
| | | /// 浅色线条 0x66CCCCCC |
| | | /// </summary> |
| | | public uint GXCGrayLineColor2 = 0x66CCCCCC; |
| | | ///// <summary> |
| | | ///// 浅色线条 0xFFEBEBEB |
| | | ///// </summary> |
| | | //public uint GXCGrayLineColor2 = 0xFFEBEBEB; |
| | | /// <summary> |
| | | /// 浅色线条 0xFFB7B8BB |
| | | /// </summary> |
| | | public uint GXCGrayLineColor3 = 0xFFB7B8BB; |
| | | /// <summary> |
| | | /// 0x40000000 |
| | | /// </summary> |
| | | public uint GXCGrayLineColor4 = 0x40000000; |
| | | |
| | | /// <summary> |
| | | /// 按钮未选中状态 0xFF656565; |
| | |
| | | Height = Application.GetRealHeight(58), |
| | | TextColor = ZigbeeColor.Current.GXCTextRed, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = CommonFormResouce.TextSize, |
| | | IsBold = true |
| | | }; |
| | | bodyFrameLayout.AddChidren(errorBtn); |
| | | |
| | |
| | | BackgroundColor = ZigbeeColor.Current.GXCButtonUnSelectedColor, |
| | | Radius = (uint)Application.GetRealHeight(127 / 2), |
| | | Enable = !string.IsNullOrEmpty(codeRow.VerificationCodeET?.Text), |
| | | IsSelected = !string.IsNullOrEmpty(codeRow.VerificationCodeET?.Text) |
| | | IsSelected = !string.IsNullOrEmpty(codeRow.VerificationCodeET?.Text), |
| | | TextSize = 16, |
| | | IsBold = true, |
| | | }; |
| | | bodyFrameLayout.AddChidren(resetBtn); |
| | | } |
| | |
| | | private void SelectPhoneOrEmail_MouseUpEvent(object sender, MouseEventArgs mouseEventArgs) |
| | | { |
| | | phoneEmailForm.SelectedPhone.IsSelected = phoneEmailForm.SelectedEmail.IsSelected = false; |
| | | phoneEmailForm.SelectedPhone.IsBold = phoneEmailForm.SelectedEmail.IsBold = false; |
| | | resetBtn.Enable = resetBtn.IsSelected = false; |
| | | errorBtn.Text = string.Empty; |
| | | (sender as Button).IsSelected = true; |
| | | (sender as Button).IsSelected = (sender as Button).IsBold = true; |
| | | if ((sender as Button).Tag.ToString() == "Phone") |
| | | { |
| | | AddPhoneOrEmailFL(accountCodeFL, "Phone"); |
| | |
| | | //验证码错误 |
| | | errorBtn.TextID = R.MyInternationalizationString.VALIDCODEANDPHONENOEQUAL; |
| | | } |
| | | else if (stateCodeStr == "NORECORD") |
| | | { |
| | | errorBtn.TextID = R.MyInternationalizationString.NORECORD; |
| | | } |
| | | |
| | | else |
| | | { |
| | | errorBtn.TextID = R.MyInternationalizationString.RequestServerFailed; |
| | |
| | | Width = Application.GetRealWidth(300), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextID = R.MyInternationalizationString.AppName, |
| | | TextColor = ZigbeeColor.Current.GXCTextWhiteColor |
| | | TextColor = ZigbeeColor.Current.GXCTextWhiteColor, |
| | | TextSize=16 |
| | | }; |
| | | midFrameLayout.AddChidren(logoName); |
| | | |
| | | phoneEmailForm = new PhoneEmailForm(); |
| | | phoneEmailForm.Init(midFrameLayout); |
| | | |
| | | |
| | | //错误提示Btn |
| | | loginErrorBtn = new Button() |
| | |
| | | Height = Application.GetRealHeight(58), |
| | | TextColor = ZigbeeColor.Current.GXCTextRed, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize=CommonFormResouce.TextSize, |
| | | IsBold=true |
| | | }; |
| | | midFrameLayout.AddChidren(loginErrorBtn); |
| | | |
| | |
| | | Y = Application.GetRealHeight(1198), |
| | | Width = Application.GetRealWidth(250), |
| | | Height = Application.GetRealHeight(58), |
| | | TextID = R.MyInternationalizationString.ForgotPWD, |
| | | TextID = R.MyInternationalizationString.ForgotPWD_1, |
| | | TextSize = CommonFormResouce.loginTextSize, |
| | | TextColor = Shared.Common.ZigbeeColor.Current.GXCTextGrayColor, |
| | | TextAlignment = TextAlignment.CenterRight |
| | |
| | | Height = Application.GetRealHeight(127), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextID = R.MyInternationalizationString.Login, |
| | | TextSize = 15, |
| | | TextSize = 16, |
| | | TextColor = ZigbeeColor.Current.GXCTextGrayColor, |
| | | SelectedTextColor = ZigbeeColor.Current.GXCTextWhiteColor, |
| | | SelectedBackgroundColor = ZigbeeColor.Current.GXCButtonBlackSelectedColor, |
| | | BackgroundColor = ZigbeeColor.Current.GXCButtonUnSelectedColor, |
| | | Radius = (uint)Application.GetRealHeight(127 / 2), |
| | | Enable = !string.IsNullOrEmpty(pwdRow.PasswrodET?.Text), |
| | | IsSelected = !string.IsNullOrEmpty(pwdRow.PasswrodET?.Text) |
| | | IsSelected = !string.IsNullOrEmpty(pwdRow.PasswrodET?.Text), |
| | | IsBold=true |
| | | }; |
| | | midFrameLayout.AddChidren(loginBtn); |
| | | |
| | |
| | | #endregion |
| | | |
| | | BindEvent(); |
| | | |
| | | if (string.IsNullOrEmpty(account) == false && AccountLogic.Instance.CheckEmail(account) == true) |
| | | { |
| | | SelectPhoneOrEmail_MouseUpEvent(phoneEmailForm.SelectedEmail, null); |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// phone/email 选择 |
| | | /// </summary> |
| | |
| | | private void SelectPhoneOrEmail_MouseUpEvent(object sender, MouseEventArgs mouseEventArgs) |
| | | { |
| | | phoneEmailForm.SelectedPhone.IsSelected = phoneEmailForm.SelectedEmail.IsSelected = false; |
| | | phoneEmailForm.SelectedPhone.IsBold = phoneEmailForm.SelectedEmail.IsBold = false; |
| | | loginBtn.Enable = loginBtn.IsSelected = false; |
| | | loginErrorBtn.Text = string.Empty; |
| | | (sender as Button).IsSelected = true; |
| | | (sender as Button).IsSelected = (sender as Button).IsBold = true; |
| | | if((sender as Button).Tag.ToString()=="Phone") |
| | | { |
| | | AddPhoneOrEmailFL(accountPwdFL, "Phone"); |
| | |
| | | /// 验证码 |
| | | /// </summary> |
| | | private string code; |
| | | /// <summary> |
| | | /// wechat |
| | | /// </summary> |
| | | private Button wechatBtn; |
| | | |
| | | private Timer t; |
| | | private DateTime dateBegin; |
| | |
| | | Width = Application.GetRealWidth(300), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextID = R.MyInternationalizationString.AppName, |
| | | TextColor = ZigbeeColor.Current.GXCTextWhiteColor |
| | | TextColor = ZigbeeColor.Current.GXCTextWhiteColor, |
| | | TextSize = 16 |
| | | }; |
| | | midFrameLayout.AddChidren(logoName); |
| | | |
| | |
| | | Height = Application.GetRealHeight(58), |
| | | TextColor = ZigbeeColor.Current.GXCTextRed, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = CommonFormResouce.TextSize, |
| | | IsBold = true |
| | | }; |
| | | midFrameLayout.AddChidren(loginErrorBtn); |
| | | |
| | |
| | | Y = Application.GetRealHeight(1198), |
| | | Width = Application.GetRealWidth(250), |
| | | Height = Application.GetRealHeight(58), |
| | | TextID = R.MyInternationalizationString.ForgotPWD, |
| | | TextID = R.MyInternationalizationString.ForgotPWD_1, |
| | | TextSize = CommonFormResouce.loginTextSize, |
| | | TextColor = Shared.Common.ZigbeeColor.Current.GXCTextGrayColor, |
| | | TextAlignment = TextAlignment.CenterRight |
| | |
| | | Height = Application.GetRealHeight(127), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextID = R.MyInternationalizationString.Login, |
| | | TextSize = 15, |
| | | TextSize = 16, |
| | | IsBold=true, |
| | | TextColor = ZigbeeColor.Current.GXCTextGrayColor, |
| | | SelectedTextColor = ZigbeeColor.Current.GXCTextWhiteColor, |
| | | SelectedBackgroundColor = ZigbeeColor.Current.GXCButtonBlackSelectedColor, |
| | |
| | | }; |
| | | midFrameLayout.AddChidren(registerBtn); |
| | | |
| | | wechatBtn = new Button |
| | | { |
| | | X = Application.GetRealWidth(395), |
| | | Y = Application.GetRealHeight(1737), |
| | | Width = Application.GetMinRealAverage(115), |
| | | Height = Application.GetMinRealAverage(115), |
| | | UnSelectedImagePath = "Account/Wechat.png", |
| | | Gravity = Gravity.CenterHorizontal |
| | | }; |
| | | midFrameLayout.AddChidren(wechatBtn); |
| | | |
| | | BindEvent(); |
| | | } |
| | | |
| | |
| | | registerBtn.MouseUpEventHandler += Register; |
| | | //忘记密码 |
| | | forgotPasswordBtn.MouseUpEventHandler += ForgetPWD_MouseUpEvent; |
| | | //wechat |
| | | wechatBtn.MouseUpEventHandler += LoginByWechat; |
| | | |
| | | } |
| | | |
| | |
| | | CommonPage.Loading.Start(); |
| | | try |
| | | { |
| | | if (CheckAccount(account) == false) |
| | | { |
| | | return; |
| | | } |
| | | var reqLoginByCode = new SendDataToServer.LoginValidCodeOBJ() |
| | | { |
| | | Account = account, |
| | |
| | | else if (stateCodeStr == "VALIDCODEANDPHONENOEQUAL") |
| | | { |
| | | CommonPage.Loading.Hide(); |
| | | //验证码错误 |
| | | loginErrorBtn.TextID = R.MyInternationalizationString.VALIDCODEANDPHONENOEQUAL; |
| | | } |
| | | else if (stateCodeStr == "NORECORD") |
| | | { |
| | | CommonPage.Loading.Hide(); |
| | | loginErrorBtn.TextID = R.MyInternationalizationString.NORECORD; |
| | | } |
| | | else if (stateCodeStr == "YOUDATANOISLOCALREGION") |
| | | { |
| | |
| | | private void SelectPhoneOrEmail_MouseUpEvent(object sender, MouseEventArgs mouseEventArgs) |
| | | { |
| | | phoneEmailForm.SelectedPhone.IsSelected = phoneEmailForm.SelectedEmail.IsSelected = false; |
| | | phoneEmailForm.SelectedPhone.IsBold = phoneEmailForm.SelectedEmail.IsBold = false; |
| | | loginBtn.Enable = loginBtn.IsSelected = false; |
| | | (sender as Button).IsSelected = true; |
| | | (sender as Button).IsSelected = (sender as Button).IsBold = true; |
| | | if ((sender as Button).Tag.ToString() == "Phone") |
| | | { |
| | | AddPhoneOrEmailFL(accountCodeFL, "Phone"); |
| | |
| | | codeRow.SendCodeBtn.MouseUpEventHandler += SendCode_MouseUpEventAsync; |
| | | codeRow.VerificationCodeET.TextChangeEventHandler += Code_TextChange; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// wechat登录 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="mouseEventArgs"></param> |
| | | private void LoginByWechat(object sender, MouseEventArgs mouseEventArgs) |
| | | { |
| | | #if Android |
| | | //var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), |
| | | // Language.StringByID(R.MyInternationalizationString.LoginByWechat), |
| | | // Language.StringByID(R.MyInternationalizationString.Cancel), |
| | | // Language.StringByID(R.MyInternationalizationString.Confrim)); |
| | | //alert.Show(); |
| | | //alert.ResultEventHandler += (send, e) => |
| | | //{ |
| | | //if (e) |
| | | //{ |
| | | com.hdl.home.Application.WXLogin(); |
| | | com.hdl.home.WXEntryActivity.RespAction = (authStr) => |
| | | { |
| | | if (authStr == null) |
| | | { |
| | | |
| | | } |
| | | else |
| | | { |
| | | new System.Threading.Thread(async () => |
| | | { |
| | | var re = await isBindAuthAsync(authStr); |
| | | if (re) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | //直接登录 |
| | | HomePage.Instance.ShowLoginLoadView(); |
| | | }); |
| | | var resultRegID = await Shared.Common.CommonPage.Instance.PushRegID(); |
| | | var homes = await House.GetHomeLists(); |
| | | //启动ZigBee |
| | | ZigBee.Common.Application.Init(); |
| | | //刷新个人中心的内存及线程 |
| | | await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread(); |
| | | Shared.Common.Room.InitAllRoom(); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | this.RemoveFromParent(); |
| | | CommonPage.Instance.RemoveViewByTag("Login"); |
| | | UserPage.Instance.Fresh(); |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | var authRes = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.ResponseEntity.AuthUserRes>(authStr); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | var registerPage = new AccountRegister(); |
| | | Shared.Common.CommonPage.Instance.AddChidren(registerPage); |
| | | registerPage.OpenID = authRes.openid; |
| | | registerPage.Show(); |
| | | }); |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | }; |
| | | //} |
| | | //}; |
| | | #endif |
| | | |
| | | #if iOS |
| | | Home.IOS.AppDelegate.WXLogin(); |
| | | Home.IOS.AppDelegate.RespAction = (authStr) => |
| | | { |
| | | if (authStr == null) |
| | | { |
| | | |
| | | } |
| | | else |
| | | { |
| | | new System.Threading.Thread(async () => |
| | | { |
| | | |
| | | var re = await isBindAuthAsync(authStr); |
| | | if (re) |
| | | { |
| | | //直接登录 |
| | | //this.RemoveFromParent(); |
| | | |
| | | //UserPage.Instance.Fresh(); |
| | | var resultRegID = await Shared.Common.CommonPage.Instance.PushRegID(); |
| | | var homes = await House.GetHomeLists(); |
| | | //启动ZigBee |
| | | ZigBee.Common.Application.Init(); |
| | | //刷新个人中心的内存及线程 |
| | | await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread(); |
| | | Shared.Common.Room.InitAllRoom(); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | this.RemoveFromParent(); |
| | | UserPage.Instance.Fresh(); |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | var authRes = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.ResponseEntity.AuthUserRes>(authStr); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | var registerPage = new AccountRegister(); |
| | | Shared.Common.CommonPage.Instance.AddChidren(registerPage); |
| | | registerPage.OpenID = authRes.openid; |
| | | registerPage.Show(); |
| | | }); |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | }; |
| | | #endif |
| | | } |
| | | |
| | | /// <summary> |
| | | /// qq登录 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="mouseEventArgs"></param> |
| | | private void LoginByQQ(object sender, MouseEventArgs mouseEventArgs) |
| | | { |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 是否已绑定 |
| | | /// </summary> |
| | | /// <param name="authStr"></param> |
| | | /// <returns></returns> |
| | | private async System.Threading.Tasks.Task<bool> isBindAuthAsync(string authStr) |
| | | { |
| | | var authRes = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.ResponseEntity.AuthUserRes>(authStr); |
| | | var auth = new SendDataToServer.AuthUser() |
| | | { |
| | | AccessToken = authRes.access_token, |
| | | RefreshToken = authRes.refresh_token, |
| | | OpenID = authRes.openid |
| | | }; |
| | | var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(auth); |
| | | var revertObj = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/InsertOrUpdateAuthUser", System.Text.Encoding.UTF8.GetBytes(requestJson)); |
| | | if (revertObj == null) |
| | | { |
| | | return false; |
| | | } |
| | | var stateCodeStr = revertObj.StateCode.ToUpper(); |
| | | if (stateCodeStr == "SUCCESS") |
| | | { |
| | | var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.UserLoginRes>(revertObj.ResponseData.ToString()); |
| | | var revertData = responseDataObj; |
| | | Config.Instance.Account = revertData.Account; |
| | | Config.Instance.MD5PWD = revertData.MD5PWD; |
| | | Config.Instance.Guid = revertData.Guid; |
| | | Config.Instance.LoginDateTime = DateTime.Now; |
| | | if (Config.Instance.AccountList.Find((obj) => obj == revertData.Account) == null) |
| | | { |
| | | Config.Instance.AccountList.Add(revertData.Account); |
| | | } |
| | | Config.Instance.Save(); |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region ◆ 账号、验证码监听______________________ |
| | |
| | | Height = Application.GetRealHeight(58), |
| | | TextColor = ZigbeeColor.Current.GXCTextRed, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = CommonFormResouce.TextSize, |
| | | IsBold = true |
| | | }; |
| | | bodyFrameLayout.AddChidren(errorBtn); |
| | | |
| | |
| | | BackgroundColor = ZigbeeColor.Current.GXCButtonUnSelectedColor, |
| | | Radius = (uint)Application.GetRealHeight(127 / 2), |
| | | Enable = !string.IsNullOrEmpty(codeRow.VerificationCodeET?.Text), |
| | | IsSelected = !string.IsNullOrEmpty(codeRow.VerificationCodeET?.Text) |
| | | IsSelected = !string.IsNullOrEmpty(codeRow.VerificationCodeET?.Text), |
| | | TextSize = 16, |
| | | IsBold = true, |
| | | }; |
| | | bodyFrameLayout.AddChidren(registerBtn); |
| | | |
| | |
| | | Y = registerBtn.Bottom + Application.GetRealHeight(50), |
| | | Width = Application.GetRealWidth(400), |
| | | Height = Application.GetRealHeight(58), |
| | | TextID = R.MyInternationalizationString.LoginByAccountPWD, |
| | | TextID = R.MyInternationalizationString.LoginByAccountPWD_1, |
| | | TextColor = ZigbeeColor.Current.GXCTextGrayColor, |
| | | TextSize = CommonFormResouce.loginTextSize, |
| | | Gravity=Gravity.CenterHorizontal |
| | |
| | | private void SelectPhoneOrEmail_MouseUpEvent(object sender, MouseEventArgs mouseEventArgs) |
| | | { |
| | | phoneEmailForm.SelectedPhone.IsSelected = phoneEmailForm.SelectedEmail.IsSelected = false; |
| | | phoneEmailForm.SelectedPhone.IsBold = phoneEmailForm.SelectedEmail.IsBold = false; |
| | | registerBtn.Enable = registerBtn.IsSelected = false; |
| | | (sender as Button).IsSelected = true; |
| | | (sender as Button).IsSelected = (sender as Button).IsBold = true; |
| | | account = string.Empty; |
| | | errorBtn.Text = string.Empty; |
| | | if ((sender as Button).Tag.ToString() == "Phone") |
| | |
| | | //验证码错误 |
| | | errorBtn.TextID = R.MyInternationalizationString.VALIDCODEANDPHONENOEQUAL; |
| | | } |
| | | else if (stateCodeStr == "NORECORD") |
| | | { |
| | | errorBtn.TextID = R.MyInternationalizationString.NORECORD; |
| | | } |
| | | else |
| | | { |
| | | errorBtn.TextID = R.MyInternationalizationString.RequestServerFailed; |
| | |
| | | SelectedTextColor = ZigbeeColor.Current.GXCTextWhiteColor, |
| | | Radius = (uint)Application.GetRealHeight(height / 2), |
| | | IsSelected = true, |
| | | Tag = "Phone" |
| | | IsBold=true, |
| | | Tag = "Phone", |
| | | TextSize= CommonFormResouce.TextSize |
| | | }; |
| | | PhoneEmailFL.AddChidren(SelectedPhone); |
| | | |
| | |
| | | SelectedTextColor = ZigbeeColor.Current.GXCTextWhiteColor, |
| | | Radius = (uint)Application.GetRealHeight(height / 2), |
| | | IsSelected = false, |
| | | Tag = "Email" |
| | | Tag = "Email", |
| | | TextSize = CommonFormResouce.TextSize |
| | | }; |
| | | PhoneEmailFL.AddChidren(SelectedEmail); |
| | | } |
| | |
| | | /// Button_Height |
| | | /// </summary> |
| | | private int Button_Height = 92; |
| | | /// <summary> |
| | | /// accountLine |
| | | /// </summary> |
| | | private Button accountLine; |
| | | |
| | | /// <summary> |
| | | /// Init |
| | |
| | | TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor, |
| | | Text = $"+{CommonPage.PhoneZoneStr}", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextSize = CommonFormResouce.loginTextSize |
| | | TextSize = CommonFormResouce.TextSize |
| | | }; |
| | | accountFL.AddChidren(PhoneZoneBtn); |
| | | PhoneZoneBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | var form = new AreaCodeSelectForm();
parFL.AddChidren(form);
form.InitForm();
form.ShowForm();
form.FinishSelectEvent += (code) =>
{
(sender as Button).Text = "+" + code;
CommonPage.PhoneZoneStr = code;
}; |
| | | |
| | | //var zoneListView = new PhoneZone { }; |
| | | //zoneListView.ActionSelectedZone += (zone) => |
| | | //{ |
| | | // var t = CommonPage.PhoneZoneStr; |
| | | // (sender as Button).Text = "+" + zone; |
| | | //}; |
| | | //parFL.AddChidren(zoneListView); |
| | | //zoneListView.Show(); |
| | | }; |
| | | |
| | | AccountET = new EditText() |
| | |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | Text = account, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = CommonFormResouce.loginTextSize |
| | | TextSize = CommonFormResouce.PlaceHolderTextSize |
| | | }; |
| | | accountFL.AddChidren(AccountET); |
| | | |
| | | var accountLine = new Button() |
| | | accountLine = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1, |
| | | Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 2, |
| | | Width = Application.GetRealWidth(CommonFormResouce.Row_Width), |
| | | Height = 1, |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor |
| | | }; |
| | | accountFL.AddChidren(accountLine); |
| | | |
| | | AccountET.FoucsChanged += Text_FoucesChangeEvent; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 光标改变 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="focusEvent"></param> |
| | | private void Text_FoucesChangeEvent(object sender, FocusEventArgs focusEvent) |
| | | { |
| | | if (focusEvent.Focus) |
| | | { |
| | | accountLine.BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor; |
| | | accountLine.Height = 2; |
| | | } |
| | | else |
| | | { |
| | | accountLine.BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor; |
| | | accountLine.Height = 1; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | /// Button_Height |
| | | /// </summary> |
| | | private int Button_Height = 92; |
| | | /// <summary> |
| | | /// accountLine |
| | | /// </summary> |
| | | private Button accountLine; |
| | | |
| | | /// <summary> |
| | | /// Init |
| | |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | Text = account, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = CommonFormResouce.loginTextSize |
| | | TextSize = CommonFormResouce.PlaceHolderTextSize |
| | | }; |
| | | accountFL.AddChidren(AccountET); |
| | | |
| | | var accountLine = new Button() |
| | | accountLine = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1, |
| | | Y = Application.GetRealHeight(CommonFormResouce.Row_Height)-2, |
| | | Width = Application.GetRealWidth(CommonFormResouce.Row_Width), |
| | | Height = 1, |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor |
| | | }; |
| | | accountFL.AddChidren(accountLine); |
| | | |
| | | AccountET.FoucsChanged += Text_FoucesChangeEvent; |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 光标改变 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="focusEvent"></param> |
| | | private void Text_FoucesChangeEvent(object sender, FocusEventArgs focusEvent) |
| | | { |
| | | if(focusEvent.Focus) |
| | | { |
| | | accountLine.BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor; |
| | | accountLine.Height = 2; |
| | | } |
| | | else |
| | | { |
| | | accountLine.BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor; |
| | | accountLine.Height = 1; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | /// Button_Height |
| | | /// </summary> |
| | | private int Button_Height = 92; |
| | | /// <summary> |
| | | /// accountLine |
| | | /// </summary> |
| | | private Button accountLine; |
| | | |
| | | /// <summary> |
| | | /// Init |
| | |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | Text = account, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = CommonFormResouce.loginTextSize |
| | | TextSize = CommonFormResouce.PlaceHolderTextSize |
| | | }; |
| | | accountFL.AddChidren(AccountET); |
| | | |
| | | var accountLine = new Button() |
| | | accountLine = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1, |
| | | Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 2, |
| | | Width = Application.GetRealWidth(CommonFormResouce.Row_Width), |
| | | Height = 1, |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor |
| | | }; |
| | | accountFL.AddChidren(accountLine); |
| | | |
| | | AccountET.FoucsChanged += Text_FoucesChangeEvent; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 光标改变 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="focusEvent"></param> |
| | | private void Text_FoucesChangeEvent(object sender, FocusEventArgs focusEvent) |
| | | { |
| | | if (focusEvent.Focus) |
| | | { |
| | | accountLine.BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor; |
| | | accountLine.Height = 2; |
| | | } |
| | | else |
| | | { |
| | | accountLine.BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor; |
| | | accountLine.Height = 1; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | /// Button_Height |
| | | /// </summary> |
| | | private int Button_Height = 92; |
| | | /// <summary> |
| | | /// accountLine |
| | | /// </summary> |
| | | private Button accountLine; |
| | | |
| | | /// <summary> |
| | | /// Init |
| | |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | Text = account, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = CommonFormResouce.loginTextSize |
| | | TextSize = CommonFormResouce.PlaceHolderTextSize |
| | | }; |
| | | accountFL.AddChidren(AccountET); |
| | | |
| | | var accountLine = new Button() |
| | | accountLine = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1, |
| | | Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 2, |
| | | Width = Application.GetRealWidth(CommonFormResouce.Row_Width), |
| | | Height = 1, |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor |
| | | }; |
| | | accountFL.AddChidren(accountLine); |
| | | |
| | | AccountET.FoucsChanged += Text_FoucesChangeEvent; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 光标改变 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="focusEvent"></param> |
| | | private void Text_FoucesChangeEvent(object sender, FocusEventArgs focusEvent) |
| | | { |
| | | if (focusEvent.Focus) |
| | | { |
| | | accountLine.BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor; |
| | | accountLine.Height = 2; |
| | | } |
| | | else |
| | | { |
| | | accountLine.BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor; |
| | | accountLine.Height = 1; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | public class EmailForgotRowForm : FrameLayout |
| | |
| | | /// Button_Height |
| | | /// </summary> |
| | | private int Button_Height = 92; |
| | | /// <summary> |
| | | /// accountLine |
| | | /// </summary> |
| | | private Button accountLine; |
| | | |
| | | /// <summary> |
| | | /// Init |
| | |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | Text = account, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = CommonFormResouce.loginTextSize |
| | | TextSize = CommonFormResouce.PlaceHolderTextSize |
| | | }; |
| | | accountFL.AddChidren(AccountET); |
| | | |
| | | var accountLine = new Button() |
| | | accountLine = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1, |
| | | Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 2, |
| | | Width = Application.GetRealWidth(CommonFormResouce.Row_Width), |
| | | Height = 1, |
| | | BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor |
| | | }; |
| | | accountFL.AddChidren(accountLine); |
| | | |
| | | AccountET.FoucsChanged += Text_FoucesChangeEvent; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 光标改变 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="focusEvent"></param> |
| | | private void Text_FoucesChangeEvent(object sender, FocusEventArgs focusEvent) |
| | | { |
| | | if (focusEvent.Focus) |
| | | { |
| | | accountLine.BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor; |
| | | accountLine.Height = 2; |
| | | } |
| | | else |
| | | { |
| | | accountLine.BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor; |
| | | accountLine.Height = 1; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | /// VerificationCodeET |
| | | /// </summary> |
| | | public EditText VerificationCodeET; |
| | | /// <summary> |
| | | /// pwdLine |
| | | /// </summary> |
| | | private Button pwdLine; |
| | | |
| | | /// <summary> |
| | | /// Init |
| | |
| | | TextColor = ZigbeeColor.Current.GXCTextGrayColor, |
| | | SelectedTextColor = ZigbeeColor.Current.GXCTextColor, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextSize=CommonFormResouce.TextSize, |
| | | Enable = false, |
| | | IsSelected = false |
| | | IsSelected = false, |
| | | IsBold=true |
| | | }; |
| | | codeFL.AddChidren(SendCodeBtn); |
| | | |
| | | var pwdLine = new Button() |
| | | pwdLine = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1, |
| | | Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 2, |
| | | Width = Application.GetRealWidth(CommonFormResouce.Row_Width), |
| | | Height = 1, |
| | | BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor |
| | | }; |
| | | codeFL.AddChidren(pwdLine); |
| | | |
| | | VerificationCodeET.FoucsChanged += Text_FoucesChangeEvent; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 光标改变 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="focusEvent"></param> |
| | | private void Text_FoucesChangeEvent(object sender, FocusEventArgs focusEvent) |
| | | { |
| | | if (focusEvent.Focus) |
| | | { |
| | | pwdLine.BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor; |
| | | pwdLine.Height = 2; |
| | | } |
| | | else |
| | | { |
| | | pwdLine.BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor; |
| | | pwdLine.Height = 1; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | /// Button_Height |
| | | /// </summary> |
| | | private int Button_Height = 92; |
| | | /// <summary> |
| | | /// pwdLine |
| | | /// </summary> |
| | | private Button pwdLine; |
| | | |
| | | /// <summary> |
| | | /// Init |
| | |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | Text = password, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = CommonFormResouce.loginTextSize, |
| | | TextSize = CommonFormResouce.PlaceHolderTextSize, |
| | | SecureTextEntry = true |
| | | }; |
| | | pwdFL.AddChidren(PasswrodET); |
| | |
| | | PasswrodET.SecureTextEntry = (sender as Button).IsSelected; |
| | | }; |
| | | |
| | | var pwdLine = new Button() |
| | | pwdLine = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1, |
| | | Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 2, |
| | | Width = Application.GetRealWidth(CommonFormResouce.Row_Width), |
| | | Height = 1, |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor |
| | | }; |
| | | pwdFL.AddChidren(pwdLine); |
| | | |
| | | PasswrodET.FoucsChanged += Text_FoucesChangeEvent; |
| | | } |
| | | /// <summary> |
| | | /// SetPlaceholdText |
| | |
| | | public void SetPlaceholdText(string holdText) |
| | | { |
| | | PasswrodET.PlaceholderText = holdText; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 光标改变 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="focusEvent"></param> |
| | | private void Text_FoucesChangeEvent(object sender, FocusEventArgs focusEvent) |
| | | { |
| | | if (focusEvent.Focus) |
| | | { |
| | | pwdLine.BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor; |
| | | pwdLine.Height = 2; |
| | | } |
| | | else |
| | | { |
| | | pwdLine.BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor; |
| | | pwdLine.Height = 1; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | /// Button_Height |
| | | /// </summary> |
| | | private int Button_Height = 92; |
| | | /// <summary> |
| | | /// pwdLine |
| | | /// </summary> |
| | | private Button pwdLine; |
| | | |
| | | /// <summary> |
| | | /// Init |
| | |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | Text = password, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = CommonFormResouce.loginTextSize, |
| | | TextSize = CommonFormResouce.PlaceHolderTextSize, |
| | | SecureTextEntry = true |
| | | }; |
| | | pwdFL.AddChidren(PasswrodET); |
| | |
| | | PasswrodET.SecureTextEntry = (sender as Button).IsSelected; |
| | | }; |
| | | |
| | | var pwdLine = new Button() |
| | | pwdLine = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1, |
| | | Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 2, |
| | | Width = Application.GetRealWidth(CommonFormResouce.Row_Width), |
| | | Height = 1, |
| | | BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor |
| | | }; |
| | | pwdFL.AddChidren(pwdLine); |
| | | |
| | | PasswrodET.FoucsChanged += Text_FoucesChangeEvent; |
| | | } |
| | | /// <summary> |
| | | /// SetPlaceholdText |
| | |
| | | public void SetPlaceholdText(string holdText) |
| | | { |
| | | PasswrodET.PlaceholderText = holdText; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 光标改变 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="focusEvent"></param> |
| | | private void Text_FoucesChangeEvent(object sender, FocusEventArgs focusEvent) |
| | | { |
| | | if (focusEvent.Focus) |
| | | { |
| | | pwdLine.BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor; |
| | | pwdLine.Height = 2; |
| | | } |
| | | else |
| | | { |
| | | pwdLine.BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor; |
| | | pwdLine.Height = 1; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | /// Button_Height |
| | | /// </summary> |
| | | private int Button_Height = 92; |
| | | /// <summary> |
| | | /// pwdLine |
| | | /// </summary> |
| | | private Button pwdLine; |
| | | |
| | | /// <summary> |
| | | /// Init |
| | |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | Text = password, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = CommonFormResouce.loginTextSize, |
| | | TextSize = CommonFormResouce.PlaceHolderTextSize, |
| | | SecureTextEntry = true |
| | | }; |
| | | pwdFL.AddChidren(PasswrodET); |
| | |
| | | PasswrodET.SecureTextEntry = (sender as Button).IsSelected; |
| | | }; |
| | | |
| | | var pwdLine = new Button() |
| | | pwdLine = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1, |
| | | Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 2, |
| | | Width = Application.GetRealWidth(CommonFormResouce.Row_Width), |
| | | Height = 1, |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor |
| | | }; |
| | | pwdFL.AddChidren(pwdLine); |
| | | |
| | | PasswrodET.FoucsChanged += Text_FoucesChangeEvent; |
| | | } |
| | | /// <summary> |
| | | /// SetPlaceholdText |
| | |
| | | public void SetPlaceholdText(string holdText) |
| | | { |
| | | PasswrodET.PlaceholderText = holdText; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 光标改变 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="focusEvent"></param> |
| | | private void Text_FoucesChangeEvent(object sender, FocusEventArgs focusEvent) |
| | | { |
| | | if (focusEvent.Focus) |
| | | { |
| | | pwdLine.BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor; |
| | | pwdLine.Height = 2; |
| | | } |
| | | else |
| | | { |
| | | pwdLine.BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor; |
| | | pwdLine.Height = 1; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | /// VerificationCodeET |
| | | /// </summary> |
| | | public EditText VerificationCodeET; |
| | | /// <summary> |
| | | /// pwdLine |
| | | /// </summary> |
| | | private Button pwdLine; |
| | | /// <summary> |
| | | /// sendCodeBG |
| | | /// </summary> |
| | |
| | | SelectedBackgroundColor=ZigbeeColor.Current.GXCButtonSelectedColor, |
| | | Enable = false, |
| | | IsSelected = false, |
| | | Radius=(uint)Application.GetRealHeight(12) |
| | | Radius=(uint)Application.GetRealHeight(12), |
| | | IsBold=true, |
| | | TextSize=CommonFormResouce.TextSize |
| | | }; |
| | | codeFL.AddChidren(SendCodeBtn); |
| | | |
| | | var pwdLine = new Button() |
| | | pwdLine = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1, |
| | | Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 2, |
| | | Width = Application.GetRealWidth(536), |
| | | Height = 1, |
| | | BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor |
| | | }; |
| | | codeFL.AddChidren(pwdLine); |
| | | |
| | | VerificationCodeET.FoucsChanged += Text_FoucesChangeEvent; |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 光标改变 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="focusEvent"></param> |
| | | private void Text_FoucesChangeEvent(object sender, FocusEventArgs focusEvent) |
| | | { |
| | | if (focusEvent.Focus) |
| | | { |
| | | pwdLine.BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor; |
| | | pwdLine.Height = 2; |
| | | } |
| | | else |
| | | { |
| | | pwdLine.BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor; |
| | | pwdLine.Height = 1; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | public EditText VerificationCodeET; |
| | | /// <summary> |
| | | /// pwdLine |
| | | /// </summary> |
| | | private Button pwdLine; |
| | | /// <summary> |
| | | /// Timer |
| | | /// </summary> |
| | | private Timer t; |
| | |
| | | SelectedBackgroundColor = ZigbeeColor.Current.GXCButtonSelectedColor, |
| | | Enable = false, |
| | | IsSelected = false, |
| | | Radius = (uint)Application.GetRealHeight(12) |
| | | Radius = (uint)Application.GetRealHeight(12), |
| | | IsBold=true, |
| | | TextSize=CommonFormResouce.TextSize |
| | | }; |
| | | codeFL.AddChidren(SendCodeBtn); |
| | | |
| | | var pwdLine = new Button() |
| | | pwdLine = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1, |
| | | Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 2, |
| | | Width = Application.GetRealWidth(536), |
| | | Height = 1, |
| | | BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor |
| | | }; |
| | | codeFL.AddChidren(pwdLine); |
| | | |
| | | VerificationCodeET.FoucsChanged += Text_FoucesChangeEvent; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 光标改变 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="focusEvent"></param> |
| | | private void Text_FoucesChangeEvent(object sender, FocusEventArgs focusEvent) |
| | | { |
| | | if (focusEvent.Focus) |
| | | { |
| | | pwdLine.BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor; |
| | | pwdLine.Height = 2; |
| | | } |
| | | else |
| | | { |
| | | pwdLine.BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor; |
| | | pwdLine.Height = 1; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | deviceRow.HideSwitchBtn(true); |
| | | deviceTypeRowLayout.AddChidren(deviceRow); |
| | | |
| | | deviceRow.ClickBtn.MouseUpEventHandler += (send2, e2) => |
| | | { |
| | | var userDoorLockPage = new UserDoorLockPage(curRoom, deviceUI); |
| | | HomePage.Instance.AddChidren(userDoorLockPage); |
| | | HomePage.Instance.PageIndex += 1; |
| | | userDoorLockPage.Show(); |
| | | }; |
| | | |
| | | var editBtn = new CommonForm.RowLayoutEditButton() |
| | | { |
| | | Tag = deviceUI |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (sceneTargetDevicesList.Count > 2) |
| | | |
| | | if (sceneTargetDevicesList.Count > 1) |
| | | { |
| | | var targetRowLayout = new RowLayout() |
| | | { |
| | |
| | | targetFL.AddChidren(TargetListScrolView); |
| | | |
| | | confirmBtn = new CommonForm.CompleteButton(1656, 907, 127); |
| | | confirmBtn.TextID = R.MyInternationalizationString.Next; |
| | | AddChidren(confirmBtn); |
| | | |
| | | if (isModify) |
| | |
| | | |
| | | var deviceName = new Button |
| | | { |
| | | Width = Application.GetRealWidth(400), |
| | | Width = Application.GetRealWidth(600), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 16, |
| | |
| | | |
| | | var deviceName = new Button |
| | | { |
| | | Width = Application.GetRealWidth(400), |
| | | Width = Application.GetRealWidth(600), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 16, |
| | |
| | | |
| | | var deviceName = new Button |
| | | { |
| | | Width = Application.GetRealWidth(400), |
| | | Width = Application.GetRealWidth(600), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 16, |
| | |
| | | |
| | | var deviceName = new Button |
| | | { |
| | | Width = Application.GetRealWidth(400), |
| | | Width = Application.GetRealWidth(600), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 16, |
| | |
| | | Height = Application.GetRealHeight(200), |
| | | Width = Application.GetRealWidth(700), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Text = Language.StringByID(R.MyInternationalizationString.NoFunction_Tip).Replace("{\\r\\n}", "\r\n"), |
| | | Text = Language.StringByID(R.MyInternationalizationString.NoFunction).Replace("{\\r\\n}", "\r\n"), |
| | | TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor, |
| | | TextAlignment = TextAlignment.Center, |
| | | IsMoreLines = true |
| | |
| | | |
| | | var deviceName = new Button |
| | | { |
| | | Width = Application.GetRealWidth(400), |
| | | Width = Application.GetRealWidth(600), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 16, |
| | |
| | | |
| | | var deviceName = new Button |
| | | { |
| | | Width = Application.GetRealWidth(400), |
| | | Width = Application.GetRealWidth(600), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 16, |
| | |
| | | |
| | | var deviceName = new Button |
| | | { |
| | | Width = Application.GetRealWidth(400), |
| | | Width = Application.GetRealWidth(600), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 16, |
| | |
| | | |
| | | var deviceName = new Button |
| | | { |
| | | Width = Application.GetRealWidth(400), |
| | | Width = Application.GetRealWidth(600), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 16, |
| | |
| | | Width = Width, |
| | | Height = Height - Application.GetRealHeight(6), |
| | | TextColor = ZigbeeColor.Current.GXCTextGrayColor4, |
| | | SelectedTextColor = ZigbeeColor.Current.GXCTextDeepBlackColor, |
| | | SelectedTextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = CommonFormResouce.TextSize, |
| | | TextAlignment = TextAlignment.CenterLeft |
| | | }; |
| | |
| | | public const int loginTextSize = 12; |
| | | /// <summary> |
| | | /// 占位字体大小 |
| | | /// 12 |
| | | /// 14 |
| | | /// </summary> |
| | | public const int PlaceHolderTextSize = 12; |
| | | public const int PlaceHolderTextSize = 14; |
| | | |
| | | /// <summary> |
| | | /// Row_Height |
| | |
| | | CommonPage.Loading.Hide(); |
| | | if (result) |
| | | { |
| | | var alertSuccess = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.Success), Language.StringByID(R.MyInternationalizationString.Confrim)); |
| | | alertSuccess.Show(); |
| | | alertSuccess.ResultEventHandler += (senderSuccess, eSuccess) => |
| | | { |
| | | //var alertSuccess = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.Success), Language.StringByID(R.MyInternationalizationString.Confrim)); |
| | | //alertSuccess.Show(); |
| | | //alertSuccess.ResultEventHandler += (senderSuccess, eSuccess) => |
| | | //{ |
| | | //改房间 |
| | | Shared.Common.Room.CurrentRoom.ChangedRoom(device.CommonDevice, curRoom.Id); |
| | | device.CommonDevice.ReSave(); |
| | | RemoveFromParent(); |
| | | }; |
| | | //}; |
| | | } |
| | | else |
| | | { |
| | |
| | | var line = new Button() |
| | | { |
| | | X = Application.GetRealWidth(CommonFormResouce.X_Left), |
| | | Y = Height - 2, |
| | | Y = Height - 1, |
| | | Width = Application.GetRealWidth(965), |
| | | Height = 2, |
| | | Height = 1, |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor2, |
| | | }; |
| | | AddChidren(line); |
| | |
| | | line = new Button() |
| | | { |
| | | X = Application.GetRealWidth(CommonFormResouce.X_Left), |
| | | Y = Height - 2, |
| | | Y = Height - 1, |
| | | Width = Application.GetRealWidth(965), |
| | | Height = 2, |
| | | Height = 1, |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor2, |
| | | }; |
| | | AddChidren(line); |
| | |
| | | var line = new Button() |
| | | { |
| | | X = Application.GetRealWidth(200), |
| | | Y = Height - 2, |
| | | Y = Height - 1, |
| | | Width = Application.GetRealWidth(821), |
| | | Height = 2, |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor, |
| | | Height = 1, |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor2, |
| | | Tag = Tag |
| | | }; |
| | | AddChidren(line); |
| | |
| | | |
| | | public override void RemoveFromParent()
|
| | | {
|
| | | HdlGatewayReceiveLogic.Current.RemoveEvent("TemperatrueDevice");
|
| | | HdlGatewayReceiveLogic.Current.RemoveEvent("HumidityDevice");
|
| | | HdlGatewayReceiveLogic.Current.RemoveEvent("TemperatrueDevice" + room.Id);
|
| | | HdlGatewayReceiveLogic.Current.RemoveEvent("HumidityDevice" + room.Id);
|
| | | base.RemoveFromParent();
|
| | | } |
| | | |
| | |
| | | |
| | | if (string.IsNullOrEmpty(room.TemperatrueDevice) == false) |
| | | { |
| | | HdlGatewayReceiveLogic.Current.RemoveEvent("TemperatrueDevice"); |
| | | HdlGatewayReceiveLogic.Current.AddAttributeEvent("TemperatrueDevice", ReceiveComandDiv.A设备属性上报, (Action<ZigBee.Device.CommonDevice>)((report) => |
| | | HdlGatewayReceiveLogic.Current.RemoveEvent("TemperatrueDevice" + room.Id); |
| | | HdlGatewayReceiveLogic.Current.AddAttributeEvent("TemperatrueDevice" + room.Id, ReceiveComandDiv.A设备属性上报, (report) => |
| | | { |
| | | string mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(report); |
| | | if (room.TemperatrueDevice != mainKeys) |
| | |
| | | } |
| | | } |
| | | } |
| | | })); |
| | | }); |
| | | //发送获取温度的命令 |
| | | var dev = Common.LocalDevice.Current.GetDevice(room.TemperatrueDevice); |
| | | if (dev != null) |
| | |
| | | |
| | | if (string.IsNullOrEmpty(room.HumidityDevice) == false) |
| | | { |
| | | HdlGatewayReceiveLogic.Current.RemoveEvent("HumidityDevice"); |
| | | HdlGatewayReceiveLogic.Current.AddAttributeEvent("HumidityDevice", ReceiveComandDiv.A设备属性上报, (report) => |
| | | HdlGatewayReceiveLogic.Current.RemoveEvent("HumidityDevice"+room.Id); |
| | | HdlGatewayReceiveLogic.Current.AddAttributeEvent("HumidityDevice" + room.Id, ReceiveComandDiv.A设备属性上报, (report) => |
| | | { |
| | | string mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(report); |
| | | if (room.HumidityDevice != mainKeys) |
| | |
| | | { |
| | | sceneRowLayout.AddRightView(settingBtn); |
| | | sceneRowLayout.AddRightView(deleteBtn); |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | Y = this.Height - 1, |
| | | Width = Application.GetRealWidth(919), |
| | | Height = 1, |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor, |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor2, |
| | | }; |
| | | AddChidren(line); |
| | | |
| | |
| | | line = new Button() |
| | | { |
| | | X = Application.GetRealWidth(180), |
| | | Y = this.Height - 2, |
| | | Y = this.Height - 1, |
| | | Width = Application.GetRealWidth(841), |
| | | Height = 2, |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor, |
| | | Height = 1, |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor2, |
| | | }; |
| | | AddChidren(line); |
| | | |
| | |
| | | Y = this.Height - 1, |
| | | Width = Application.GetRealWidth(919), |
| | | Height = 1, |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor, |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor2, |
| | | }; |
| | | AddChidren(line); |
| | | } |
| | |
| | | private List<string> floorList = new List<string> { }; |
| | | private List<string> roomList = new List<string> { }; |
| | | private List<string> roomIdList = new List<string> { }; |
| | | private string currentId; |
| | | /// <summary> |
| | | /// curRoom |
| | | /// </summary> |
| | | private Common.Room curRoom; |
| | | |
| | | public SelectZone() |
| | | { |
| | | } |
| | |
| | | /// </summary> |
| | | public void Init() |
| | | { |
| | | var dialog = new FrameLayout() |
| | | List<string> floorIds = new List<string> { }; |
| | | List<string> floorNames = new List<string> { }; |
| | | List<List<string>> roomNames = new List<List<string>> { }; |
| | | List<List<Common.Room>> rooms = new List<List<Common.Room>> { }; |
| | | List<Common.Room> rs = new List<Common.Room> { }; |
| | | List<string> rNames = new List<string> { }; |
| | | if (Config.Instance.Home.FloorDics.Count > 0) |
| | | { |
| | | BackgroundColor = ZigbeeColor.Current.GXCDailogBackGroundColor |
| | | }; |
| | | AddChidren(dialog); |
| | | |
| | | dialog.MouseUpEventHandler += (sender, e) => |
| | | foreach (var floor in Config.Instance.Home.FloorDics) |
| | | { |
| | | floorIds.Add(floor.Key); |
| | | floorNames.Add(floor.Value); |
| | | if (Common.Room.CurrentRoom.GetRoomsByFloorId(floor.Key).Count > 0) |
| | | { |
| | | roomNames.Add(Common.Room.CurrentRoom.GetRoomNamesByFloorId(floor.Key)); |
| | | rooms.Add(Common.Room.CurrentRoom.GetRoomsByFloorId(floor.Key)); |
| | | } |
| | | } |
| | | PickerView.ShowSecondary(floorNames, roomNames, (index1, index2) => |
| | | { |
| | | curRoom = rooms[index1][index2]; |
| | | ZoneAction?.Invoke(curRoom); |
| | | RemoveFromParent(); |
| | | }, 0, 0, Language.StringByID(R.MyInternationalizationString.BelongFloor), |
| | | Language.StringByID(R.MyInternationalizationString.Confrim), |
| | | Language.StringByID(R.MyInternationalizationString.Cancel)); |
| | | } |
| | | else |
| | | { |
| | | RemoveFromParent(); |
| | | }; |
| | | |
| | | var backgroundFL = new FrameLayout |
| | | { |
| | | Y = Application.GetRealHeight(1115), |
| | | Height = Application.GetRealHeight(805), |
| | | BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor, |
| | | Radius = (uint)Application.GetRealHeight(20) |
| | | }; |
| | | dialog.AddChidren(backgroundFL); |
| | | |
| | | var topView = new FrameLayout |
| | | { |
| | | Height = Application.GetRealHeight(138) |
| | | }; |
| | | backgroundFL.AddChidren(topView); |
| | | |
| | | var cancle = new Button |
| | | { |
| | | X = Application.GetRealWidth(80), |
| | | Width = Application.GetRealWidth(300), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = ZigbeeColor.Current.GXCTextGrayColor, |
| | | TextID = R.MyInternationalizationString.Cancel, |
| | | TextSize = 14 |
| | | }; |
| | | topView.AddChidren(cancle); |
| | | |
| | | var title = new Button |
| | | { |
| | | Width = Application.GetRealWidth(300), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor2, |
| | | TextID = R.MyInternationalizationString.AddTo, |
| | | TextSize = 16 |
| | | }; |
| | | topView.AddChidren(title); |
| | | |
| | | var confrim = new Button |
| | | { |
| | | X = Application.GetRealWidth(CommonFormResouce.AppRealWidth - 80 - 300), |
| | | Width = Application.GetRealWidth(300), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = ZigbeeColor.Current.GXCTextSelectedColor2, |
| | | TextID = R.MyInternationalizationString.Confrim, |
| | | TextSize = 14 |
| | | }; |
| | | topView.AddChidren(confrim); |
| | | |
| | | pickView = new UIPickerView |
| | | { |
| | | Y = Application.GetRealHeight(20 + 138), |
| | | Height = Application.GetRealHeight(450) |
| | | }; |
| | | backgroundFL.AddChidren(pickView); |
| | | for (int i = 0; i < Common.Room.Lists.Count; i++) |
| | | { |
| | | var r = Common.Room.Lists[i]; |
| | | if (r.IsLove) |
| | | { |
| | | continue; |
| | | } |
| | | rs.Add(r); |
| | | rNames.Add(r.Name); |
| | | } |
| | | PickerView.Show(rNames, (index1) => |
| | | { |
| | | curRoom = rs[index1]; |
| | | ZoneAction?.Invoke(curRoom); |
| | | RemoveFromParent(); |
| | | }, 0, Language.StringByID(R.MyInternationalizationString.BelongFloor), |
| | | Language.StringByID(R.MyInternationalizationString.Confrim), |
| | | Language.StringByID(R.MyInternationalizationString.Cancel)); |
| | | } |
| | | |
| | | foreach (var floor in Config.Instance.Home.FloorDics) |
| | | { |
| | |
| | | roomList.Add(room.Name); |
| | | roomIdList.Add(room.Id); |
| | | } |
| | | |
| | | if (floorList.Count == 0) |
| | | { |
| | | pickView.setNPicker(roomList, null, null); |
| | | currentId = roomIdList[0]; |
| | | pickView.OnSelectChangeEvent += (l1, l2, l3) => |
| | | { |
| | | currentId = roomIdList[l1]; |
| | | }; |
| | | } |
| | | else |
| | | { |
| | | pickView.setNPicker(floorList, roomList, null); |
| | | currentId = roomIdList[0]; |
| | | pickView.OnSelectChangeEvent += (l1, l2, l3) => |
| | | { |
| | | currentId = roomIdList[l2]; |
| | | }; |
| | | } |
| | | |
| | | cancle.MouseUpEventHandler += Close; |
| | | confrim.MouseUpEventHandler += Confrim_MouseEvent; |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="mouseEventArgs"></param> |
| | | private void Confrim_MouseEvent(object sender, MouseEventArgs mouseEventArgs) |
| | | { |
| | | if (Shared.Common.Room.CurrentRoom.GetRoomById(currentId) != null) |
| | | { |
| | | ZoneAction?.Invoke(Shared.Common.Room.CurrentRoom.GetRoomById(currentId)); |
| | | } |
| | | ZoneAction?.Invoke(curRoom); |
| | | RemoveFromParent(); |
| | | } |
| | | } |
| | |
| | | { |
| | | Y = Application.GetRealHeight(CommonFormResouce.TopStatuFrameLayout_Height), |
| | | Height = Application.GetRealHeight(CommonFormResouce.Topview_Height), |
| | | Width = Application.GetRealWidth(CommonPage.AppRealWidth) |
| | | Width = Application.GetRealWidth(CommonPage.AppRealWidth), |
| | | BackgroundColor=ZigbeeColor.Current.GXCTopViewBackgroundColor |
| | | }; |
| | | AddChidren(topView); |
| | | |
| | |
| | | { |
| | | Y=Height-1, |
| | | Height=1, |
| | | BackgroundColor=ZigbeeColor.Current.GXCGrayLineColor3 |
| | | BackgroundColor=ZigbeeColor.Current.GXCGrayLineColor4 |
| | | }; |
| | | AddChidren(line); |
| | | } |
| | |
| | | curtainRollSeekBar.Progress = (device.CommonDevice as Rollershade).WcdCurrentPositionLiftPercentage; |
| | | layout.AddChidren(curtainRollSeekBar); |
| | | curtainRollSeekBar.IsProgressTextShow = false; |
| | | //curtainRollSeekBar.OnStopTrackingTouchEvent += (sender, e) => |
| | | //{ |
| | | // (device.CommonDevice as Rollershade).WcdGoToTiltValue(curtainRollSeekBar.Progress); |
| | | //}; |
| | | curtainRollSeekBar.CurtainPaddingTop = Application.GetRealHeight(110); |
| | | curtainRollSeekBar.OnStopTrackingTouchEvent += (sender, e) => |
| | | { |
| | | (device.CommonDevice as Rollershade).WcdGoToTiltValue(curtainRollSeekBar.Progress); |
| | | }; |
| | | |
| | | curtainRollSeekBar.OnStartTrackingTouchEvent += (sender, e) => |
| | | { |
| | |
| | | OnProgressButtonMove(e2); |
| | | |
| | | //判断是否300ms屏蔽 |
| | | if (curtainRollSeekBar.IsProgressChangeDelay()) return; |
| | | //if (curtainRollSeekBar.IsProgressChangeDelay()) return; |
| | | |
| | | (device.CommonDevice as Rollershade).WcdGoToTiltValue(curtainRollSeekBar.Progress); |
| | | //(device.CommonDevice as Rollershade).WcdGoToTiltValue(curtainRollSeekBar.Progress); |
| | | }; |
| | | |
| | | InitProgressBtn(layout); |
| | |
| | | } |
| | | light.OnOffStatus = light.DeviceStatusReport.AttriBute[0].AttriButeData; |
| | | deviceIMG.IsSelected = switchBtn.IsSelected = light.OnOffStatus == 1; |
| | | StatuBtn.Text = CommonFormResouce.GetSwitchStatu(deviceIMG.IsSelected); |
| | | StatuBtn.Text = $"{Language.StringByID(R.MyInternationalizationString.Current)} {device.GetDeviceStatu()}"; |
| | | light.LastDateTime = DateTime.Now; |
| | | } |
| | | } |
| | |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Text = device.CommonDevice.DeviceEpointName, |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 15 |
| | | TextSize = 15, |
| | | IsBold=true |
| | | }; |
| | | itemView.AddChidren(deviceNameBtn); |
| | | |
| | |
| | | Height = Application.GetRealHeight(60), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextColor = ZigbeeColor.Current.GXCTextGrayColor, |
| | | Text = CommonFormResouce.GetSwitchStatu((device.CommonDevice as ZigBee.Device.AirSwitch).OnOffStatus == 1) |
| | | Text = $"{Language.StringByID(R.MyInternationalizationString.Current)} {device.GetDeviceStatu()}", |
| | | TextSize = 10 |
| | | }; |
| | | itemView.AddChidren(StatuBtn); |
| | | |
| | |
| | | Height = Application.GetRealHeight(50), |
| | | Text = room.Name, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = ZigbeeColor.Current.GXCTextWhiteColor |
| | | TextColor = ZigbeeColor.Current.GXCTextWhiteColor, |
| | | TextSize = 12 |
| | | }; |
| | | itemView.AddChidren(roomName); |
| | | } |
| | |
| | | zbGateway.ReportAction += UpdateDeviceControllStatu; |
| | | switchBtn.IsSelected = !switchBtn.IsSelected; |
| | | deviceIMG.IsSelected = !deviceIMG.IsSelected; |
| | | StatuBtn.Text = CommonFormResouce.GetSwitchStatu(deviceIMG.IsSelected); |
| | | StatuBtn.Text = deviceIMG.IsSelected ? $"{Language.StringByID(R.MyInternationalizationString.Current)} {Language.StringByID(R.MyInternationalizationString.Open)}" : $"{Language.StringByID(R.MyInternationalizationString.Current)} {Language.StringByID(R.MyInternationalizationString.Shut)}"; |
| | | if (switchBtn.IsSelected == true) |
| | | { |
| | | (device.CommonDevice as ZigBee.Device.AirSwitch).SwitchControl(1); |
| | |
| | | } |
| | | dimmableLight.OnOffStatus = dimmableLight.DeviceStatusReport.AttriBute[0].AttriButeData; |
| | | switchBtn.IsSelected = dimmableLight.OnOffStatus == 1; |
| | | StatuBtn.Text = CommonFormResouce.GetSwitchStatu(switchBtn.IsSelected); |
| | | StatuBtn.Text = switchBtn.IsSelected ? $"{Language.StringByID(R.MyInternationalizationString.CurrentLightLevel)} { device.GetDeviceStatu()}" : $"{Language.StringByID(R.MyInternationalizationString.Current)} {Language.StringByID(R.MyInternationalizationString.Shut)}"; |
| | | |
| | | if (switchBtn.IsSelected == true) |
| | | { |
| | | levelSeekBar.IsClickable = true; |
| | |
| | | dimmableLight.Level = attriButeList[0].AttriButeData; |
| | | dimmableLight.LastDateTime = DateTime.Now; |
| | | levelSeekBar.Progress = (int)(dimmableLight.Level*1.0/MaxLevel*100); |
| | | StatuBtn.Text = switchBtn.IsSelected ? $"{Language.StringByID(R.MyInternationalizationString.CurrentLightLevel)} { device.GetDeviceStatu()}" : $"{Language.StringByID(R.MyInternationalizationString.Current)} {Language.StringByID(R.MyInternationalizationString.Shut)}"; |
| | | |
| | | break; |
| | | } |
| | | } |
| | |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Text = device.CommonDevice.DeviceEpointName, |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 15 |
| | | TextSize = 15, |
| | | IsBold=true |
| | | }; |
| | | itemView.AddChidren(deviceNameBtn); |
| | | |
| | |
| | | Height = Application.GetRealHeight(60), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextColor = ZigbeeColor.Current.GXCTextGrayColor, |
| | | Text = CommonFormResouce.GetSwitchStatu((device.CommonDevice as DimmableLight).OnOffStatus == 1) |
| | | Text = dimmableLight.Level>0?$"{Language.StringByID(R.MyInternationalizationString.CurrentLightLevel)} { device.GetDeviceStatu()}" :$"{Language.StringByID(R.MyInternationalizationString.Current)} {Language.StringByID(R.MyInternationalizationString.Shut)}", |
| | | TextSize=10 |
| | | }; |
| | | |
| | | itemView.AddChidren(StatuBtn); |
| | | |
| | | levelSeekBar = new WaveSeekBar() |
| | |
| | | WavePadding = Application.GetRealWidth(8), |
| | | MaxValue=100, |
| | | Progress = (int)(dimmableLight.Level*1.0/MaxLevel*100), |
| | | WaveColor = ZigbeeColor.Current.GXCWaveSeekBarColor |
| | | WaveColor = ZigbeeColor.Current.GXCWaveSeekBarColor, |
| | | CornerRadius= Application.GetRealHeight(58) |
| | | }; |
| | | |
| | | itemView.AddChidren(levelSeekBar); |
| | | |
| | | if (dimmableLight.OnOffStatus == 1) |
| | |
| | | levelSeekBar.OnStartTrackingTouchEvent += (sender, e) =>
|
| | | {
|
| | | OnProgressButtonMove(levelSeekBar.Progress);
|
| | | levelSeekBar.IsProgressTextShow = false;
|
| | | ProgressBtn.Visible = true;
|
| | | };
|
| | |
|
| | | levelSeekBar.OnStopTrackingTouchEvent += (sender, e) =>
|
| | | {
|
| | | ProgressBtn.Visible = false;
|
| | | levelSeekBar.IsProgressTextShow = true;
|
| | | };
|
| | |
|
| | | levelSeekBar.OnProgressChangedEvent += (send2, e2) =>
|
| | |
| | | Height = Application.GetRealHeight(50), |
| | | Text = room.Name, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = ZigbeeColor.Current.GXCTextWhiteColor |
| | | TextColor = ZigbeeColor.Current.GXCTextWhiteColor, |
| | | TextSize = 12 |
| | | }; |
| | | itemView.AddChidren(roomName); |
| | | } |
| | |
| | | private void Switch_MouseUpEvent(object sender, MouseEventArgs eventArgs) |
| | | { |
| | | switchBtn.IsSelected = !switchBtn.IsSelected; |
| | | StatuBtn.Text = CommonFormResouce.GetSwitchStatu(switchBtn.IsSelected); |
| | | StatuBtn.Text = switchBtn.IsSelected ? $"{Language.StringByID(R.MyInternationalizationString.CurrentLightLevel)} { device.GetDeviceStatu()}" : $"{Language.StringByID(R.MyInternationalizationString.Current)} {Language.StringByID(R.MyInternationalizationString.Shut)}"; |
| | | if (switchBtn.IsSelected == true) |
| | | { |
| | | dimmableLight.SwitchControl(1); |
| | |
| | | } |
| | | light.OnOffStatus = light.DeviceStatusReport.AttriBute[0].AttriButeData; |
| | | deviceIMG.IsSelected = switchBtn.IsSelected = light.OnOffStatus == 1; |
| | | StatuBtn.Text = CommonFormResouce.GetSwitchStatu(deviceIMG.IsSelected); |
| | | StatuBtn.Text = $"{Language.StringByID(R.MyInternationalizationString.Current)} {device.GetDeviceStatu()}"; |
| | | light.LastDateTime = DateTime.Now; |
| | | } |
| | | } |
| | |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Text = device.CommonDevice.DeviceEpointName, |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize=15 |
| | | TextSize=15, |
| | | IsBold=true |
| | | }; |
| | | itemView.AddChidren(deviceNameBtn); |
| | | |
| | |
| | | Height = Application.GetRealHeight(60), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextColor = ZigbeeColor.Current.GXCTextGrayColor, |
| | | Text=CommonFormResouce.GetSwitchStatu((device.CommonDevice as ToggleLight).OnOffStatus == 1) |
| | | Text= $"{Language.StringByID(R.MyInternationalizationString.Current)} {device.GetDeviceStatu()}", |
| | | TextSize =10 |
| | | }; |
| | | itemView.AddChidren(StatuBtn); |
| | | |
| | | |
| | | deviceIMG = new Button() |
| | | { |
| | |
| | | Height = Application.GetRealHeight(50), |
| | | Text = room.Name, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = ZigbeeColor.Current.GXCTextWhiteColor |
| | | TextColor = ZigbeeColor.Current.GXCTextWhiteColor, |
| | | TextSize=12 |
| | | }; |
| | | itemView.AddChidren(roomName); |
| | | } |
| | |
| | | zbGateway.ReportAction += UpdateDeviceControllStatu; |
| | | switchBtn.IsSelected = !switchBtn.IsSelected; |
| | | deviceIMG.IsSelected = !deviceIMG.IsSelected; |
| | | StatuBtn.Text = CommonFormResouce.GetSwitchStatu(deviceIMG.IsSelected); |
| | | StatuBtn.Text = deviceIMG.IsSelected ? $"{Language.StringByID(R.MyInternationalizationString.Current)} {Language.StringByID(R.MyInternationalizationString.Open)}" : $"{Language.StringByID(R.MyInternationalizationString.Current)} {Language.StringByID(R.MyInternationalizationString.Shut)}"; |
| | | |
| | | if (switchBtn.IsSelected == true) |
| | | { |
| | | (device.CommonDevice as ToggleLight).SwitchControl(1); |
| | |
| | | } |
| | | light.OnOffStatus = light.DeviceStatusReport.AttriBute[0].AttriButeData; |
| | | SetONOFFStatu(light.OnOffStatus == 1); |
| | | StatuBtn.Text = CommonFormResouce.GetSwitchStatu(light.OnOffStatus == 1); |
| | | StatuBtn.Text = $"{Language.StringByID(R.MyInternationalizationString.Current)} {device.GetDeviceStatu()}"; |
| | | light.LastDateTime = DateTime.Now; |
| | | } |
| | | } |
| | |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Text = device.CommonDevice.DeviceEpointName, |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 15 |
| | | TextSize = 15, |
| | | IsBold=true |
| | | }; |
| | | itemView.AddChidren(deviceNameBtn); |
| | | |
| | |
| | | Height = Application.GetRealHeight(60), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextColor = ZigbeeColor.Current.GXCTextGrayColor, |
| | | Text = CommonFormResouce.GetSwitchStatu((device.CommonDevice as ToggleLight).OnOffStatus == 1) |
| | | Text = $"{Language.StringByID(R.MyInternationalizationString.Current)} {device.GetDeviceStatu()}", |
| | | TextSize = 10 |
| | | }; |
| | | itemView.AddChidren(StatuBtn); |
| | | |
| | |
| | | Height = Application.GetRealHeight(50), |
| | | Text = room.Name, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = ZigbeeColor.Current.GXCTextWhiteColor |
| | | TextColor = ZigbeeColor.Current.GXCTextWhiteColor, |
| | | TextSize = 12 |
| | | }; |
| | | itemView.AddChidren(roomName); |
| | | } |
| | |
| | | OnBtn.IsSelected = false; |
| | | OffBtn.IsSelected = true; |
| | | } |
| | | StatuBtn.Text = statu ? $"{Language.StringByID(R.MyInternationalizationString.Current)} {Language.StringByID(R.MyInternationalizationString.Open)}" : $"{Language.StringByID(R.MyInternationalizationString.Current)} {Language.StringByID(R.MyInternationalizationString.Shut)}"; |
| | | } |
| | | |
| | | |
| | | |
| | | #endregion |
| | | |
| | |
| | | } |
| | | light.OnOffStatus = light.DeviceStatusReport.AttriBute[0].AttriButeData; |
| | | deviceIMG.IsSelected = switchBtn.IsSelected = light.OnOffStatus == 1; |
| | | StatuBtn.Text = CommonFormResouce.GetSwitchStatu(deviceIMG.IsSelected); |
| | | StatuBtn.Text = $"{Language.StringByID(R.MyInternationalizationString.Current)} {device.GetDeviceStatu()}"; |
| | | light.LastDateTime = DateTime.Now; |
| | | } |
| | | } |
| | |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Text = device.CommonDevice.DeviceEpointName, |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 15 |
| | | TextSize = 15, |
| | | IsBold=true |
| | | }; |
| | | itemView.AddChidren(deviceNameBtn); |
| | | |
| | |
| | | Height = Application.GetRealHeight(60), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextColor = ZigbeeColor.Current.GXCTextGrayColor, |
| | | Text = CommonFormResouce.GetSwitchStatu((device.CommonDevice as ToggleLight).OnOffStatus == 1) |
| | | Text = $"{Language.StringByID(R.MyInternationalizationString.Current)} {device.GetDeviceStatu()}", |
| | | TextSize = 10 |
| | | }; |
| | | itemView.AddChidren(StatuBtn); |
| | | |
| | |
| | | Height = Application.GetRealHeight(50), |
| | | Text = room.Name, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = ZigbeeColor.Current.GXCTextWhiteColor |
| | | TextColor = ZigbeeColor.Current.GXCTextWhiteColor, |
| | | TextSize=12 |
| | | }; |
| | | itemView.AddChidren(roomName); |
| | | } |
| | |
| | | zbGateway.ReportAction += UpdateDeviceControllStatu; |
| | | switchBtn.IsSelected = !switchBtn.IsSelected; |
| | | deviceIMG.IsSelected = !deviceIMG.IsSelected; |
| | | StatuBtn.Text = CommonFormResouce.GetSwitchStatu(deviceIMG.IsSelected); |
| | | StatuBtn.Text = deviceIMG.IsSelected ? $"{Language.StringByID(R.MyInternationalizationString.Current)} {Language.StringByID(R.MyInternationalizationString.Open)}" : $"{Language.StringByID(R.MyInternationalizationString.Current)} {Language.StringByID(R.MyInternationalizationString.Shut)}"; |
| | | if (switchBtn.IsSelected == true) |
| | | { |
| | | (device.CommonDevice as ToggleLight).SwitchControl(1); |
| | |
| | | itemView.AddChidren(roomView); |
| | | roomView.Init(this,room); |
| | | roomView.SetRoomName(room.Name); |
| | | roomView.SetRoomIcon(room.BackgroundImage); |
| | | roomView.SetRoomIcon(room.BackgroundImageType == 0 ? room.BackgroundImage : System.IO.Path.Combine(Config.Instance.FullPath, room.BackgroundImage)); |
| | | roomView.ClickBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | if (CanClick == false) |
| | |
| | | { |
| | | RemoveFromParent(); |
| | | }; |
| | | |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param> |
| | | private void ShowSameTypeFunction(object typeSender, MouseEventArgs mouseEventArgs) |
| | | { |
| | | //选择功能--直接从房间的devicelist中获取 |
| | | tempFunctionTypeBtn.IsSelected = false; |
| | | tempFunctionTypeBtn = (typeSender as Button).Parent as FunctionButton; |
| | | ((typeSender as Button).Parent as FunctionButton).IsSelected = true; |
| | |
| | | if ((sender as Button).IsSelected) |
| | | { |
| | | (sender as Button).TextID = R.MyInternationalizationString.Cancel; |
| | | selectedList.Clear(); |
| | | selectedList.AddRange(sameTypeList); |
| | | } |
| | | else |
| | |
| | | r.AddDevice(d.CommonDevice, true); |
| | | deviceListScrolView.RemoveViewByTag(d); |
| | | } |
| | | RefreshData(); |
| | | |
| | | if (sameTypeList.Count == selectedList.Count) |
| | | { |
| | | RefreshData(); |
| | | RefreshBodyView(); |
| | | } |
| | | else |
| | | { |
| | | RefreshData(); |
| | | sameTypeList = typeDeviceDic[int.Parse((typeSender as Button).Tag.ToString())]; |
| | | } |
| | | }; |
| | | }; |
| | | } |
| | |
| | | dialog.Close(); |
| | | return; |
| | | } |
| | | new System.Threading.Thread(() => |
| | | CommonPage.Loading.Start(); |
| | | new System.Threading.Thread(async () => |
| | | { |
| | | var result= HdlSafeguardLogic.Current.SetSafetyGarrisonByModel(GarrisonMode.AtHome); |
| | | var result=await HdlSafeguardLogic.Current.SetSafetyGarrisonByModel(GarrisonMode.AtHome); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | CommonPage.Loading.Hide(); |
| | | dialog.Close(); |
| | | if(result == GarrisonMode.AtHome) |
| | | { |
| | | |
| | | } |
| | | }); |
| | | |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }; |
| | |
| | | if(UserCenterResourse.Option.SafetyShortcut) |
| | | { |
| | | var safetyBtn = new SafetyShortcutControl(); |
| | | safetyBtn.X = Application.GetRealWidth(855); |
| | | safetyBtn.X = Application.GetRealWidth(860); |
| | | safetyBtn.Gravity = Gravity.CenterVertical; |
| | | topFrameLayout.AddChidren(safetyBtn); |
| | | } |
| | |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = Config.Instance.Home.Name ?? Language.StringByID(R.MyInternationalizationString.TheResidenceNameNull), |
| | | TextSize = 24, |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextColor = ZigbeeColor.Current.GXCTextDeepBlackColor, |
| | | IsBold=true |
| | | }; |
| | | if (Config.Instance.Home.IsOthreShare) |
| | |
| | | /// </summary> |
| | | public const int LoginByAccountPWD = 10110; |
| | | /// <summary> |
| | | /// 发送验证码 |
| | | /// 获取验证码 |
| | | /// </summary> |
| | | public const int SendVerificationCode = 10111; |
| | | /// <summary> |
| | |
| | | /// 新密码和原密码一致 |
| | | /// </summary> |
| | | public const int NEWPASSWORDANDOLDPASSWORDEQUAL = 10142; |
| | | /// <summary> |
| | | /// 请先获取验证码 |
| | | /// </summary> |
| | | public const int NORECORD = 10143; |
| | | /// <summary> |
| | | /// 忘记密码? |
| | | /// </summary> |
| | | public const int ForgotPWD_1 = 10144; |
| | | /// <summary> |
| | | /// 已有账号?登录 |
| | | /// </summary> |
| | | public const int LoginByAccountPWD_1 = 10145; |
| | | |
| | | |
| | | /// <summary> |
| | |
| | | /// 网关不在线 |
| | | /// </summary> |
| | | public const int TheMainGatewayIsNotOnLine = 10157; |
| | | /// <summary> |
| | | /// 下一步 |
| | | /// </summary> |
| | | public const int Next = 10158; |
| | | |
| | | |
| | | /// <summary> |
| | |
| | | public const int NeedCleanAC = 13511; |
| | | |
| | | /// <summary> |
| | | /// 没功能 请先添加 |
| | | /// 还没有功能哦 |
| | | /// </summary> |
| | | public const int NoFunction_Tip = 13600; |
| | | /// <summary> |
| | | /// 没场景 请先添加 |
| | | /// 还没有场景哦 |
| | | /// </summary> |
| | | public const int NoScene_Tip = 13601; |
| | | /// <summary> |
| | |
| | | /// 获取中... |
| | | /// </summary> |
| | | public const int Getting = 13603; |
| | | /// <summary> |
| | | /// 当前 亮度 |
| | | /// </summary> |
| | | public const int CurrentLightLevel = 13604; |
| | | |
| | | |
| | | |