diff --git a/ClientsLibrary/AccountSupport/FormAccountSelect.cs b/ClientsLibrary/AccountSupport/FormAccountSelect.cs index bcbe97e..1dbd707 100644 --- a/ClientsLibrary/AccountSupport/FormAccountSelect.cs +++ b/ClientsLibrary/AccountSupport/FormAccountSelect.cs @@ -16,13 +16,18 @@ namespace ClientsLibrary { #region Constructor - - public FormAccountSelect(List selected = null) + /// + /// 实例化一个选择服务器账户的窗口,该窗口可以根据工厂属性或是角色属性来筛选 + /// + /// + /// + public FormAccountSelect(string condition = null, List selected = null) { InitializeComponent(); Icon = UserSystem.GetFormWindowIcon(); m_selected = selected; + m_condition = condition; } @@ -35,7 +40,7 @@ namespace ClientsLibrary { // 初始化 - OperateResultString result = UserClient.Net_simplify_client.ReadFromServer(CommonHeadCode.SimplifyHeadCode.获取账户, ""); + OperateResultString result = UserClient.Net_simplify_client.ReadFromServer(CommonHeadCode.SimplifyHeadCode.获取账户, m_condition); if (result.IsSuccess) { List accounts = JArray.Parse(result.Content).ToObject>(); @@ -136,6 +141,7 @@ namespace ClientsLibrary private List m_selected; private List m_result; + private string m_condition; #endregion diff --git a/ClientsLibrary/Configuration/RolesConfiguration.cs b/ClientsLibrary/Configuration/RolesConfiguration.cs index 6bac859..c9ae7a1 100644 --- a/ClientsLibrary/Configuration/RolesConfiguration.cs +++ b/ClientsLibrary/Configuration/RolesConfiguration.cs @@ -183,9 +183,9 @@ namespace ClientsLibrary.Configuration if (listBox1.SelectedItem is RoleItem role) { // select account - using (FormAccountSelect form = new FormAccountSelect(role.Accounts)) + using (FormAccountSelect form = new FormAccountSelect(null, role.Accounts)) { - if(form.ShowDialog() == DialogResult.OK) + if (form.ShowDialog() == DialogResult.OK) { role.Accounts = form.SelectAccounts.ConvertAll(m => m.UserName); listBox2.DataSource = role.Accounts; diff --git a/CommonLibrary/UserSystem.cs b/CommonLibrary/UserSystem.cs index ff3f4d8..6591154 100644 --- a/CommonLibrary/UserSystem.cs +++ b/CommonLibrary/UserSystem.cs @@ -42,7 +42,7 @@ namespace CommonLibrary * **************************************************************************/ - SoftBasic.FrameworkVersion = new SystemVersion("1.6.14"); + SoftBasic.FrameworkVersion = new SystemVersion("1.6.15"); }