From 66a9965c44ecc32a6696abca876ab9d1cd091584 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期五, 28 二月 2020 15:25:13 +0800
Subject: [PATCH] 2020.2.28
---
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs | 45 +++++++++++++++++++++++++++++----------------
1 files changed, 29 insertions(+), 16 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs
index 1368cc6..0554fa7 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs
+++ b/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;
@@ -231,22 +251,15 @@
/// </summary>
private async void SetAllEpointName()
{
- var tempValue = Common.LocalDevice.Current.GetDeviceObjectText(this.listNewDevice);
- var arry = tempValue.Split(new string[] { "(" }, StringSplitOptions.RemoveEmptyEntries);
- var objName = arry[0].Trim();
-
foreach (var device in this.listNewDevice)
{
if (Common.LocalDevice.Current.GetSimpleEpointName(device) != string.Empty)
{
+ //鏈夊悕瀛椾笉澶勭悊
continue;
}
- var epointName = objName;
- if (this.listNewDevice.Count > 1)
- {
- //XXXXX(N鍥炶矾)
- epointName += "(" + device.DeviceEpoint + Language.StringByID(R.MyInternationalizationString.uDeviceCircuit) + ")";
- }
+ //鑾峰彇绔偣鍚嶅瓧
+ var epointName = Common.LocalDevice.Current.GetDeviceEpointName(device);
await Common.LocalDevice.Current.ReName(device, epointName, ShowErrorMode.NO);
}
}
--
Gitblit v1.8.0