新增用户管理功能

This commit is contained in:
cloud301530 2024-12-19 22:02:20 +08:00
parent 5432e2abea
commit 2795a94e27
12 changed files with 1165 additions and 241 deletions

View File

@ -1,4 +1,5 @@
using System;
using MiniExcelLibs;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SQLite;
@ -207,7 +208,7 @@ namespace PBAnaly.LoginCommon
Password = reader["Password"].ToString(),
CreatedBy = reader["CreatedBy"].ToString(),
CreatedDate = Convert.ToDateTime(reader["CreatedDate"]),
Role = Enum.TryParse<UserRole>(reader["Role"].ToString(), out var role) ? role : UserRole.Operator,
Role = (UserRole)Enum.Parse(typeof(UserRole), reader["Role"].ToString()),
PasswordQuestion = reader["PasswordQuestion"].ToString(),
QuestionAnswer = reader["QuestionAnswer"].ToString()
};
@ -360,5 +361,126 @@ namespace PBAnaly.LoginCommon
#endregion
#region FixUserRole
/// <summary>
/// 修改权限
/// </summary>
/// <param name="UserName"></param>
/// <param name="Role"></param>
/// <returns></returns>
public static bool FixUserRole(string UserName,string Role)
{
try
{
string updateQuery = "UPDATE User SET Role = @Role WHERE UserName = @UserName";
using (SQLiteConnection conn = new SQLiteConnection(connectionString))
{
conn.Open();
using (SQLiteCommand cmd = new SQLiteCommand(updateQuery, conn))
{
// 参数化查询防止SQL注入
cmd.Parameters.AddWithValue("@UserName", UserName);
cmd.Parameters.AddWithValue("@Role", Role);
// 执行更新命令
int rowsAffected = cmd.ExecuteNonQuery();
Console.WriteLine($"更新成功,受影响的行数:{rowsAffected}");
}
conn.Close();
return true;
}
}
catch (Exception)
{
return false;
}
}
#endregion
#region DeleteUser
/// <summary>
/// 删除用户
/// </summary>
/// <param name="UserName"></param>
/// <returns></returns>
public static bool DeleteUser(string UserName)
{
try
{
string sql = string.Format("delete from User where `UserName`='{0}'", UserName);
using (SQLiteConnection conn = new SQLiteConnection(connectionString))
{
conn.Open();
using (SQLiteCommand cmd = new SQLiteCommand(sql, conn))
{
var blnResult = (cmd.ExecuteNonQuery() > 0);
}
conn.Close();
UsersKeyValuePairs.Remove(UserName);
return true;
}
}
catch (Exception)
{
return false;
}
}
#endregion
#region FixUserPassword
/// <summary>
/// 修改密码
/// </summary>
/// <param name="UserName"></param>
/// <param name="Password"></param>
/// <returns></returns>
public static bool FixUserPassword(string UserName , string Password)
{
try
{
string updateQuery = "UPDATE User SET Password = @Password WHERE UserName = @UserName";
using (SQLiteConnection conn = new SQLiteConnection(connectionString))
{
conn.Open();
using (SQLiteCommand cmd = new SQLiteCommand(updateQuery, conn))
{
// 参数化查询防止SQL注入
cmd.Parameters.AddWithValue("@UserName", UserName);
cmd.Parameters.AddWithValue("@Password", Password);
// 执行更新命令
int rowsAffected = cmd.ExecuteNonQuery();
Console.WriteLine($"更新成功,受影响的行数:{rowsAffected}");
}
conn.Close();
return true;
}
}
catch (Exception)
{
return false;
}
}
#endregion
}
}

View File

@ -0,0 +1,491 @@
namespace PBAnaly.LoginCommon
{
partial class UserManageForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle26 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle28 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle29 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle30 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tab_fix = new System.Windows.Forms.TabPage();
this.btn_fix_role = new System.Windows.Forms.Button();
this.txt_UserName = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
this.cbx_role_role = new System.Windows.Forms.ComboBox();
this.label12 = new System.Windows.Forms.Label();
this.tab_delete = new System.Windows.Forms.TabPage();
this.tab_fix_password = new System.Windows.Forms.TabPage();
this.panel1 = new System.Windows.Forms.Panel();
this.btn_delete = new System.Windows.Forms.Button();
this.btn_edit_password = new System.Windows.Forms.Button();
this.btn_editRole = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.btn_delete_user = new System.Windows.Forms.Button();
this.txt_fix_p_UserName = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.txt_password = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.btn_FixPassword = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.tabControl1.SuspendLayout();
this.tab_fix.SuspendLayout();
this.tab_delete.SuspendLayout();
this.tab_fix_password.SuspendLayout();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.dataGridView1);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.BackColor = System.Drawing.Color.White;
this.splitContainer1.Panel2.Controls.Add(this.tabControl1);
this.splitContainer1.Panel2.Controls.Add(this.panel1);
this.splitContainer1.Size = new System.Drawing.Size(863, 507);
this.splitContainer1.SplitterDistance = 427;
this.splitContainer1.TabIndex = 1;
//
// dataGridView1
//
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false;
this.dataGridView1.AllowUserToResizeColumns = false;
this.dataGridView1.AllowUserToResizeRows = false;
this.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dataGridView1.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle26.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle26.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle26.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle26.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle26.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle26.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle26.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle26;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column1,
this.Column2,
this.Column5,
this.Column3,
this.Column4});
this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView1.Location = new System.Drawing.Point(0, 0);
this.dataGridView1.MultiSelect = false;
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.ReadOnly = true;
this.dataGridView1.RowHeadersVisible = false;
this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView1.Size = new System.Drawing.Size(427, 507);
this.dataGridView1.TabIndex = 496;
this.dataGridView1.SelectionChanged += new System.EventHandler(this.dataGridView1_SelectionChanged);
//
// Column1
//
dataGridViewCellStyle27.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.Column1.DefaultCellStyle = dataGridViewCellStyle27;
this.Column1.HeaderText = "序号";
this.Column1.Name = "Column1";
this.Column1.ReadOnly = true;
this.Column1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Column2
//
dataGridViewCellStyle28.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
this.Column2.DefaultCellStyle = dataGridViewCellStyle28;
this.Column2.HeaderText = "用户名";
this.Column2.Name = "Column2";
this.Column2.ReadOnly = true;
this.Column2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Column5
//
this.Column5.HeaderText = "创建人";
this.Column5.Name = "Column5";
this.Column5.ReadOnly = true;
//
// Column3
//
dataGridViewCellStyle29.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.Column3.DefaultCellStyle = dataGridViewCellStyle29;
this.Column3.HeaderText = "创建时间";
this.Column3.Name = "Column3";
this.Column3.ReadOnly = true;
this.Column3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Column4
//
dataGridViewCellStyle30.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.Column4.DefaultCellStyle = dataGridViewCellStyle30;
this.Column4.HeaderText = "权限";
this.Column4.Name = "Column4";
this.Column4.ReadOnly = true;
this.Column4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// tabControl1
//
this.tabControl1.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.tabControl1.Controls.Add(this.tab_fix);
this.tabControl1.Controls.Add(this.tab_delete);
this.tabControl1.Controls.Add(this.tab_fix_password);
this.tabControl1.Location = new System.Drawing.Point(3, 22);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(429, 485);
this.tabControl1.TabIndex = 0;
//
// tab_fix
//
this.tab_fix.Controls.Add(this.btn_fix_role);
this.tab_fix.Controls.Add(this.txt_UserName);
this.tab_fix.Controls.Add(this.label11);
this.tab_fix.Controls.Add(this.cbx_role_role);
this.tab_fix.Controls.Add(this.label12);
this.tab_fix.Location = new System.Drawing.Point(4, 22);
this.tab_fix.Name = "tab_fix";
this.tab_fix.Padding = new System.Windows.Forms.Padding(3);
this.tab_fix.Size = new System.Drawing.Size(421, 459);
this.tab_fix.TabIndex = 0;
this.tab_fix.Text = "修改权限";
this.tab_fix.UseVisualStyleBackColor = true;
//
// btn_fix_role
//
this.btn_fix_role.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(32)))), ((int)(((byte)(96)))));
this.btn_fix_role.FlatAppearance.BorderSize = 0;
this.btn_fix_role.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn_fix_role.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold);
this.btn_fix_role.ForeColor = System.Drawing.Color.White;
this.btn_fix_role.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btn_fix_role.Location = new System.Drawing.Point(284, 215);
this.btn_fix_role.Name = "btn_fix_role";
this.btn_fix_role.Size = new System.Drawing.Size(101, 38);
this.btn_fix_role.TabIndex = 505;
this.btn_fix_role.Text = "修改权限";
this.btn_fix_role.UseVisualStyleBackColor = false;
this.btn_fix_role.Click += new System.EventHandler(this.btn_fix_role_Click);
//
// txt_UserName
//
this.txt_UserName.Font = new System.Drawing.Font("宋体", 13F);
this.txt_UserName.Location = new System.Drawing.Point(93, 43);
this.txt_UserName.Multiline = true;
this.txt_UserName.Name = "txt_UserName";
this.txt_UserName.ReadOnly = true;
this.txt_UserName.Size = new System.Drawing.Size(292, 28);
this.txt_UserName.TabIndex = 504;
//
// label11
//
this.label11.AutoSize = true;
this.label11.Font = new System.Drawing.Font("宋体", 15F);
this.label11.Location = new System.Drawing.Point(18, 51);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(69, 20);
this.label11.TabIndex = 503;
this.label11.Text = "用户名";
//
// cbx_role_role
//
this.cbx_role_role.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbx_role_role.Font = new System.Drawing.Font("宋体", 15F);
this.cbx_role_role.FormattingEnabled = true;
this.cbx_role_role.Items.AddRange(new object[] {
"Operator",
"Engineer",
"Administrator",
"SuperAdministrator"});
this.cbx_role_role.Location = new System.Drawing.Point(93, 145);
this.cbx_role_role.Name = "cbx_role_role";
this.cbx_role_role.Size = new System.Drawing.Size(292, 28);
this.cbx_role_role.TabIndex = 502;
//
// label12
//
this.label12.AutoSize = true;
this.label12.Font = new System.Drawing.Font("宋体", 15F);
this.label12.Location = new System.Drawing.Point(38, 148);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(49, 20);
this.label12.TabIndex = 501;
this.label12.Text = "权限";
//
// tab_delete
//
this.tab_delete.Controls.Add(this.btn_delete_user);
this.tab_delete.Controls.Add(this.label1);
this.tab_delete.Location = new System.Drawing.Point(4, 22);
this.tab_delete.Name = "tab_delete";
this.tab_delete.Padding = new System.Windows.Forms.Padding(3);
this.tab_delete.Size = new System.Drawing.Size(421, 459);
this.tab_delete.TabIndex = 1;
this.tab_delete.Text = "删除";
this.tab_delete.UseVisualStyleBackColor = true;
//
// tab_fix_password
//
this.tab_fix_password.Controls.Add(this.btn_FixPassword);
this.tab_fix_password.Controls.Add(this.txt_password);
this.tab_fix_password.Controls.Add(this.label3);
this.tab_fix_password.Controls.Add(this.txt_fix_p_UserName);
this.tab_fix_password.Controls.Add(this.label2);
this.tab_fix_password.Location = new System.Drawing.Point(4, 22);
this.tab_fix_password.Name = "tab_fix_password";
this.tab_fix_password.Padding = new System.Windows.Forms.Padding(3);
this.tab_fix_password.Size = new System.Drawing.Size(421, 459);
this.tab_fix_password.TabIndex = 2;
this.tab_fix_password.Text = "修改密码";
this.tab_fix_password.UseVisualStyleBackColor = true;
//
// panel1
//
this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel1.Controls.Add(this.btn_delete);
this.panel1.Controls.Add(this.btn_edit_password);
this.panel1.Controls.Add(this.btn_editRole);
this.panel1.Location = new System.Drawing.Point(3, 3);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(429, 43);
this.panel1.TabIndex = 453;
//
// btn_delete
//
this.btn_delete.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.btn_delete.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(32)))), ((int)(((byte)(96)))));
this.btn_delete.FlatAppearance.BorderSize = 0;
this.btn_delete.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn_delete.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold);
this.btn_delete.ForeColor = System.Drawing.Color.White;
this.btn_delete.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btn_delete.Location = new System.Drawing.Point(181, 2);
this.btn_delete.Name = "btn_delete";
this.btn_delete.Size = new System.Drawing.Size(78, 38);
this.btn_delete.TabIndex = 498;
this.btn_delete.Text = "删除";
this.btn_delete.UseVisualStyleBackColor = false;
this.btn_delete.Click += new System.EventHandler(this.btn_delete_Click);
//
// btn_edit_password
//
this.btn_edit_password.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.btn_edit_password.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(32)))), ((int)(((byte)(96)))));
this.btn_edit_password.FlatAppearance.BorderSize = 0;
this.btn_edit_password.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn_edit_password.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold);
this.btn_edit_password.ForeColor = System.Drawing.Color.White;
this.btn_edit_password.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btn_edit_password.Location = new System.Drawing.Point(321, 2);
this.btn_edit_password.Name = "btn_edit_password";
this.btn_edit_password.Size = new System.Drawing.Size(101, 38);
this.btn_edit_password.TabIndex = 499;
this.btn_edit_password.Text = "修改密码";
this.btn_edit_password.UseVisualStyleBackColor = false;
this.btn_edit_password.Click += new System.EventHandler(this.btn_edit_password_Click);
//
// btn_editRole
//
this.btn_editRole.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.btn_editRole.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(32)))), ((int)(((byte)(96)))));
this.btn_editRole.FlatAppearance.BorderSize = 0;
this.btn_editRole.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn_editRole.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold);
this.btn_editRole.ForeColor = System.Drawing.Color.White;
this.btn_editRole.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btn_editRole.Location = new System.Drawing.Point(7, 3);
this.btn_editRole.Name = "btn_editRole";
this.btn_editRole.Size = new System.Drawing.Size(101, 38);
this.btn_editRole.TabIndex = 497;
this.btn_editRole.Text = "修改权限";
this.btn_editRole.UseVisualStyleBackColor = false;
this.btn_editRole.Click += new System.EventHandler(this.btn_editRole_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(119, 17);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(161, 12);
this.label1.TabIndex = 0;
this.label1.Text = "选中左侧表格的一行即可删除";
//
// btn_delete_user
//
this.btn_delete_user.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(32)))), ((int)(((byte)(96)))));
this.btn_delete_user.FlatAppearance.BorderSize = 0;
this.btn_delete_user.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn_delete_user.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold);
this.btn_delete_user.ForeColor = System.Drawing.Color.White;
this.btn_delete_user.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btn_delete_user.Location = new System.Drawing.Point(155, 74);
this.btn_delete_user.Name = "btn_delete_user";
this.btn_delete_user.Size = new System.Drawing.Size(78, 38);
this.btn_delete_user.TabIndex = 499;
this.btn_delete_user.Text = "删除";
this.btn_delete_user.UseVisualStyleBackColor = false;
this.btn_delete_user.Click += new System.EventHandler(this.btn_delete_user_Click);
//
// txt_fix_p_UserName
//
this.txt_fix_p_UserName.Font = new System.Drawing.Font("宋体", 13F);
this.txt_fix_p_UserName.Location = new System.Drawing.Point(94, 46);
this.txt_fix_p_UserName.Multiline = true;
this.txt_fix_p_UserName.Name = "txt_fix_p_UserName";
this.txt_fix_p_UserName.ReadOnly = true;
this.txt_fix_p_UserName.Size = new System.Drawing.Size(292, 28);
this.txt_fix_p_UserName.TabIndex = 506;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("宋体", 15F);
this.label2.Location = new System.Drawing.Point(19, 54);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(69, 20);
this.label2.TabIndex = 505;
this.label2.Text = "用户名";
//
// txt_password
//
this.txt_password.Font = new System.Drawing.Font("宋体", 10F);
this.txt_password.Location = new System.Drawing.Point(94, 148);
this.txt_password.Multiline = true;
this.txt_password.Name = "txt_password";
this.txt_password.Size = new System.Drawing.Size(292, 28);
this.txt_password.TabIndex = 508;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("宋体", 15F);
this.label3.Location = new System.Drawing.Point(39, 156);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(49, 20);
this.label3.TabIndex = 507;
this.label3.Text = "密码";
//
// btn_FixPassword
//
this.btn_FixPassword.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(32)))), ((int)(((byte)(96)))));
this.btn_FixPassword.FlatAppearance.BorderSize = 0;
this.btn_FixPassword.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn_FixPassword.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold);
this.btn_FixPassword.ForeColor = System.Drawing.Color.White;
this.btn_FixPassword.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btn_FixPassword.Location = new System.Drawing.Point(285, 216);
this.btn_FixPassword.Name = "btn_FixPassword";
this.btn_FixPassword.Size = new System.Drawing.Size(101, 38);
this.btn_FixPassword.TabIndex = 509;
this.btn_FixPassword.Text = "修改密码";
this.btn_FixPassword.UseVisualStyleBackColor = false;
this.btn_FixPassword.Click += new System.EventHandler(this.btn_FixPassword_Click);
//
// UserManageForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(863, 507);
this.Controls.Add(this.splitContainer1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "UserManageForm";
this.Text = "UserManageForm";
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.tabControl1.ResumeLayout(false);
this.tab_fix.ResumeLayout(false);
this.tab_fix.PerformLayout();
this.tab_delete.ResumeLayout(false);
this.tab_delete.PerformLayout();
this.tab_fix_password.ResumeLayout(false);
this.tab_fix_password.PerformLayout();
this.panel1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Button btn_delete;
private System.Windows.Forms.Button btn_edit_password;
private System.Windows.Forms.Button btn_editRole;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tab_fix;
private System.Windows.Forms.TabPage tab_delete;
private System.Windows.Forms.TabPage tab_fix_password;
private System.Windows.Forms.Button btn_fix_role;
private System.Windows.Forms.TextBox txt_UserName;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.ComboBox cbx_role_role;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Button btn_delete_user;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btn_FixPassword;
private System.Windows.Forms.TextBox txt_password;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txt_fix_p_UserName;
private System.Windows.Forms.Label label2;
}
}

View File

@ -0,0 +1,224 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace PBAnaly.LoginCommon
{
public partial class UserManageForm : Form
{
public UserManageForm()
{
InitializeComponent();
panel1.BringToFront();
SetMainMenuButtonCilkeColor("btn_editRole");
}
#region InitUser root除外
/// <summary>
/// 加载全部的用户 root除外
/// </summary>
public void InitUser()
{
try
{
int index = 1;
dataGridView1.Rows.Clear();
foreach (User user in UserManage.UsersKeyValuePairs.Values)
{
if (user.Name != "root")
{
DataGridViewRow dr = new DataGridViewRow();
dr.CreateCells(dataGridView1);
dr.Cells[0].Value = index.ToString();
dr.Cells[1].Value = user.Name;
dr.Cells[2].Value = user.CreatedBy;
dr.Cells[3].Value = user.CreatedDate;
dr.Cells[4].Value = user.Role.ToString();
dataGridView1.Rows.Add(dr);
index++;
}
}
}
catch (Exception)
{
}
}
#endregion
#region btn_fix_role_Click
private void btn_fix_role_Click(object sender, EventArgs e)
{
DialogResult result = MessageBox.Show($"确定要用户:{txt_UserName.Text}的权限吗?", "提示", MessageBoxButtons.YesNo);
if (result == DialogResult.Yes)
{
try
{
if (!string.IsNullOrEmpty(txt_UserName.Text))
{
User user = new User();
user.Name = txt_UserName.Text;
user.Role = (UserRole)Enum.Parse(typeof(UserRole), cbx_role_role.Text);
user.CreatedDate = UserManage.UsersKeyValuePairs[txt_UserName.Text].CreatedDate;
user.CreatedBy = UserManage.UsersKeyValuePairs[txt_UserName.Text].CreatedBy;
user.PasswordQuestion = UserManage.UsersKeyValuePairs[txt_UserName.Text].PasswordQuestion;
user.QuestionAnswer = UserManage.UsersKeyValuePairs[txt_UserName.Text].QuestionAnswer;
user.Password = UserManage.UsersKeyValuePairs[txt_UserName.Text].Password;
UserManage.UsersKeyValuePairs[user.Name] = user;
if(UserManage.FixUserRole(txt_UserName.Text, cbx_role_role.Text))
{
InitUser();
MessageBox.Show("修改成功");
}
else
{
MessageBox.Show("修改失败");
}
}
}
catch (Exception ex)
{
MessageBox.Show($"权限修改失败,原因:{ex.Message.ToString()}");
}
}
}
#endregion
private void dataGridView1_SelectionChanged(object sender, EventArgs e)
{
if (dataGridView1.SelectedRows.Count > 0)
{
DataGridViewRow row = dataGridView1.SelectedRows[0];
txt_UserName.Text = row.Cells[1].Value.ToString();
cbx_role_role.Text = row.Cells[4].Value.ToString();
txt_fix_p_UserName.Text=row.Cells[1].Value.ToString();
txt_password.Text = UserManage.UsersKeyValuePairs[txt_fix_p_UserName.Text].Password;
}
}
private void btn_delete_user_Click(object sender, EventArgs e)
{
try
{
if (dataGridView1.SelectedRows.Count > 0 )
{
if(dataGridView1.SelectedRows.Count >= 2) { MessageBox.Show("一次只能删除一个用户");return; }
DataGridViewRow row = dataGridView1.SelectedRows[0];
string UserName = row.Cells[1].Value.ToString();
if (UserManage.DeleteUser(UserName))
{
InitUser();
}
}
else
{
MessageBox.Show("请在表格内选择一行要删除的登记信息,且一次只能删除一行");
}
}
catch (Exception ex)
{
MessageBox.Show("删除失败,原因:" + ex.Message);
}
}
private void btn_FixPassword_Click(object sender, EventArgs e)
{
try
{
if (!string.IsNullOrEmpty(txt_UserName.Text))
{
User user = new User();
user.Name = txt_UserName.Text;
user.Role = (UserRole)Enum.Parse(typeof(UserRole), cbx_role_role.Text);
user.CreatedDate = UserManage.UsersKeyValuePairs[txt_UserName.Text].CreatedDate;
user.CreatedBy = UserManage.UsersKeyValuePairs[txt_UserName.Text].CreatedBy;
user.PasswordQuestion = UserManage.UsersKeyValuePairs[txt_UserName.Text].PasswordQuestion;
user.QuestionAnswer = UserManage.UsersKeyValuePairs[txt_UserName.Text].QuestionAnswer;
user.Password = txt_password.Text;
UserManage.UsersKeyValuePairs[user.Name] = user;
if (UserManage.FixUserPassword(txt_UserName.Text, txt_password.Text))
{
MessageBox.Show("密码修改成功");
}
else
{
MessageBox.Show("密码修改失败");
}
}
}
catch (Exception ex)
{
MessageBox.Show($"密码修改失败,原因:{ex.Message.ToString()}");
}
}
private void btn_editRole_Click(object sender, EventArgs e)
{
this.tabControl1.SelectedIndex = 0;
SetMainMenuButtonCilkeColor(((Button)sender).Name);
}
private void btn_delete_Click(object sender, EventArgs e)
{
this.tabControl1.SelectedIndex = 1;
SetMainMenuButtonCilkeColor(((Button)sender).Name);
}
private void btn_edit_password_Click(object sender, EventArgs e)
{
this.tabControl1.SelectedIndex = 2;
SetMainMenuButtonCilkeColor(((Button)sender).Name);
}
#region SetMainMenuButtonCilkeColor
/// <summary>
/// 主菜单中按钮点击之后,设置按钮的前景色和背景色
/// </summary>
/// <param name="strBtnName">点击的按钮的名称</param>
private void SetMainMenuButtonCilkeColor(string strBtnName)
{
foreach (Control control in panel1.Controls)
{
if (control.Name == panel1.Name)
{
continue;
}
else if (control.Name == strBtnName)
{
control.BackColor = Color.Aqua;
control.ForeColor = Color.Black;
}
else
{
control.BackColor = Color.FromArgb(0, 32, 96);
control.ForeColor = Color.White;
}
}
}
#endregion
}
}

View File

@ -0,0 +1,135 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View File

@ -247,6 +247,8 @@ namespace PBAnaly
private void materialButton_setting_Click(object sender, EventArgs e)
{
SystemSettingForm system = new SystemSettingForm();
system.ShowDialog();
//if (settingForm != null)
// return;

View File

@ -96,6 +96,12 @@
</Compile>
<Compile Include="LoginCommon\User.cs" />
<Compile Include="LoginCommon\UserManage.cs" />
<Compile Include="LoginCommon\UserManageForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="LoginCommon\UserManageForm.Designer.cs">
<DependentUpon>UserManageForm.cs</DependentUpon>
</Compile>
<Compile Include="LoginCommon\UserRole.cs" />
<Compile Include="LoginForm.cs">
<SubType>Form</SubType>
@ -195,6 +201,9 @@
<EmbeddedResource Include="LoginCommon\RegisterFrom.resx">
<DependentUpon>RegisterFrom.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="LoginCommon\UserManageForm.resx">
<DependentUpon>UserManageForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="LoginForm.resx">
<DependentUpon>LoginForm.cs</DependentUpon>
</EmbeddedResource>
@ -430,6 +439,7 @@
</ItemGroup>
<ItemGroup>
<Content Include="GS-Analy.ico" />
<None Include="Resources\添加用户.png" />
<None Include="Resources\最小化white.png" />
<None Include="Resources\最大化white.png" />
<None Include="Resources\关闭White.png" />

View File

@ -540,6 +540,16 @@ namespace PBAnaly.Properties {
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap {
get {
object obj = ResourceManager.GetObject("添加用户", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>

View File

@ -136,17 +136,17 @@
<data name="EtBr_1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\EtBr_1.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="壁纸" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\壁纸.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Gray" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Gray.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="保存图片" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\保存图片.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="蛋白质-01" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\蛋白质-01.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="线段" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\线段.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="YellowHot_1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\YellowHot_1.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="饼干" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\饼干.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Black_Green_1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Black_Green_1.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -172,23 +172,26 @@
<data name="波形设置-未选中" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\波形设置-未选中.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="主页面-图像编辑-正反片" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\主页面-图像编辑-正反片.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Black_Blue_1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Black_Blue_1.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="zoom-in" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\zoom-in.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="数据报告 (1)" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\数据报告 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="线段 (1)" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\线段 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="保存1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\保存.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="圖片_20240731174523" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\圖片_20240731174523.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="图片管理" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\图片管理.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="重置" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\重置.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Black_Red_0" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Black_Red_0.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -196,6 +199,9 @@
<data name="京仪科技定稿_画板 1 副本2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\京仪科技定稿_画板 1 副本2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="数据报告" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\数据报告.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="zoom-out" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\zoom-out.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -205,9 +211,6 @@
<data name="风控" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\风控.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Black_SDS_1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Black_SDS_1.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="分析" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\分析.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -238,20 +241,17 @@
<data name="C" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\C.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="前台" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\前台.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="图片管理" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\图片管理.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="圆形" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\圆形.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="執行日誌紀錄" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\執行日誌紀錄.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="最大化white" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\最大化white.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="圆形1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\圆形.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Black_Green_0" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Black_Green_0.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="主页面-图像编辑-正反片" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\主页面-图像编辑-正反片.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="缩小" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\缩小.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -265,43 +265,46 @@
<data name="Pseudo_1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Pseudo_1.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="线段" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\线段.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="Gray" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Gray.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="10矩形" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\10矩形.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="线段 (1)" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\线段 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="放大" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\放大.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="YellowHot_1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\YellowHot_1.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="Black_Green_0" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Black_Green_0.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="饼干" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\饼干.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="執行日誌紀錄" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\執行日誌紀錄.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="数据报告" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\数据报告.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="蛋白质-01" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\蛋白质-01.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="zoom-in" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\zoom-in.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="壁纸" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\壁纸.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="圆形1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\圆形.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="黑白平衡" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\黑白平衡.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="重置" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\重置.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="最小化white" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\最小化white.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="放大" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\放大.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="Black_SDS_1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Black_SDS_1.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="前台" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\前台.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="波形图" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\波形图.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="最大化white" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\最大化white.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="最小化white" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\最小化white.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="添加用户" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\添加用户.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

View File

@ -28,40 +28,20 @@
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
this.panel1 = new System.Windows.Forms.Panel();
this.panel_mode = new System.Windows.Forms.Panel();
this.tabMain = new System.Windows.Forms.TabControl();
this.tab_UserManage = new System.Windows.Forms.TabPage();
this.pnlMainMenu = new System.Windows.Forms.Panel();
this.btn_ConfigManage = new System.Windows.Forms.Button();
this.btn_ComManage = new System.Windows.Forms.Button();
this.btn_FormatManage = new System.Windows.Forms.Button();
this.btn_ReadManage = new System.Windows.Forms.Button();
this.label4 = new System.Windows.Forms.Label();
this.btn_Min = new System.Windows.Forms.Button();
this.btn_Max = new System.Windows.Forms.Button();
this.btn_Close = new System.Windows.Forms.Button();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.panel1.SuspendLayout();
this.panel_mode.SuspendLayout();
this.tabMain.SuspendLayout();
this.tab_UserManage.SuspendLayout();
this.pnlMainMenu.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.SuspendLayout();
//
// panel1
@ -84,34 +64,31 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.panel_mode.BackColor = System.Drawing.SystemColors.Control;
this.panel_mode.Controls.Add(this.tabMain);
this.panel_mode.Location = new System.Drawing.Point(50, 0);
this.panel_mode.Location = new System.Drawing.Point(58, 0);
this.panel_mode.Name = "panel_mode";
this.panel_mode.Size = new System.Drawing.Size(1106, 639);
this.panel_mode.Size = new System.Drawing.Size(1098, 639);
this.panel_mode.TabIndex = 444;
//
// tabMain
//
this.tabMain.Alignment = System.Windows.Forms.TabAlignment.Left;
this.tabMain.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.tabMain.Controls.Add(this.tab_UserManage);
this.tabMain.Location = new System.Drawing.Point(0, -3);
this.tabMain.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabMain.Location = new System.Drawing.Point(0, 0);
this.tabMain.Multiline = true;
this.tabMain.Name = "tabMain";
this.tabMain.SelectedIndex = 0;
this.tabMain.Size = new System.Drawing.Size(1114, 651);
this.tabMain.Size = new System.Drawing.Size(1098, 639);
this.tabMain.TabIndex = 0;
//
// tab_UserManage
//
this.tab_UserManage.BackColor = System.Drawing.Color.White;
this.tab_UserManage.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.tab_UserManage.Controls.Add(this.splitContainer1);
this.tab_UserManage.Location = new System.Drawing.Point(22, 4);
this.tab_UserManage.Name = "tab_UserManage";
this.tab_UserManage.Padding = new System.Windows.Forms.Padding(3);
this.tab_UserManage.Size = new System.Drawing.Size(1088, 643);
this.tab_UserManage.Size = new System.Drawing.Size(1072, 631);
this.tab_UserManage.TabIndex = 0;
this.tab_UserManage.Text = "用户管理";
//
@ -120,56 +97,18 @@
this.pnlMainMenu.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.pnlMainMenu.BackColor = System.Drawing.Color.White;
this.pnlMainMenu.Controls.Add(this.btn_ConfigManage);
this.pnlMainMenu.Controls.Add(this.btn_ComManage);
this.pnlMainMenu.Controls.Add(this.btn_FormatManage);
this.pnlMainMenu.Controls.Add(this.btn_ReadManage);
this.pnlMainMenu.Location = new System.Drawing.Point(3, 3);
this.pnlMainMenu.Location = new System.Drawing.Point(3, -3);
this.pnlMainMenu.Name = "pnlMainMenu";
this.pnlMainMenu.Size = new System.Drawing.Size(77, 636);
this.pnlMainMenu.Size = new System.Drawing.Size(77, 642);
this.pnlMainMenu.TabIndex = 443;
//
// btn_ConfigManage
//
this.btn_ConfigManage.BackColor = System.Drawing.Color.White;
this.btn_ConfigManage.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn_ConfigManage.Font = new System.Drawing.Font("宋体", 9F);
this.btn_ConfigManage.Location = new System.Drawing.Point(3, 279);
this.btn_ConfigManage.Name = "btn_ConfigManage";
this.btn_ConfigManage.Size = new System.Drawing.Size(76, 86);
this.btn_ConfigManage.TabIndex = 6;
this.btn_ConfigManage.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
this.btn_ConfigManage.UseVisualStyleBackColor = false;
//
// btn_ComManage
//
this.btn_ComManage.BackColor = System.Drawing.Color.White;
this.btn_ComManage.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn_ComManage.Font = new System.Drawing.Font("宋体", 9F);
this.btn_ComManage.Location = new System.Drawing.Point(3, 187);
this.btn_ComManage.Name = "btn_ComManage";
this.btn_ComManage.Size = new System.Drawing.Size(76, 86);
this.btn_ComManage.TabIndex = 5;
this.btn_ComManage.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
this.btn_ComManage.UseVisualStyleBackColor = false;
//
// btn_FormatManage
//
this.btn_FormatManage.BackColor = System.Drawing.Color.White;
this.btn_FormatManage.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn_FormatManage.Font = new System.Drawing.Font("宋体", 9F);
this.btn_FormatManage.Location = new System.Drawing.Point(3, 95);
this.btn_FormatManage.Name = "btn_FormatManage";
this.btn_FormatManage.Size = new System.Drawing.Size(76, 86);
this.btn_FormatManage.TabIndex = 4;
this.btn_FormatManage.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
this.btn_FormatManage.UseVisualStyleBackColor = false;
//
// btn_ReadManage
//
this.btn_ReadManage.BackColor = System.Drawing.Color.White;
this.btn_ReadManage.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn_ReadManage.Font = new System.Drawing.Font("宋体", 9F);
this.btn_ReadManage.Image = global::PBAnaly.Properties.Resources.;
this.btn_ReadManage.Location = new System.Drawing.Point(3, 3);
this.btn_ReadManage.Name = "btn_ReadManage";
this.btn_ReadManage.Size = new System.Drawing.Size(76, 86);
@ -196,11 +135,12 @@
this.btn_Min.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn_Min.ForeColor = System.Drawing.Color.Transparent;
this.btn_Min.Image = global::PBAnaly.Properties.Resources.white;
this.btn_Min.Location = new System.Drawing.Point(1014, 0);
this.btn_Min.Location = new System.Drawing.Point(1014, -1);
this.btn_Min.Name = "btn_Min";
this.btn_Min.Size = new System.Drawing.Size(44, 32);
this.btn_Min.TabIndex = 459;
this.btn_Min.UseVisualStyleBackColor = false;
this.btn_Min.Visible = false;
//
// btn_Max
//
@ -210,11 +150,12 @@
this.btn_Max.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn_Max.ForeColor = System.Drawing.Color.Transparent;
this.btn_Max.Image = global::PBAnaly.Properties.Resources.white;
this.btn_Max.Location = new System.Drawing.Point(1064, 0);
this.btn_Max.Location = new System.Drawing.Point(1064, -1);
this.btn_Max.Name = "btn_Max";
this.btn_Max.Size = new System.Drawing.Size(44, 32);
this.btn_Max.TabIndex = 458;
this.btn_Max.UseVisualStyleBackColor = false;
this.btn_Max.Visible = false;
//
// btn_Close
//
@ -224,100 +165,12 @@
this.btn_Close.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn_Close.ForeColor = System.Drawing.Color.Transparent;
this.btn_Close.Image = global::PBAnaly.Properties.Resources.White;
this.btn_Close.Location = new System.Drawing.Point(1114, 0);
this.btn_Close.Location = new System.Drawing.Point(1114, -1);
this.btn_Close.Name = "btn_Close";
this.btn_Close.Size = new System.Drawing.Size(44, 32);
this.btn_Close.TabIndex = 457;
this.btn_Close.UseVisualStyleBackColor = false;
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.Location = new System.Drawing.Point(3, 3);
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.dataGridView1);
this.splitContainer1.Size = new System.Drawing.Size(1082, 637);
this.splitContainer1.SplitterDistance = 562;
this.splitContainer1.TabIndex = 0;
//
// dataGridView1
//
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false;
this.dataGridView1.AllowUserToResizeColumns = false;
this.dataGridView1.AllowUserToResizeRows = false;
this.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dataGridView1.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column1,
this.Column2,
this.Column5,
this.Column3,
this.Column4});
this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView1.Location = new System.Drawing.Point(0, 0);
this.dataGridView1.MultiSelect = false;
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.ReadOnly = true;
this.dataGridView1.RowHeadersVisible = false;
this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView1.Size = new System.Drawing.Size(562, 637);
this.dataGridView1.TabIndex = 496;
//
// Column1
//
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.Column1.DefaultCellStyle = dataGridViewCellStyle2;
this.Column1.HeaderText = "序号";
this.Column1.Name = "Column1";
this.Column1.ReadOnly = true;
this.Column1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Column2
//
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
this.Column2.DefaultCellStyle = dataGridViewCellStyle3;
this.Column2.HeaderText = "用户名";
this.Column2.Name = "Column2";
this.Column2.ReadOnly = true;
this.Column2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Column5
//
this.Column5.HeaderText = "创建人";
this.Column5.Name = "Column5";
this.Column5.ReadOnly = true;
//
// Column3
//
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.Column3.DefaultCellStyle = dataGridViewCellStyle4;
this.Column3.HeaderText = "创建时间";
this.Column3.Name = "Column3";
this.Column3.ReadOnly = true;
this.Column3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Column4
//
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.Column4.DefaultCellStyle = dataGridViewCellStyle5;
this.Column4.HeaderText = "权限";
this.Column4.Name = "Column4";
this.Column4.ReadOnly = true;
this.Column4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.btn_Close.Click += new System.EventHandler(this.btn_Close_Click);
//
// SystemSettingForm
//
@ -333,15 +186,11 @@
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "SystemSettingForm";
this.Text = "SystemSettingForm";
this.Load += new System.EventHandler(this.SystemSettingForm_Load);
this.panel1.ResumeLayout(false);
this.panel_mode.ResumeLayout(false);
this.tabMain.ResumeLayout(false);
this.tab_UserManage.ResumeLayout(false);
this.pnlMainMenu.ResumeLayout(false);
this.splitContainer1.Panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@ -355,19 +204,9 @@
private System.Windows.Forms.Button btn_Max;
private System.Windows.Forms.Button btn_Min;
private System.Windows.Forms.Panel pnlMainMenu;
private System.Windows.Forms.Button btn_ConfigManage;
private System.Windows.Forms.Button btn_ComManage;
private System.Windows.Forms.Button btn_FormatManage;
private System.Windows.Forms.Button btn_ReadManage;
private System.Windows.Forms.Panel panel_mode;
private System.Windows.Forms.TabControl tabMain;
private System.Windows.Forms.TabPage tab_UserManage;
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
}
}

View File

@ -1,9 +1,11 @@
using System;
using PBAnaly.LoginCommon;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
@ -15,6 +17,107 @@ namespace PBAnaly.UI
public SystemSettingForm()
{
InitializeComponent();
pnlMainMenu.BringToFront();
}
UserManageForm UserForm;
#region =====WndPoc方法 =========
const int HTLEFT = 10;
const int HTRIGHT = 11;
const int HTTOP = 12;
const int HTTOPLEFT = 13;
const int HTTOPRIGHT = 14;
const int HTBOTTOM = 15;
const int HTBOTTOMLEFT = 0x10;
const int HTBOTTOMRIGHT = 17;
protected override void WndProc(ref System.Windows.Forms.Message m)
{
try
{
switch (m.Msg)
{
case 0x0084:
base.WndProc(ref m);
System.Drawing.Point vPoint = new System.Drawing.Point((int)m.LParam & 0xFFFF, (int)m.LParam >> 16 & 0xFFFF);
vPoint = PointToClient(vPoint);
if (vPoint.X <= 5)
{
if (vPoint.Y <= 5)
{
m.Result = (IntPtr)HTTOPLEFT;
}
else if (vPoint.Y >= ClientSize.Height - 5)
{
m.Result = (IntPtr)HTBOTTOMLEFT;
}
else
{
m.Result = (IntPtr)HTLEFT;
}
}
else if (vPoint.X >= ClientSize.Width - 5)
{
if (vPoint.Y <= 5)
{
m.Result = (IntPtr)HTTOPRIGHT;
}
else if (vPoint.Y >= ClientSize.Height - 5)
{
m.Result = (IntPtr)HTBOTTOMRIGHT;
}
else
{
m.Result = (IntPtr)HTRIGHT;
}
}
else if (vPoint.Y <= 5)
{
m.Result = (IntPtr)HTTOP;
}
else if (vPoint.Y >= ClientSize.Height - 5)
{
m.Result = (IntPtr)HTBOTTOM;
}
break;
case 0x0201://鼠标左键按下的消息 用于实现拖动窗口功能
m.Msg = 0x00A1;//更改消息为非客户区按下鼠标
m.LParam = IntPtr.Zero;//默认值
m.WParam = new IntPtr(2);//鼠标放在标题栏内
base.WndProc(ref m);
break;
default:
base.WndProc(ref m);
break;
}
}
catch (Exception ex)
{
//showERRORMsg($"重写WndPoc方法 无边框窗体更改大小及拖动方法发生异常,原因:{ex.Message}");
}
}
#endregion
private void btn_Close_Click(object sender, EventArgs e)
{
this.Close();
}
private void SystemSettingForm_Load(object sender, EventArgs e)
{
UserForm = new UserManageForm();
UserForm.Dock = DockStyle.Fill;
UserForm.Location = new Point(0, 0);
UserForm.TopLevel = false;
tab_UserManage.Controls.Add(UserForm);
UserForm.InitUser();
UserForm.Show();
}
}
}

View File

@ -117,19 +117,4 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>