?? 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 + -