| | |
| | | }; |
| | | middle.AddChidren(fLayout); |
| | | #endregion |
| | | |
| | | #region 常开自动化 |
| | | ///第三块第一级父控件 |
| | | listLogicFl = new FrameLayout |
| | |
| | | } |
| | | }; |
| | | |
| | | |
| | | 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); |
| | |
| | | } |
| | | else |
| | | { |
| | | |
| | | |
| | | ///在当前界面编辑显示系统时间(不能每一次编辑都去网关拿数据)
year = DateTime.Now.Year.ToString();//那一年 |
| | | month = DateTime.Now.Month.ToString();//那一月 |
| | | var d = DateTime.Now.ToString("dd");//那一天 |
| | |
| | | /// <param name="yes"></param> |
| | | private async void Read(bool yes) |
| | | { |
| | | if (yes) |
| | | { |
| | | //if (yes) |
| | | // { |
| | | CommonPage.Loading.Start(); |
| | | } |
| | | // } |
| | | try |
| | | { |
| | | if (Common.Logic.SoneLogicList.Count == 0) |
| | |
| | | { |
| | | var dd = e.Message; |
| | | } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | // if (yes) |
| | | // { |
| | | CommonPage.Loading.Hide(); |
| | | // } |
| | | //自动化 |
| | | RefreshView(); |
| | | if (yes) |
| | | { |
| | | CommonPage.Loading.Hide(); |
| | | |
| | | }); |
| | | } |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 记录左滑状态 |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 将UNIX时间戳转换成系统时间(精确到秒) |
| | | /// <returns></returns> |
| | | |
| | | public DateTime GetLocalTime(int unixTimeStamp) |
| | | { |
| | | DateTime dtStart = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1)); |