黄学彪
2019-12-30 3dcbd186c42c598c0c08d1cd37034cf2baa09e54
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs
@@ -57,12 +57,32 @@
            //初始化桌布
            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;
@@ -140,7 +160,7 @@
            };
            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;
@@ -193,9 +213,9 @@
            };
        }
        #endregion
#endregion
        #region ■ 修改名字___________________________
#region ■ 修改名字___________________________
        /// <summary>
        /// 设备重命名然后打开新的画面
@@ -249,18 +269,21 @@
                    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>
        /// 画面关闭
@@ -277,6 +300,6 @@
            base.CloseFormBefore();
        }
        #endregion
#endregion
    }
}