gxc
2019-12-13 eb424d24e39bab4a245725f35deab3f234ea0f13
ZigbeeApp/Shared/Phone/UserView/UserPage.cs
@@ -3,6 +3,8 @@
using Shared.Common;
using ZigBee.Device;
using Shared.Phone.Device.AC;
using System.Text;
using Shared.Phone.Device.Account;
namespace Shared.Phone.UserView
{
@@ -39,7 +41,7 @@
        /// <summary>
        /// 底部按钮文字的Y值
        /// </summary>
        private static readonly int tabBarEnumName_Y = 104;
        private static readonly int tabBarEnumName_Y = 98;
        #endregion
        #region ◆ 接口____________________________
@@ -186,6 +188,18 @@
                                    case 28:
                                        ac.currentSystemMode = attriButeList[0].AttriButeData;
                                        ac.LastDateTime = DateTime.Now;
                                        break;
                                    case 4099:
                                        var value = Convert.ToString(attriButeList[0].AttriButeData, 2).PadLeft(16, '0');
                                        var modeStr = value.Substring(value.Length - 5, 5);
                                        for (int j = 0; j < modeStr.Length; j++)
                                        {
                                            ac.listSupportMode[j] = Convert.ToInt32(modeStr[j]) == 49 ? 1 : 0;
                                        }
                                        break;
                                    case 4097:
                                        ac.CleanStatu = attriButeList[0].AttriButeData == 42;
                                        break;
                                }
                            }
@@ -316,6 +330,10 @@
        {
            BackgroundColor = Shared.Common.ZigbeeColor.Current.MainColor;
            ZbGateway.StatusList.Add(this);
            Shared.Application.LocationAction += (lat, lon) =>
            {
                AccountLogic.Instance.ReceiveAppLatAndLon(lat.ToString(), lon.ToString());
            };
        }
        /// <summary>
@@ -477,15 +495,18 @@
            if (sender == Instance.homePageIMG || sender == Instance.homePageName)
            {
                //主页
                CommonPage.Instance.IsDrawerLockMode = false;
                Instance.homePageName.IsSelected = true;
                Instance.homePageIMG.IsSelected = true;
                var home = new UserHomeView { };
                Instance.BodyView.AddChidren(home);
                home.Show();
            }
            else if (sender == Instance.categoryIMG || sender==Instance.categoryName)
            {
                //分类
                CommonPage.Instance.IsDrawerLockMode = true;
                Instance.categoryName.IsSelected = true;
                Instance.categoryIMG.IsSelected = true;
                var category = new Phone.Device.Category.Category { };
@@ -494,7 +515,8 @@
            }
            else if (sender == Instance.settingIMG || sender==Instance.settingName)
            {
                 //个人中心
                //个人中心
                CommonPage.Instance.IsDrawerLockMode = true;
                Instance.settingName.IsSelected = true;
                Instance.settingIMG.IsSelected = true;
                var form = new UserCenter.UserMain.UserMainForm();