陈嘉乐
2020-05-19 0e0584b87851c56745bf73b1a961b80613dd0721
ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs
@@ -98,6 +98,7 @@
            };
            middle.AddChidren(fLayout);
            #endregion
            #region 常开自动化
            ///第三块第一级父控件
            listLogicFl = new FrameLayout
@@ -303,19 +304,21 @@
                    }
                };
                if (logicId != 0)
                {
                ///显示失效设置时间文本控件
                var timeTextBtn = new Button
                {
                    Y = Application.GetRealHeight(127 + 69),
                    X = Application.GetRealWidth(86),//125
                    Width = Application.GetRealWidth(907),//634 + 200
                        X = Application.GetRealWidth(80),//125
                        Width = Application.GetRealWidth(907+12),//634 + 200
                    Height = Application.GetRealHeight(60),
                    TextSize = 15,
                    TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                };
                if (logicId != 0)
                {
                    openModeFl.AddChidren(timeTextBtn);
                    string text1 = Language.StringByID(MyInternationalizationString.timeSensitive);
                    string text2 = Language.StringByID(MyInternationalizationString.yearSone);
                    string text3 = Language.StringByID(MyInternationalizationString.monthSone);
@@ -341,6 +344,8 @@
                    }
                    else
                    {
                        ///在当前界面编辑显示系统时间(不能每一次编辑都去网关拿数据)                         year = DateTime.Now.Year.ToString();//那一年
                        month = DateTime.Now.Month.ToString();//那一月
                        var d = DateTime.Now.ToString("dd");//那一天
@@ -483,10 +488,10 @@
        /// <param name="yes"></param>
        private async void Read(bool yes)
        {
            if (yes)
            {
            //if (yes)
            // {
                CommonPage.Loading.Start();
            }
            // }
            try
            {
                if (Common.Logic.SoneLogicList.Count == 0)
@@ -514,13 +519,20 @@
            {
                var dd = e.Message;
            }
            finally
            {
                Application.RunOnMainThread(() =>
                {
                    // if (yes)
                    // {
                    CommonPage.Loading.Hide();
                    // }
            //自动化
            RefreshView();
            if (yes)
            {
                CommonPage.Loading.Hide();
                });
            }
        }
        /// <summary>
        /// 记录左滑状态
@@ -697,9 +709,7 @@
            }
        }
        /// <summary>
        /// 将UNIX时间戳转换成系统时间(精确到秒)
        /// <returns></returns>
        public DateTime GetLocalTime(int unixTimeStamp)
        {
            DateTime dtStart = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));