From dc0309e64f02227d8e1468b7326c07955f804612 Mon Sep 17 00:00:00 2001
From: chenqiyang <1406175257@qq.com>
Date: 星期三, 22 六月 2022 11:22:18 +0800
Subject: [PATCH] 修改引用路径
---
ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs | 71 ++++++++++++++++++-----------------
1 files changed, 37 insertions(+), 34 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs
index bdb24b3..faa609b 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs
@@ -21,7 +21,7 @@
public void ShowForm()
{
//璁颁綇瀹冨師鏉ョ殑鏄电О
- HdlUserCenterResourse.UserInfo.OldUserName = HdlUserCenterResourse.UserInfo.NickName;
+ UserCenterResourse.UserInfo.OldUserName = UserCenterResourse.UserInfo.UserName;
//鍥犱负鍒殑鐢婚潰浼氳皟鐢ㄨ繖涓嚱鏁帮紝鐒跺悗鍒锋柊鐢婚潰
this.ClearBodyFrame();
@@ -60,7 +60,7 @@
btnUserIcon.Radius = (uint)this.GetPictrueRealSize(251) / 2;
btnUserIcon.Y = Application.GetRealHeight(46);
btnUserIcon.Gravity = Gravity.CenterHorizontal;
- btnUserIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(HdlFileNameResourse.UserHeadIconFile);
+ btnUserIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(UserCenterResourse.UserInfo.UserIconFile);
specialTopFrame.AddChidren(btnUserIcon);
btnUserIcon.MouseUpEventHandler += (sender, e) =>
{
@@ -82,7 +82,7 @@
{
frameMiddleBack = new NormalFrameLayout();
frameMiddleBack.Y = Application.GetRealHeight(363);
- frameMiddleBack.Height = Application.GetRealHeight(1008) - HdlControlResourse.ListViewRowHeight - Application.GetRealHeight(12);
+ frameMiddleBack.Height = Application.GetRealHeight(1008) - ControlCommonResourse.ListViewRowHeight - Application.GetRealHeight(12);
frameMiddleBack.BackgroundColor = UserCenterColor.Current.White;
bodyFrameLayout.AddChidren(frameMiddleBack);
}
@@ -108,10 +108,10 @@
var txtName = new TextInputControl(700, true);
txtName.MaxByte = 36;//闄愬埗36涓瓧鑺�
txtName.UseFocusColor = true;
- txtName.X = bodyFrameLayout.Width - Application.GetRealWidth(700) - HdlControlResourse.XXLeft;
+ txtName.X = bodyFrameLayout.Width - Application.GetRealWidth(700) - ControlCommonResourse.XXLeft;
txtName.Gravity = Gravity.CenterVertical;
txtName.TextAlignment = TextAlignment.CenterRight;
- txtName.Text = HdlUserCenterResourse.UserInfo.NickName;
+ txtName.Text = UserCenterResourse.UserInfo.UserName;
rowName.AddChidren(txtName, ChidrenBindMode.NotBind);
txtName.Y += listMidFrame.rowSpace / 2;
//杈撳叆缁撴潫浜嬩欢
@@ -124,7 +124,7 @@
//鎵�浠ユ墠鍑烘涓嬬瓥,娣诲姞杩欎釜浜嬩欢)
txtName.TextChangedEvent += (value) =>
{
- HdlUserCenterResourse.UserInfo.NickName = value;
+ UserCenterResourse.UserInfo.UserName = value;
};
//鍏夋爣鏀瑰彉浜嬩欢(2020.04.05:浠ュ墠閮藉畾姝昏鎸夊洖杞﹂敭鎵嶆洿鏂�,鐜板湪鍙堣鍚嶅瓧娌℃湁鍚屾
//鎵�浠ユ墠鍑烘涓嬬瓥,娣诲姞杩欎釜浜嬩欢)
@@ -164,15 +164,15 @@
//娣诲姞鍚戝彸鍥炬爣
rowEmail.AddRightArrow();
//閭
- var btnEmail = rowEmail.AddMostRightView(HdlUserCenterResourse.UserInfo.UserEmail, 500);
- if (string.IsNullOrEmpty(HdlUserCenterResourse.UserInfo.UserEmail) == true)
+ var btnEmail = rowEmail.AddMostRightView(UserCenterResourse.UserInfo.Email, 500);
+ if (string.IsNullOrEmpty(UserCenterResourse.UserInfo.Email) == true)
{
//鏈缃�,璇风粦瀹�
btnEmail.TextID = R.MyInternationalizationString.uNotSettionAndPleaseBind;
}
rowEmail.ButtonClickEvent += (sender, e) =>
{
- if (string.IsNullOrEmpty(HdlUserCenterResourse.UserInfo.UserEmail) == true)
+ if (string.IsNullOrEmpty(UserCenterResourse.UserInfo.Email) == true)
{
var form = new Password.CheckNewEmailForm();
form.AddForm();
@@ -193,15 +193,15 @@
//娣诲姞鍚戝彸鍥炬爣
rowPhone.AddRightArrow();
//鎵嬫満鍙�
- var btnPhone = rowPhone.AddMostRightView(HdlUserCenterResourse.UserInfo.UserPhone, 500);
- if (string.IsNullOrEmpty(HdlUserCenterResourse.UserInfo.UserPhone) == true)
+ var btnPhone = rowPhone.AddMostRightView(UserCenterResourse.UserInfo.Phone, 500);
+ if (string.IsNullOrEmpty(UserCenterResourse.UserInfo.Phone) == true)
{
//鏈缃�,璇风粦瀹�
btnPhone.TextID = R.MyInternationalizationString.uNotSettionAndPleaseBind;
}
else
{
- string phoneNum = HdlUserCenterResourse.UserInfo.UserPhone;
+ string phoneNum = UserCenterResourse.UserInfo.Phone;
if (phoneNum.Length >= 11)
{
phoneNum = phoneNum.Substring(0, 3) + "".PadLeft(phoneNum.Length - 7, '*') + phoneNum.Substring(phoneNum.Length - 4, 4);
@@ -211,11 +211,11 @@
//鎴栬杩欐槸鍥藉鐨勬墜鏈哄惂
phoneNum = phoneNum.Substring(0, 3) + "".PadLeft(phoneNum.Length - 5, '*') + phoneNum.Substring(phoneNum.Length - 2, 2);
}
- btnPhone.Text = "+" + HdlUserCenterResourse.UserInfo.PhoneAreaCode + " " + phoneNum;
+ btnPhone.Text = "+" + UserCenterResourse.UserInfo.AreaCode + " " + phoneNum;
}
rowPhone.ButtonClickEvent += (sender, e) =>
{
- if (string.IsNullOrEmpty(HdlUserCenterResourse.UserInfo.UserPhone) == true)
+ if (string.IsNullOrEmpty(UserCenterResourse.UserInfo.Phone) == true)
{
var form = new Password.CheckNewPhoneForm();
form.AddForm();
@@ -285,8 +285,8 @@
private void InitLogoutFrameLayout()
{
var specialFrame = new FrameLayout();
- specialFrame.Height = HdlControlResourse.ListViewRowHeight;
- specialFrame.Y = Application.GetRealHeight(1394) - HdlControlResourse.ListViewRowHeight - Application.GetRealHeight(12);
+ specialFrame.Height = ControlCommonResourse.ListViewRowHeight;
+ specialFrame.Y = Application.GetRealHeight(1394) - ControlCommonResourse.ListViewRowHeight - Application.GetRealHeight(12);
specialFrame.BackgroundColor = UserCenterColor.Current.White;
bodyFrameLayout.AddChidren(specialFrame);
@@ -305,7 +305,7 @@
this.ShowMassage(ShowMsgType.Confirm, msg, () =>
{
//閫�鍑鸿处鍙�
- HdlAccountLogic.Current.ReLoginAgain(Common.Config.Instance.Account);
+ UserCenterLogic.ReLoginAgain(Common.Config.Instance.Account);
});
};
}
@@ -320,20 +320,22 @@
/// <param name="txtName"></param>
private void SaveUserName(TextInputControl txtName, bool showMsg)
{
- if (HdlUserCenterResourse.UserInfo.NickName == string.Empty)
+ if (UserCenterResourse.UserInfo.UserName == string.Empty)
{
//鎶婂悕绉拌繕鍘熷洖鍘�
- txtName.Text = HdlUserCenterResourse.UserInfo.OldUserName;
- HdlUserCenterResourse.UserInfo.NickName = HdlUserCenterResourse.UserInfo.OldUserName;
+ txtName.Text = UserCenterResourse.UserInfo.OldUserName;
+ UserCenterResourse.UserInfo.UserName = UserCenterResourse.UserInfo.OldUserName;
return;
}
- if (HdlUserCenterResourse.UserInfo.OldUserName == HdlUserCenterResourse.UserInfo.NickName)
+ if (UserCenterResourse.UserInfo.OldUserName == UserCenterResourse.UserInfo.UserName)
{
//鏃犻渶淇敼
return;
}
+ var pra = new SaveUserNamePra();
+ pra.UserName = UserCenterResourse.UserInfo.UserName;
- bool result = HdlAccountLogic.Current.EditorUserNikeName(HdlUserCenterResourse.UserInfo.NickName, showMsg == true ? ShowNetCodeMode.YES : ShowNetCodeMode.No);
+ bool result = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/UpdateUserName", false, pra);
if (result == false)
{
return;
@@ -346,7 +348,7 @@
this.ShowMassage(ShowMsgType.Tip, msg);
}
- HdlUserCenterResourse.UserInfo.OldUserName = HdlUserCenterResourse.UserInfo.NickName;
+ UserCenterResourse.UserInfo.OldUserName = UserCenterResourse.UserInfo.UserName;
}
#endregion
@@ -373,7 +375,7 @@
if (this.MoveUserIconFile(imagePath) == true)
{
//涓婁紶鐢ㄦ埛澶村儚鏂囦欢
- this.UpLoadUserIconFile(btnUser, HdlFileNameResourse.UserHeadIconFile);
+ this.UpLoadUserIconFile(btnUser, UserCenterResourse.UserInfo.UserIconFile);
}
}
}, "HdlPicture");
@@ -390,7 +392,7 @@
if (this.MoveUserIconFile(imagePath) == true)
{
//涓婁紶鐢ㄦ埛澶村儚鏂囦欢
- this.UpLoadUserIconFile(btnUser, HdlFileNameResourse.UserHeadIconFile);
+ this.UpLoadUserIconFile(btnUser, UserCenterResourse.UserInfo.UserIconFile);
}
}
}, "HdlPicture");
@@ -404,16 +406,12 @@
/// <param name="imagePath"></param>
private void UpLoadUserIconFile(ImageView btnUser, string imagePath)
{
- var headImage = Shared.IO.FileUtils.ReadFile(imagePath);
- if (headImage == null)
- {
- return;
- }
- var result = HdlAccountLogic.Current.UpLoadUserIconImage(headImage);
+ var pra = new { HeadImage = Shared.IO.FileUtils.ReadFile(imagePath) };
+ var result = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/UpdateHeadImage", false, pra);
if (result == true)
{
- HdlUserCenterResourse.UserInfo.UserIconFileChanged = true;
- btnUser.ImageBytes = headImage;
+ UserCenterResourse.UserInfo.UserIconFileChanged = true;
+ btnUser.ImageBytes = Shared.IO.FileUtils.ReadFile(imagePath);
}
}
@@ -426,7 +424,12 @@
{
try
{
- HdlFileLogic.Current.MoveFile(imagePath, HdlFileNameResourse.UserHeadIconFile);
+ if (System.IO.File.Exists(UserCenterResourse.UserInfo.UserIconFile) == true)
+ {
+ System.IO.File.Delete(UserCenterResourse.UserInfo.UserIconFile);
+ }
+ //绉诲姩鏂囦欢
+ System.IO.File.Move(imagePath, UserCenterResourse.UserInfo.UserIconFile);
return true;
}
catch (Exception ex)
--
Gitblit v1.8.0