From 34e965100d635346e2d4cd6e6013bdaed66b3004 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期四, 02 一月 2020 19:52:13 +0800
Subject: [PATCH] 2019.1.2-3
---
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs | 59 +++++++++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 45 insertions(+), 14 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs
index 871c1ad..a4c9e34 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;
@@ -193,9 +213,9 @@
};
}
- #endregion
+#endregion
- #region 鈻� 淇敼鍚嶅瓧___________________________
+#region 鈻� 淇敼鍚嶅瓧___________________________
/// <summary>
/// 璁惧閲嶅懡鍚嶇劧鍚庢墦寮�鏂扮殑鐢婚潰
@@ -249,18 +269,29 @@
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 if (deviceInfoType.ConcreteType == Common.DeviceConcreteType.Sensor_Pir)
+ {
+ //pir浼犳劅鍣�,瀹冨張鎼炵壒娈婁笢瑗�,浼犳劅鍣ㄨ嚜韬敤鑷繁鐨勫悕瀛�,缁х數鍣ㄥ洖璺殑璇濃�︹��
+ if (device.Type == DeviceType.OnOffOutput)
+ {
+ epointName += Language.StringByID(R.MyInternationalizationString.uDeviceBelongId2300);
+ }
+ }
+ 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 +308,6 @@
base.CloseFormBefore();
}
- #endregion
+#endregion
}
}
--
Gitblit v1.8.0