| | |
| | | framePic.Y = Application.GetRealHeight(58);
|
| | | listBackControl.frameTable.AddChidren(framePic);
|
| | |
|
| | | var imageFile = "Gateway/RealGateway" + this.zbGateway.getGwInfo.LinuxImageType + ".png";
|
| | | string fullName = IO.FileUtils.GetImageFilePath(imageFile);
|
| | | if (fullName == string.Empty)
|
| | | var linuxImageType = this.zbGateway.LinuxImageType.ToString();
|
| | | var imageFile = "Gateway/RealGateway" + linuxImageType + ".png";
|
| | | imageFile = IO.FileUtils.GetImageFilePath(imageFile);
|
| | | if (imageFile == string.Empty)
|
| | | {
|
| | | //如果没有指定的网关的真实图片的话,则用共通图片
|
| | | imageFile = "Gateway/RealGateway.png";
|
| | |
|
| | | imageFile = IO.FileUtils.GetImageFilePath("Gateway/RealGateway.png");
|
| | | }
|
| | | #if Android
|
| | | //设备图片
|
| | | var bim = Android.Graphics.BitmapFactory.DecodeFile(fullName);
|
| | | var bim = Android.Graphics.BitmapFactory.DecodeFile(imageFile);
|
| | | var btnpictrue = new PicViewControl(bim.Width, bim.Height);
|
| | | #endif
|
| | | #if iOS
|
| | | //设备图片
|
| | | var bim = UIKit.UIImage.FromFile(fullName);
|
| | | var bim = UIKit.UIImage.FromFile(imageFile);
|
| | | var btnpictrue = new PicViewControl((int)bim.Size.Width, (int)bim.Size.Height);
|
| | | #endif
|
| | | bim.Dispose();
|
| | |
| | | rowBeloneArea.SelectRoomEvent += (roomKeys) =>
|
| | | {
|
| | | //变更网关房间
|
| | | HdlGatewayLogic.Current.ChangedGatewayRoom(this.zbGateway, roomKeys);
|
| | | HdlGatewayLogic.Current.ChangedGatewayRoom(this.zbGateway.GwId, roomKeys);
|
| | | };
|
| | |
|
| | | //完成初始化桌布
|
| | |
| | | /// </summary>
|
| | | /// <param name="gatewayName">网关名称</param>
|
| | | /// <param name="closeForm">关闭界面</param>
|
| | | private async void SetGatewayName(string gatewayName, bool closeForm)
|
| | | private void SetGatewayName(string gatewayName, bool closeForm)
|
| | | {
|
| | | //打开进度条
|
| | | this.ShowProgressBar();
|
| | | //修改本地网关名
|
| | | var result = await HdlGatewayLogic.Current.ReName(zbGateway, gatewayName);
|
| | | var result = HdlGatewayLogic.Current.ReName(zbGateway, gatewayName);
|
| | | //关闭进度条
|
| | | this.CloseProgressBar();
|
| | |
|