| | |
| | | |
| | | public Action<string> FloorAction; |
| | | |
| | | public bool changeFloor; |
| | | |
| | | /// <summary> |
| | | /// Init |
| | |
| | | Height = Application.GetRealHeight(150), |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextID = R.MyInternationalizationString.SelectFloor |
| | | TextID = R.MyInternationalizationString.SelectFloor, |
| | | TextSize=16, |
| | | IsBold=true |
| | | }; |
| | | backgroundFL.AddChidren(tip); |
| | | tip.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | BackgroundColor = ZigbeeColor.Current.GXCRedColor; |
| | | }; |
| | | |
| | | var floorLayout = new VerticalScrolViewLayout |
| | | { |
| | |
| | | frow.IsSelected = true; |
| | | } |
| | | |
| | | frow.IconButton.MouseUpEventHandler += SelectFloor_MouseUpEvent; |
| | | frow.TitleButton.MouseUpEventHandler += SelectFloor_MouseUpEvent; |
| | | frow.ClickBtn.MouseUpEventHandler += SelectFloor_MouseUpEvent; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// SelectFloor_MouseUpEvent |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="mouseEventArgs"></param> |
| | | private void SelectFloor_MouseUpEvent(object sender,MouseEventArgs mouseEventArgs) |
| | | { |
| | | ((sender as Button).Parent as CommonForm.LeftIconButtonRow).IsSelected = true; |
| | | Config.Instance.Home.CurrentFloorId = (sender as Button).Tag.ToString(); |
| | | Config.Instance.Home.Save(); |
| | | FloorAction?.Invoke(Config.Instance.Home.GetCurrentFloorName); |
| | | if(changeFloor) |
| | | { |
| | | Config.Instance.Home.CurrentFloorId = (sender as Button).Tag.ToString(); |
| | | Config.Instance.Home.Save(); |
| | | Common.Room.RefreshRoomListView(); |
| | | } |
| | | |
| | | FloorAction?.Invoke((sender as Button).Tag.ToString()); |
| | | RemoveFromParent(); |
| | | } |
| | | } |