diff --git a/CommonLibrary/AccountSupport/FormAccountManage.cs b/CommonLibrary/AccountSupport/FormAccountManage.cs
new file mode 100644
index 0000000..1a80ab4
--- /dev/null
+++ b/CommonLibrary/AccountSupport/FormAccountManage.cs
@@ -0,0 +1,57 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+
+namespace CommonLibrary
+{
+ ///
+ /// 一个简单的账户管理窗口类
+ ///
+ public partial class FormAccountManage : Form
+ {
+ ///
+ /// 实例化一个简单的账户管理
+ ///
+ /// 设置账户信息的方法
+ /// 获取账户信息的方法
+ public FormAccountManage(Func getAccounts,Func setAccounts)
+ {
+ InitializeComponent();
+ GetAccounts = getAccounts;
+ SetAccounts = setAccounts;
+ }
+
+ private Func GetAccounts = null;
+ private Func SetAccounts = null;
+
+ private void FormAccountManage_Load(object sender, EventArgs e)
+ {
+
+ }
+
+ private void userButton1_Click(object sender, EventArgs e)
+ {
+ textBox1.Text = GetAccounts();
+ }
+
+ private void userButton2_Click(object sender, EventArgs e)
+ {
+ if (textBox1.Text != "")
+ {
+ SetAccounts(textBox1.Text);
+ MessageBox.Show("账户更新成功");
+ }
+ }
+
+ private void FormAccountManage_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ GetAccounts = null;
+ SetAccounts = null;
+ }
+ }
+}
diff --git a/CommonLibrary/AccountSupport/FormAccountManage.designer.cs b/CommonLibrary/AccountSupport/FormAccountManage.designer.cs
new file mode 100644
index 0000000..89353c1
--- /dev/null
+++ b/CommonLibrary/AccountSupport/FormAccountManage.designer.cs
@@ -0,0 +1,118 @@
+namespace CommonLibrary
+{
+ partial class FormAccountManage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.userButton2 = new BasicFramework.UserButton();
+ this.userButton1 = new BasicFramework.UserButton();
+ this.SuspendLayout();
+ //
+ // textBox1
+ //
+ this.textBox1.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.textBox1.Location = new System.Drawing.Point(12, 29);
+ this.textBox1.Multiline = true;
+ this.textBox1.Name = "textBox1";
+ this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
+ this.textBox1.Size = new System.Drawing.Size(443, 430);
+ this.textBox1.TabIndex = 0;
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(12, 9);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(256, 17);
+ this.label1.TabIndex = 1;
+ this.label1.Text = "数据格式为JSON格式,请确认账户信息再修改";
+ //
+ // userButton2
+ //
+ this.userButton2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.userButton2.BackColor = System.Drawing.Color.Transparent;
+ 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(465, 69);
+ this.userButton2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+ this.userButton2.Name = "userButton2";
+ this.userButton2.Size = new System.Drawing.Size(91, 32);
+ this.userButton2.TabIndex = 3;
+ this.userButton2.UIText = "提交";
+ this.userButton2.Click += new System.EventHandler(this.userButton2_Click);
+ //
+ // userButton1
+ //
+ this.userButton1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.userButton1.BackColor = System.Drawing.Color.Transparent;
+ 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(465, 29);
+ this.userButton1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+ this.userButton1.Name = "userButton1";
+ this.userButton1.Size = new System.Drawing.Size(91, 32);
+ this.userButton1.TabIndex = 2;
+ this.userButton1.UIText = "查看";
+ this.userButton1.Click += new System.EventHandler(this.userButton1_Click);
+ //
+ // FormAccountManage
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(564, 471);
+ this.Controls.Add(this.userButton2);
+ this.Controls.Add(this.userButton1);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.textBox1);
+ 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 = "FormAccountManage";
+ this.ShowIcon = false;
+ this.ShowInTaskbar = false;
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "账户管理界面";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FormAccountManage_FormClosing);
+ this.Load += new System.EventHandler(this.FormAccountManage_Load);
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.Label label1;
+ private UserButton userButton1;
+ private UserButton userButton2;
+ }
+}
\ No newline at end of file
diff --git a/CommonLibrary/AccountSupport/FormAccountManage.resx b/CommonLibrary/AccountSupport/FormAccountManage.resx
new file mode 100644
index 0000000..7080a7d
--- /dev/null
+++ b/CommonLibrary/AccountSupport/FormAccountManage.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/CommonLibrary/AccountSupport/ServerAccount.cs b/CommonLibrary/AccountSupport/ServerAccount.cs
index 3c6928e..42047da 100644
--- a/CommonLibrary/AccountSupport/ServerAccount.cs
+++ b/CommonLibrary/AccountSupport/ServerAccount.cs
@@ -14,14 +14,14 @@ namespace CommonLibrary
public class ServerAccounts where T : UserAccount, new()
{
///
- /// 初始化構造方法
+ /// 初始化构造方法
///
public ServerAccounts()
{
}
///
- /// 初始化構造方法,将添加几个初始化账户
+ /// 初始化构造方法,将添加几个初始化账户
///
public ServerAccounts(IEnumerable accounts)
{
@@ -226,7 +226,7 @@ namespace CommonLibrary
}
///
- /// 使用Base64编码將所有的帳戶信息保存到文件
+ /// 使用Base64编码将所有的账户信息保存到文件
///
public void SaveFile()
{
@@ -236,6 +236,7 @@ namespace CommonLibrary
///
/// 使用自定义的加密方法将所有账户信息保存到文件
///
+ /// 加密的方式
public void SaveFile(Converter encrypt)
{
if (FileSavePath != "")
diff --git a/CommonLibrary/CommonLibrary.csproj b/CommonLibrary/CommonLibrary.csproj
index 3e2b024..72c7d40 100644
--- a/CommonLibrary/CommonLibrary.csproj
+++ b/CommonLibrary/CommonLibrary.csproj
@@ -38,12 +38,20 @@
+
+
+
+ Form
+
+
+ FormAccountManage.cs
+
@@ -56,6 +64,11 @@
+
+
+ FormAccountManage.cs
+
+