| | |
| | | { |
| | | public FunTpye(string str) |
| | | { |
| | | if_type = str; |
| | | if_Type = str; |
| | | } |
| | | /// <summary> |
| | | /// 表示是(条件/目标) |
| | | /// </summary> |
| | | private string if_type; |
| | | |
| | | private string if_Type; |
| | | Loading loading = new Loading(); |
| | | /// <summary> |
| | | /// 设备功能ui |
| | | /// </summary> |
| | |
| | | /// <param name="bottm"></param> |
| | | /// <param name="funCount">支持功能类型个数<表示上面所占高度></param> |
| | | public void FunTypeView(FrameLayout viewLayout,int bottm,int funCount) { |
| | | viewLayout.AddChidren(loading); |
| | | LogicView.FunAllAreaView funAllAreaView = new LogicView.FunAllAreaView(); |
| | | funAllAreaView.frameLayout.Y = bottm + Application.GetRealHeight(8); |
| | | viewLayout.AddChidren(funAllAreaView.FLayoutView()); |
| | |
| | | ///切换房间默认:全部功能 |
| | | UserInfo.Current.logicselectedFunction = Language.StringByID(StringId.allFun); |
| | | ///获取显示设备列表 |
| | | var list = LogicMethod.CurrLogicMethod.GetFunctionDeviceList(areaView.btnClick.Tag as Entity.Room, if_type); |
| | | var list = LogicMethod.CurrLogicMethod.GetFunctionDeviceList(areaView.btnClick.Tag as Entity.Room, if_Type); |
| | | |
| | | this.LoadingDeviceListView(vv, list); |
| | | }; |
| | |
| | | { |
| | | |
| | | //获取最终显示列表 |
| | | var functionList = LogicMethod.CurrLogicMethod.GetFunctionDeviceList(UserInfo.Current.logicselectedRoom, if_type); |
| | | var functionList = LogicMethod.CurrLogicMethod.GetFunctionDeviceList(UserInfo.Current.logicselectedRoom, if_Type); |
| | | //获取设备列表的类型(例如:灯光类,窗帘类。。。) |
| | | var deviceTypeList = LogicMethod.CurrLogicMethod.GetDeviceTypeList(functionList); |
| | | if (deviceTypeList.Count == 0) |
| | |
| | | funAllAreaView.btnText2.MouseUpEventHandler += funClick; |
| | | funAllAreaView.btnIcon2.MouseUpEventHandler += funClick; |
| | | ///获取房间支持的设备列表 |
| | | var deviceList = LogicMethod.CurrLogicMethod.GetFunctionDeviceList(UserInfo.Current.logicselectedRoom, if_type); |
| | | var deviceList = LogicMethod.CurrLogicMethod.GetFunctionDeviceList(UserInfo.Current.logicselectedRoom, if_Type); |
| | | ///获取设备单个大类spk列表(例如:灯光类,空调类...) |
| | | var typeFunctionList = LogicMethod.CurrLogicMethod.GetDeviceTypeFunctionList(UserInfo.Current.logicselectedFunction); |
| | | ///获取设备单个小类列表(例如:灯光1,灯光2...) |
| | |
| | | ///设备大类名称<灯光类。。。。。> |
| | | funAllAreaView.btnText2.Text = UserInfo.Current.logicselectedFunction; |
| | | this.LoadingDeviceListView(vv, lists); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | /// <param name="deviceList"></param> |
| | | private void LoadingDeviceListView(VerticalScrolViewLayout verticalScrolView, List<HDL_ON.Entity.Function> deviceList) |
| | | { |
| | | loading.Start(); |
| | | System.Threading.Tasks.Task.Run(() => |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | loading.Hide(); |
| | | verticalScrolView.RemoveAll(); |
| | | foreach (var dev in deviceList) |
| | | { |
| | |
| | | funView.btnRoomName.Text = dev.GetRoomListName(); |
| | | funView.btnClick.MouseUpEventHandler += (sen, e) => |
| | | { |
| | | if (if_type == LogicMethod.condition_if) |
| | | if (if_Type == LogicMethod.condition_if) |
| | | { |
| | | ConditionDeviceFunList conditionDeviceFunList = new ConditionDeviceFunList(); |
| | | MainPage.BasePageView.AddChidren(conditionDeviceFunList); |
| | |
| | | |
| | | }; |
| | | } |
| | | |
| | | }); |
| | | |
| | | }); |
| | | } |
| | | } |