| | |
| | | }
|
| | |
|
| | | //检测是否绑定有网关
|
| | | if (this.CheckHadBindGateway() == false)
|
| | | if (Common.Config.Instance.Home.IsVirtually == false && this.CheckHadBindGateway() == false)
|
| | | {
|
| | | //显示没有绑定过网关的界面
|
| | | this.ShowNoGatewayTip();
|
| | |
| | | bg.UnSelectedImagePath = "Item/NoBindGW.png";
|
| | | this.listBodyContr.frameTable.AddChidren(bg);
|
| | |
|
| | | var tip = new NormalViewControl(Application.GetMinRealAverage(717), Application.GetMinRealAverage(58), false);
|
| | | var tip = new NormalViewControl(this.GetPictrueRealSize(717), this.GetPictrueRealSize(58), false);
|
| | | tip.Y = Application.GetRealHeight(815);
|
| | | tip.Gravity = Gravity.CenterHorizontal;
|
| | | tip.TextID = R.MyInternationalizationString.NewAccountNeedBingGW;
|
| | |
| | | //设备计数
|
| | | int contrCount = 0;
|
| | | //X轴坐标(图片左边有余白)
|
| | | int XX = Application.GetMinRealAverage(44);
|
| | | int XX = this.GetPictrueRealSize(44);
|
| | | //Y轴坐标
|
| | | int YY = 0;
|
| | | var listContr = new List<Controls.DeviceCardCommon>();
|
| | |
| | | //设备计数
|
| | | contrCount++;
|
| | | //卡片左右两边有14的余白,每两个后,X轴重置
|
| | | XX = contrCount % 2 == 0 ? Application.GetMinRealAverage(44) : cardContr.Right + Application.GetMinRealAverage(20);
|
| | | XX = contrCount % 2 == 0 ? this.GetPictrueRealSize(44) : cardContr.Right + this.GetPictrueRealSize(20);
|
| | | if (contrCount % 2 == 0)
|
| | | {
|
| | | //没两个之后,Y轴递增
|
| | | YY = cardContr.Bottom + Application.GetMinRealAverage(15);
|
| | | YY = cardContr.Bottom + this.GetPictrueRealSize(15);
|
| | | }
|
| | | //控件记录到缓存中
|
| | | this.dicDeviceCardControl[LocalDevice.Current.GetDeviceMainKeys(device)] = cardContr;
|
| | |
| | | var noFunction = new Button
|
| | | {
|
| | | Y = Application.GetRealHeight(69),
|
| | | Width = Application.GetMinRealAverage(683),
|
| | | Height = Application.GetMinRealAverage(392),
|
| | | Width = this.GetPictrueRealSize(683),
|
| | | Height = this.GetPictrueRealSize(392),
|
| | | Gravity = Gravity.CenterHorizontal,
|
| | | UnSelectedImagePath = "Item/NoFunction.png"
|
| | | };
|
| | |
| | | if (contrCount % 2 == 1)
|
| | | {
|
| | | //第一个固定44
|
| | | XX = Application.GetMinRealAverage(44);
|
| | | XX = this.GetPictrueRealSize(44);
|
| | | }
|
| | | else
|
| | | {
|
| | | //第二个是44+控件宽度+20余白
|
| | | XX = Application.GetMinRealAverage(44) + this.dicDeviceCardControl[mainkey].Width + Application.GetMinRealAverage(20);
|
| | | XX = this.GetPictrueRealSize(44) + this.dicDeviceCardControl[mainkey].Width + this.GetPictrueRealSize(20);
|
| | | }
|
| | |
|
| | | //每两个之后,并且是第一个的时候,Y轴递增
|
| | |
| | | //求商
|
| | | int value = contrCount / 2;
|
| | | //控件的底部有15的间隔
|
| | | YY = value * (this.dicDeviceCardControl[mainkey].Height + Application.GetMinRealAverage(15));
|
| | | YY = value * (this.dicDeviceCardControl[mainkey].Height + this.GetPictrueRealSize(15));
|
| | | }
|
| | | if (canMove == true)
|
| | | {
|
| | |
| | | if (contrCount % 2 == 1)
|
| | | {
|
| | | //第一个固定44
|
| | | XX = Application.GetMinRealAverage(44);
|
| | | XX = this.GetPictrueRealSize(44);
|
| | | }
|
| | | else
|
| | | {
|
| | | //第二个是44+控件宽度+20余白
|
| | | XX = Application.GetMinRealAverage(44) + this.dicSceneCardControl[sceneId].Width + Application.GetMinRealAverage(20);
|
| | | XX = this.GetPictrueRealSize(44) + this.dicSceneCardControl[sceneId].Width + this.GetPictrueRealSize(20);
|
| | | }
|
| | |
|
| | | //每两个之后,并且是第一个时,Y轴递增
|
| | |
| | | //求商
|
| | | int value = contrCount / 2;
|
| | | //控件的底部有15的间隔
|
| | | YY = value * (this.dicSceneCardControl[sceneId].Height + Application.GetMinRealAverage(15));
|
| | | YY = value * (this.dicSceneCardControl[sceneId].Height + this.GetPictrueRealSize(15));
|
| | | }
|
| | | if (canMove == true)
|
| | | {
|
| | |
| | | Config.Instance.Save();
|
| | | //刷新个人中心的内存及线程
|
| | | await UserCenterLogic.InitUserCenterMenmoryAndThread();
|
| | | //初始化全部房间
|
| | | HdlRoomLogic.Current.InitAllRoom();
|
| | |
|
| | | Application.RunOnMainThread(() =>
|
| | | {
|