| | |
| | | }; |
| | | changeHomeFL.AddChidren(scrolView); |
| | | |
| | | var houseCount = Config.Instance.HomeFilePathList.Count; |
| | | if (Config.Instance.HomeFilePathList.Count > 0) |
| | | //获取本地全部的住宅对象 |
| | | var listHouse = UserCenter.HdlResidenceLogic.Current.GetLocalResidenceList(); |
| | | var houseCount = listHouse.Count; |
| | | if (houseCount > 0) |
| | | { |
| | | if (houseCount > 5) |
| | | { |
| | |
| | | changeHomeFL.Height = this.GetPictrueRealSize(150 * (houseCount + 1)); |
| | | scrolView.Height = this.GetPictrueRealSize(150 * houseCount); |
| | | } |
| | | |
| | | foreach (var housePath in Config.Instance.HomeFilePathList) |
| | | { |
| | | var home = House.GetHouseByFilePath(housePath); |
| | | if (home == null) |
| | | { |
| | | continue; |
| | | } |
| | | AddFloor(scrolView, home); |
| | | foreach (var house in listHouse)
|
| | | {
|
| | | AddFloor(scrolView, house);
|
| | | } |
| | | } |
| | | } |
| | |
| | | frow.IsSelected = true; |
| | | } |
| | | |
| | | frow.ButtonClickEvent += SelectFloor_MouseUpEvent; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// SelectFloor_MouseUpEvent |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="mouseEventArgs"></param> |
| | | private void SelectFloor_MouseUpEvent(object sender, MouseEventArgs mouseEventArgs) |
| | | { |
| | | (sender as Device.CommonForm.LeftIconButtonRow).IsSelected = true; |
| | | var home = House.GetHouseByFilePath((sender as Device.CommonForm.LeftIconButtonRow).Tag.ToString()); |
| | | RemoveView(); |
| | | HouseAction?.Invoke(home.Id); |
| | | frow.ButtonClickEvent += (sender, e) => |
| | | {
|
| | | RemoveView();
|
| | | HouseAction?.Invoke(house.Id);
|
| | | }; |
| | | } |
| | | |
| | | /// <summary> |