📄 frmsaveeditcomputer.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 FrmSaveEditComputer
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
Me.TxtConfig.Text = "0"
'
'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.Enabled = False
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
'
'FrmSaveEditComputer
'
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 = "FrmSaveEditComputer"
Me.Text = "添加计算机信息"
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Private Sub FrmAddComputer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim TempComputer As New ClsComputer
TempComputer.ComputerName = Me.TxtComputerName.Text
TempComputer.GetInfo()
Me.TxtComputerName.Text = TempComputer.ComputerName
Me.TxtRoomNo.Text = TempComputer.RoomNo
Me.TxtPosNo.Text = TempComputer.PositionNo
Me.TxtConfig.Text = TempComputer.Config
Me.TxtMemo.Text = TempComputer.Memo
End Sub
Private Sub BtOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtOK.Click
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 + -