DLL/Linphone/iOS/Shared.IOS.HDLLinphoneSDK.dllBinary files differ
HDL-ON_Android/Assets/Language.ini
@@ -530,6 +530,7 @@ 542=Wandering alarm 543=Get more 544=Angle 545=Alarm data statistics 2532=Visitor Invitation Record 2533=Visitor management @@ -1717,6 +1718,7 @@ 542=徘徊报警 543=获取更多 544=角度 545=报警数据统计 2532=访客邀请记录 @@ -2884,6 +2886,7 @@ 542=Wandering alarm 543=Get more 544=Angle 545=Alarm data statistics 2532=Visitor Invitation Record 2533=Visitor management @@ -4062,6 +4065,7 @@ 542=Wandering alarm 543=Get more 544=Angle 545=Alarm data statistics 1000=Humedad de ambiente 1001=V-chip HDL-ON_Android/Assets/Phone/FunctionIcon/CAC/HvacCacHumidityIcon.png
HDL-ON_Android/Assets/Phone/FunctionIcon/CAC/HvacCacTempIcon.png
HDL-ON_Android/HDL-ON_Android.csproj
@@ -251,6 +251,8 @@ <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\curtaindream_blue.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\curtaindream_white.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\curtaindream.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\CAC\HvacCacHumidityIcon.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\CAC\HvacCacTempIcon.png" /> </ItemGroup> <ItemGroup> <AndroidResource Include="Resources\values\colors.xml" /> HDL-ON_Android/LeChengVideoActivity.cs
@@ -19,6 +19,7 @@ using Com.Lechange.Opensdk.Device; using Com.Lechange.Opensdk.Listener; using Com.Lechange.Opensdk.Media; using HDL_ON; using HDL_ON.DAL.Server; using HDL_ON_Android.LeChengView.Form; using Java.IO; @@ -166,6 +167,7 @@ /// </summary> public void StartTalk() { UserInfo.Current.inVideo = true; CloseAudio();// 关闭Audio LCOpenSDK_Talk.Listener = new AudioTalkerListener();//设置对讲监听 //2021-10-29 对讲请求类型,call呼叫,如果不传,默认为talk @@ -184,6 +186,8 @@ /// </summary> public void StopTalk() { UserInfo.Current.inCall = DateTime.MinValue; UserInfo.Current.inVideo = false; LCOpenSDK_Talk.StopTalk(); LCOpenSDK_Talk.Listener = null; } HDL-ON_Android/Other/JPush/JPushReceiver.cs
@@ -65,6 +65,12 @@ Utlis.WriteLine("PushMes messageType : " + pushMes.messageType); } if (!string.IsNullOrEmpty(pushMes.spk))//自研可视对讲需要记录时间反呼 { UserInfo.Current.pushMessageInfo = pushMes; UserInfo.Current.inCall = DateTime.Now; } Utlis.WriteLine("PushMes title : " + pushMes.Title); Utlis.WriteLine("PushMes message : " + pushMes.Content); Utlis.WriteLine("PushMes extras : " + pushMes.Extras); HDL-ON_Android/Properties/AndroidManifest.xml
@@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.5.9" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202207041"> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.5.9" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202207081"> <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" /> <!--友盟--> <!--<uses-sdk android:minSdkVersion="8"></uses-sdk>--> HDL-ON_iOS/AppDelegate.cs
@@ -388,6 +388,11 @@ Utlis.WriteLine("PushMes title : " + pushMes.Title); Utlis.WriteLine("PushMes message : " + pushMes.Content); Utlis.WriteLine("PushMes extras : " + pushMes.Extras); if (!string.IsNullOrEmpty(pushMes.spk))//自研可视对讲需要记录时间反呼 { UserInfo.Current.pushMessageInfo = pushMes; UserInfo.Current.inCall = DateTime.Now; } if (bFinishedLaunching) { HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -1413,6 +1413,8 @@ <BundleResource Include="Resources\Phone\FunctionIcon\Icon\curtaindream.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\curtaindream_blue.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\curtaindream_white.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\CAC\HvacCacHumidityIcon.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\CAC\HvacCacTempIcon.png" /> </ItemGroup> <ItemGroup> <ITunesArtwork Include="iTunesArtwork" /> HDL-ON_iOS/Resources/Language.ini
@@ -530,6 +530,28 @@ 542=Wandering alarm 543=Get more 544=Angle 545=Alarm data statistics 2532=Visitor Invitation Record 2533=Visitor management 2534=Visitor Invitation 2535=Record 2536=*After you initiate the visitor certificate, you can unlock the door by password or swipe the code freely within the validity period you set. Please share the certificate carefully. 2537=Input phone number of the visitor 2538=Input 6-digits temporary password 2539=Random Generation 2540=After confirmation, the visitor QR code will be generated, and the 6-digit dynamic digital password SMS will also be sent to the visitor mobile phone. 2541=Are you sure to delete visitor credentials? 2542=Long press the QR code to save the QR code to the album 2543=QR code is invalid 2544=Generate Visitor Credentials 2545=Cancle Visitor Credentials 2546=Visitor QR Code 2547=Phone Number 2548=Please enter a correct phone number 2549=Please select a effective time 2550=Please select a expire time 2551=Temporary password is invalid 1000=Room Humidity @@ -1051,6 +1073,7 @@ 7158=is 7159=Fall in the alarm 7160=Someone called the police @@ -1695,7 +1718,34 @@ 542=徘徊报警 543=获取更多 544=角度 545=报警数据统计 2532=访客邀请记录 2533=访客管理 2534=访客邀请 2535=访客记录 2536=*您发起访客凭证后,该凭证将在您设置的有效期内,可自由刷码或密码开锁进行进出,请谨慎分享该凭证。 2537=输入访客手机号码 2538=输入6位动态密码 2539=随机生成 2540=确认后,会生成访客二维码,同时也会将6位动态数字密码短信发送到访客手机上。 2541=确定删除访客凭证? 2542=长按二维码可以将二维码保存到相册 2543=二维码已失效 2544=生成访客凭证 2545=取消访客凭证 2546=访客二维码 2547=手机号 2548=请输入正确的手机号码 2549=请选择生效时间 2550=请选择失效时间 2551=动态密码已失效 1000=室内湿度 1001=童锁 1002=负离子 @@ -2836,6 +2886,28 @@ 542=Wandering alarm 543=Get more 544=Angle 545=Alarm data statistics 2532=Visitor Invitation Record 2533=Visitor management 2534=Visitor Invitation 2535=Record 2536=*After you initiate the visitor certificate, you can unlock the door by password or swipe the code freely within the validity period you set. Please share the certificate carefully. 2537=Input phone number of the visitor 2538=Input 6-digits temporary password 2539=Random Generation 2540=After confirmation, the visitor QR code will be generated, and the 6-digit dynamic digital password SMS will also be sent to the visitor mobile phone. 2541=Are you sure to delete visitor credentials? 2542=Long press the QR code to save the QR code to the album 2543=QR code is invalid 2544=Generate Visitor Credentials 2545=Cancle Visitor Credentials 2546=Visitor QR Code 2547=Phone Number 2548=Please enter a correct phone number 2549=Please select a effective time 2550=Please select a expire time 2551=Temporary password is invalid 1000=Влажность в Помещении @@ -3993,6 +4065,7 @@ 542=Wandering alarm 543=Get more 544=Angle 545=Alarm data statistics 1000=Humedad de ambiente 1001=V-chip HDL-ON_iOS/Resources/Phone/FunctionIcon/CAC/HvacCacHumidityIcon.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/CAC/HvacCacTempIcon.png
HDL_ON/Common/HDLCommon.cs
@@ -301,9 +301,23 @@ else if (jpushMessageInfo.messageType.Contains(PushMessageType.HDL_INTERPHONE.ToString())) { if (string.IsNullOrEmpty(jpushMessageInfo.expantContent)) return; //字段兼容问题,只能直接取值了 var json = Newtonsoft.Json.Linq.JObject.Parse(jpushMessageInfo.expantContent); try { var pushTime = json["pushTime"]; if (!string.IsNullOrEmpty(pushTime.ToString())) { var pushDateTime = Utlis.UnixToDateTimeMS(Convert.ToInt64(pushTime)); if (pushDateTime.AddSeconds(30) < DateTime.Now) { return; } } } catch { } //1.视对讲厂家类型 string interphoneTypeEnum = json["interphoneTypeEnum"].ToString(); if (string.IsNullOrEmpty(interphoneTypeEnum)) return; HDL_ON/Common/R.cs
@@ -5,6 +5,10 @@ public static class StringId { /// <summary> /// 报警数据统计 /// </summary> public const int AlarmDataStatistics = 545; /// <summary> /// 角度 /// </summary> public const int Angle = 544; HDL_ON/Common/UserInfo.cs
@@ -322,5 +322,21 @@ return path + "/"; } /// <summary> /// 推送消息记录 /// </summary> public JPushMessageInfo pushMessageInfo = new JPushMessageInfo(); /// <summary> /// 是否已经加载呼叫弹窗 /// </summary> public bool alreadyShowCallInDialog = false; [Newtonsoft.Json.JsonIgnore] public bool inVideo = false; [Newtonsoft.Json.JsonIgnore] public DateTime inCall = DateTime.MinValue; } } HDL_ON/Entity/Function/Function.cs
@@ -1025,6 +1025,10 @@ /// </summary> public const string RoomHumidity = "room_humidity"; /// <summary> /// 露点温度 /// </summary> public const string dew_point_temp = "dew_point_temp"; /// <summary> /// value /// </summary> public const string Value = "value"; HDL_ON/Entity/FunctionList.cs
@@ -471,6 +471,7 @@ if (readList.Count > 9) { Control.Ins.SendReadCommand(readList); readList.Clear(); } } if (readList.Count > 0) HDL_ON/UI/MainPage.cs
@@ -8,88 +8,88 @@ namespace HDL_ON { public static class MainPage { /// <summary> /// BaseView /// </summary> public static FrameLayout BaseView { get; internal set; } /// <summary> /// BasePageView /// </summary> public static PageLayout BasePageView { get; set; } /// <summary> /// 用户控制父容器 /// </summary> public static UserPage UserBasePage; /// <summary> /// 版本号 /// </summary> public static string VersionString = "1.5.9"; ///// <summary> ///// 客户端类型 ///// </summary> //public static string ClientType = APIClientType.HDL_ON_PRO.ToString(); /// <summary> /// /// </summary> public static Entity.CityInfo cityInfo = new Entity.CityInfo(); /// <summary> /// 天气刷新action /// </summary> public static Action RefreshAir; /// <summary> /// 回退页面action 没有需要可以不用 /// </summary> public static Action ReturnRefreshAction; /// <summary> /// 无登录模式 /// </summary> public static bool NoLoginMode = false; /// <summary> /// 网络连接状态 /// 0:无网络 /// </summary> public static int InternetStatus = 2; /// <summary> /// 是否进入后台 /// </summary> public static bool IsEnterBackground = false; /// <summary> /// 当前分页索引 /// 0:收藏 /// 1:分类 /// 2:智能 /// 3:个人 /// </summary> public static int CurPageIndex = 9999; ///// <summary> ///// 公司代码 ///// 预留第三方定制标记 ///// 0:HDL ///// </summary> //public static int Company = 0; /// <summary> /// 右滑后退提示按钮 /// </summary> public static Button BtnBackIcon; /// <summary> /// 后退右滑了多少距离,超过一定距离才触发后退事件 /// </summary> public static int StartX = 0; /// <summary> /// 是否全面屏手机 /// </summary> public static bool Increase public static class MainPage { get { /// <summary> /// BaseView /// </summary> public static FrameLayout BaseView { get; internal set; } /// <summary> /// BasePageView /// </summary> public static PageLayout BasePageView { get; set; } /// <summary> /// 用户控制父容器 /// </summary> public static UserPage UserBasePage; /// <summary> /// 版本号 /// </summary> public static string VersionString = "1.5.9"; ///// <summary> ///// 客户端类型 ///// </summary> //public static string ClientType = APIClientType.HDL_ON_PRO.ToString(); /// <summary> /// /// </summary> public static Entity.CityInfo cityInfo = new Entity.CityInfo(); /// <summary> /// 天气刷新action /// </summary> public static Action RefreshAir; /// <summary> /// 回退页面action 没有需要可以不用 /// </summary> public static Action ReturnRefreshAction; /// <summary> /// 无登录模式 /// </summary> public static bool NoLoginMode = false; /// <summary> /// 网络连接状态 /// 0:无网络 /// </summary> public static int InternetStatus = 2; /// <summary> /// 是否进入后台 /// </summary> public static bool IsEnterBackground = false; /// <summary> /// 当前分页索引 /// 0:收藏 /// 1:分类 /// 2:智能 /// 3:个人 /// </summary> public static int CurPageIndex = 9999; ///// <summary> ///// 公司代码 ///// 预留第三方定制标记 ///// 0:HDL ///// </summary> //public static int Company = 0; /// <summary> /// 右滑后退提示按钮 /// </summary> public static Button BtnBackIcon; /// <summary> /// 后退右滑了多少距离,超过一定距离才触发后退事件 /// </summary> public static int StartX = 0; /// <summary> /// 是否全面屏手机 /// </summary> public static bool Increase { get { #if __IOS__ if (Application.PhoneType>10) if (Application.PhoneType > 10) { return true; } @@ -97,13 +97,13 @@ #else return false; #endif } } } } /// <summary> /// 场景支持的功能列表 /// </summary> public static List<string> SceneSupportFunctionList = new List<string> { /// <summary> /// 场景支持的功能列表 /// </summary> public static List<string> SceneSupportFunctionList = new List<string> { SPK.LightCCT,SPK.LightDimming,SPK.LightSwitch,SPK.LightRGB, SPK.CurtainRoller,SPK.CurtainSwitch,SPK.CurtainTrietex,SPK.CurtainDream, SPK.AcIr,SPK.AcStandard,SPK.HvacAC, @@ -114,354 +114,357 @@ }; static List<string> _RoomNotSupportFunctionList = null; /// <summary> /// 房间功能列表不加载的功能列表 /// </summary> public static List<string> RoomNotSupportFunctionList { get { if (_RoomNotSupportFunctionList == null) static List<string> _RoomNotSupportFunctionList = null; /// <summary> /// 房间功能列表不加载的功能列表 /// </summary> public static List<string> RoomNotSupportFunctionList { _RoomNotSupportFunctionList = new List<string>(); _RoomNotSupportFunctionList.Add(SPK.EnergyStandard); _RoomNotSupportFunctionList.Add(SPK.MusicStandard); _RoomNotSupportFunctionList.Add(SPK.AvMusic); _RoomNotSupportFunctionList.Add(SPK.AirSwitch); _RoomNotSupportFunctionList.Add(SPK.ElectricEnergy); _RoomNotSupportFunctionList.AddRange(SPK.EnvironDeviceSpkList()); _RoomNotSupportFunctionList.AddRange(SPK.ArmSensorSpkList()); } return _RoomNotSupportFunctionList; } } public static void Show() { try { Application.DesignWidth = 375; Application.DesignHeight = 667; BaseView = Application.MainPage; Application.MainPage.BackgroundColor = CSS_Color.MainBackgroundColor; Language.UpdateLanguage(); //#region 测试 //var ddd = new UI.test.TestDialog(); //ddd.InitView(); //return; //#endregion if (string.IsNullOrEmpty(OnAppConfig.Instance.LastLoginUserId)) { GoLoginPage(); } else { //判断需不需要登录,有没有登录,或者登录是否过期, if (UserInfo.Current == null || !UserInfo.Current.IsLogin) { GoLoginPage(UserInfo.Current); } else { //new System.Threading.Thread(() => //{ // var pm = new DAL.Server.HttpServerRequest(); // pm.RefreshToken();//刷新Token // pm.GetHomePager();//刷新住宅信息 // pm.GetUserInfo();//刷新个人信息 //}) //{ IsBackground = true }.Start(); Common.ApiUtlis.Ins.DownloadData(); GoUserPage(false, true); } } } catch (Exception ex) { Log("root erorr : " + ex.Message); } finally { //Application.RunOnMainThread(() => { // Application.HideSoftInput(); //}); } } /// <summary> /// 进入登录界面 /// </summary> public static void GoLoginPage(UserInfo userInfo = null) { BaseView.RemoveAll(); BaseView.BackgroundColor = CSS_Color.BackgroundColor; var fisrtView = new UI.UI1Login.LoginPage(); fisrtView.BackgroundColor = CSS_Color.MainBackgroundColor; BaseView.AddChidren(fisrtView); fisrtView.LoadView(userInfo); } /// <summary> /// 进入主页 /// </summary> /// <param name="isFirstOpen">如果是第一次启动 检测校验密码</param> /// <param name="pageShowEvent">主页显示之后触发的事件(没有住宅的话,则不会触发)</param> public static void GoUserPage(bool downloadData, bool isFirstOpen = false, Action pageShowEvent = null) { BaseView.RemoveAll(); #region 后退事件 BasePageView = new PageLayout(); BasePageView.ScrollEnabled = false; BasePageView.IsShowPoint = false; BasePageView.PageChange = (sender, e) => { if (e < BasePageView.ChildrenCount - 1) { BasePageView.GetChildren(BasePageView.ChildrenCount - 1).RemoveFromParent(); } try { ReturnRefreshAction?.Invoke(); ReturnRefreshAction = null; } catch (Exception ex) { Log($"后退事件异常:{ex.Message}"); } }; BaseView.AddChidren(BasePageView); var backView = new FrameLayout() { Y = Application.GetRealHeight(100), Width = Application.GetRealWidth(10), Height = Application.GetRealHeight(440), }; BaseView.AddChidren(backView); BtnBackIcon = new Button() { X = -Application.GetRealWidth(100), Gravity = Gravity.CenterVertical, Width = Application.GetRealWidth(88 / 2), Height = Application.GetRealHeight(56 / 2), UnSelectedImagePath = "Public/RightSlideBackIcon.png" }; BaseView.AddChidren(BtnBackIcon); backView.MouseMoveEventHandler = (sender, e) => { if (BasePageView.ChildrenCount <= 1) { return; } MainPage.Log($"move:{e.X}"); if (StartX == 0 && e.X < 30) { StartX = (int)e.X; } if (StartX < 30) { if (e.X < Application.GetRealWidth(100)) { BtnBackIcon.X = (int)e.X - Application.GetRealWidth(100); } } }; backView.MouseDownEventHandler = (sender, e) => { if (BasePageView.ChildrenCount <= 1) { return; } MainPage.Log($"down:{e.X}"); StartX = (int)e.X; BtnBackIcon.Y = (int)e.Y + Application.GetRealHeight(50); }; backView.MouseUpEventHandler = (sender, e) => { MainPage.Log($"up{e.X}"); StartX = 0; BtnBackIcon.X = -Application.GetRealWidth(100); if (e.X > 70) { if (BasePageView.ChildrenCount > 1) { BasePageView.PageIndex = BasePageView.ChildrenCount - 2; } } }; backView.MouseUpOutsideEventHandler = (sender, e) => { MainPage.Log($"up{e.X}"); StartX = 0; BtnBackIcon.X = -Application.GetRealWidth(100); if (e.X > 70) { if (BasePageView.ChildrenCount > 1) { BasePageView.PageIndex = BasePageView.ChildrenCount - 2; } } }; #endregion //体验模式 if (NoLoginMode) { //跳转页面---- UserBasePage = new UserPage(); BasePageView.AddChidren(UserBasePage); UserBasePage.LoadPage(); BasePageView.PageIndex = 0; return; } //加载Loading效果 var waitPage = new Loading(); BaseView.AddChidren(waitPage); waitPage.Start(Language.StringByID(StringId.PleaseWait)); //当没有住宅时,不能让它往下走 if (UserInfo.Current.regionList.Count == 0) { waitPage.Hide(); var addResidencePage = new BindingResidencePage(); BaseView.AddChidren(addResidencePage); addResidencePage.LoadView(); return; } new System.Threading.Thread(async () => { try { Entity.FunctionList.List.Clear(); Entity.SpatialInfo.CurrentSpatial.Clear(); ///等待获取住宅信息 Application.RunOnMainThread(() => { if (waitPage != null) get { waitPage.RemoveFromParent(); waitPage = null; } //跳转页面---- UserBasePage = new UserPage(); BasePageView.AddChidren(UserBasePage); UserBasePage.LoadPage(); BasePageView.PageIndex = 0; if (isFirstOpen) { //启动密码验证 new AppUnlockPage().LoadPage(isFirstOpen); } //主页加载完成,回调事件 pageShowEvent?.Invoke(); pageShowEvent = null; }); } catch (Exception ex) { MainPage.Log($"GoUserPage : {ex.Message}"); } finally { Application.RunOnMainThread(() => { if (downloadData) { DB_ResidenceData.Instance.EixtAccount(); ///初始化app数据 Common.ApiUtlis.Ins.DownloadData(); }; }); } }).Start(); } /// <summary> /// 后退事件 /// 0:后退 /// 1:有等待界面 /// 2:无法再后退,可以执行退到桌面 /// </summary> public static int LoadEvent_BackAction() { int result = 0; Application.RunOnMainThread(() => { if (BasePageView == null || BasePageView.ChildrenCount <= 1) { result = 2;//无法再后退,可以执行退到桌面 } if (BasePageView.ChildrenCount > 1) { int index = BasePageView.ChildrenCount - 1; var view = BasePageView.GetChildren(index); if (view.GetType() == typeof(Loading)) { var loading = view as Loading; if (loading.CurStatus == false)//有一些等待界面隐藏了,但是没有移除到,需要先移除 { loading.RemoveFromParent(); result = LoadEvent_BackAction(); } else { result = 1;//正在等待某些操作 } } else { if (view != null) { if (view.Tag != null) { if (view.Tag.ToString() != "unlockpage") if (_RoomNotSupportFunctionList == null) { view.RemoveFromParent(); _RoomNotSupportFunctionList = new List<string>(); _RoomNotSupportFunctionList.Add(SPK.EnergyStandard); _RoomNotSupportFunctionList.Add(SPK.MusicStandard); _RoomNotSupportFunctionList.Add(SPK.AvMusic); _RoomNotSupportFunctionList.Add(SPK.AirSwitch); _RoomNotSupportFunctionList.Add(SPK.ElectricEnergy); _RoomNotSupportFunctionList.AddRange(SPK.EnvironDeviceSpkList()); _RoomNotSupportFunctionList.AddRange(SPK.ArmSensorSpkList()); } return _RoomNotSupportFunctionList; } } public static void Show() { try { Application.DesignWidth = 375; Application.DesignHeight = 667; //设置语言环境 防止string转 double出现逗号,todouble异常等问题 System.Globalization.CultureInfo.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("zh-CN"); BaseView = Application.MainPage; Application.MainPage.BackgroundColor = CSS_Color.MainBackgroundColor; Language.UpdateLanguage(); //#region 测试 //var ddd = new UI.test.TestDialog(); //ddd.InitView(); //return; //#endregion if (string.IsNullOrEmpty(OnAppConfig.Instance.LastLoginUserId)) { GoLoginPage(); } else { result = 2; //判断需不需要登录,有没有登录,或者登录是否过期, if (UserInfo.Current == null || !UserInfo.Current.IsLogin) { GoLoginPage(UserInfo.Current); } else { //new System.Threading.Thread(() => //{ // var pm = new DAL.Server.HttpServerRequest(); // pm.RefreshToken();//刷新Token // pm.GetHomePager();//刷新住宅信息 // pm.GetUserInfo();//刷新个人信息 //}) //{ IsBackground = true }.Start(); Common.ApiUtlis.Ins.DownloadData(); GoUserPage(false, true); } } } else { view.RemoveFromParent(); } } } catch (Exception ex) { Log("root erorr : " + ex.Message); } finally { //Application.RunOnMainThread(() => { // Application.HideSoftInput(); //}); } } else /// <summary> /// 进入登录界面 /// </summary> public static void GoLoginPage(UserInfo userInfo = null) { result = 2;//无法再后退,可以执行退到桌面 BaseView.RemoveAll(); BaseView.BackgroundColor = CSS_Color.BackgroundColor; var fisrtView = new UI.UI1Login.LoginPage(); fisrtView.BackgroundColor = CSS_Color.MainBackgroundColor; BaseView.AddChidren(fisrtView); fisrtView.LoadView(userInfo); } }); return result; } /// <summary> /// 进入主页 /// </summary> /// <param name="isFirstOpen">如果是第一次启动 检测校验密码</param> /// <param name="pageShowEvent">主页显示之后触发的事件(没有住宅的话,则不会触发)</param> public static void GoUserPage(bool downloadData, bool isFirstOpen = false, Action pageShowEvent = null) { BaseView.RemoveAll(); #region 后退事件 BasePageView = new PageLayout(); BasePageView.ScrollEnabled = false; BasePageView.IsShowPoint = false; BasePageView.PageChange = (sender, e) => { if (e < BasePageView.ChildrenCount - 1) { BasePageView.GetChildren(BasePageView.ChildrenCount - 1).RemoveFromParent(); } try { ReturnRefreshAction?.Invoke(); ReturnRefreshAction = null; } catch (Exception ex) { Log($"后退事件异常:{ex.Message}"); } }; BaseView.AddChidren(BasePageView); var backView = new FrameLayout() { Y = Application.GetRealHeight(100), Width = Application.GetRealWidth(10), Height = Application.GetRealHeight(440), }; BaseView.AddChidren(backView); BtnBackIcon = new Button() { X = -Application.GetRealWidth(100), Gravity = Gravity.CenterVertical, Width = Application.GetRealWidth(88 / 2), Height = Application.GetRealHeight(56 / 2), UnSelectedImagePath = "Public/RightSlideBackIcon.png" }; BaseView.AddChidren(BtnBackIcon); backView.MouseMoveEventHandler = (sender, e) => { if (BasePageView.ChildrenCount <= 1) { return; } MainPage.Log($"move:{e.X}"); if (StartX == 0 && e.X < 30) { StartX = (int)e.X; } if (StartX < 30) { if (e.X < Application.GetRealWidth(100)) { BtnBackIcon.X = (int)e.X - Application.GetRealWidth(100); } } }; backView.MouseDownEventHandler = (sender, e) => { if (BasePageView.ChildrenCount <= 1) { return; } MainPage.Log($"down:{e.X}"); StartX = (int)e.X; BtnBackIcon.Y = (int)e.Y + Application.GetRealHeight(50); }; backView.MouseUpEventHandler = (sender, e) => { MainPage.Log($"up{e.X}"); StartX = 0; BtnBackIcon.X = -Application.GetRealWidth(100); if (e.X > 70) { if (BasePageView.ChildrenCount > 1) { BasePageView.PageIndex = BasePageView.ChildrenCount - 2; } } }; backView.MouseUpOutsideEventHandler = (sender, e) => { MainPage.Log($"up{e.X}"); StartX = 0; BtnBackIcon.X = -Application.GetRealWidth(100); if (e.X > 70) { if (BasePageView.ChildrenCount > 1) { BasePageView.PageIndex = BasePageView.ChildrenCount - 2; } } }; #endregion /// <summary> /// 自定义日志输出 /// </summary> public static void Log(string msg) { //体验模式 if (NoLoginMode) { //跳转页面---- UserBasePage = new UserPage(); BasePageView.AddChidren(UserBasePage); UserBasePage.LoadPage(); BasePageView.PageIndex = 0; return; } //加载Loading效果 var waitPage = new Loading(); BaseView.AddChidren(waitPage); waitPage.Start(Language.StringByID(StringId.PleaseWait)); //当没有住宅时,不能让它往下走 if (UserInfo.Current.regionList.Count == 0) { waitPage.Hide(); var addResidencePage = new BindingResidencePage(); BaseView.AddChidren(addResidencePage); addResidencePage.LoadView(); return; } new System.Threading.Thread(async () => { try { Entity.FunctionList.List.Clear(); Entity.SpatialInfo.CurrentSpatial.Clear(); ///等待获取住宅信息 Application.RunOnMainThread(() => { if (waitPage != null) { waitPage.RemoveFromParent(); waitPage = null; } //跳转页面---- UserBasePage = new UserPage(); BasePageView.AddChidren(UserBasePage); UserBasePage.LoadPage(); BasePageView.PageIndex = 0; if (isFirstOpen) { //启动密码验证 new AppUnlockPage().LoadPage(isFirstOpen); } //主页加载完成,回调事件 pageShowEvent?.Invoke(); pageShowEvent = null; }); } catch (Exception ex) { MainPage.Log($"GoUserPage : {ex.Message}"); } finally { Application.RunOnMainThread(() => { if (downloadData) { DB_ResidenceData.Instance.EixtAccount(); ///初始化app数据 Common.ApiUtlis.Ins.DownloadData(); }; }); } }).Start(); } /// <summary> /// 后退事件 /// 0:后退 /// 1:有等待界面 /// 2:无法再后退,可以执行退到桌面 /// </summary> public static int LoadEvent_BackAction() { int result = 0; Application.RunOnMainThread(() => { if (BasePageView == null || BasePageView.ChildrenCount <= 1) { result = 2;//无法再后退,可以执行退到桌面 } if (BasePageView.ChildrenCount > 1) { int index = BasePageView.ChildrenCount - 1; var view = BasePageView.GetChildren(index); if (view.GetType() == typeof(Loading)) { var loading = view as Loading; if (loading.CurStatus == false)//有一些等待界面隐藏了,但是没有移除到,需要先移除 { loading.RemoveFromParent(); result = LoadEvent_BackAction(); } else { result = 1;//正在等待某些操作 } } else { if (view != null) { if (view.Tag != null) { if (view.Tag.ToString() != "unlockpage") { view.RemoveFromParent(); } else { result = 2; } } else { view.RemoveFromParent(); } } } } else { result = 2;//无法再后退,可以执行退到桌面 } }); return result; } /// <summary> /// 自定义日志输出 /// </summary> public static void Log(string msg) { #if DEBUG Console.WriteLine(msg); #endif } } } } HDL_ON/UI/UI0-Public/AppUnlockPage.cs
@@ -75,6 +75,26 @@ { if (UserInfo.Current.unlockTime.AddMinutes(5) > DateTime.Now || UserInfo.Current.appUnlockPasswrod == "" || UserInfo.Current.appUnlockPage.Count == 0) { if (UserInfo.Current.inCall.AddMinutes(30) > DateTime.Now || UserInfo.Current.inVideo) { //UserInfo.Current.PushMesLogTime = DateTime.MinValue; //var pushMes = new JPushMessageInfo() //{ // Title = UserInfo.Current.PushMesTitle, // Content = UserInfo.Current.PushMesMessage, // Extras = UserInfo.Current.PushMesExtras, // messageType = UserInfo.Current.pushMesMessageType, // expantContent = UserInfo.Current.pushMesExpantContent, // HomeId = UserInfo.Current.PushMesHomeId, //}; Shared.Application.RunOnMainThread(() => { HDLCommon.Current.AdjustPushMessage(UserInfo.Current.pushMessageInfo); }); } return; } } HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -616,7 +616,7 @@ new FunctionAttributes(){ key = "on_off",curValue = "on",state = "on" }, new FunctionAttributes(){ key = "cac_valve",curValue = "on",state = "on" },//毛细阀 new FunctionAttributes(){ key = "fh_valve",curValue = "on",state = "on" },//地暖阀 new FunctionAttributes(){ key = "mode",curValue = "cool",state = "cool", value = new List<string>{ "cool","heat","fan"} }, new FunctionAttributes(){ key = "mode",curValue = "cool",state = "cool", value = new List<string>{ "cool","heat"} }, new FunctionAttributes(){ key = "set_temp",curValue = "20",state = "20",min = 16,max = 30 }, new FunctionAttributes(){ key = "room_temp",curValue = "20",state = "20" }, new FunctionAttributes(){ key = "dew_point_temp",curValue = "20",state = "20" },//露点温度 HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
@@ -106,18 +106,18 @@ { X = Application.GetRealWidth(51), Y = Application.GetRealHeight(66), Width = Application.GetRealWidth(17), Height = Application.GetRealWidth(17), UnSelectedImagePath = "Public/DeviceInfoIcon/HumidityIcon.png", Width = Application.GetMinRealAverage(16), Height = Application.GetMinRealAverage(16), UnSelectedImagePath = "FunctionIcon/CAC/HvacCacHumidityIcon.png", }; bodyDiv.AddChidren(btnHumidityIcon); var btnHumidityValues = new TextButton() { X = btnHumidityIcon.Right + Application.GetRealWidth(4), Y = Application.GetRealHeight(66), Gravity = Gravity.CenterVertical, TextColor = CSS_Color.MainBackgroundColor, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, X = Application.GetRealWidth(70), Y = Application.GetRealHeight(64), Height = Application.GetRealHeight(18), TextColor = 0xFF161616, TextSize = CSS_FontSize.TextFontSize, Text = function.GetAttrState(FunctionAttributeKey.RoomHumidity) + "%", TextAlignment = TextAlignment.CenterLeft, }; @@ -126,26 +126,26 @@ Button btnTempIcon = new Button() { X = btnHumidityValues.Right + Application.GetRealWidth(20), Gravity = Gravity.CenterVertical, X = Application.GetRealWidth(110), Y = Application.GetRealHeight(66), Width = Application.GetMinRealAverage(17), Height = Application.GetMinRealAverage(17), UnSelectedImagePath = "Public/DeviceInfoIcon/TempIcon.png", UnSelectedImagePath = "FunctionIcon/CAC/HvacCacTempIcon.png", }; bodyDiv.AddChidren(btnTempIcon); var btnTempValues = new TextButton() { X = btnTempIcon.Right + Application.GetRealWidth(4), Gravity = Gravity.CenterVertical, TextColor = CSS_Color.MainBackgroundColor, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, Text = function.GetAttrState(FunctionAttributeKey.RoomTemp) + "°", X = Application.GetRealWidth(130), Y = Application.GetRealHeight(64), Height = Application.GetRealHeight(18), TextColor = 0xFF161616, TextSize = CSS_FontSize.TextFontSize, Text = function.GetAttrState(FunctionAttributeKey.RoomTemp) + "°C", TextAlignment = TextAlignment.CenterLeft, }; btnTempValues.Width = btnTempValues.GetTextWidth(); btnTempValues.Width = btnTempValues.GetTextWidth(); bodyDiv.AddChidren(btnTempIcon); bodyDiv.AddChidren(btnTempValues); var btnJinMaoIcon = new Button() { HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
@@ -120,10 +120,8 @@ private void InitFrameWhiteContent1() { //获取温度值 var setTempTemp = device.GetAttrState(FunctionAttributeKey.SetTemp); var setTempString = setTempTemp.Replace(",", "."); var setTempDouble = Convert.ToDouble(setTempString); temp = Convert.ToInt32(setTempDouble); string setTempTemp = device.GetAttrState(FunctionAttributeKey.SetTemp); temp = (int) Convert.ToDouble(setTempTemp); if (temp <= 0) { //默认值改成16,2022年06月10日10:03:19 成甫要求的 HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/CacControlPage.cs
@@ -28,14 +28,27 @@ /// </summary> Button btnTemp; Button btnTempUint; /// <summary> /// 室内湿度显示控件 /// </summary> TextButton btnHumidityValues; /// <summary> /// 室内温度显示控件 /// </summary> TextButton btnTempValues; /// <summary> /// 室内温度按钮 /// </summary> Button btnIndoorTemp; //Button btnIndoorTemp; /// <summary> /// 模式按钮 /// </summary> Button btnMode; /// <summary> /// /// </summary> Button btnModeText; /// <summary> /// 风速按钮 /// </summary> @@ -114,15 +127,50 @@ /// </summary> private void InitFrameWhiteContent1() { Button btnJinmaoIcon = new Button() var btnHumidityIcon = new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(94), Width = Application.GetRealWidth(164), Height = Application.GetRealHeight(43), UnSelectedImagePath = "FunctionIcon/CAC/JinMaoIcon.png" X = Application.GetRealWidth(55), Y = Application.GetRealHeight(101), Width = Application.GetMinRealAverage(28), Height = Application.GetMinRealAverage(28), UnSelectedImagePath = "FunctionIcon/CAC/HvacCacHumidityIcon.png", }; FrameWhiteCentet1.AddChidren(btnJinmaoIcon); FrameWhiteCentet1.AddChidren(btnHumidityIcon); btnHumidityValues = new TextButton() { X = Application.GetRealWidth(83), Y = Application.GetRealHeight(96), Height = Application.GetRealHeight(33), Width = Application.GetRealWidth(100), TextColor = 0xFF161616, TextSize = 24, Text = device.GetAttrState(FunctionAttributeKey.RoomHumidity) + "%", TextAlignment = TextAlignment.CenterLeft, }; FrameWhiteCentet1.AddChidren(btnHumidityValues); Button btnTempIcon = new Button() { X = Application.GetRealWidth(194), Y = Application.GetRealHeight(101), Width = Application.GetMinRealAverage(28), Height = Application.GetMinRealAverage(28), UnSelectedImagePath = "FunctionIcon/CAC/HvacCacTempIcon.png", }; FrameWhiteCentet1.AddChidren(btnTempIcon); btnTempValues = new TextButton() { X = Application.GetRealWidth(222), Y = Application.GetRealHeight(96), Height = Application.GetRealHeight(33), Width = Application.GetRealWidth(100), TextColor = 0xFF161616, TextSize = 24, Text = device.GetAttrState(FunctionAttributeKey.RoomTemp) + "°C", TextAlignment = TextAlignment.CenterLeft, }; FrameWhiteCentet1.AddChidren(btnTempValues); temp = (int)Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")); @@ -141,12 +189,12 @@ OfflineProgressBarColor = CSS_Color.PromptingColor2, ArcColor = CSS_Color.BackgroundColor, #if __IOS__ Y = Application.GetRealHeight(120 + 25), Y = Application.GetRealHeight(130 + 25), Width = Application.GetRealWidth(260 - 40), Height = Application.GetRealWidth(260 - 40), SeekBarPadding = Application.GetRealWidth(8), #else Y = Application.GetRealHeight(120 + 40), Y = Application.GetRealHeight(130 + 40), Width = Application.GetRealWidth(260 - 40), Height = Application.GetRealWidth(260 - 40), SeekBarPadding = Application.GetRealWidth(7), @@ -165,7 +213,7 @@ btnTemp = new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(206), Y = Application.GetRealHeight(226), Width = Application.GetRealWidth(71), Height = Application.GetRealWidth(60), TextColor = CSS_Color.FirstLevelTitleColor, @@ -190,17 +238,17 @@ }; FrameWhiteCentet1.AddChidren(btnTempUint); btnIndoorTemp = new Button() { Gravity = Gravity.CenterHorizontal, Y = btnTemp.Bottom, Width = Application.GetRealWidth(120), Height = Application.GetRealHeight(20), Text = Language.StringByID(StringId.IndoorTemp) + "20°C/" + Language.StringByID(StringId.Humidity) +"45%", TextColor = CSS_Color.PromptingColor1, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, }; FrameWhiteCentet1.AddChidren(btnIndoorTemp); //btnIndoorTemp = new Button() //{ // Gravity = Gravity.CenterHorizontal, // Y = btnTemp.Bottom, // Width = Application.GetRealWidth(120), // Height = Application.GetRealHeight(20), // Text = Language.StringByID(StringId.IndoorTemp) + "20°C/" + Language.StringByID(StringId.Humidity) +"45%", // TextColor = CSS_Color.PromptingColor1, // TextSize = CSS_FontSize.PromptFontSize_FirstLevel, //}; //FrameWhiteCentet1.AddChidren(btnIndoorTemp); btnMinus = new Button() { @@ -232,16 +280,16 @@ }; FrameWhiteCentet1.AddChidren(btnMode); Button btnModeText = new Button() btnModeText = new Button() { X = Application.GetRealWidth(30), Y = btnMode.Bottom, Y = btnMode.Bottom + Application.GetRealHeight(4), Width = Application.GetRealWidth(90), Height = Application.GetRealHeight(20), TextAlignment = TextAlignment.Center, TextSize = 12, TextColor = CSS_Color.TextualColor, TextID = StringId.Mode Text = acFunction.GetModeAttrText(device.GetAttrState(FunctionAttributeKey.Mode)) }; FrameWhiteCentet1.AddChidren(btnModeText); @@ -540,14 +588,42 @@ /// </summary> void LoadEvent_AcStatesChange() { btnMode.MouseUpEventHandler = (sender, e) => EventHandler<MouseEventArgs> eventHandler = (sender, e) => { if (device.trait_on_off.curValue.ToString() == "off") { return; } LoadDiv_ChangeModeView(); var modeValueList = device.GetAttribute(FunctionAttributeKey.Mode).value; if (modeValueList.Count == 0) { return; } var curMode = device.GetAttrState(FunctionAttributeKey.Mode); var curModeIndex = device.GetAttribute(FunctionAttributeKey.Mode).value.IndexOf(curMode); if (++curModeIndex >= modeValueList.Count) { curModeIndex = 0; } var setMode = device.GetAttribute(FunctionAttributeKey.Mode).value[curModeIndex]; device.SetAttrState(FunctionAttributeKey.Mode, setMode); btnModeText.Text = acFunction.GetModeAttrText(setMode); btnMode.UnSelectedImagePath = acFunction.GetModeIconPath(setMode); Dictionary<string, string> d = new Dictionary<string, string>(); d.Add(FunctionAttributeKey.Mode, setMode); Control.Ins.SendWriteCommand(device, d); //LoadDiv_ChangeModeView(); }; btnMode.MouseUpEventHandler = eventHandler; btnModeText.MouseUpEventHandler = eventHandler; btnWindSpeed.MouseUpEventHandler = (sender, e) => { var page = new CacHistoryChoosePage(device); @@ -605,8 +681,11 @@ } else { btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))) + "°C" + Language.StringByID(StringId.Humidity) + Convert.ToInt32(Convert.ToDouble(device.GetAttrState("room_humidity").Replace(", ", "."))) + "%"; //btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))) + "°C" // + Language.StringByID(StringId.Humidity) + Convert.ToInt32(Convert.ToDouble(device.GetAttrState("room_humidity").Replace(", ", "."))) + "%"; btnTempValues.Text = Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))) + "°C"; btnHumidityValues.Text = Convert.ToInt32(Convert.ToDouble(device.GetAttrState("room_humidity").Replace(", ", "."))) + "%"; btnMode.UnSelectedImagePath = acFunction.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode)); temp = Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", "."))); HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs
@@ -2,6 +2,7 @@ using HDL_ON.Stan; using HDL_ON.UI.CSS; using HDL_ON.Entity; using System; namespace HDL_ON.UI { @@ -74,6 +75,43 @@ SelectedTextColor = CSS_Color.MainColor, }; FrameWhiteCentet1.AddChidren(btnSuctionView); //加载瞬时值 var btnInstantaneousValue = new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(391), Width = Application.GetMinRealAverage(32), Height = Application.GetMinRealAverage(32), UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/DiagramIconOn.png", }; FrameWhiteCentet1.AddChidren(btnInstantaneousValue); var btnInstantaneousValueText = new Button() { Gravity = Gravity.CenterHorizontal, Y = btnInstantaneousValue.Bottom, Width = Application.GetRealWidth(96), Height = Application.GetRealHeight(29), TextAlignment = TextAlignment.Center, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, TextColor = CSS_Color.TextualColor, TextID = StringId.AlarmDataStatistics, IsMoreLines = true }; FrameWhiteCentet1.AddChidren(btnInstantaneousValueText); EventHandler<MouseEventArgs> eventHandler = (sender, e) => { //var page = new SocketPage_InstantaneousValue(function); //MainPage.BasePageView.AddChidren(page); //page.LoadPage(); //MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; }; btnInstantaneousValue.MouseUpEventHandler = eventHandler; btnInstantaneousValueText.MouseUpEventHandler = eventHandler; } /// <summary> HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs
@@ -107,15 +107,15 @@ }; nameView.AddChidren(btnEditName); nameView.AddChidren( new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(49), BackgroundColor = CSS_Color.DividingLineColor, Width = Application.GetRealWidth(343), Height = Application.GetRealHeight(1) }); //nameView.AddChidren( // new Button() // { // Gravity = Gravity.CenterHorizontal, // Y = Application.GetRealHeight(49), // BackgroundColor = CSS_Color.DividingLineColor, // Width = Application.GetRealWidth(343), // Height = Application.GetRealHeight(1) // }); #endregion if (locationSetting) @@ -164,7 +164,6 @@ new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(54), BackgroundColor = CSS_Color.DividingLineColor, Width = Application.GetRealWidth(343), Height = Application.GetRealHeight(1) @@ -284,7 +283,7 @@ new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(54), //Y = Application.GetRealHeight(54), BackgroundColor = CSS_Color.DividingLineColor, Width = Application.GetRealWidth(343), Height = Application.GetRealHeight(1) @@ -365,6 +364,53 @@ #endregion } else if (function.spk == SPK.HvacCac) { #region 露点温度 if (function.GetAttribute(FunctionAttributeKey.dew_point_temp) != null) { contentView.AddChidren(new Button { Height = Application.GetRealHeight(10), }); var row = new FrameLayout() { Height = Application.GetRealHeight(55), BackgroundColor = CSS_Color.MainBackgroundColor, }; contentView.AddChidren(row); var btnText = new Button() { X = Application.GetRealWidth(16), Width = Application.GetRealWidth(160), TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.SubheadingFontSize, TextID = StringId.DewPointTemp, }; row.AddChidren(btnText); var btnValue = new Button() { Width = Application.GetRealWidth(355), TextAlignment = TextAlignment.CenterRight, TextColor = CSS_Color.PromptingColor1, TextSize = CSS_FontSize.TextFontSize, Text = function.GetAttrState(FunctionAttributeKey.dew_point_temp) + "°C", }; row.AddChidren(btnValue); } #endregion } LoadEventList(); }