?? frmaddcomputer.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 FrmAddComputer
Friend WithEvents BtOK As System.Windows.Forms.Button
Friend WithEvents BtCancel As System.Windows.Forms.Button
Friend WithEvents TxtRoomNo As System.Windows.Forms.TextBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents TxtComputerName As System.Windows.Forms.TextBox
Friend WithEvents TxtPosNo As System.Windows.Forms.TextBox
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents TxtConfig As System.Windows.Forms.TextBox
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents Label13 As System.Windows.Forms.Label
Friend WithEvents TxtMemo As System.Windows.Forms.TextBox
Private Sub InitializeComponent()
Me.TxtMemo = New System.Windows.Forms.TextBox
Me.Label13 = New System.Windows.Forms.Label
Me.Label3 = New System.Windows.Forms.Label
Me.TxtConfig = New System.Windows.Forms.TextBox
Me.Label4 = New System.Windows.Forms.Label
Me.TxtPosNo = New System.Windows.Forms.TextBox
Me.TxtComputerName = 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.TxtRoomNo = New System.Windows.Forms.TextBox
Me.SuspendLayout()
'
'TxtMemo
'
Me.TxtMemo.Location = New System.Drawing.Point(94, 104)
Me.TxtMemo.MaxLength = 10
Me.TxtMemo.Multiline = True
Me.TxtMemo.Name = "TxtMemo"
Me.TxtMemo.Size = New System.Drawing.Size(352, 79)
Me.TxtMemo.TabIndex = 71
'
'Label13
'
Me.Label13.AutoSize = True
Me.Label13.Location = New System.Drawing.Point(37, 106)
Me.Label13.Name = "Label13"
Me.Label13.Size = New System.Drawing.Size(41, 12)
Me.Label13.TabIndex = 61
Me.Label13.Text = "備注:"
'
'Label3
'
Me.Label3.AutoSize = True
Me.Label3.Location = New System.Drawing.Point(253, 21)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(65, 12)
Me.Label3.TabIndex = 52
Me.Label3.Text = "機位編號:"
'
'TxtConfig
'
Me.TxtConfig.Location = New System.Drawing.Point(325, 58)
Me.TxtConfig.MaxLength = 3
Me.TxtConfig.Name = "TxtConfig"
Me.TxtConfig.Size = New System.Drawing.Size(120, 21)
Me.TxtConfig.TabIndex = 50
'
'Label4
'
Me.Label4.AutoSize = True
Me.Label4.Location = New System.Drawing.Point(241, 61)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(77, 12)
Me.Label4.TabIndex = 49
Me.Label4.Text = "計算機配置:"
'
'TxtPosNo
'
Me.TxtPosNo.Location = New System.Drawing.Point(94, 58)
Me.TxtPosNo.MaxLength = 10
Me.TxtPosNo.Name = "TxtPosNo"
Me.TxtPosNo.Size = New System.Drawing.Size(121, 21)
Me.TxtPosNo.TabIndex = 48
'
'TxtComputerName
'
Me.TxtComputerName.Location = New System.Drawing.Point(94, 18)
Me.TxtComputerName.MaxLength = 20
Me.TxtComputerName.Name = "TxtComputerName"
Me.TxtComputerName.Size = New System.Drawing.Size(121, 21)
Me.TxtComputerName.TabIndex = 47
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(28, 62)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(65, 12)
Me.Label2.TabIndex = 46
Me.Label2.Text = "機房編號:"
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(14, 16)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(77, 24)
Me.Label1.TabIndex = 45
Me.Label1.Text = "計算機名稱:" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "(MAC地址)"
'
'BtCancel
'
Me.BtCancel.Location = New System.Drawing.Point(277, 207)
Me.BtCancel.Name = "BtCancel"
Me.BtCancel.Size = New System.Drawing.Size(90, 27)
Me.BtCancel.TabIndex = 44
Me.BtCancel.Text = "取消"
'
'BtOK
'
Me.BtOK.Location = New System.Drawing.Point(123, 207)
Me.BtOK.Name = "BtOK"
Me.BtOK.Size = New System.Drawing.Size(92, 27)
Me.BtOK.TabIndex = 43
Me.BtOK.Text = "確定"
'
'TxtRoomNo
'
Me.TxtRoomNo.Location = New System.Drawing.Point(325, 18)
Me.TxtRoomNo.MaxLength = 10
Me.TxtRoomNo.Name = "TxtRoomNo"
Me.TxtRoomNo.Size = New System.Drawing.Size(121, 21)
Me.TxtRoomNo.TabIndex = 72
'
'FrmAddComputer
'
Me.ClientSize = New System.Drawing.Size(474, 251)
Me.Controls.Add(Me.TxtRoomNo)
Me.Controls.Add(Me.TxtMemo)
Me.Controls.Add(Me.Label13)
Me.Controls.Add(Me.Label3)
Me.Controls.Add(Me.TxtConfig)
Me.Controls.Add(Me.Label4)
Me.Controls.Add(Me.TxtPosNo)
Me.Controls.Add(Me.TxtComputerName)
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 = "FrmAddComputer"
Me.Text = "添加計算機信息"
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Private Sub BtOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtOK.Click
If Trim(TxtComputerName.Text) = "" Then
MsgBox("輸入的計算機名不能為空!", MsgBoxStyle.Exclamation, Me.Text)
Exit Sub
End If
If Trim(TxtPosNo.Text) = "" Then
MsgBox("輸入的房間編號不能為空!", MsgBoxStyle.Exclamation, Me.Text)
Exit Sub
End If
If Trim(TxtPosNo.Text) = "" Then
MsgBox("輸入的機位編號不能為空!", MsgBoxStyle.Exclamation, Me.Text)
Exit Sub
End If
Dim TempComputer As New ClsComputer
TempComputer.ComputerName = Me.TxtComputerName.Text
TempComputer.RoomNo = Me.TxtRoomNo.Text
TempComputer.PositionNo = Me.TxtPosNo.Text
TempComputer.Config = Me.TxtConfig.Text
TempComputer.Memo = Me.TxtMemo.Text
TempComputer.AddComputer()
End Sub
Private Sub BtCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtCancel.Click
Me.Close()
End Sub
End Class
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -