old mode 100755
new mode 100644
| | |
| | | using System.Text;
|
| | | using ZigBee.Device;
|
| | |
|
| | |
|
| | | namespace Shared.Phone.MainPage
|
| | | {
|
| | | /// <summary>
|
| | |
| | | {
|
| | | #region ■ 变量声明___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// The instance.
|
| | | /// </summary>
|
| | | public static HomeMainPageForm Instance;
|
| | | /// <summary>
|
| | | /// 整个界面的上下滑动控件
|
| | | /// </summary>
|
| | |
| | | /// </summary>
|
| | | public void ShowForm()
|
| | | {
|
| | | this.FormID = "HomeMainPageForm";
|
| | | Instance = this;
|
| | | |
| | | //先初始化左滑房间列表界面(在反射里面初始化)
|
| | | if (ListRoomViewFrom.Instance == null) { }
|
| | |
|
| | |
| | | this.AddNormalDeviceReportEvent();
|
| | | //添加传感器状态上报事件
|
| | | this.AddSensorDeviceReportEvent();
|
| | | //将当前的画面保存到内存当中
|
| | | UserCenterLogic.AddActionForm(this);
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 初始化头部控件
|
| | | /// </summary>
|
| | | private void InitTopFrameLayoutControl()
|
| | | {
|
| | | { |
| | | |
| | | |
| | |
|
| | | //头部容器
|
| | | base.topFrameLayout = new FrameLayout();
|
| | | topFrameLayout.Y = Application.GetRealHeight(60);
|
| | |
| | | //显示选择楼层的界面
|
| | | this.ShowSelectFloorForm(btnFloorName);
|
| | | };
|
| | | }
|
| | | //安防快捷方式
|
| | | } |
| | | |
| | | //可视对讲快捷方式 |
| | | Shared.Phone.Device.VideoIntercom.VideoMachine.AccountSupportVideo(topFrameLayout); |
| | | |
| | | //var videoIntercomBtn = new Button();
|
| | | //videoIntercomBtn.Gravity = Gravity.CenterVertical;
|
| | | //videoIntercomBtn.UnSelectedImagePath = "Item/videoIntercom.png";
|
| | | //videoIntercomBtn.Width = Application.GetMinRealAverage(69); |
| | | //videoIntercomBtn.Height = Application.GetMinRealAverage(69);
|
| | | //topFrameLayout.AddChidren(videoIntercomBtn); |
| | | //if (UserCenterResourse.ResidenceOption.SafetyShortcut) |
| | | //{ |
| | | // videoIntercomBtn.X = Application.GetRealWidth(746+10);
|
| | | //} |
| | | //else |
| | | //{ |
| | | // videoIntercomBtn.X = Application.GetRealWidth(850+10); |
| | | //} |
| | | //videoIntercomBtn.MouseUpEventHandler += (sender, e) => |
| | | //{ |
| | | // var videoMachine = new Device.VideoIntercom.VideoMachine(); |
| | | // UserView.HomePage.Instance.AddChidren(videoMachine); |
| | | // UserView.HomePage.Instance.PageIndex += 1; |
| | | // videoMachine.Show(); |
| | | //}; |
| | | |
| | | |
| | | |
| | | |
| | | //安防快捷方式 |
| | | if (UserCenterResourse.ResidenceOption.SafetyShortcut)
|
| | | {
|
| | | var btnSafety = new Controls.SafetyShortcutControl();
|
| | |
| | | btnSafety.Gravity = Gravity.CenterVertical;
|
| | | topFrameLayout.AddChidren(btnSafety);
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | //消息图标
|
| | | var btnMessage = new MessageManagementControl();
|
| | | btnMessage.X = Application.GetRealWidth(953);
|
| | |
| | | selectHouse.Init();
|
| | | selectHouse.HouseAction = (houseId) =>
|
| | | {
|
| | | ChangeResidence(House.GetHouseByHouseId(houseId));
|
| | | ChangeResidence(HdlResidenceLogic.Current.GetHouseByHouseId(houseId));
|
| | | };
|
| | | }
|
| | | };
|
| | |
| | | {
|
| | | cardContr = new Controls.DeviceDoorLockCardControl();
|
| | | }
|
| | | //色温灯
|
| | | else if (device.Type == DeviceType.ColorTemperatureLight)
|
| | | {
|
| | | cardContr = new Controls.DeviceColorTemperatureCardControl();
|
| | | }
|
| | | //无法识别
|
| | | else
|
| | | {
|
| | |
| | | new System.Threading.Thread(async () =>
|
| | | {
|
| | | Config.Instance.HomeId = home.Id;
|
| | | Config.Instance.Home = House.GetHouseByFilePath(home.FileName);
|
| | | Config.Instance.Home = HdlResidenceLogic.Current.GetHouseByHouseId(home.Id);
|
| | | Global.CreateHomeDirectory(home.Id);
|
| | | Config.Instance.Save();
|
| | | //刷新个人中心的内存及线程
|
| | |
| | | floorFL.changeFloor = true;
|
| | | floorFL.FloorAction = (floorId) =>
|
| | | {
|
| | | btnFloor.Text = Config.Instance.Home.GetFloorNameById(floorId);
|
| | | btnFloor.Text = HdlResidenceLogic.Current.GetFloorNameById(floorId);
|
| | | HdlRoomLogic.Current.NowMainPageRoom = HdlRoomLogic.Current.GetLoveRoom();
|
| | | this.ShowForm();
|
| | | };
|
| | |
| | | /// </summary>
|
| | | public override void CloseFormBefore()
|
| | | {
|
| | | //把静态变量的这个东西置空
|
| | | Instance = null;
|
| | |
|
| | | HdlGatewayReceiveLogic.Current.RemoveEvent("UserHomeViewDeviceOnline");
|
| | | HdlGatewayReceiveLogic.Current.RemoveEvent("UserHomeViewDeviceRespone");
|
| | | HdlGatewayReceiveLogic.Current.RemoveEvent("UserHomeViewDeviceStatus");
|
| | | HdlGatewayReceiveLogic.Current.RemoveEvent("UserHomeViewSensor");
|
| | |
|