大面积更新,主要文件功能块更改,账号新增BUG修复,新增框架版本验证,v1.5.0
This commit is contained in:
@@ -176,6 +176,7 @@ namespace CommonLibrary
|
||||
bool result = true;
|
||||
hybirdLock.Enter();
|
||||
|
||||
// 账户名重复的时候不允许添加
|
||||
for (int i = 0; i < all_list_accounts.Count; i++)
|
||||
{
|
||||
if (all_list_accounts[i].UserName == account.UserName)
|
||||
@@ -184,8 +185,19 @@ namespace CommonLibrary
|
||||
break;
|
||||
}
|
||||
}
|
||||
all_list_accounts.Add(account);
|
||||
ILogNet?.WriteInfo(SoftResources.StringResouce.AccountAddSuccess + account.UserName);
|
||||
|
||||
// 账户名为空的时候不允许添加
|
||||
if(string.IsNullOrEmpty(account.UserName))
|
||||
{
|
||||
result = false;
|
||||
}
|
||||
|
||||
// 检测通过后进行添加账户名
|
||||
if (result)
|
||||
{
|
||||
all_list_accounts.Add(account);
|
||||
ILogNet?.WriteInfo(SoftResources.StringResouce.AccountAddSuccess + account.UserName);
|
||||
}
|
||||
|
||||
hybirdLock.Leave();
|
||||
return result;
|
||||
|
||||
@@ -102,6 +102,10 @@ namespace CommonLibrary
|
||||
/// 大尺寸头像的MD5传送名称
|
||||
/// </summary>
|
||||
public static string LargePortraitText { get { return "LargePortrait"; } }
|
||||
/// <summary>
|
||||
/// 系统的框架版本,框架版本不一致,由服务器决定是否允许客户端登录
|
||||
/// </summary>
|
||||
public static string FrameworkVersion { get { return "FrameworkVersion"; } }
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -58,6 +58,10 @@ namespace CommonLibrary
|
||||
/// </summary>
|
||||
public bool AllowUserMultiOnline { get; set; } = false;
|
||||
/// <summary>
|
||||
/// 当框架版本不对的时候,是否允许登录
|
||||
/// </summary>
|
||||
public bool AllowLoginWhenFramewordVersionNotCheck { get; set; } = false;
|
||||
/// <summary>
|
||||
/// 不允许登录系统的原因
|
||||
/// </summary>
|
||||
public string Account_Forbidden_Reason { get; set; } = "系统处于维护中,请稍后登录。";
|
||||
@@ -158,6 +162,7 @@ namespace CommonLibrary
|
||||
{ nameof(SystemFactories), new JArray(SystemFactories) },
|
||||
{ nameof(WhetherToEnableTrustedClientAuthentication),new JValue(WhetherToEnableTrustedClientAuthentication) },
|
||||
{ nameof(TrustedClientList),new JArray(TrustedClientList) },
|
||||
{ nameof(AllowLoginWhenFramewordVersionNotCheck), new JValue(AllowLoginWhenFramewordVersionNotCheck) },
|
||||
};
|
||||
return json.ToString();
|
||||
}
|
||||
@@ -173,6 +178,9 @@ namespace CommonLibrary
|
||||
Can_Account_Login = SoftBasic.GetValueFromJsonObject(json, nameof(Can_Account_Login), Can_Account_Login);
|
||||
AllowUserMultiOnline = SoftBasic.GetValueFromJsonObject(json, nameof(AllowUserMultiOnline), AllowUserMultiOnline);
|
||||
Account_Forbidden_Reason = SoftBasic.GetValueFromJsonObject(json, nameof(Account_Forbidden_Reason), Account_Forbidden_Reason);
|
||||
AllowLoginWhenFramewordVersionNotCheck = SoftBasic.GetValueFromJsonObject(json, nameof(AllowLoginWhenFramewordVersionNotCheck), AllowLoginWhenFramewordVersionNotCheck);
|
||||
|
||||
|
||||
|
||||
if (json[nameof(SystemFactories)] != null)
|
||||
{
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace CommonLibrary
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
SoftBasic.FrameworkVersion = new SystemVersion("1.4.10");
|
||||
SoftBasic.FrameworkVersion = new SystemVersion("1.5.0");
|
||||
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace CommonLibrary
|
||||
/// <summary>
|
||||
/// 共享文件的端口号
|
||||
/// </summary>
|
||||
public static int Port_Share_File { get; } = 34261;
|
||||
public static int Port_Ultimate_File_Server { get; } = 34261;
|
||||
/// <summary>
|
||||
/// 用于UDP传输的端口号
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user