File was renamed from ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlControlLogic.cs |
| | |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | |
| | | namespace Shared.Phone.UserCenter |
| | | namespace Shared.Phone |
| | | { |
| | | /// <summary> |
| | | /// 控件的逻辑 |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region ■ 显示底部弹窗的房间列表_____________ |
| | | #region ■ 显示启动页_________________________ |
| | | |
| | | /// <summary> |
| | | /// 显示底部弹窗的时间列表 |
| | | /// 显示启动页 |
| | | /// </summary> |
| | | /// <param name="hKey">选择的时间主键</param> |
| | | /// <param name="mKey">选择的分钟主键</param> |
| | | /// <param name="titleText">标题信息</param> |
| | | /// <param name="SelectTimeEvent">确认选择时间的回调函数 </param> |
| | | /// <param name="type">晾衣架时间 :1烘干,2:风干;3消毒</param> |
| | | public bool ShowBottomListTimeView(string hKey, string mKey, string titleText, Action<string, string> SelectTimeEvent, int type) |
| | | public void ShowLoginLoadView() |
| | | { |
| | | //小时列表名字 |
| | | var listHourName = new List<string>(); |
| | | //小时列表主键 |
| | | var listHourKeys = new List<string>(); |
| | | //分钟名字 |
| | | var listMinName = new List<List<string>>(); |
| | | //分钟主键 |
| | | var listMinKeys = new List<List<string>>(); |
| | | var listKeys = new List<string>() { "" }; |
| | | var listName = new List<string>() { "" }; |
| | | if (type == 3) |
| | | { |
| | | //名字和键收集 |
| | | for (int i = 1; i < 31; i++) |
| | | { |
| | | listName.Add(i.ToString()); |
| | | listKeys.Add(i.ToString()); |
| | | } |
| | | listMinName.Add(listName); |
| | | listMinKeys.Add(listKeys); |
| | | } |
| | | else |
| | | { |
| | | //名字和键收集 |
| | | for (int i = 0; i < 4; i++) |
| | | { |
| | | listHourName.Add(i.ToString()); |
| | | listHourKeys.Add((i + 1).ToString()); |
| | | } |
| | | for (int i = 0; i < 60; i++) |
| | | { |
| | | listName.Add(i.ToString()); |
| | | listKeys.Add((i + 1).ToString()); |
| | | } |
| | | listMinName.Add(listName); |
| | | listMinKeys.Add(listKeys); |
| | | } |
| | | |
| | | int index1 = hKey != null ? int.Parse(hKey) : 0; |
| | | int index2 = mKey != null ? int.Parse(mKey) : 0; |
| | | |
| | | if (type == 3) |
| | | { |
| | | //只有分钟,消毒时间 |
| | | PickerView.Show( |
| | | listMinName[0], |
| | | (value) => |
| | | { |
| | | mKey = listMinKeys[0][value]; |
| | | SelectTimeEvent?.Invoke(mKey, listMinKeys[0][value]); |
| | | }, |
| | | index2, |
| | | titleText, |
| | | Language.StringByID(R.MyInternationalizationString.uFinish), |
| | | Language.StringByID(R.MyInternationalizationString.uCancel)); |
| | | } |
| | | else |
| | | { |
| | | //有小时,分钟 |
| | | PickerView.ShowSecondary(listHourName, listMinName, (value1, value2) => |
| | | { |
| | | mKey = listMinKeys[value1][value2]; |
| | | string name = listHourName[value1] + " " + listMinName[value1][value2]; |
| | | SelectTimeEvent?.Invoke(mKey, name); |
| | | |
| | | }, index1, index2, titleText, |
| | | Language.StringByID(R.MyInternationalizationString.uFinish), |
| | | Language.StringByID(R.MyInternationalizationString.uCancel)); |
| | | } |
| | | return true; |
| | | var loginLoad = new UserView.LoginLoading(); |
| | | Common.CommonPage.Instance.AddChidren(loginLoad); |
| | | loginLoad.Show(); |
| | | } |
| | | #endregion |
| | | |
| | | } |
| | | } |