| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.7.6" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202305122"> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.7.6" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202305126"> |
| | | <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" /> |
| | | <uses-permission android:name="android.permission.RECEIVE_SMS" /> |
| | | <!--友盟--> |
| | | <!--<uses-sdk android:minSdkVersion="8"></uses-sdk>--> |
| | | <!--<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>--> |
| | |
| | | //#endif |
| | | JPushInterface.Init(this); |
| | | |
| | | //Com.Chteam.Agent.BuglyAgentHelper.Init(this.ApplicationContext, "316a8f5d83"); |
| | | Com.Chteam.Agent.BuglyAgentHelper.Init(this.ApplicationContext, "316a8f5d83"); |
| | | |
| | | |
| | | |
| | |
| | | using Shared; |
| | | using UIKit; |
| | | using UserNotifications; |
| | | using Microsoft.AppCenter; |
| | | using Microsoft.AppCenter.Analytics; |
| | | using Microsoft.AppCenter.Crashes; |
| | | using HDL_ON.UI; |
| | | using HDL_ON.DAL.Server; |
| | | using Intents; |
| | |
| | | Console.WriteLine("111111111111"); |
| | | SetCurrentLanguage(); |
| | | //Shared.Application.FontSize = 12; |
| | | Bugly.Bugly.StartWithAppId("b58fb35436"); |
| | | Bugly.Bugly.StartWithAppId("1dc40c170a"); |
| | | //取消EditText默认密码输入方式 |
| | | //Shared.Application.IsEditTextContentTypePassword = false; |
| | | //默认使用苹方字体 |
| | |
| | | rootViewController = new UINavigationController(new ViewController()) { NavigationBarHidden = true }; |
| | | Window.RootViewController = rootViewController; |
| | | Window.MakeKeyAndVisible(); |
| | | |
| | | AppCenter.Start("e1add75a-82c6-4a5c-a902-4705b195748e", typeof(Analytics), typeof(Crashes)); |
| | | |
| | | SharedMethod.SharedMethod.sharedApp = application; |
| | | //NSString* nsCount = [[NSLocale currentLocale] objectForKey: NSLocaleCountryCode]; |
| | |
| | | <PackageReference Include="MQTTnet"> |
| | | <Version>3.1.0</Version> |
| | | </PackageReference> |
| | | <PackageReference Include="Microsoft.AppCenter.Analytics"> |
| | | <Version>4.4.0</Version> |
| | | </PackageReference> |
| | | <PackageReference Include="Microsoft.AppCenter.Crashes"> |
| | | <Version>4.4.0</Version> |
| | | </PackageReference> |
| | | <PackageReference Include="ZXing.Net.Mobile"> |
| | | <Version>2.4.1</Version> |
| | | </PackageReference> |
| | |
| | | public void SearchLoaclGateway() |
| | | { |
| | | //2021-01-15 : 住宅没有绑定网关的时候不用搜索,并且不能链接mqtt |
| | | if (DB_ResidenceData.Instance.HomeGateway == null || string.IsNullOrEmpty(DB_ResidenceData.Instance.HomeGateway.gatewayId)) |
| | | if (DB_ResidenceData.Instance.HomeGateway == null || string.IsNullOrEmpty(DB_ResidenceData.Instance.HomeGateway.gatewayId) || |
| | | !UserInfo.Current.IsLogin) |
| | | { |
| | | return; |
| | | } |
| | |
| | | /// <summary> |
| | | /// 验证码文本输入框 |
| | | /// </summary> |
| | | EditText etVerificationCode; |
| | | TextView etVerificationCode; |
| | | /// <summary> |
| | | /// 获取验证码按钮 |
| | | /// </summary> |
| | |
| | | //}; |
| | | //verificationCodeView.AddChidren(btnDividingLineVertical_VerificationCodeView1); |
| | | |
| | | etVerificationCode = new EditText() |
| | | etVerificationCode = new TextView() |
| | | { |
| | | X = Application.GetRealWidth(49), |
| | | Width = Application.GetRealWidth(61 + 84), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | //TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | PlaceholderTextColor = CSS_Color.PromptingColor1, |
| | | PlaceholderText = Language.StringByID(StringId.PlsEntryVerificationCode), |
| | | IsNumberKeyboardType = true |
| | | //PlaceholderTextColor = CSS_Color.PromptingColor1, |
| | | //PlaceholderText = Language.StringByID(StringId.PlsEntryVerificationCode), |
| | | //IsNumberKeyboardType = true |
| | | }; |
| | | verificationCodeView.AddChidren(etVerificationCode); |
| | | |
| | |
| | | // } |
| | | //}; |
| | | |
| | | Action<View, string> textChangeEventHandler = (view, textStr) => |
| | | { |
| | | LoadMothed_EnableResetButton(); |
| | | }; |
| | | //etAccount.TextChangeEventHandler += textChangeEventHandler; |
| | | etPassword.TextChangeEventHandler += textChangeEventHandler; |
| | | etRepeatPassword.TextChangeEventHandler += textChangeEventHandler; |
| | | etVerificationCode.TextChangeEventHandler += textChangeEventHandler; |
| | | //Action<View, string> textChangeEventHandler = (view, textStr) => |
| | | //{ |
| | | // LoadMothed_EnableResetButton(); |
| | | //}; |
| | | ////etAccount.TextChangeEventHandler += textChangeEventHandler; |
| | | //etPassword.TextChangeEventHandler += textChangeEventHandler; |
| | | //etRepeatPassword.TextChangeEventHandler += textChangeEventHandler; |
| | | //etVerificationCode.TextChangeEventHandler += textChangeEventHandler; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | }; |
| | | |
| | | //验证码文本框焦点变化事件 |
| | | etVerificationCode.FoucsChanged += (sender, e) => |
| | | { |
| | | if (etVerificationCode.Foucs) |
| | | { |
| | | HDLCommon.Current.BottomLineShowType(btnVerificationCodeViewBottomLine, BottomLineType.GotFocus); |
| | | } |
| | | else |
| | | { |
| | | if (isHitBack) return;//点击返回关闭页面不检测提示 |
| | | //etVerificationCode.FoucsChanged += (sender, e) => |
| | | //{ |
| | | // if (etVerificationCode.Foucs) |
| | | // { |
| | | // HDLCommon.Current.BottomLineShowType(btnVerificationCodeViewBottomLine, BottomLineType.GotFocus); |
| | | // } |
| | | // else |
| | | // { |
| | | // if (isHitBack) return;//点击返回关闭页面不检测提示 |
| | | |
| | | HDLCommon.Current.BottomLineShowType(btnVerificationCodeViewBottomLine, BottomLineType.Normal); |
| | | if (etVerificationCode.Text.Length > 4) |
| | | { |
| | | LoadMothed_EnableResetButton(); |
| | | } |
| | | } |
| | | }; |
| | | // HDLCommon.Current.BottomLineShowType(btnVerificationCodeViewBottomLine, BottomLineType.Normal); |
| | | // if (etVerificationCode.Text.Length > 4) |
| | | // { |
| | | // LoadMothed_EnableResetButton(); |
| | | // } |
| | | // } |
| | | //}; |
| | | } |
| | | |
| | | |
| | |
| | | { |
| | | //短信发送间隔60s |
| | | (sender as Button).IsSelected = false; |
| | | etVerificationCode.Foucs = true; |
| | | //etVerificationCode.Foucs = true; |
| | | }); |
| | | //2.1获取验证码倒计时 |
| | | new Thread(() => |
| | |
| | | this.Y = 0; |
| | | }); |
| | | }; |
| | | BaseActivity.SmsAction = (message) => { |
| | | Console.WriteLine($"接收到短信:"+ message); |
| | | |
| | | string pattern = @"【HDL】.*(\d{6}).*"; |
| | | |
| | | Regex regex = new Regex(pattern); |
| | | |
| | | Match match = regex.Match(message); |
| | | |
| | | if (match.Success) |
| | | { |
| | | string code = match.Groups[1].Value; |
| | | Console.WriteLine("验证码为:" + code); |
| | | if(loginType==0 && logintMode == 1) |
| | | { |
| | | etPassword.Text = code; |
| | | } |
| | | smsCode = code; |
| | | } |
| | | else |
| | | { |
| | | Console.WriteLine("未找到验证码!"); |
| | | } |
| | | }; |
| | | #endif |
| | | } |
| | | |
| | |
| | | BaseActivity.HideKeyboardEvent = () => { |
| | | |
| | | }; |
| | | BaseActivity.SmsAction = (sms) => { }; |
| | | #endif |
| | | base.RemoveFromParent(); |
| | | |
| | |
| | | int logintMode = 0; |
| | | string account = ""; |
| | | string password = ""; |
| | | /// <summary> |
| | | /// 短信验证码 |
| | | /// </summary> |
| | | string smsCode = ""; |
| | | #endregion |
| | | |
| | | #region 控件列表 |
| | |
| | | //etAccount.Text = "tf@smarttech.com.ua"; |
| | | //etAccount.Text = "455740454@qq.com"; |
| | | //etAccount.Text = "18688565449"; |
| | | etAccount.Text = "support7@hdlautomation.com"; |
| | | //etAccount.Text = "18570064522"; |
| | | //etAccount.Text = "18718417827"; |
| | | //etAccount.Text = "18188019284"; |
| | |
| | | //etAccount.Text = "13751916353"; |
| | | etAccount.Text = "13549566666"; |
| | | etAccount.Text = "18316672920"; |
| | | etAccount.Text = "support7@hdlautomation.com"; |
| | | } |
| | | else |
| | | { |
| | |
| | | btnAccountViewBottomLine.Height = Application.GetRealHeight(2); |
| | | return; |
| | | } |
| | | #if __IOS__ |
| | | etPassword.Foucs = true; |
| | | #endif |
| | | //加载Loading效果 |
| | | var waitPage = new Loading(); |
| | | bodyView.AddChidren(waitPage); |
| | |
| | | //} |
| | | //隐藏密码 |
| | | etPassword.SecureTextEntry = true; |
| | | etPassword.IsNumberKeyboardType = false; |
| | | } |
| | | //验证码登录 |
| | | else if (logintMode == 1) |
| | |
| | | } |
| | | //验证码不需要隐藏 |
| | | etPassword.SecureTextEntry = false; |
| | | etPassword.Text = smsCode; |
| | | etPassword.IsNumberKeyboardType = true; |
| | | #if __IOS__ |
| | | var currentInputMode = UIKit.UITextInputMode.CurrentInputMode; |
| | | var installedInputModes = UIKit.UITextInputMode.ActiveInputModes; |
| | | var temmm = new EditText() |
| | | { |
| | | X = Application.GetRealWidth(78), |
| | | Width = Application.GetRealWidth(61 + 84), |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Foucs = true, |
| | | BackgroundColor = 0x44330000, |
| | | }; |
| | | passwordView.AddChidren(etPassword); |
| | | |
| | | #endif |
| | | } |
| | | } |
| | | |
| | |
| | | d.Add(FunctionAttributeKey.FadeTime, function.GetAttrState(FunctionAttributeKey.FadeTime)); |
| | | Control.Ins.SendWriteCommand(function, d); |
| | | } |
| | | else if (function.spk == SPK.PanelSocket) |
| | | { |
| | | if (function.attributes.Find((obj) => obj.key == "on_off_usb") != null) |
| | | { |
| | | d.Add("on_off_usb", function.trait_on_off.curValue.ToString()); |
| | | } |
| | | Control.Ins.SendWriteCommand(function, d); |
| | | } |
| | | //else if (function.spk == SPK.PanelSocket)//去掉,统一处理总控 |
| | | //{ |
| | | // if (function.attributes.Find((obj) => obj.key == "on_off_usb") != null) |
| | | // { |
| | | // d.Add("on_off_usb", function.trait_on_off.curValue.ToString()); |
| | | // } |
| | | // Control.Ins.SendWriteCommand(function, d); |
| | | //} |
| | | else |
| | | { |
| | | d.Add("on_off", function.trait_on_off.curValue.ToString()); |
| | |
| | | { |
| | | return; |
| | | } |
| | | if (updateTemp.sid != bodyView.function.sid) |
| | | { |
| | | return; |
| | | } |
| | | var outinTemp = Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", "."))); |
| | | bodyView.btnTemp.Text = outinTemp.ToString(); |
| | | //bodyView.btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))) + "°C"; |
| | |
| | | <key>CFBundlePackageType</key> |
| | | <string>XPC!</string> |
| | | <key>CFBundleShortVersionString</key> |
| | | <string>1.3.202304211</string> |
| | | <string>1.7.6</string> |
| | | <key>CFBundleVersion</key> |
| | | <string>1.3.04211</string> |
| | | <string>1.7.6</string> |
| | | <key>MinimumOSVersion</key> |
| | | <string>12.2</string> |
| | | <key>NSExtension</key> |
| | |
| | | <key>CFBundlePackageType</key> |
| | | <string>XPC!</string> |
| | | <key>CFBundleShortVersionString</key> |
| | | <string>1.3.202304211</string> |
| | | <string>1.7.6</string> |
| | | <key>CFBundleVersion</key> |
| | | <string>1.3.04211</string> |
| | | <string>1.7.6</string> |
| | | <key>MinimumOSVersion</key> |
| | | <string>12.2</string> |
| | | <key>NSExtension</key> |