组件更新,代码优化,v1.5.6
This commit is contained in:
@@ -98,17 +98,7 @@ namespace CommonLibrary
|
||||
{
|
||||
return all_list_accounts.Where(selector).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 将所有账户信息转换成另一种元素,并返回列表
|
||||
/// </summary>
|
||||
/// <typeparam name="TResult">目标类型</typeparam>
|
||||
/// <param name="converter">转换方法</param>
|
||||
/// <returns>转换后的结果列表</returns>
|
||||
public List<TResult> ConvertAll<TResult>(Converter<T, TResult> converter)
|
||||
{
|
||||
return all_list_accounts.ConvertAll(converter);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 检查账户信息,并返回账户对象
|
||||
@@ -210,6 +200,7 @@ namespace CommonLibrary
|
||||
public void DeleteAccount(string name)
|
||||
{
|
||||
hybirdLock.Enter();
|
||||
|
||||
for (int i = 0; i < all_list_accounts.Count; i++)
|
||||
{
|
||||
if (name == all_list_accounts[i].UserName)
|
||||
@@ -249,6 +240,19 @@ namespace CommonLibrary
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有的账户的用户名的JSON字符串
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string GetAccountsNamesJson()
|
||||
{
|
||||
string result = string.Empty;
|
||||
hybirdLock.Enter();
|
||||
result = JArray.FromObject(all_list_accounts.ConvertAll(m => m.UserName)).ToString();
|
||||
hybirdLock.Leave();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 从所有的账户的json数据加载账户
|
||||
/// </summary>
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace CommonLibrary
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
SoftBasic.FrameworkVersion = new SystemVersion("1.5.5");
|
||||
SoftBasic.FrameworkVersion = new SystemVersion("1.5.6");
|
||||
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ namespace CommonLibrary
|
||||
/// </summary>
|
||||
public static int Port_Udp_Server { get; } = 32566;
|
||||
/// <summary>
|
||||
/// 文件管理的服务器端口
|
||||
/// 用于服务器版本更新的端口
|
||||
/// </summary>
|
||||
public static int Port_Advanced_File_Server { get; } = 24672;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user