| | |
| | | ///没有房间直接返回去; |
| | | if (Common.Room.Lists.Count == 0) |
| | | { |
| | | return; |
| | | return; |
| | | } |
| | | ///房间滑动控件 |
| | | var roomhorizontalScrol = new HorizontalScrolViewLayout() |
| | |
| | | |
| | | middle = new VerticalScrolViewLayout(); |
| | | middle.Y = devicetypehorizontalScrol.Bottom + Application.GetRealHeight(40); |
| | | middle.Height =Application.GetRealHeight(1920-40) - devicetypehorizontalScrol.Bottom; |
| | | middle.Height = Application.GetRealHeight(1920 - 40) - devicetypehorizontalScrol.Bottom; |
| | | middle.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor; |
| | | middle.X = Application.GetRealWidth(58); |
| | | middle.Radius = (uint)Application.GetRealHeight(50); |
| | |
| | | Height = Application.GetRealHeight(780), |
| | | X = Application.GetRealWidth(1080 - 468 - 35), |
| | | Y = Application.GetRealHeight(184), |
| | | BackgroundImagePath= "Item/SelectFloor_Right.png", |
| | | BackgroundImagePath = "Item/SelectFloor_Right.png", |
| | | }; |
| | | flMain.AddChidren(foolrbjicon); |
| | | |
| | |
| | | { |
| | | |
| | | Width = Application.GetRealWidth(450), |
| | | Height =foolrbjicon.Height - btnfoolrtext.Height, |
| | | Height = foolrbjicon.Height - btnfoolrtext.Height, |
| | | X = Application.GetRealWidth(80), |
| | | Y = btnfoolrtext.Bottom, |
| | | }; |
| | |
| | | var foolrRowLayout = new RowLayout |
| | | { |
| | | Height = Application.GetRealHeight(150), |
| | | LineColor= ZigbeeColor.Current.LogicMiddleBackgroundColor, |
| | | LineColor = ZigbeeColor.Current.LogicMiddleBackgroundColor, |
| | | }; |
| | | foolrbj.AddChidren(foolrRowLayout); |
| | | |
| | |
| | | Width = Application.GetRealWidth(81), |
| | | Height = Application.GetRealHeight(81), |
| | | UnSelectedImagePath = "Floor/Floor.png", |
| | | Gravity=Gravity.CenterVertical, |
| | | Gravity = Gravity.CenterVertical, |
| | | }; |
| | | foolrRowLayout.AddChidren(btnfoolricon); |
| | | |
| | |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = ZigbeeColor.Current.LogicBtnCancelColor, |
| | | Tag = foolr.Key, |
| | | X= btnfoolricon.Right+Application.GetRealWidth(12), |
| | | X = btnfoolricon.Right + Application.GetRealWidth(12), |
| | | }; |
| | | foolrRowLayout.AddChidren(btnfoolrname); |
| | | if (foolrname.Text == foolr.Value) { |
| | | if (foolrname.Text == foolr.Value) |
| | | { |
| | | btnfoolricon.UnSelectedImagePath = "Floor/FloorSelected.png"; |
| | | btnfoolrname.TextColor = ZigbeeColor.Current.LogicTextBlackColor; |
| | | } |
| | |
| | | foolrname.Text = btnfoolrname.Text; |
| | | flMain.RemoveFromParent(); |
| | | var list = Send.GetRoomList(btnfoolrname.Tag.ToString()); |
| | | |
| | | |
| | | AllRoomView(list, deviceTypeList, roomhorizontalScrol, devicetypehorizontalScrol); |
| | | }; |
| | | foolrRowLayout.MouseUpEventHandler += foolrnameclick; |
| | |
| | | Width = Application.GetRealWidth(255), |
| | | UnSelectedImagePath = "ZigeeLogic/iconBackgroundColor.png", |
| | | SelectedImagePath = "ZigeeLogic/iconSelectedBackgroundColor.png", |
| | | Y=Application.GetRealHeight(21), |
| | | Y = Application.GetRealHeight(21), |
| | | }; |
| | | fra.AddChidren(roombjBtn); |
| | | |
| | | var roomnameBtn= new Button |
| | | var roomnameBtn = new Button |
| | | { |
| | | |
| | | Height = Application.GetRealHeight(152-26-20), |
| | | Width = Application.GetRealWidth(255-20-50), |
| | | Height = Application.GetRealHeight(152 - 26 - 20), |
| | | Width = Application.GetRealWidth(255 - 20 - 50), |
| | | Text = room.Name, |
| | | TextColor = ZigbeeColor.Current.LogicBtnCancelColor, |
| | | SelectedTextColor = ZigbeeColor.Current.LogicBlankBackgroundColor, |
| | | Y=Application.GetRealHeight(21 +13+10), |
| | | X=Application.GetRealWidth(10+25), |
| | | Y = Application.GetRealHeight(21 + 13 + 10), |
| | | X = Application.GetRealWidth(10 + 25), |
| | | |
| | | }; |
| | | fra.AddChidren(roomnameBtn); |
| | |
| | | var list = new List<DeviceUI>(); |
| | | foreach (var device in room.DeviceUIList) |
| | | { |
| | | if (device.CommonDevice==null) { |
| | | if (device.CommonDevice == null) |
| | | { |
| | | continue; |
| | | } |
| | | if (!deviceTypeList.Contains(device.CommonDevice.Type)) |
| | |
| | | } |
| | | list.Add(device); |
| | | } |
| | | |
| | | |
| | | AllDeviceTypeView(list, devicetypehorizontalScrol); |
| | | |
| | | } |
| | |
| | | var list = new List<DeviceUI>(); |
| | | foreach (var device in room.DeviceUIList) |
| | | { |
| | | if (device.CommonDevice==null) { |
| | | if (device.CommonDevice == null) |
| | | { |
| | | continue; |
| | | } |
| | | if (!deviceTypeList.Contains(device.CommonDevice.Type)) |
| | |
| | | } |
| | | list.Add(device); |
| | | } |
| | | |
| | | |
| | | AllDeviceTypeView(list, devicetypehorizontalScrol); |
| | | |
| | | |
| | |
| | | devicetypelist.Add(Language.StringByID(MyInternationalizationString.Curtains)); |
| | | } |
| | | |
| | | var iASZonejosn = devicelist.Find((device) => device.CommonDevice.Type == DeviceType.IASZone|| device.CommonDevice.Type == DeviceType.TemperatureSensor); |
| | | var iASZonejosn = devicelist.Find((device) => device.CommonDevice.Type == DeviceType.IASZone || device.CommonDevice.Type == DeviceType.TemperatureSensor); |
| | | if (iASZonejosn != null) |
| | | { |
| | | devicetypelist.Add(Language.StringByID(MyInternationalizationString.sensor)); |
| | |
| | | /// 选中该设备功能作为条件的视图方法 |
| | | /// </summary> |
| | | /// <param name="common">Common.</param> |
| | | public async static void CurrentDeviceView(FrameLayout flMain, CommonDevice common, bool edit) |
| | | public async static void CurrentDeviceView(FrameLayout flMain, CommonDevice common, bool edit) |
| | | { |
| | | //不让当前界面滑动 |
| | | UserView.HomePage.Instance.ScrollEnabled = false; |
| | | List<Dictionary<string, string>> doorlockConditionsInfo= new List<Dictionary<string, string>>(); |
| | | List<Dictionary<string, string>> doorlockConditionsInfo = new List<Dictionary<string, string>>(); |
| | | Dictionary<string, string> deviceConditionsInfo = new Dictionary<string, string>(); |
| | | dictionary(deviceConditionsInfo, "Type", "1"); |
| | | dictionary(deviceConditionsInfo, "IsValid", "1"); |
| | |
| | | var buttonSelected = new SelectedButton(); |
| | | buttonRow.AddChidren(buttonSelected); |
| | | EventHandler<MouseEventArgs> buttonclick = (sender, e) => |
| | | { |
| | | buttonSelected.Visible = true; |
| | | SelectedDeviceStatuscondition = "OnOffSwitch"; |
| | | button.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; |
| | | { |
| | | buttonSelected.Visible = true; |
| | | SelectedDeviceStatuscondition = "OnOffSwitch"; |
| | | button.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; |
| | | |
| | | }; |
| | | }; |
| | | buttonRow.MouseUpEventHandler += buttonclick; |
| | | button.MouseUpEventHandler += buttonclick; |
| | | buttonSelected.MouseUpEventHandler += buttonclick; |
| | |
| | | deviceConditionsInfo.Add(Key, Value); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |