| | |
| | | //初始化桌布
|
| | | this.InitFrameTable();
|
| | |
|
| | | var framePic = new FrameLayout();
|
| | | framePic.Width = Application.GetRealWidth(855);
|
| | | framePic.Height = Application.GetRealHeight(570);
|
| | | framePic.Gravity = Gravity.CenterHorizontal;
|
| | | framePic.Y = Application.GetRealHeight(58);
|
| | | bodyFrameLayout.AddChidren(framePic);
|
| | |
|
| | | var imageFile = Common.LocalDevice.Current.GetRealDeviceIcon(listNewDevice);
|
| | | string fullName = IO.FileUtils.GetImageFilePath(imageFile);
|
| | |
|
| | | #if Android
|
| | | //设备图片
|
| | | var btnpictrue = new PicViewControl(855, 570);
|
| | | btnpictrue.Gravity = Gravity.CenterHorizontal;
|
| | | btnpictrue.Y = Application.GetRealHeight(58);
|
| | | Common.LocalDevice.Current.SetRealDeviceIconToControl(btnpictrue, listNewDevice);
|
| | | bodyFrameLayout.AddChidren(btnpictrue);
|
| | | var bim = Android.Graphics.BitmapFactory.DecodeFile(fullName);
|
| | | var btnpictrue = new PicViewControl(bim.Width, bim.Height);
|
| | | #endif
|
| | | #if iOS
|
| | | //设备图片
|
| | | var bim = UIKit.UIImage.FromFile(fullName);
|
| | | var btnpictrue = new PicViewControl((int)bim.Size.Width, (int)bim.Size.Height);
|
| | | #endif
|
| | | bim.Dispose();
|
| | | bim = null;
|
| | |
|
| | | btnpictrue.Gravity = Gravity.Center;
|
| | | btnpictrue.UnSelectedImagePath = imageFile;
|
| | | framePic.AddChidren(btnpictrue);
|
| | |
|
| | | string nameValue = Common.LocalDevice.Current.GetDeviceMacName(listNewDevice[0]);
|
| | | this.saveDefultName = nameValue;
|
| | |
| | | };
|
| | | bodyFrameLayout.AddChidren(btnHelp);
|
| | | //底线
|
| | | int lineWidth = btnHelp.GetRealWidthByText(12);
|
| | | int lineWidth = btnHelp.GetRealWidthByText();
|
| | | var btnLine = new NormalViewControl(lineWidth, ControlCommonResourse.BottomLineHeight, false);
|
| | | btnLine.BackgroundColor = UserCenterColor.Current.TextOrangeColor;
|
| | | btnLine.Gravity = Gravity.CenterHorizontal;
|
| | |
| | | };
|
| | | }
|
| | |
|
| | | #endregion
|
| | | #endregion
|
| | |
|
| | | #region ■ 修改名字___________________________
|
| | | #region ■ 修改名字___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 设备重命名然后打开新的画面
|
| | |
| | | if (deviceInfoType.BeloneType == Common.DeviceBeloneType.A按键面板 && device.Type == DeviceType.TemperatureSensor)
|
| | | {
|
| | | //面板的最后一个回路是温度传感器
|
| | | epointName = Language.StringByID(R.MyInternationalizationString.uDeviceBelongId11);
|
| | | epointName += Language.StringByID(R.MyInternationalizationString.uDeviceBelongId11);
|
| | | }
|
| | | //XXXXX(N回路)
|
| | | epointName += "(" + device.DeviceEpoint + Language.StringByID(R.MyInternationalizationString.uDeviceCircuit) + ")";
|
| | | else
|
| | | {
|
| | | //XXXXX(N回路)
|
| | | epointName += "(" + device.DeviceEpoint + Language.StringByID(R.MyInternationalizationString.uDeviceCircuit) + ")";
|
| | | }
|
| | | }
|
| | | await Common.LocalDevice.Current.ReName(device, epointName, ShowErrorMode.NO);
|
| | | }
|
| | | }
|
| | |
|
| | | #endregion
|
| | | #endregion
|
| | |
|
| | | #region ■ 画面关闭___________________________
|
| | | #region ■ 画面关闭___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 画面关闭
|
| | |
| | |
|
| | | base.CloseFormBefore();
|
| | | }
|
| | | #endregion
|
| | | #endregion
|
| | | }
|
| | | }
|