diff --git a/ClientsLibrary/AccountSupport/FormInputNewRole.Designer.cs b/ClientsLibrary/AccountSupport/FormInputNewRole.Designer.cs
index 85e50c9cdc0fe9c22a941e39f257933162943d63..3441538f84f5ea4426b0049880b5a41a21ff12da 100644
--- a/ClientsLibrary/AccountSupport/FormInputNewRole.Designer.cs
+++ b/ClientsLibrary/AccountSupport/FormInputNewRole.Designer.cs
@@ -122,6 +122,7 @@
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "FormInputNewRole";
this.Load += new System.EventHandler(this.FormInputNewRole_Load);
+ this.Shown += new System.EventHandler(this.FormInputNewRole_Shown);
this.ResumeLayout(false);
this.PerformLayout();
diff --git a/ClientsLibrary/AccountSupport/FormInputNewRole.cs b/ClientsLibrary/AccountSupport/FormInputNewRole.cs
index 865f5037b24bdcc6badbfc0b8eeb9a3c1bcf1a8c..2bd9ad6a6c84de34ab5e5a6ea1398bb9687dd4af 100644
--- a/ClientsLibrary/AccountSupport/FormInputNewRole.cs
+++ b/ClientsLibrary/AccountSupport/FormInputNewRole.cs
@@ -28,7 +28,33 @@ namespace ClientsLibrary
#endregion
- #region Form Load
+ #region Localization Support
+
+ ///
+ /// 本地化显示的操作,还未完成
+ ///
+ private void UILocalization()
+ {
+ if(m_RoleItem == null)
+ {
+ Text = UserLocalization.Localization.AccountRoleAdd;
+ }
+ else
+ {
+ Text = UserLocalization.Localization.AccountRoleEdit;
+ }
+
+ label1.Text = UserLocalization.Localization.GeneralUniqueID + ":";
+ label2.Text = UserLocalization.Localization.GeneralName + ":";
+ label3.Text = UserLocalization.Localization.GeneralDescription + ":";
+
+ userButton_login.UIText = UserLocalization.Localization.ButtonEnsure;
+ }
+
+
+ #endregion
+
+ #region Form Load Show
private void FormInputNewRole_Load(object sender, EventArgs e)
@@ -39,6 +65,11 @@ namespace ClientsLibrary
}
}
+ private void FormInputNewRole_Shown(object sender, EventArgs e)
+ {
+ UILocalization();
+ }
+
#endregion
@@ -49,7 +80,7 @@ namespace ClientsLibrary
{
// 此处是编辑
m_RoleItem = roleItem;
-
+
if (m_RoleItem != null)
{
textBox1.Text = m_RoleItem.RoleCode;
@@ -107,5 +138,7 @@ namespace ClientsLibrary
}
#endregion
+
+
}
}
diff --git a/ClientsLibrary/Configuration/ClientConfiguration.Designer.cs b/ClientsLibrary/Configuration/ClientConfiguration.Designer.cs
index 71a81d5fdf8d318c232b7f9cfcdb05d97b4349b0..cf12112d66b68c9cf73f9c3fcae2a5385ab00c75 100644
--- a/ClientsLibrary/Configuration/ClientConfiguration.Designer.cs
+++ b/ClientsLibrary/Configuration/ClientConfiguration.Designer.cs
@@ -67,7 +67,7 @@
this.listBox1.ItemHeight = 17;
this.listBox1.Location = new System.Drawing.Point(3, 51);
this.listBox1.Name = "listBox1";
- this.listBox1.Size = new System.Drawing.Size(435, 327);
+ this.listBox1.Size = new System.Drawing.Size(552, 344);
this.listBox1.TabIndex = 2;
//
// userButton_delete
@@ -77,10 +77,10 @@
this.userButton_delete.CustomerInformation = "";
this.userButton_delete.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
this.userButton_delete.Font = new System.Drawing.Font("微软雅黑", 9F);
- this.userButton_delete.Location = new System.Drawing.Point(444, 51);
+ this.userButton_delete.Location = new System.Drawing.Point(477, 23);
this.userButton_delete.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.userButton_delete.Name = "userButton_delete";
- this.userButton_delete.Size = new System.Drawing.Size(111, 27);
+ this.userButton_delete.Size = new System.Drawing.Size(78, 25);
this.userButton_delete.TabIndex = 9;
this.userButton_delete.UIText = "删除选中项";
this.userButton_delete.Click += new System.EventHandler(this.userButton_delete_Click);
@@ -89,9 +89,9 @@
//
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.textBox1.Location = new System.Drawing.Point(3, 391);
+ this.textBox1.Location = new System.Drawing.Point(3, 406);
this.textBox1.Name = "textBox1";
- this.textBox1.Size = new System.Drawing.Size(435, 23);
+ this.textBox1.Size = new System.Drawing.Size(552, 23);
this.textBox1.TabIndex = 10;
//
// userButton1
@@ -101,10 +101,10 @@
this.userButton1.CustomerInformation = "";
this.userButton1.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
this.userButton1.Font = new System.Drawing.Font("微软雅黑", 9F);
- this.userButton1.Location = new System.Drawing.Point(444, 389);
+ this.userButton1.Location = new System.Drawing.Point(98, 436);
this.userButton1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.userButton1.Name = "userButton1";
- this.userButton1.Size = new System.Drawing.Size(111, 27);
+ this.userButton1.Size = new System.Drawing.Size(98, 25);
this.userButton1.TabIndex = 11;
this.userButton1.UIText = "添加客户端标识";
this.userButton1.Click += new System.EventHandler(this.userButton1_Click);
@@ -116,10 +116,10 @@
this.userButton2.CustomerInformation = "";
this.userButton2.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
this.userButton2.Font = new System.Drawing.Font("微软雅黑", 9F);
- this.userButton2.Location = new System.Drawing.Point(444, 354);
+ this.userButton2.Location = new System.Drawing.Point(3, 436);
this.userButton2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.userButton2.Name = "userButton2";
- this.userButton2.Size = new System.Drawing.Size(111, 27);
+ this.userButton2.Size = new System.Drawing.Size(89, 25);
this.userButton2.TabIndex = 12;
this.userButton2.UIText = "获取本机标识";
this.userButton2.Click += new System.EventHandler(this.userButton2_Click);
@@ -131,10 +131,10 @@
this.userButton3.CustomerInformation = "";
this.userButton3.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
this.userButton3.Font = new System.Drawing.Font("微软雅黑", 9F);
- this.userButton3.Location = new System.Drawing.Point(444, 434);
+ this.userButton3.Location = new System.Drawing.Point(477, 436);
this.userButton3.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.userButton3.Name = "userButton3";
- this.userButton3.Size = new System.Drawing.Size(111, 27);
+ this.userButton3.Size = new System.Drawing.Size(78, 25);
this.userButton3.TabIndex = 13;
this.userButton3.UIText = "保存";
this.userButton3.Click += new System.EventHandler(this.userButton3_Click);
diff --git a/ClientsLibrary/Configuration/GeneralConfiguration.Designer.cs b/ClientsLibrary/Configuration/GeneralConfiguration.Designer.cs
index ff4807ee840f38217cd0b45b3ea669ddb7970e16..01ec083d04efc77cf63f499fc83546651fc4ded8 100644
--- a/ClientsLibrary/Configuration/GeneralConfiguration.Designer.cs
+++ b/ClientsLibrary/Configuration/GeneralConfiguration.Designer.cs
@@ -30,8 +30,8 @@
{
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.panel1 = new System.Windows.Forms.Panel();
- this.userButton2 = new HslCommunication.Controls.UserButton();
this.checkBox2 = new System.Windows.Forms.CheckBox();
+ this.userButton2 = new HslCommunication.Controls.UserButton();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
@@ -55,9 +55,19 @@
this.panel1.Controls.Add(this.checkBox1);
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
- this.panel1.Size = new System.Drawing.Size(561, 391);
+ this.panel1.Size = new System.Drawing.Size(561, 397);
this.panel1.TabIndex = 1;
//
+ // checkBox2
+ //
+ this.checkBox2.AutoSize = true;
+ this.checkBox2.Location = new System.Drawing.Point(3, 30);
+ this.checkBox2.Name = "checkBox2";
+ this.checkBox2.Size = new System.Drawing.Size(231, 21);
+ this.checkBox2.TabIndex = 1;
+ this.checkBox2.Text = "是否允许框架版本不匹配的客户端登录";
+ this.checkBox2.UseVisualStyleBackColor = true;
+ //
// userButton2
//
this.userButton2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
@@ -65,24 +75,14 @@
this.userButton2.CustomerInformation = "";
this.userButton2.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
this.userButton2.Font = new System.Drawing.Font("微软雅黑", 9F);
- this.userButton2.Location = new System.Drawing.Point(503, 398);
+ this.userButton2.Location = new System.Drawing.Point(480, 404);
this.userButton2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.userButton2.Name = "userButton2";
- this.userButton2.Size = new System.Drawing.Size(55, 27);
+ this.userButton2.Size = new System.Drawing.Size(78, 25);
this.userButton2.TabIndex = 10;
this.userButton2.UIText = "保存";
this.userButton2.Click += new System.EventHandler(this.userButton2_Click);
//
- // checkBox2
- //
- this.checkBox2.AutoSize = true;
- this.checkBox2.Location = new System.Drawing.Point(3, 30);
- this.checkBox2.Name = "checkBox2";
- this.checkBox2.Size = new System.Drawing.Size(231, 21);
- this.checkBox2.TabIndex = 1;
- this.checkBox2.Text = "是否允许框架版本不匹配的客户端登录";
- this.checkBox2.UseVisualStyleBackColor = true;
- //
// GeneralConfiguration
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
diff --git a/ClientsLibrary/Configuration/ListConfiguration.Designer.cs b/ClientsLibrary/Configuration/ListConfiguration.Designer.cs
index a2f10b5903471217199c5c6c678bd2da2f8388b8..e2c39d0722cc5f16d061ba81d4ce47dae3323100 100644
--- a/ClientsLibrary/Configuration/ListConfiguration.Designer.cs
+++ b/ClientsLibrary/Configuration/ListConfiguration.Designer.cs
@@ -67,10 +67,10 @@
this.userButton_login.CustomerInformation = "";
this.userButton_login.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
this.userButton_login.Font = new System.Drawing.Font("微软雅黑", 9F);
- this.userButton_login.Location = new System.Drawing.Point(3, 415);
+ this.userButton_login.Location = new System.Drawing.Point(3, 417);
this.userButton_login.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.userButton_login.Name = "userButton_login";
- this.userButton_login.Size = new System.Drawing.Size(55, 27);
+ this.userButton_login.Size = new System.Drawing.Size(78, 25);
this.userButton_login.TabIndex = 7;
this.userButton_login.UIText = "新增";
this.userButton_login.Click += new System.EventHandler(this.userButton_login_Click);
@@ -82,10 +82,10 @@
this.userButton1.CustomerInformation = "";
this.userButton1.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
this.userButton1.Font = new System.Drawing.Font("微软雅黑", 9F);
- this.userButton1.Location = new System.Drawing.Point(64, 415);
+ this.userButton1.Location = new System.Drawing.Point(87, 417);
this.userButton1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.userButton1.Name = "userButton1";
- this.userButton1.Size = new System.Drawing.Size(55, 27);
+ this.userButton1.Size = new System.Drawing.Size(78, 25);
this.userButton1.TabIndex = 8;
this.userButton1.UIText = "删除";
this.userButton1.Click += new System.EventHandler(this.userButton1_Click);
@@ -97,15 +97,15 @@
this.userButton2.CustomerInformation = "";
this.userButton2.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
this.userButton2.Font = new System.Drawing.Font("微软雅黑", 9F);
- this.userButton2.Location = new System.Drawing.Point(442, 415);
+ this.userButton2.Location = new System.Drawing.Point(419, 417);
this.userButton2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.userButton2.Name = "userButton2";
- this.userButton2.Size = new System.Drawing.Size(55, 27);
+ this.userButton2.Size = new System.Drawing.Size(78, 25);
this.userButton2.TabIndex = 9;
this.userButton2.UIText = "保存";
this.userButton2.Click += new System.EventHandler(this.userButton2_Click);
//
- // FactoryConfiguration
+ // ArrayConfiguration
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
@@ -115,7 +115,7 @@
this.Controls.Add(this.dataGridView1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
- this.Name = "FactoryConfiguration";
+ this.Name = "ArrayConfiguration";
this.Size = new System.Drawing.Size(500, 446);
this.Load += new System.EventHandler(this.FactoryConfiguration_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
diff --git a/ClientsLibrary/Configuration/ListConfiguration.resx b/ClientsLibrary/Configuration/ListConfiguration.resx
index e7a8f7a5e795df5568dee22e46110f827138a96a..d8eaf236d69c5153211c047c1bed0b1df256c6d0 100644
--- a/ClientsLibrary/Configuration/ListConfiguration.resx
+++ b/ClientsLibrary/Configuration/ListConfiguration.resx
@@ -120,4 +120,7 @@
True
+
+ True
+
\ No newline at end of file
diff --git a/ClientsLibrary/Configuration/RolesConfiguration.Designer.cs b/ClientsLibrary/Configuration/RolesConfiguration.Designer.cs
index 00101bc48b77d08f592cec3a356d6518a66d26b3..0b55c123012dc29cb04ecb7f498588d0bbe2a2b9 100644
--- a/ClientsLibrary/Configuration/RolesConfiguration.Designer.cs
+++ b/ClientsLibrary/Configuration/RolesConfiguration.Designer.cs
@@ -35,13 +35,13 @@
this.userButton2 = new HslCommunication.Controls.UserButton();
this.userButton1 = new HslCommunication.Controls.UserButton();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
+ this.textBox2 = new System.Windows.Forms.TextBox();
+ this.label4 = new System.Windows.Forms.Label();
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.label3 = new System.Windows.Forms.Label();
this.listBox1 = new System.Windows.Forms.ListBox();
this.listBox2 = new System.Windows.Forms.ListBox();
this.userButton5 = new HslCommunication.Controls.UserButton();
- this.label3 = new System.Windows.Forms.Label();
- this.textBox1 = new System.Windows.Forms.TextBox();
- this.textBox2 = new System.Windows.Forms.TextBox();
- this.label4 = new System.Windows.Forms.Label();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
@@ -151,16 +151,57 @@
this.splitContainer1.SplitterDistance = 264;
this.splitContainer1.TabIndex = 8;
//
+ // textBox2
+ //
+ this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.textBox2.Location = new System.Drawing.Point(71, 396);
+ this.textBox2.Name = "textBox2";
+ this.textBox2.ReadOnly = true;
+ this.textBox2.Size = new System.Drawing.Size(189, 23);
+ this.textBox2.TabIndex = 10;
+ //
+ // label4
+ //
+ this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(2, 399);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(44, 17);
+ this.label4.TabIndex = 9;
+ this.label4.Text = "描述:";
+ //
+ // textBox1
+ //
+ this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.textBox1.Location = new System.Drawing.Point(71, 371);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.ReadOnly = true;
+ this.textBox1.Size = new System.Drawing.Size(189, 23);
+ this.textBox1.TabIndex = 8;
+ //
+ // label3
+ //
+ this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(2, 374);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(44, 17);
+ this.label3.TabIndex = 7;
+ this.label3.Text = "代码:";
+ //
// listBox1
//
this.listBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
+ this.listBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.listBox1.FormattingEnabled = true;
- this.listBox1.ItemHeight = 17;
+ this.listBox1.ItemHeight = 21;
this.listBox1.Location = new System.Drawing.Point(3, 23);
this.listBox1.Name = "listBox1";
- this.listBox1.Size = new System.Drawing.Size(257, 327);
+ this.listBox1.Size = new System.Drawing.Size(257, 340);
this.listBox1.TabIndex = 6;
this.listBox1.SelectedIndexChanged += new System.EventHandler(this.listBox1_SelectedIndexChanged);
//
@@ -169,8 +210,9 @@
this.listBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
+ this.listBox2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.listBox2.FormattingEnabled = true;
- this.listBox2.ItemHeight = 17;
+ this.listBox2.ItemHeight = 21;
this.listBox2.Location = new System.Drawing.Point(3, 23);
this.listBox2.Name = "listBox2";
this.listBox2.Size = new System.Drawing.Size(258, 361);
@@ -191,46 +233,6 @@
this.userButton5.UIText = "编辑";
this.userButton5.Click += new System.EventHandler(this.userButton5_Click);
//
- // label3
- //
- this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(2, 367);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(44, 17);
- this.label3.TabIndex = 7;
- this.label3.Text = "代码:";
- //
- // textBox1
- //
- this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.textBox1.Location = new System.Drawing.Point(62, 364);
- this.textBox1.Name = "textBox1";
- this.textBox1.ReadOnly = true;
- this.textBox1.Size = new System.Drawing.Size(198, 23);
- this.textBox1.TabIndex = 8;
- //
- // textBox2
- //
- this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.textBox2.Location = new System.Drawing.Point(62, 396);
- this.textBox2.Name = "textBox2";
- this.textBox2.ReadOnly = true;
- this.textBox2.Size = new System.Drawing.Size(198, 23);
- this.textBox2.TabIndex = 10;
- //
- // label4
- //
- this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(2, 399);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(44, 17);
- this.label4.TabIndex = 9;
- this.label4.Text = "描述:";
- //
// RolesConfiguration
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
diff --git a/ClientsLibrary/Configuration/RolesConfiguration.cs b/ClientsLibrary/Configuration/RolesConfiguration.cs
index 79ba282cc9f4850f5bb8002e1a0463af30c28cf5..1970f1c7a540db0c7b4843c9a13655cb2247e0ce 100644
--- a/ClientsLibrary/Configuration/RolesConfiguration.cs
+++ b/ClientsLibrary/Configuration/RolesConfiguration.cs
@@ -14,13 +14,23 @@ namespace ClientsLibrary.Configuration
{
public partial class RolesConfiguration : UserControl
{
+ #region Constructor
+
+
public RolesConfiguration()
{
InitializeComponent();
}
+
+ #endregion
+
+ #region Control Load
+
+
private void RolesConfiguration_Load(object sender, EventArgs e)
{
+ UILocalization();
// 初始化
OperateResultString result = UserClient.Net_simplify_client.ReadFromServer(CommonLibrary.CommonHeadCode.SimplifyHeadCode.请求角色配置, "");
@@ -40,6 +50,11 @@ namespace ClientsLibrary.Configuration
}
}
+
+ #endregion
+
+ #region Role Select
+
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if(listBox1.SelectedItem is RoleItem role)
@@ -50,6 +65,11 @@ namespace ClientsLibrary.Configuration
}
}
+ #endregion
+
+ #region Role Delete
+
+
private void userButton2_Click(object sender, EventArgs e)
{
// delete list item
@@ -63,6 +83,12 @@ namespace ClientsLibrary.Configuration
}
}
+
+ #endregion
+
+ #region Role Exist Check
+
+
private bool CheckRoleWhetherExisting(string roleName)
{
foreach(var m in listBox1.Items)
@@ -89,6 +115,11 @@ namespace ClientsLibrary.Configuration
return false;
}
+
+ #endregion
+
+ #region Role Add
+
private void userButton1_Click(object sender, EventArgs e)
{
using (FormInputNewRole form = new FormInputNewRole())
@@ -109,6 +140,11 @@ namespace ClientsLibrary.Configuration
}
}
+ #endregion
+
+ #region Role Edit
+
+
private void userButton5_Click(object sender, EventArgs e)
{
if (listBox1.SelectedItem is RoleItem role)
@@ -131,11 +167,21 @@ namespace ClientsLibrary.Configuration
textBox1.Text = role.RoleCode;
textBox2.Text = role.Description;
+
+ // refresh
+ //for (int i = 0; i < listBox1.Items.Count; i++)
+ // listBox1.Items[i] = listBox1.Items[i];
+ listBox1.Items[listBox1.SelectedIndex] = listBox1.Items[listBox1.SelectedIndex];
}
}
}
}
+ #endregion
+
+ #region Role Account Edit
+
+
private void userButton3_Click(object sender, EventArgs e)
{
if (listBox1.SelectedItem is RoleItem role)
@@ -152,6 +198,10 @@ namespace ClientsLibrary.Configuration
}
}
+ #endregion
+
+ #region Role Upload Server
+
private void userButton4_Click(object sender, EventArgs e)
{
// save
@@ -176,5 +226,30 @@ namespace ClientsLibrary.Configuration
}
}
+ #endregion
+
+ #region Localization Support
+
+ ///
+ /// 本地化显示的操作,还未完成
+ ///
+ private void UILocalization()
+ {
+
+ label1.Text = UserLocalization.Localization.AccountRoleNameList;
+ label2.Text = UserLocalization.Localization.AccountRoleAccountList;
+ label3.Text = UserLocalization.Localization.GeneralUniqueID;
+ label4.Text = UserLocalization.Localization.GeneralDescription;
+
+ userButton1.UIText = UserLocalization.Localization.ButtonAdd;
+ userButton5.UIText = UserLocalization.Localization.ButtonEdit;
+ userButton2.UIText = UserLocalization.Localization.ButtonDelete;
+
+ userButton3.UIText = UserLocalization.Localization.ButtonEdit;
+ userButton4.UIText = UserLocalization.Localization.ButtonSave;
+ }
+
+
+ #endregion
}
}
diff --git a/ClientsLibrary/UserClient.cs b/ClientsLibrary/UserClient.cs
index 18373349facae86261650b73ffcbf1c173e71790..3c18cb005a0a6b03a8fec741641684db7bb2c193 100644
--- a/ClientsLibrary/UserClient.cs
+++ b/ClientsLibrary/UserClient.cs
@@ -110,14 +110,14 @@ namespace ClientsLibrary
///
/// 检查当前账户是否有role角色的权限
///
- /// 角色名称
+ /// 角色名称
///
- public static bool CheckUserAccountRole(string role)
+ public static bool CheckUserAccountRole(string roleCode)
{
JObject json = new JObject
{
{ "Name", UserAccount.UserName },
- { "Role", role }
+ { "Role", roleCode }
};
HslCommunication.OperateResultString result = Net_simplify_client.ReadFromServer(CommonHeadCode.SimplifyHeadCode.检查角色权限,
json.ToString());
diff --git a/CommonLibrary/AccountSupport/RoleAssign.cs b/CommonLibrary/AccountSupport/RoleAssign.cs
index b8dd9c4a791f29b65c9e89b5549c4a752e185f9a..4cd838029ce138908f57f0940ede991c3cc89345 100644
--- a/CommonLibrary/AccountSupport/RoleAssign.cs
+++ b/CommonLibrary/AccountSupport/RoleAssign.cs
@@ -62,18 +62,21 @@ namespace CommonLibrary
#region Public Method
- public bool IsAllowAccountOperate(string role,string name)
+ public bool IsAllowAccountOperate(string roleCode,string name)
{
bool result = false;
hybirdLock.Enter();
for (int i = 0; i < m_roles.Count; i++)
{
- if (m_roles[i].RoleName == role)
+ if (m_roles[i].RoleCode == roleCode)
{
- if(m_roles[i].Accounts.Contains(name))
+ if (m_roles[i].Accounts != null)
{
- result = true;
+ if (m_roles[i].Accounts.Contains(name))
+ {
+ result = true;
+ }
}
}
}
diff --git a/CommonLibrary/LocalizationSupport/ChineseLocalization.cs b/CommonLibrary/LocalizationSupport/ChineseLocalization.cs
index 5a08d27db6b4359829dbe199968c97923f12c053..6bc04006bd6b6715c6f01461ccdcfea023b20fe9 100644
--- a/CommonLibrary/LocalizationSupport/ChineseLocalization.cs
+++ b/CommonLibrary/LocalizationSupport/ChineseLocalization.cs
@@ -9,8 +9,49 @@ namespace CommonLibrary
public class ChineseLocalization : ILocalization
{
public string FormateDateTime { get; set; } = "yyyy-MM-dd HH:mm:ss";
+ ///
+ /// 唯一标识
+ ///
+ public string GeneralUniqueID { get; set; } = "唯一标识";
+ ///
+ /// 名称
+ ///
+ public string GeneralName { get; set; } = "名称";
+ ///
+ /// 描述
+ ///
+ public string GeneralDescription { get; set; } = "描述";
+
+
+
+ #region 按钮相关
+
+ ///
+ /// 确认
+ ///
public string ButtonEnsure { get; set; } = "确认";
+ ///
+ /// 新增
+ ///
+ public string ButtonAdd { get; set; } = "新增";
+ ///
+ /// 编辑
+ ///
+ public string ButtonEdit { get; set; } = "编辑";
+ ///
+ /// 删除
+ ///
+ public string ButtonDelete { get; set; } = "删除";
+ ///
+ /// 保存
+ ///
+ public string ButtonSave { get; set; } = "保存";
+ ///
+ /// 取消
+ ///
+ public string ButtonCancel { get; set; } = "取消";
+ #endregion
#region 账户相关
@@ -33,10 +74,12 @@ namespace CommonLibrary
public string AccountPortrait { get; set; } = "头像";
public string AccountDetails { get; set; } = "账户详细信息";
public string AccountRegisterTitle { get; set; } = "注册一个新的账户";
-
+ public string AccountRoleAdd { get; set; } = "角色新增";
+ public string AccountRoleEdit { get; set; } = "角色编辑";
+ public string AccountRoleNameList { get; set; } = "角色名称列表";
+ public string AccountRoleAccountList { get; set; } = "关联账户列表";
#endregion
-
#region 配置相关
public string SettingsText { get; set; } = "配置系统的参数";
diff --git a/CommonLibrary/LocalizationSupport/EnglishLocalization.cs b/CommonLibrary/LocalizationSupport/EnglishLocalization.cs
index 9216d98a81a737fb3f5a373680e31ece9e22e145..b453aebfa04e56bae876d7fb55a427ac4c6b966e 100644
--- a/CommonLibrary/LocalizationSupport/EnglishLocalization.cs
+++ b/CommonLibrary/LocalizationSupport/EnglishLocalization.cs
@@ -8,12 +8,51 @@ namespace CommonLibrary
public class EnglishLocalization : ILocalization
{
public string FormateDateTime { get; set; } = "yyyy/MM/dd HH:mm:ss";
- public string ButtonEnsure { get; set; } = "Sure";
+ ///
+ /// 唯一标识
+ ///
+ public string GeneralUniqueID { get; set; } = "Unique ID";
+ ///
+ /// 名称
+ ///
+ public string GeneralName { get; set; } = "Name";
+ ///
+ /// 描述
+ ///
+ public string GeneralDescription { get; set; } = "Descrition";
+
+ #region 按钮相关
+ ///
+ /// 确认
+ ///
+ public string ButtonEnsure { get; set; } = "Sure";
+ ///
+ /// 新增
+ ///
+ public string ButtonAdd { get; set; } = "Add";
+ ///
+ /// 编辑
+ ///
+ public string ButtonEdit { get; set; } = "Edit";
+ ///
+ /// 删除
+ ///
+ public string ButtonDelete { get; set; } = "Delete";
+ ///
+ /// 保存
+ ///
+ public string ButtonSave { get; set; } = "Save";
+ ///
+ /// 取消
+ ///
+ public string ButtonCancel { get; set; } = "Cancel";
+
+ #endregion
#region 账户相关
-
+
public string AccountSelect { get; set; } = "Select";
@@ -33,11 +72,12 @@ namespace CommonLibrary
public string AccountPortrait { get; set; } = "Portrait";
public string AccountDetails { get; set; } = "Account Details";
public string AccountRegisterTitle { get; set; } = "Register a new account";
-
-
+ public string AccountRoleAdd { get; set; } = "Role add new";
+ public string AccountRoleEdit { get; set; } = "Role edit";
+ public string AccountRoleNameList { get; set; } = "Roles List";
+ public string AccountRoleAccountList { get; set; } = "Account of selected role";
#endregion
-
#region 配置相关
public string SettingsText { get; set; } = "System parameters settings";
diff --git a/CommonLibrary/LocalizationSupport/Localization.cs b/CommonLibrary/LocalizationSupport/Localization.cs
index 98790367e512db5969ac40b82b4a38cbffc7c6e5..83c05b0543cd89116de4c6939e442bd1fc6b679e 100644
--- a/CommonLibrary/LocalizationSupport/Localization.cs
+++ b/CommonLibrary/LocalizationSupport/Localization.cs
@@ -17,10 +17,6 @@ namespace CommonLibrary
///
public static class UserLocalization
{
- ///
- /// 默认的语言选项
- ///
- public static ILocalization Localization = new ChineseLocalization();
///
/// 设置系统的语言选项
@@ -30,24 +26,99 @@ namespace CommonLibrary
{
if(language.ToLower() == "chinese")
{
- Localization = Chinese;
+ localization = Chinese;
+ }
+ else
+ {
+ localization = English;
+ }
+ }
+
+ ///
+ /// 获取当前指定的语言选项信息
+ ///
+ ///
+ ///
+ public static ILocalization GetSpecifiedLocalization(string language)
+ {
+ if (language.ToLower() == "chinese")
+ {
+ return Chinese;
}
else
{
- Localization = English;
+ return English;
}
}
- private static ILocalization Chinese = new ChineseLocalization();
- private static ILocalization English = new EnglishLocalization();
+
+ ///
+ /// 默认的语言选项
+ ///
+ public static ILocalization Localization
+ {
+ get { return localization; }
+ }
+
+
+
+ private static ILocalization Chinese = new ChineseLocalization(); // 中文语言
+ private static ILocalization English = new EnglishLocalization(); // 英文语言
+ private static ILocalization localization = Chinese; // 当前语言
}
+ ///
+ /// 所有支持的语言必须从本接口继承
+ ///
public interface ILocalization
{
string FormateDateTime { get; set; }
+
+ ///
+ /// 唯一标识
+ ///
+ string GeneralUniqueID { get; set;}
+ ///
+ /// 名称
+ ///
+ string GeneralName { get; set; }
+ ///
+ /// 描述
+ ///
+ string GeneralDescription { get; set; }
+
+
+
+
+ #region 按钮相关
+
+ ///
+ /// 确认
+ ///
string ButtonEnsure { get; set; }
+ ///
+ /// 新增
+ ///
+ string ButtonAdd { get; set; }
+ ///
+ /// 编辑
+ ///
+ string ButtonEdit { get; set; }
+ ///
+ /// 删除
+ ///
+ string ButtonDelete { get; set; }
+ ///
+ /// 保存
+ ///
+ string ButtonSave { get; set; }
+ ///
+ /// 取消
+ ///
+ string ButtonCancel { get; set; }
+ #endregion
#region 账户相关
@@ -69,6 +140,10 @@ namespace CommonLibrary
string AccountPortrait { get; set; }
string AccountDetails { get; set; }
string AccountRegisterTitle { get; set; }
+ string AccountRoleAdd { get; set; }
+ string AccountRoleEdit { get; set; }
+ string AccountRoleNameList { get; set; } // 角色名称列表
+ string AccountRoleAccountList { get; set; } //关联账户列表
#endregion
diff --git a/CommonLibrary/ProtocolSupport/CommonProtocol.cs b/CommonLibrary/ProtocolSupport/CommonProtocol.cs
index 1c38bbffb3a9a016d8bb402065629ae5b099ba99..c34a27d1344819011331a9a223d7df120a3a8104 100644
--- a/CommonLibrary/ProtocolSupport/CommonProtocol.cs
+++ b/CommonLibrary/ProtocolSupport/CommonProtocol.cs
@@ -45,7 +45,7 @@ namespace CommonLibrary
*
**************************************************************************/
- SoftBasic.FrameworkVersion = new SystemVersion("1.6.2");
+ SoftBasic.FrameworkVersion = new SystemVersion("1.6.3");
}
diff --git "a/\350\275\257\344\273\266\347\263\273\347\273\237\346\234\215\345\212\241\347\253\257\346\250\241\347\211\210/FormServerWindow.cs" "b/\350\275\257\344\273\266\347\263\273\347\273\237\346\234\215\345\212\241\347\253\257\346\250\241\347\211\210/FormServerWindow.cs"
index 82f843575bcc409563cc0a4287a62116a5e64c08..d2c6edbab6cc89702cf88298ea05cfcc3575a797 100644
--- "a/\350\275\257\344\273\266\347\263\273\347\273\237\346\234\215\345\212\241\347\253\257\346\250\241\347\211\210/FormServerWindow.cs"
+++ "b/\350\275\257\344\273\266\347\263\273\347\273\237\346\234\215\345\212\241\347\253\257\346\250\241\347\211\210/FormServerWindow.cs"
@@ -697,8 +697,8 @@ namespace 软件系统服务端模版
{
JObject json = JObject.Parse(data);
string name = SoftBasic.GetValueFromJsonObject(json, "Name", "");
- string role = SoftBasic.GetValueFromJsonObject(json, "Role", "");
- net_simplify_server.SendMessage(state, handle, UserServer.ServerRoles.IsAllowAccountOperate(role, name).ToString());
+ string roleCode = SoftBasic.GetValueFromJsonObject(json, "Role", "");
+ net_simplify_server.SendMessage(state, handle, UserServer.ServerRoles.IsAllowAccountOperate(roleCode, name).ToString());
}
else
{