| | |
| | | //大图显示 |
| | | if (OnAppConfig.Instance.IsShowBigPicture) |
| | | { |
| | | LoadBigPirtureRoomRow(roomView, roomsShowed[i/2]); |
| | | LoadBigPirtureRoomRow(roomView, roomsShowed[i]); |
| | | } |
| | | else//无图显示 |
| | | { |
| | | LoadSmallPirtureRoomRow(roomView, roomsShowed[i/2]); |
| | | LoadSmallPirtureRoomRow(roomView, roomsShowed[i]); |
| | | } |
| | | } |
| | | |
| | | |
| | | new System.Threading.Thread(() => |
| | | { |
| | | //需要移动的高度 |
| | | var runHeight = Application.GetRealWidth(i / 2 * 142); |
| | | var runHeight = Application.GetRealWidth(i * 142); |
| | | |
| | | int runCount = 0; |
| | | //循环次数,动画效果需要在1秒 (10次)内完成 |
| | | while (runCount == 9) |
| | | while (runCount < 9) |
| | | { |
| | | System.Threading.Thread.Sleep(100); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | if (childView.GetType() == typeof(FrameLayout)) |
| | |
| | | } |
| | | if (i > 0) |
| | | { |
| | | childView.Y += runDirection * Application.GetRealWidth(14 * i / 2); |
| | | childView.Y += runDirection * Application.GetRealWidth(14 * i); |
| | | } |
| | | }); |
| | | runCount++; |
| | | System.Threading.Thread.Sleep(8); |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | { |
| | |
| | | { |
| | | if (runDirection == 1) |
| | | { |
| | | childView.Height = Application.GetRealWidth(192); |
| | | childView.Height = Application.GetRealWidth(192+20); |
| | | } |
| | | else |
| | | { |
| | | childView.Height = Application.GetRealWidth(70); |
| | | childView.Height = Application.GetRealWidth(70+20); |
| | | } |
| | | } |
| | | }); |
| | | }) |
| | | { IsBackground = true, Priority = System.Threading.ThreadPriority.Highest }.Start(); |
| | | |
| | | //if (childView.GetType() == typeof(Button)) |
| | | //{ |
| | | // new System.Threading.Thread(() => { |
| | | // //循环次数,动画效果需要在1秒 (10次)内完成 |
| | | // int runCount = 9; |
| | | // //需要移动的高度 |
| | | // var runHeight = i / 2 * Application.GetRealWidth(142); |
| | | |
| | | // while (runCount == 0) |
| | | // { |
| | | // System.Threading.Thread.Sleep(100); |
| | | // Application.RunOnMainThread(() => |
| | | // { |
| | | // childView.Height += Application.GetRealWidth(14) * runDirection; |
| | | // }); |
| | | // } |
| | | // Application.RunOnMainThread(() => |
| | | // { |
| | | // if (runDirection == 1) |
| | | // { |
| | | // childView.Height = Application.GetRealWidth(192 + 20); |
| | | // } |
| | | // else |
| | | // { |
| | | // childView.Height = Application.GetRealWidth(70 + 20); |
| | | // } |
| | | // }); |
| | | // }) |
| | | // { IsBackground = true, Priority = System.Threading.ThreadPriority.Highest }.Start(); |
| | | //} |
| | | |
| | | } |
| | | } |
| | | else |
| | |
| | | { |
| | | roomView.RemoveAll(); |
| | | roomFloorChangeView.BackgroundColor = roomListView.BackgroundColor = CSS_Color.MainBackgroundColor; |
| | | |
| | | roomView.BackgroundColor = CSS_Color.MainBackgroundColor; |
| | | var roomViewbg = new ImageView() |
| | | { |
| | | Width = Application.GetRealWidth(343), |
| | |
| | | |
| | | var roomViewbgColor = new Button() |
| | | { |
| | | Height = Application.GetRealWidth(192), |
| | | Radius = (uint)Application.GetRealWidth(12), |
| | | BackgroundColor = 0x19333333, |
| | | }; |
| | |
| | | roomView.AddChidren(btnAllClose); |
| | | LoadEvent_CloseAllFunction(btnAllClose, room); |
| | | |
| | | var btn = new Button() |
| | | { |
| | | Y = Application.GetRealWidth(192), |
| | | Height = Application.GetRealWidth(20), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | roomView.AddChidren(btn); |
| | | //var btn = new Button() |
| | | //{ |
| | | // Y = Application.GetRealWidth(192), |
| | | // Height = Application.GetRealWidth(20), |
| | | // BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | //}; |
| | | //roomView.AddChidren(btn); |
| | | |
| | | roomViewbgColor.MouseUpEventHandler += (sender, e) => |
| | | { |
| | |
| | | { |
| | | roomView.RemoveAll(); |
| | | roomFloorChangeView.BackgroundColor = roomListView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | roomView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | |
| | | |
| | | var viewbg = new ImageView() |
| | | { |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealWidth(70), |
| | | Radius = (uint)Application.GetRealWidth(12), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | roomView.AddChidren(viewbg); |
| | | |
| | | var btnRoomName = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealHeight(12 - 2), |
| | | //Y = Application.GetRealHeight(12 - 2), |
| | | Width = Application.GetRealWidth(266), |
| | | Height = Application.GetRealHeight(52), |
| | | Text = room.roomName, |
| | |
| | | var btnFloorName = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealHeight(42), |
| | | Y = Application.GetRealHeight(19), |
| | | Width = Application.GetRealWidth(266), |
| | | Height = Application.GetRealHeight(46), |
| | | Text = room.floorName, |
| | |
| | | var btnAllClose = new Button() |
| | | { |
| | | X = Application.GetRealWidth(288), |
| | | Gravity = Gravity.CenterVertical, |
| | | Y = Application.GetRealWidth(10), |
| | | Width = Application.GetMinRealAverage(58), |
| | | Height = Application.GetMinRealAverage(58), |
| | | UnSelectedImagePath = "Classification/Room/AllCloseIcon2.png", |
| | |
| | | roomView.AddChidren(btnAllClose); |
| | | LoadEvent_CloseAllFunction(btnAllClose, room); |
| | | |
| | | var btn = new Button() |
| | | { |
| | | Y = Application.GetRealWidth(70), |
| | | Height = Application.GetRealWidth(20), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | roomView.AddChidren(btn); |
| | | //var btn = new Button() |
| | | //{ |
| | | // Y = Application.GetRealWidth(70), |
| | | // Height = Application.GetRealWidth(20), |
| | | // BackgroundColor = CSS_Color.BackgroundColor, |
| | | //}; |
| | | //roomView.AddChidren(btn); |
| | | |
| | | roomViewbg.MouseUpEventHandler += (sender, e) => |
| | | { |
| | |
| | | break; |
| | | case ShowFunction.FreshAir: |
| | | functionCount = FunctionList.List.GetAirFreshList().Count; |
| | | functionOnCount = FunctionList.List.GetAirFreshList().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | break; |
| | | case ShowFunction.Music: |
| | | functionCount = Music.A31MusicModel.A31MusicModelList.Count; |
| | | functionOnCount = Music.A31MusicModel.A31MusicModelList.FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | if(functionCount == 0) |
| | | { |
| | | functionCount = FunctionList.List.GetMusicList().Count; |
| | | } |
| | | //functionCount = Music.A31MusicModel.A31MusicModelList.Count; |
| | | //functionOnCount = Music.A31MusicModel.A31MusicModelList.FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | //if(functionCount == 0) |
| | | //{ |
| | | // functionCount = FunctionList.List.GetMusicList().Count; |
| | | //} |
| | | functionCount = 1; |
| | | break; |
| | | case ShowFunction.Panel: |
| | | break; |
| | | case ShowFunction.SecurityMonitoring: |
| | | functionCount = 1; |
| | | if (!MainPage.NoLoginMode) |
| | | { |
| | | functionCount = 1; |
| | | } |
| | | break; |
| | | case ShowFunction.Sensor: |
| | | functionCount = FunctionList.List.GetArmSensorList().Count; |
| | | break; |
| | | case ShowFunction.VideoIntercom: |
| | | if (FunctionList.List.videoIntercom != null) |
| | | if (FunctionList.List.videoIntercom != null && FunctionList.List.videoIntercom.Count > 0) |
| | | { |
| | | functionCount = 1; |
| | | } |
| | |
| | | functionView.AddChidren(btnName); |
| | | |
| | | if (item != ShowFunction.Environmental && item != ShowFunction.Sensor && item != ShowFunction.VideoIntercom |
| | | && item != ShowFunction.SecurityMonitoring && item != ShowFunction.FreshAir |
| | | && item != ShowFunction.SecurityMonitoring && item != ShowFunction.FreshAir && item != ShowFunction.Music |
| | | && item != ShowFunction.EnergyMonitoring && item != ShowFunction.SecurityCenter |
| | | && functionCount != 0) |
| | | { |
| | |
| | | btnName.TextID = StringId.Sensor; |
| | | functionPageTitleId = StringId.Sensor; |
| | | break; |
| | | case ShowFunction.VideoIntercom: |
| | | case ShowFunction.VideoIntercom://可视对讲 |
| | | btnName.TextID = StringId.VideoIntercom; |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var videoMethod = new UI2.FuntionControlView.Video.VideoMethod(); |
| | | videoMethod.MianView(this,FunctionList.List.videoIntercom); |
| | | videoMethod.MianView(this); |
| | | }; |
| | | break; |
| | | case ShowFunction.SecurityCenter: |