📄 frmaddsuperuser.vb
字号:
'****************************************************************************
'人人为我,我为人人
'枕善居汉化收藏整理
'发布日期:2007/07/23
'描 述:网吧计费管理系统客户端/服务器端
'网 站:http://www.Mndsoft.com/ (VB6源码博客)
'网 站:http://www.VbDnet.com/ (VB.NET源码博客,主要基于.NET2005)
'e-mail :Mndsoft@163.com
'e-mail :Mndsoft@126.com
'OICQ :88382850
' 如果您有新的好的代码别忘记给枕善居哦!
'****************************************************************************
Public Class FrmAddSuperUser
Inherits System.Windows.Forms.Form
#Region " Windows 窗体设计器生成的代码 "
Public Sub New()
MyBase.New()
'该调用是 Windows 窗体设计器所必需的。
InitializeComponent()
'在 InitializeComponent() 调用之后添加任何初始化
End Sub
'窗体重写处置以清理组件列表。
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 TxtPassword As System.Windows.Forms.TextBox
Friend WithEvents TxtName As System.Windows.Forms.TextBox
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents BtCancel As System.Windows.Forms.Button
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents TxtRealName As System.Windows.Forms.TextBox
Friend WithEvents TxtMemo As System.Windows.Forms.TextBox
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents ComboModComputer As System.Windows.Forms.ComboBox
Friend WithEvents ComboModUser As System.Windows.Forms.ComboBox
Friend WithEvents BtOK As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.TxtPassword = New System.Windows.Forms.TextBox
Me.TxtName = New System.Windows.Forms.TextBox
Me.Label2 = New System.Windows.Forms.Label
Me.Label1 = New System.Windows.Forms.Label
Me.BtCancel = New System.Windows.Forms.Button
Me.BtOK = New System.Windows.Forms.Button
Me.Label3 = New System.Windows.Forms.Label
Me.TxtRealName = New System.Windows.Forms.TextBox
Me.TxtMemo = New System.Windows.Forms.TextBox
Me.Label4 = New System.Windows.Forms.Label
Me.GroupBox1 = New System.Windows.Forms.GroupBox
Me.ComboModComputer = New System.Windows.Forms.ComboBox
Me.ComboModUser = New System.Windows.Forms.ComboBox
Me.Label6 = New System.Windows.Forms.Label
Me.Label5 = New System.Windows.Forms.Label
Me.GroupBox1.SuspendLayout()
Me.SuspendLayout()
'
'TxtPassword
'
Me.TxtPassword.Location = New System.Drawing.Point(77, 53)
Me.TxtPassword.MaxLength = 10
Me.TxtPassword.Name = "TxtPassword"
Me.TxtPassword.Size = New System.Drawing.Size(120, 21)
Me.TxtPassword.TabIndex = 11
'
'TxtName
'
Me.TxtName.Location = New System.Drawing.Point(77, 15)
Me.TxtName.MaxLength = 10
Me.TxtName.Name = "TxtName"
Me.TxtName.Size = New System.Drawing.Size(120, 21)
Me.TxtName.TabIndex = 10
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(23, 57)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(48, 24)
Me.Label2.TabIndex = 9
Me.Label2.Text = "密码:"
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(15, 18)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(56, 24)
Me.Label1.TabIndex = 8
Me.Label1.Text = "用户名:"
'
'BtCancel
'
Me.BtCancel.Location = New System.Drawing.Point(218, 224)
Me.BtCancel.Name = "BtCancel"
Me.BtCancel.Size = New System.Drawing.Size(95, 24)
Me.BtCancel.TabIndex = 7
Me.BtCancel.Text = "取消"
'
'BtOK
'
Me.BtOK.Location = New System.Drawing.Point(72, 224)
Me.BtOK.Name = "BtOK"
Me.BtOK.Size = New System.Drawing.Size(92, 24)
Me.BtOK.TabIndex = 6
Me.BtOK.Text = "确定"
'
'Label3
'
Me.Label3.AutoSize = True
Me.Label3.Location = New System.Drawing.Point(216, 21)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(65, 12)
Me.Label3.TabIndex = 12
Me.Label3.Text = "真实姓名:"
'
'TxtRealName
'
Me.TxtRealName.Location = New System.Drawing.Point(287, 15)
Me.TxtRealName.Name = "TxtRealName"
Me.TxtRealName.Size = New System.Drawing.Size(120, 21)
Me.TxtRealName.TabIndex = 13
'
'TxtMemo
'
Me.TxtMemo.Location = New System.Drawing.Point(287, 56)
Me.TxtMemo.MaxLength = 10
Me.TxtMemo.Name = "TxtMemo"
Me.TxtMemo.Size = New System.Drawing.Size(120, 21)
Me.TxtMemo.TabIndex = 15
'
'Label4
'
Me.Label4.Location = New System.Drawing.Point(233, 62)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(48, 24)
Me.Label4.TabIndex = 14
Me.Label4.Text = "备注:"
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.ComboModComputer)
Me.GroupBox1.Controls.Add(Me.ComboModUser)
Me.GroupBox1.Controls.Add(Me.Label6)
Me.GroupBox1.Controls.Add(Me.Label5)
Me.GroupBox1.Location = New System.Drawing.Point(11, 97)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(398, 109)
Me.GroupBox1.TabIndex = 16
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "权限设置"
'
'ComboModComputer
'
Me.ComboModComputer.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.ComboModComputer.FormattingEnabled = True
Me.ComboModComputer.Items.AddRange(New Object() {"无权限", "可读", "可读写"})
Me.ComboModComputer.Location = New System.Drawing.Point(132, 64)
Me.ComboModComputer.Name = "ComboModComputer"
Me.ComboModComputer.Size = New System.Drawing.Size(252, 20)
Me.ComboModComputer.TabIndex = 3
'
'ComboModUser
'
Me.ComboModUser.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.ComboModUser.FormattingEnabled = True
Me.ComboModUser.Items.AddRange(New Object() {"无权限", "可读", "可读写"})
Me.ComboModUser.Location = New System.Drawing.Point(131, 28)
Me.ComboModUser.Name = "ComboModUser"
Me.ComboModUser.Size = New System.Drawing.Size(254, 20)
Me.ComboModUser.TabIndex = 2
'
'Label6
'
Me.Label6.AutoSize = True
Me.Label6.Location = New System.Drawing.Point(7, 67)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(125, 12)
Me.Label6.TabIndex = 1
Me.Label6.Text = "计算机信息管理模块:"
'
'Label5
'
Me.Label5.AutoSize = True
Me.Label5.Location = New System.Drawing.Point(17, 31)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(113, 12)
Me.Label5.TabIndex = 0
Me.Label5.Text = "用户信息管理模块:"
'
'FrmAddSuperUser
'
Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
Me.ClientSize = New System.Drawing.Size(419, 259)
Me.Controls.Add(Me.GroupBox1)
Me.Controls.Add(Me.TxtMemo)
Me.Controls.Add(Me.Label4)
Me.Controls.Add(Me.TxtRealName)
Me.Controls.Add(Me.Label3)
Me.Controls.Add(Me.TxtPassword)
Me.Controls.Add(Me.TxtName)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.BtCancel)
Me.Controls.Add(Me.BtOK)
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "FrmAddSuperUser"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
Me.Text = "添加操作员"
Me.GroupBox1.ResumeLayout(False)
Me.GroupBox1.PerformLayout()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
#End Region
Private Sub BtCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtCancel.Click
Me.Close()
End Sub
Private Sub BtOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtOK.Click
If Trim(TxtName.Text) = "" Then
MsgBox("输入的用户名不能为空!", MsgBoxStyle.Exclamation, "信息框")
Exit Sub
End If
If Trim(TxtRealName.Text) = "" Then
MsgBox("输入的用户真实姓名不能为空!", MsgBoxStyle.Exclamation, "信息框")
Exit Sub
End If
If Trim(TxtPassword.Text) = "" Then
MsgBox("输入的密码不能为空!", MsgBoxStyle.Exclamation, "信息框")
Exit Sub
End If
Dim TempUser As New ClsSuperUser(Trim(TxtName.Text), TxtPassword.Text)
TempUser.RealName = Trim(TxtRealName.Text)
TempUser.ModUser = Trim(ComboModUser.Text)
TempUser.ModComputer = Trim(ComboModComputer.Text)
TempUser.Memo = Trim(TxtMemo.Text)
NewSuperUser.AddUser(TempUser)
End Sub
Private Sub FrmAddUser_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ComboModUser.SelectedIndex = 0
ComboModComputer.SelectedIndex = 0
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -