📄 userform.vb
字号:
Imports System.Data.SqlClient
Public Class UserForm
Inherits System.Windows.Forms.Form
#Region " Windows 窗体设计器生成的代码 "
Public Sub New()
MyBase.New()
'该调用是 Windows 窗体设计器所必需的。
InitializeComponent()
'在 InitializeComponent() 调用之后添加任何初始化
End Sub
'窗体重写 dispose 以清理组件列表。
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Windows 窗体设计器所必需的
Private components As System.ComponentModel.IContainer
'注意: 以下过程是 Windows 窗体设计器所必需的
'可以使用 Windows 窗体设计器修改此过程。
'不要使用代码编辑器修改它。
Friend WithEvents lbUser As System.Windows.Forms.ListBox
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents tbName As System.Windows.Forms.TextBox
Friend WithEvents tbPwd As System.Windows.Forms.TextBox
Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
Friend WithEvents cbAdmin As System.Windows.Forms.CheckBox
Friend WithEvents cbOrder As System.Windows.Forms.CheckBox
Friend WithEvents cbOut As System.Windows.Forms.CheckBox
Friend WithEvents cbIn As System.Windows.Forms.CheckBox
Friend WithEvents cbSeek As System.Windows.Forms.CheckBox
Friend WithEvents cMenu As System.Windows.Forms.ContextMenu
Friend WithEvents btOK As System.Windows.Forms.Button
Friend WithEvents btCancel As System.Windows.Forms.Button
Friend WithEvents mItem_Add As System.Windows.Forms.MenuItem
Friend WithEvents mItem_Del As System.Windows.Forms.MenuItem
Friend WithEvents mItem_Mod As System.Windows.Forms.MenuItem
Friend WithEvents btQuit As System.Windows.Forms.Button
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents tbId As System.Windows.Forms.TextBox
Friend WithEvents tbPwd_New As System.Windows.Forms.TextBox
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents lbOper As System.Windows.Forms.Label
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.lbUser = New System.Windows.Forms.ListBox
Me.cMenu = New System.Windows.Forms.ContextMenu
Me.mItem_Add = New System.Windows.Forms.MenuItem
Me.mItem_Del = New System.Windows.Forms.MenuItem
Me.mItem_Mod = New System.Windows.Forms.MenuItem
Me.GroupBox1 = New System.Windows.Forms.GroupBox
Me.lbOper = New System.Windows.Forms.Label
Me.Label4 = New System.Windows.Forms.Label
Me.tbId = New System.Windows.Forms.TextBox
Me.Label5 = New System.Windows.Forms.Label
Me.btQuit = New System.Windows.Forms.Button
Me.btCancel = New System.Windows.Forms.Button
Me.GroupBox2 = New System.Windows.Forms.GroupBox
Me.cbSeek = New System.Windows.Forms.CheckBox
Me.cbOut = New System.Windows.Forms.CheckBox
Me.cbIn = New System.Windows.Forms.CheckBox
Me.cbOrder = New System.Windows.Forms.CheckBox
Me.cbAdmin = New System.Windows.Forms.CheckBox
Me.tbPwd_New = New System.Windows.Forms.TextBox
Me.Label3 = New System.Windows.Forms.Label
Me.tbPwd = New System.Windows.Forms.TextBox
Me.Label2 = New System.Windows.Forms.Label
Me.tbName = New System.Windows.Forms.TextBox
Me.Label1 = New System.Windows.Forms.Label
Me.btOK = New System.Windows.Forms.Button
Me.GroupBox1.SuspendLayout()
Me.GroupBox2.SuspendLayout()
Me.SuspendLayout()
'
'lbUser
'
Me.lbUser.ContextMenu = Me.cMenu
Me.lbUser.ItemHeight = 12
Me.lbUser.Location = New System.Drawing.Point(24, 16)
Me.lbUser.Name = "lbUser"
Me.lbUser.Size = New System.Drawing.Size(120, 280)
Me.lbUser.TabIndex = 0
'
'cMenu
'
Me.cMenu.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mItem_Add, Me.mItem_Del, Me.mItem_Mod})
'
'mItem_Add
'
Me.mItem_Add.Index = 0
Me.mItem_Add.Text = "增加用户"
'
'mItem_Del
'
Me.mItem_Del.Index = 1
Me.mItem_Del.Text = "删除用户"
'
'mItem_Mod
'
Me.mItem_Mod.Index = 2
Me.mItem_Mod.Text = "修改用户"
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.lbOper)
Me.GroupBox1.Controls.Add(Me.Label4)
Me.GroupBox1.Controls.Add(Me.tbId)
Me.GroupBox1.Controls.Add(Me.Label5)
Me.GroupBox1.Controls.Add(Me.btQuit)
Me.GroupBox1.Controls.Add(Me.btCancel)
Me.GroupBox1.Controls.Add(Me.GroupBox2)
Me.GroupBox1.Controls.Add(Me.tbPwd_New)
Me.GroupBox1.Controls.Add(Me.Label3)
Me.GroupBox1.Controls.Add(Me.tbPwd)
Me.GroupBox1.Controls.Add(Me.Label2)
Me.GroupBox1.Controls.Add(Me.tbName)
Me.GroupBox1.Controls.Add(Me.Label1)
Me.GroupBox1.Controls.Add(Me.btOK)
Me.GroupBox1.Location = New System.Drawing.Point(152, 8)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(224, 296)
Me.GroupBox1.TabIndex = 1
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "用户详细资料"
'
'lbOper
'
Me.lbOper.Location = New System.Drawing.Point(88, 16)
Me.lbOper.Name = "lbOper"
Me.lbOper.TabIndex = 14
Me.lbOper.Text = "无"
Me.lbOper.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'Label4
'
Me.Label4.Location = New System.Drawing.Point(16, 16)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(64, 23)
Me.Label4.TabIndex = 13
Me.Label4.Text = "当前操作"
Me.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'tbId
'
Me.tbId.Location = New System.Drawing.Point(88, 48)
Me.tbId.Name = "tbId"
Me.tbId.TabIndex = 12
Me.tbId.Text = ""
'
'Label5
'
Me.Label5.Location = New System.Drawing.Point(16, 48)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(64, 23)
Me.Label5.TabIndex = 11
Me.Label5.Text = "用户ID"
Me.Label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'btQuit
'
Me.btQuit.DialogResult = System.Windows.Forms.DialogResult.Cancel
Me.btQuit.Location = New System.Drawing.Point(152, 272)
Me.btQuit.Name = "btQuit"
Me.btQuit.Size = New System.Drawing.Size(50, 23)
Me.btQuit.TabIndex = 10
Me.btQuit.Text = "退出"
'
'btCancel
'
Me.btCancel.Location = New System.Drawing.Point(88, 272)
Me.btCancel.Name = "btCancel"
Me.btCancel.Size = New System.Drawing.Size(50, 23)
Me.btCancel.TabIndex = 9
Me.btCancel.Text = "取消"
'
'GroupBox2
'
Me.GroupBox2.Controls.Add(Me.cbSeek)
Me.GroupBox2.Controls.Add(Me.cbOut)
Me.GroupBox2.Controls.Add(Me.cbIn)
Me.GroupBox2.Controls.Add(Me.cbOrder)
Me.GroupBox2.Controls.Add(Me.cbAdmin)
Me.GroupBox2.Location = New System.Drawing.Point(8, 176)
Me.GroupBox2.Name = "GroupBox2"
Me.GroupBox2.Size = New System.Drawing.Size(208, 96)
Me.GroupBox2.TabIndex = 8
Me.GroupBox2.TabStop = False
Me.GroupBox2.Text = "权限管理"
'
'cbSeek
'
Me.cbSeek.Location = New System.Drawing.Point(112, 64)
Me.cbSeek.Name = "cbSeek"
Me.cbSeek.Size = New System.Drawing.Size(80, 24)
Me.cbSeek.TabIndex = 4
Me.cbSeek.Text = "查询"
'
'cbOut
'
Me.cbOut.Location = New System.Drawing.Point(16, 64)
Me.cbOut.Name = "cbOut"
Me.cbOut.Size = New System.Drawing.Size(80, 24)
Me.cbOut.TabIndex = 3
Me.cbOut.Text = "出库管理"
'
'cbIn
'
Me.cbIn.Location = New System.Drawing.Point(112, 40)
Me.cbIn.Name = "cbIn"
Me.cbIn.Size = New System.Drawing.Size(80, 24)
Me.cbIn.TabIndex = 2
Me.cbIn.Text = "入库管理"
'
'cbOrder
'
Me.cbOrder.Location = New System.Drawing.Point(16, 40)
Me.cbOrder.Name = "cbOrder"
Me.cbOrder.Size = New System.Drawing.Size(80, 24)
Me.cbOrder.TabIndex = 1
Me.cbOrder.Text = "订单管理"
'
'cbAdmin
'
Me.cbAdmin.Location = New System.Drawing.Point(16, 17)
Me.cbAdmin.Name = "cbAdmin"
Me.cbAdmin.Size = New System.Drawing.Size(80, 24)
Me.cbAdmin.TabIndex = 0
Me.cbAdmin.Text = "管理员"
'
'tbPwd_New
'
Me.tbPwd_New.Location = New System.Drawing.Point(88, 144)
Me.tbPwd_New.Name = "tbPwd_New"
Me.tbPwd_New.PasswordChar = Microsoft.VisualBasic.ChrW(42)
Me.tbPwd_New.TabIndex = 5
Me.tbPwd_New.Text = ""
'
'Label3
'
Me.Label3.Location = New System.Drawing.Point(16, 144)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(64, 23)
Me.Label3.TabIndex = 4
Me.Label3.Text = "新密码"
Me.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'tbPwd
'
Me.tbPwd.Location = New System.Drawing.Point(88, 112)
Me.tbPwd.Name = "tbPwd"
Me.tbPwd.PasswordChar = Microsoft.VisualBasic.ChrW(42)
Me.tbPwd.TabIndex = 3
Me.tbPwd.Text = ""
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(16, 112)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(64, 23)
Me.Label2.TabIndex = 2
Me.Label2.Text = "密码"
Me.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'tbName
'
Me.tbName.Location = New System.Drawing.Point(88, 80)
Me.tbName.Name = "tbName"
Me.tbName.TabIndex = 1
Me.tbName.Text = ""
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(16, 80)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(64, 23)
Me.Label1.TabIndex = 0
Me.Label1.Text = "用户名"
Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'btOK
'
Me.btOK.DialogResult = System.Windows.Forms.DialogResult.OK
Me.btOK.Location = New System.Drawing.Point(24, 272)
Me.btOK.Name = "btOK"
Me.btOK.Size = New System.Drawing.Size(50, 23)
Me.btOK.TabIndex = 2
Me.btOK.Text = "确定"
'
'UserForm
'
Me.AcceptButton = Me.btOK
Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
Me.CancelButton = Me.btQuit
Me.ClientSize = New System.Drawing.Size(392, 308)
Me.Controls.Add(Me.GroupBox1)
Me.Controls.Add(Me.lbUser)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
Me.MaximizeBox = False
Me.Name = "UserForm"
Me.StartPosition = System.Windows.Forms.FormStartPosition.Manual
Me.Text = "用户管理"
Me.GroupBox1.ResumeLayout(False)
Me.GroupBox2.ResumeLayout(False)
Me.ResumeLayout(False)
End Sub
#End Region
Private Oper As String = String.Empty
Private Sub UserForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.BindLb()
Me.SetEnable(New Int16() {0, 0})
End Sub
Private Sub mItem_Add_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mItem_Add.Click
Me.Oper = "Add"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -