|
@@ -95,13 +95,32 @@ public class LoginPanel : BaseUI
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
- m_AccountStr = PlayerPrefs.GetString("Account", "");
|
|
|
- m_PasswordStr = PlayerPrefs.GetString("Password", "");
|
|
|
- int n = int.Parse(PlayerPrefs.GetString("IsremPwd", "0"));
|
|
|
- m_RemenberPwd.isOn = n > 0 ? true : false;
|
|
|
- m_IsRemberPwd = n > 0 ? true : false;
|
|
|
-
|
|
|
+ if(PlayerPrefs.HasKey("Account") && PlayerPrefs.HasKey("Password"))
|
|
|
+ {
|
|
|
+ m_AccountStr = PlayerPrefs.GetString("Account", "");
|
|
|
+ m_PasswordStr = PlayerPrefs.GetString("Password", "");
|
|
|
+ if (!string.IsNullOrWhiteSpace(m_AccountStr) && !string.IsNullOrWhiteSpace(m_PasswordStr))
|
|
|
+ {
|
|
|
+ m_Account.text = m_AccountStr;
|
|
|
+ m_Password.text = m_PasswordStr;
|
|
|
+ m_Logn.interactable = true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ m_Account.text = "";
|
|
|
+ m_Password.text = "";
|
|
|
+ m_AccountStr = "";
|
|
|
+ m_PasswordStr = "";
|
|
|
+ m_Logn.interactable = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(PlayerPrefs.HasKey("IsremPwd"))
|
|
|
+ {
|
|
|
+ int n = int.Parse(PlayerPrefs.GetString("IsremPwd", "0"));
|
|
|
+ m_RemenberPwd.isOn = n > 0 ? true : false;
|
|
|
+ m_IsRemberPwd = n > 0 ? true : false;
|
|
|
+ }
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(m_AccountStr) && !string.IsNullOrWhiteSpace(m_PasswordStr))
|
|
|
{
|
|
@@ -117,6 +136,8 @@ public class LoginPanel : BaseUI
|
|
|
m_PasswordStr = "";
|
|
|
m_Logn.interactable = false;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
#region UI监听事件
|
|
@@ -306,7 +327,7 @@ public class LoginPanel : BaseUI
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- if (m_IsRemberPwd)
|
|
|
+ if (m_RemenberPwd.isOn)
|
|
|
{
|
|
|
PlayerPrefs.SetString("Account", m_AccountStr);
|
|
|
PlayerPrefs.SetString("Password", m_PasswordStr);
|
|
@@ -629,7 +650,7 @@ public class LoginPanel : BaseUI
|
|
|
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
private void CalMatCOS(List<MaterialObl> mats)
|
|
|
{
|
|
|
|
|
@@ -699,14 +720,43 @@ public class LoginPanel : BaseUI
|
|
|
|
|
|
gameObject.transform.localScale = new Vector3(1, 1, 1);
|
|
|
m_Logn.interactable = false;
|
|
|
- m_AccountStr = PlayerPrefs.GetString("Account", "");
|
|
|
- m_PasswordStr = PlayerPrefs.GetString("Password", "");
|
|
|
- int n = int.Parse(PlayerPrefs.GetString("IsremPwd", "0"));
|
|
|
- m_RemenberPwd.isOn = n > 0 ? true : false;
|
|
|
- m_IsRemberPwd = n > 0 ? true : false;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ if (PlayerPrefs.HasKey("Account") && PlayerPrefs.HasKey("Password"))
|
|
|
+ {
|
|
|
+ m_AccountStr = PlayerPrefs.GetString("Account", "");
|
|
|
+ m_PasswordStr = PlayerPrefs.GetString("Password", "");
|
|
|
+ if (!string.IsNullOrWhiteSpace(m_AccountStr) && !string.IsNullOrWhiteSpace(m_PasswordStr))
|
|
|
+ {
|
|
|
+ m_Account.text = m_AccountStr;
|
|
|
+ m_Password.text = m_PasswordStr;
|
|
|
+ m_Logn.interactable = true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ m_Account.text = "";
|
|
|
+ m_Password.text = "";
|
|
|
+ m_AccountStr = "";
|
|
|
+ m_PasswordStr = "";
|
|
|
+ m_Logn.interactable = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (PlayerPrefs.HasKey("IsremPwd"))
|
|
|
+ {
|
|
|
+ int n = int.Parse(PlayerPrefs.GetString("IsremPwd", "0"));
|
|
|
+ m_RemenberPwd.isOn = n > 0 ? true : false;
|
|
|
+ m_IsRemberPwd = n > 0 ? true : false;
|
|
|
+ }
|
|
|
#if UNITY_EDITOR
|
|
|
|
|
|
m_AccountStr = "jiajun.hu@ghz-tech.com";
|