JLChen
2020-12-23 f9f9b0030fdd2691632569b7dcad9d0ddca5e4cf
2020-12-23 1.调整mqtt挤下线,跑ui线程。2.LoadEvent_CheckLinkStatus方法调整
5个文件已修改
141 ■■■■ 已修改文件
.vs/HDL_APP_Project/xs/UserPrefs.xml 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/HDLCommon.cs 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Mqtt/MqttClient.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/1-HomePage/HomePage.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs 69 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,43 +1,58 @@
<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default">
  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008030-00014C392121802E" />
  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/4-PersonalCenter/ResetAccountPassword/ResetPasswordVerificationCodePage.cs">
<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default">
  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.08FD445C-3EE8-4ED2-BF28-B42ADD0DA92C" />
  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/1-HomePage/HomePage.cs">
    <Files>
      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberFunctionPermissionPageBLL.cs" Line="1" Column="1" />
      <File FileName="HDL_ON/DAL/Server/HttpServerRequest.cs" Line="177" Column="52" />
      <File FileName="HDL_ON/UI/UI1-Login/LoginPageBLL.cs" Line="111" Column="52" />
      <File FileName="HDL_ON/UI/UI1-Login/RegisterPageBLL.cs" Line="424" Column="52" />
      <File FileName="HDL_ON/UI/UI1-Login/ForgetPasswordPageBLL.cs" Line="385" Column="52" />
      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/FunctionIntroductionPage.cs" Line="186" Column="43" />
      <File FileName="HDL_ON/UI/BindingResidence/BindingResidencePage.cs" Line="118" Column="22" />
      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/ChangeBindAccountPage.cs" Line="206" Column="69" />
      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/ChangeBindVerificationCodePage.cs" Line="654" Column="61" />
      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/NewBindAccountPage.cs" Line="302" Column="69" />
      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/NewBindVerificationCodePage.cs" Line="645" Column="61" />
      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/ResetAccountPassword/ResetPasswordVerificationCodePage.cs" Line="586" Column="72" />
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs" Line="312" Column="46" />
      <File FileName="HDL_ON/Common/HDLCommon.cs" Line="297" Column="21" />
      <File FileName="HDL_ON/DAL/Mqtt/MqttClient.cs" Line="563" Column="35" />
      <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePage.cs" Line="133" Column="20" />
    </Files>
    <Pads>
      <Pad Id="ProjectPad">
        <State name="__root__">
          <Node name="HDL_APP_Project" expanded="True">
            <Node name="HDL_ON" expanded="True">
              <Node name="Common" expanded="True" />
              <Node name="DAL" expanded="True">
                <Node name="DriverLayer" expanded="True" />
                <Node name="Mqtt" expanded="True" />
                <Node name="Server" expanded="True" />
              </Node>
              <Node name="Entity" expanded="True">
                <Node name="Function" expanded="True" />
              </Node>
              <Node name="UI" expanded="True">
                <Node name="BindingResidence" expanded="True" />
                <Node name="UI1-Login" expanded="True" />
                <Node name="UI2" expanded="True">
                  <Node name="1-HomePage" expanded="True">
                    <Node name="HomePage.cs" selected="True" />
                  </Node>
                  <Node name="2-Classification" expanded="True" />
                  <Node name="3-Intelligence" expanded="True">
                    <Node name="Automation" expanded="True" />
                    <Node name="Scene" expanded="True" />
                  </Node>
                  <Node name="4-PersonalCenter" expanded="True">
                    <Node name="AboutOn" expanded="True" />
                    <Node name="AccountBindInfo" expanded="True" />
                    <Node name="MemberManagement" expanded="True" />
                    <Node name="ResetAccountPassword" expanded="True">
                      <Node name="ResetPasswordVerificationCodePage.cs" selected="True" />
                    <Node name="ResetAccountPassword" expanded="True" />
                    <Node name="RoomListManage" expanded="True">
                      <Node name="AddRoom" expanded="True" />
                    </Node>
                  </Node>
                  <Node name="FuntionControlView" expanded="True">
                    <Node name="AC" expanded="True" />
                    <Node name="Curtain" expanded="True" />
                    <Node name="Electrical" expanded="True" />
                    <Node name="Light" expanded="True" />
                  </Node>
                </Node>
              </Node>
            </Node>
            <Node name="HDL-ON_Android" expanded="True" />
            <Node name="HDL-ON_iOS" expanded="True" />
          </Node>
        </State>
      </Pad>
@@ -49,7 +64,7 @@
    <String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String>
    <String>Shared.IOS/Shared.IOS.csproj</String>
  </DisabledProjects>
  <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" />
  <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
  <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.364c4b3158493098" />
  <MonoDevelop.Ide.DebuggingService.Breakpoints>
    <BreakpointStore />
HDL_ON/Common/HDLCommon.cs
@@ -258,11 +258,11 @@
                {
                    Shared.Application.RunOnMainThread(() =>
                    {
                        //账号在别处登陆,被踢下线 跳转到登录页面
                        new Alert(Language.StringByID(StringId.Tip), Language.StringByID(StringId.LoggedOnOtherDevices), Language.StringByID(StringId.Close)).Show();
                        ////账号在别处登陆,被踢下线 跳转到登录页面
                        //new Alert(Language.StringByID(StringId.Tip), Language.StringByID(StringId.LoggedOnOtherDevices), Language.StringByID(StringId.Close)).Show();
                        //退出登录操作
                        CheckLogout();
                    });
                    return;
                }
@@ -290,6 +290,8 @@
        }
        /// <summary>
        /// 账号在别处登陆,被踢下线 跳转到登录页面
        /// 要在主线程调用
        /// 退出登录操作
        /// </summary>
        public void CheckLogout()
@@ -297,6 +299,9 @@
            //未登录不用处理
            if (!UserInfo.Current.IsLogin) return;
            //账号在别处登陆,被踢下线 跳转到登录页面
            new Alert(Language.StringByID(StringId.Tip), Language.StringByID(StringId.LoggedOnOtherDevices), Language.StringByID(StringId.Close)).Show();
#if DEBUG
            return;
#endif
HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -557,7 +557,12 @@
            DisConnectRemoteMqttClient("挤下线");
            HDLCommon.Current.CheckLogout();
            Application.RunOnMainThread(() =>
            {
                //弹窗提示被挤下线
                HDLCommon.Current.CheckLogout();
            });
            //UserInfo.Current.LastTime = DateTime.MinValue;
            //UserInfo.Current.SaveUserInfo();
HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -130,7 +130,8 @@
                };
                topView.AddChidren(btnLinkStateTip);
                //更新链接状态icon颜色
                LoadEvent_CheckLinkStatus();
                CheckLinkStatus()//2020-12-22
                //LoadEvent_CheckLinkStatus();
                btnResidenceName = new Button()
                {
HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
@@ -21,32 +21,63 @@
                bodyView.btnPm25Values.Text = MainPage.cityInfo.pm25 == null ? "--" : MainPage.cityInfo.pm25;
            }
        }
        /// <summary>
        /// 更新连接状态图标
        /// </summary>
        void CheckLinkStatus()
        {
            if (Control.Ins.GatewayOnline)
            {
                if (Control.Ins.IsRemote)
                {
                    bodyView.btnLinkStateTip.BackgroundColor = CSS.CSS_Color.MainColor;
                }
                else
                {
                    bodyView.btnLinkStateTip.BackgroundColor = CSS.CSS_Color.LinkTipRemote;
                }
            }
            else
            {
                bodyView.btnLinkStateTip.BackgroundColor = CSS.CSS_Color.LinkTipFail;
            }
        }
        /// <summary>
        /// 确认连接状态
        /// </summary>
        public static void LoadEvent_CheckLinkStatus()
        {
            if (bodyView != null)
            Application.RunOnMainThread(() =>
            {
                Application.RunOnMainThread(() =>
                if (bodyView != null)
                {
                    if (Control.Ins.GatewayOnline)
                    {
                        if (Control.Ins.IsRemote)
                        {
                            bodyView.btnLinkStateTip.BackgroundColor = CSS.CSS_Color.MainColor;
                        }
                        else
                        {
                            bodyView.btnLinkStateTip.BackgroundColor = CSS.CSS_Color.LinkTipRemote;
                        }
                    }
                    else
                    {
                        bodyView.btnLinkStateTip.BackgroundColor = CSS.CSS_Color.LinkTipFail;
                    }
                });
            }
                    bodyView.CheckLinkStatus();
                }
            });
            //if (bodyView != null)
            //{
            //    Application.RunOnMainThread(() =>
            //    {
            //        if (Control.Ins.GatewayOnline)
            //        {
            //            if (Control.Ins.IsRemote)
            //            {
            //                bodyView.btnLinkStateTip.BackgroundColor = CSS.CSS_Color.MainColor;
            //            }
            //            else
            //            {
            //                bodyView.btnLinkStateTip.BackgroundColor = CSS.CSS_Color.LinkTipRemote;
            //            }
            //        }
            //        else
            //        {
            //            bodyView.btnLinkStateTip.BackgroundColor = CSS.CSS_Color.LinkTipFail;
            //        }
            //    });
            //}
        }
        /// <summary>