Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
688 lines
24 KiB
VB.net
688 lines
24 KiB
VB.net
Imports System.Net
|
||
Imports System.Text
|
||
|
||
Public Class AdminInfo
|
||
Inherits System.Windows.Forms.Form
|
||
|
||
#Region " Windows Form Designer generated code "
|
||
|
||
Public Sub New()
|
||
MyBase.New()
|
||
|
||
'This call is required by the Windows Form Designer.
|
||
InitializeComponent()
|
||
|
||
'Add any initialization after the InitializeComponent() call
|
||
|
||
End Sub
|
||
|
||
'Form overrides dispose to clean up the component list.
|
||
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
|
||
|
||
'Required by the Windows Form Designer
|
||
Private components As System.ComponentModel.IContainer
|
||
|
||
'NOTE: The following procedure is required by the Windows Form Designer
|
||
'It can be modified using the Windows Form Designer.
|
||
'Do not modify it using the code editor.
|
||
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
|
||
Friend WithEvents cboSearchType As System.Windows.Forms.ComboBox
|
||
Friend WithEvents txtId As System.Windows.Forms.TextBox
|
||
Friend WithEvents btnSearch As System.Windows.Forms.Button
|
||
Friend WithEvents grdResult As System.Windows.Forms.DataGrid
|
||
Friend WithEvents grboxEdit As System.Windows.Forms.GroupBox
|
||
Friend WithEvents txtAdminid As System.Windows.Forms.TextBox
|
||
Friend WithEvents txtPass As System.Windows.Forms.TextBox
|
||
Friend WithEvents txtPass2 As System.Windows.Forms.TextBox
|
||
Friend WithEvents txtName As System.Windows.Forms.TextBox
|
||
Friend WithEvents txtip1 As System.Windows.Forms.TextBox
|
||
Friend WithEvents Label8 As System.Windows.Forms.Label
|
||
Friend WithEvents Label9 As System.Windows.Forms.Label
|
||
Friend WithEvents Label10 As System.Windows.Forms.Label
|
||
Friend WithEvents txtip2 As System.Windows.Forms.TextBox
|
||
Friend WithEvents txtip3 As System.Windows.Forms.TextBox
|
||
Friend WithEvents txtip4 As System.Windows.Forms.TextBox
|
||
Friend WithEvents cboAdminKind As System.Windows.Forms.ComboBox
|
||
Friend WithEvents btnAdminReg As System.Windows.Forms.Button
|
||
Friend WithEvents btnAdminAdd As System.Windows.Forms.Button
|
||
Friend WithEvents btnDelete As System.Windows.Forms.Button
|
||
Friend WithEvents btnEdit As System.Windows.Forms.Button
|
||
Friend WithEvents Button1 As System.Windows.Forms.Button
|
||
Friend WithEvents lbltitle As System.Windows.Forms.Label
|
||
Friend WithEvents lblip As System.Windows.Forms.Label
|
||
Friend WithEvents lblrights As System.Windows.Forms.Label
|
||
Friend WithEvents lblname As System.Windows.Forms.Label
|
||
Friend WithEvents lblpass2 As System.Windows.Forms.Label
|
||
Friend WithEvents lblpass As System.Windows.Forms.Label
|
||
Friend WithEvents lbladminid As System.Windows.Forms.Label
|
||
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
|
||
Me.lbltitle = New System.Windows.Forms.Label()
|
||
Me.grdResult = New System.Windows.Forms.DataGrid()
|
||
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
|
||
Me.btnSearch = New System.Windows.Forms.Button()
|
||
Me.txtId = New System.Windows.Forms.TextBox()
|
||
Me.cboSearchType = New System.Windows.Forms.ComboBox()
|
||
Me.btnAdminAdd = New System.Windows.Forms.Button()
|
||
Me.btnDelete = New System.Windows.Forms.Button()
|
||
Me.grboxEdit = New System.Windows.Forms.GroupBox()
|
||
Me.Button1 = New System.Windows.Forms.Button()
|
||
Me.btnEdit = New System.Windows.Forms.Button()
|
||
Me.cboAdminKind = New System.Windows.Forms.ComboBox()
|
||
Me.txtip4 = New System.Windows.Forms.TextBox()
|
||
Me.txtip3 = New System.Windows.Forms.TextBox()
|
||
Me.txtip2 = New System.Windows.Forms.TextBox()
|
||
Me.Label10 = New System.Windows.Forms.Label()
|
||
Me.Label9 = New System.Windows.Forms.Label()
|
||
Me.Label8 = New System.Windows.Forms.Label()
|
||
Me.txtip1 = New System.Windows.Forms.TextBox()
|
||
Me.txtName = New System.Windows.Forms.TextBox()
|
||
Me.txtPass2 = New System.Windows.Forms.TextBox()
|
||
Me.txtPass = New System.Windows.Forms.TextBox()
|
||
Me.txtAdminid = New System.Windows.Forms.TextBox()
|
||
Me.lblip = New System.Windows.Forms.Label()
|
||
Me.lblrights = New System.Windows.Forms.Label()
|
||
Me.lblname = New System.Windows.Forms.Label()
|
||
Me.lblpass2 = New System.Windows.Forms.Label()
|
||
Me.lblpass = New System.Windows.Forms.Label()
|
||
Me.lbladminid = New System.Windows.Forms.Label()
|
||
Me.btnAdminReg = New System.Windows.Forms.Button()
|
||
CType(Me.grdResult, System.ComponentModel.ISupportInitialize).BeginInit()
|
||
Me.GroupBox1.SuspendLayout()
|
||
Me.grboxEdit.SuspendLayout()
|
||
Me.SuspendLayout()
|
||
'
|
||
'lbltitle
|
||
'
|
||
Me.lbltitle.AutoSize = True
|
||
Me.lbltitle.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||
Me.lbltitle.Font = New System.Drawing.Font("GulimChe", 14.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
|
||
Me.lbltitle.Location = New System.Drawing.Point(400, 40)
|
||
Me.lbltitle.Name = "lbltitle"
|
||
Me.lbltitle.Size = New System.Drawing.Size(118, 24)
|
||
Me.lbltitle.TabIndex = 0
|
||
Me.lbltitle.Text = "<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||
'
|
||
'grdResult
|
||
'
|
||
Me.grdResult.DataMember = ""
|
||
Me.grdResult.HeaderForeColor = System.Drawing.SystemColors.ControlText
|
||
Me.grdResult.Location = New System.Drawing.Point(48, 336)
|
||
Me.grdResult.Name = "grdResult"
|
||
Me.grdResult.Size = New System.Drawing.Size(712, 256)
|
||
Me.grdResult.TabIndex = 1
|
||
'
|
||
'GroupBox1
|
||
'
|
||
Me.GroupBox1.Controls.AddRange(New System.Windows.Forms.Control() {Me.btnSearch, Me.txtId, Me.cboSearchType})
|
||
Me.GroupBox1.Location = New System.Drawing.Point(48, 88)
|
||
Me.GroupBox1.Name = "GroupBox1"
|
||
Me.GroupBox1.Size = New System.Drawing.Size(336, 56)
|
||
Me.GroupBox1.TabIndex = 2
|
||
Me.GroupBox1.TabStop = False
|
||
'
|
||
'btnSearch
|
||
'
|
||
Me.btnSearch.Location = New System.Drawing.Point(240, 24)
|
||
Me.btnSearch.Name = "btnSearch"
|
||
Me.btnSearch.Size = New System.Drawing.Size(72, 24)
|
||
Me.btnSearch.TabIndex = 2
|
||
Me.btnSearch.Text = "ã<EFBFBD><EFBFBD>"
|
||
'
|
||
'txtId
|
||
'
|
||
Me.txtId.Location = New System.Drawing.Point(128, 24)
|
||
Me.txtId.Name = "txtId"
|
||
Me.txtId.Size = New System.Drawing.Size(104, 21)
|
||
Me.txtId.TabIndex = 1
|
||
Me.txtId.Text = ""
|
||
'
|
||
'cboSearchType
|
||
'
|
||
Me.cboSearchType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||
Me.cboSearchType.Location = New System.Drawing.Point(24, 24)
|
||
Me.cboSearchType.Name = "cboSearchType"
|
||
Me.cboSearchType.Size = New System.Drawing.Size(96, 20)
|
||
Me.cboSearchType.TabIndex = 0
|
||
'
|
||
'btnAdminAdd
|
||
'
|
||
Me.btnAdminAdd.Location = New System.Drawing.Point(600, 104)
|
||
Me.btnAdminAdd.Name = "btnAdminAdd"
|
||
Me.btnAdminAdd.Size = New System.Drawing.Size(72, 40)
|
||
Me.btnAdminAdd.TabIndex = 3
|
||
Me.btnAdminAdd.Text = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||
'
|
||
'btnDelete
|
||
'
|
||
Me.btnDelete.Location = New System.Drawing.Point(688, 104)
|
||
Me.btnDelete.Name = "btnDelete"
|
||
Me.btnDelete.Size = New System.Drawing.Size(72, 40)
|
||
Me.btnDelete.TabIndex = 4
|
||
Me.btnDelete.Text = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||
'
|
||
'grboxEdit
|
||
'
|
||
Me.grboxEdit.Controls.AddRange(New System.Windows.Forms.Control() {Me.Button1, Me.btnEdit, Me.cboAdminKind, Me.txtip4, Me.txtip3, Me.txtip2, Me.Label10, Me.Label9, Me.Label8, Me.txtip1, Me.txtName, Me.txtPass2, Me.txtPass, Me.txtAdminid, Me.lblip, Me.lblrights, Me.lblname, Me.lblpass2, Me.lblpass, Me.lbladminid, Me.btnAdminReg})
|
||
Me.grboxEdit.Location = New System.Drawing.Point(48, 152)
|
||
Me.grboxEdit.Name = "grboxEdit"
|
||
Me.grboxEdit.Size = New System.Drawing.Size(712, 168)
|
||
Me.grboxEdit.TabIndex = 5
|
||
Me.grboxEdit.TabStop = False
|
||
'
|
||
'Button1
|
||
'
|
||
Me.Button1.Location = New System.Drawing.Point(456, 40)
|
||
Me.Button1.Name = "Button1"
|
||
Me.Button1.Size = New System.Drawing.Size(72, 32)
|
||
Me.Button1.TabIndex = 23
|
||
Me.Button1.Text = "<EFBFBD><EFBFBD><EFBFBD>Ѽ<EFBFBD><EFBFBD><EFBFBD>"
|
||
'
|
||
'btnEdit
|
||
'
|
||
Me.btnEdit.Location = New System.Drawing.Point(552, 112)
|
||
Me.btnEdit.Name = "btnEdit"
|
||
Me.btnEdit.Size = New System.Drawing.Size(64, 40)
|
||
Me.btnEdit.TabIndex = 22
|
||
Me.btnEdit.Text = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||
'
|
||
'cboAdminKind
|
||
'
|
||
Me.cboAdminKind.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||
Me.cboAdminKind.Location = New System.Drawing.Point(320, 48)
|
||
Me.cboAdminKind.Name = "cboAdminKind"
|
||
Me.cboAdminKind.Size = New System.Drawing.Size(112, 20)
|
||
Me.cboAdminKind.TabIndex = 19
|
||
'
|
||
'txtip4
|
||
'
|
||
Me.txtip4.Location = New System.Drawing.Point(488, 112)
|
||
Me.txtip4.Name = "txtip4"
|
||
Me.txtip4.Size = New System.Drawing.Size(48, 21)
|
||
Me.txtip4.TabIndex = 17
|
||
Me.txtip4.Text = ""
|
||
'
|
||
'txtip3
|
||
'
|
||
Me.txtip3.Location = New System.Drawing.Point(432, 112)
|
||
Me.txtip3.Name = "txtip3"
|
||
Me.txtip3.Size = New System.Drawing.Size(48, 21)
|
||
Me.txtip3.TabIndex = 16
|
||
Me.txtip3.Text = ""
|
||
'
|
||
'txtip2
|
||
'
|
||
Me.txtip2.Location = New System.Drawing.Point(376, 112)
|
||
Me.txtip2.Name = "txtip2"
|
||
Me.txtip2.Size = New System.Drawing.Size(48, 21)
|
||
Me.txtip2.TabIndex = 15
|
||
Me.txtip2.Text = ""
|
||
'
|
||
'Label10
|
||
'
|
||
Me.Label10.AutoSize = True
|
||
Me.Label10.Location = New System.Drawing.Point(480, 120)
|
||
Me.Label10.Name = "Label10"
|
||
Me.Label10.Size = New System.Drawing.Size(9, 14)
|
||
Me.Label10.TabIndex = 14
|
||
Me.Label10.Text = "."
|
||
'
|
||
'Label9
|
||
'
|
||
Me.Label9.AutoSize = True
|
||
Me.Label9.Location = New System.Drawing.Point(424, 120)
|
||
Me.Label9.Name = "Label9"
|
||
Me.Label9.Size = New System.Drawing.Size(9, 14)
|
||
Me.Label9.TabIndex = 13
|
||
Me.Label9.Text = "."
|
||
'
|
||
'Label8
|
||
'
|
||
Me.Label8.AutoSize = True
|
||
Me.Label8.Location = New System.Drawing.Point(368, 120)
|
||
Me.Label8.Name = "Label8"
|
||
Me.Label8.Size = New System.Drawing.Size(9, 14)
|
||
Me.Label8.TabIndex = 12
|
||
Me.Label8.Text = "."
|
||
'
|
||
'txtip1
|
||
'
|
||
Me.txtip1.Location = New System.Drawing.Point(320, 112)
|
||
Me.txtip1.Name = "txtip1"
|
||
Me.txtip1.Size = New System.Drawing.Size(48, 21)
|
||
Me.txtip1.TabIndex = 11
|
||
Me.txtip1.Text = ""
|
||
'
|
||
'txtName
|
||
'
|
||
Me.txtName.Location = New System.Drawing.Point(96, 112)
|
||
Me.txtName.Name = "txtName"
|
||
Me.txtName.Size = New System.Drawing.Size(120, 21)
|
||
Me.txtName.TabIndex = 9
|
||
Me.txtName.Text = ""
|
||
'
|
||
'txtPass2
|
||
'
|
||
Me.txtPass2.Location = New System.Drawing.Point(320, 80)
|
||
Me.txtPass2.Name = "txtPass2"
|
||
Me.txtPass2.PasswordChar = Microsoft.VisualBasic.ChrW(42)
|
||
Me.txtPass2.Size = New System.Drawing.Size(121, 21)
|
||
Me.txtPass2.TabIndex = 8
|
||
Me.txtPass2.Text = ""
|
||
'
|
||
'txtPass
|
||
'
|
||
Me.txtPass.Location = New System.Drawing.Point(96, 80)
|
||
Me.txtPass.Name = "txtPass"
|
||
Me.txtPass.PasswordChar = Microsoft.VisualBasic.ChrW(42)
|
||
Me.txtPass.Size = New System.Drawing.Size(120, 21)
|
||
Me.txtPass.TabIndex = 7
|
||
Me.txtPass.Text = ""
|
||
'
|
||
'txtAdminid
|
||
'
|
||
Me.txtAdminid.Location = New System.Drawing.Point(96, 48)
|
||
Me.txtAdminid.Name = "txtAdminid"
|
||
Me.txtAdminid.Size = New System.Drawing.Size(120, 21)
|
||
Me.txtAdminid.TabIndex = 6
|
||
Me.txtAdminid.Text = ""
|
||
'
|
||
'lblip
|
||
'
|
||
Me.lblip.AutoSize = True
|
||
Me.lblip.Location = New System.Drawing.Point(267, 117)
|
||
Me.lblip.Name = "lblip"
|
||
Me.lblip.Size = New System.Drawing.Size(42, 14)
|
||
Me.lblip.TabIndex = 5
|
||
Me.lblip.Text = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||
'
|
||
'lblrights
|
||
'
|
||
Me.lblrights.AutoSize = True
|
||
Me.lblrights.Location = New System.Drawing.Point(278, 52)
|
||
Me.lblrights.Name = "lblrights"
|
||
Me.lblrights.Size = New System.Drawing.Size(52, 14)
|
||
Me.lblrights.TabIndex = 4
|
||
Me.lblrights.Text = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ddd"
|
||
'
|
||
'lblname
|
||
'
|
||
Me.lblname.AutoSize = True
|
||
Me.lblname.Location = New System.Drawing.Point(48, 112)
|
||
Me.lblname.Name = "lblname"
|
||
Me.lblname.Size = New System.Drawing.Size(29, 14)
|
||
Me.lblname.TabIndex = 3
|
||
Me.lblname.Text = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||
'
|
||
'lblpass2
|
||
'
|
||
Me.lblpass2.AutoSize = True
|
||
Me.lblpass2.Location = New System.Drawing.Point(233, 85)
|
||
Me.lblpass2.Name = "lblpass2"
|
||
Me.lblpass2.Size = New System.Drawing.Size(79, 14)
|
||
Me.lblpass2.TabIndex = 2
|
||
Me.lblpass2.Text = "<EFBFBD>н<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȯ<EFBFBD><EFBFBD>"
|
||
'
|
||
'lblpass
|
||
'
|
||
Me.lblpass.AutoSize = True
|
||
Me.lblpass.Location = New System.Drawing.Point(24, 80)
|
||
Me.lblpass.Name = "lblpass"
|
||
Me.lblpass.Size = New System.Drawing.Size(54, 14)
|
||
Me.lblpass.TabIndex = 1
|
||
Me.lblpass.Text = "<EFBFBD>н<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||
'
|
||
'lbladminid
|
||
'
|
||
Me.lbladminid.AutoSize = True
|
||
Me.lbladminid.Location = New System.Drawing.Point(32, 48)
|
||
Me.lbladminid.Name = "lbladminid"
|
||
Me.lbladminid.Size = New System.Drawing.Size(69, 14)
|
||
Me.lbladminid.TabIndex = 0
|
||
Me.lbladminid.Text = "<EFBFBD><EFBFBD><EFBFBD>IDdd"
|
||
'
|
||
'btnAdminReg
|
||
'
|
||
Me.btnAdminReg.Location = New System.Drawing.Point(640, 112)
|
||
Me.btnAdminReg.Name = "btnAdminReg"
|
||
Me.btnAdminReg.Size = New System.Drawing.Size(64, 40)
|
||
Me.btnAdminReg.TabIndex = 21
|
||
Me.btnAdminReg.Text = "ID <20><><EFBFBD><EFBFBD>"
|
||
'
|
||
'AdminInfo
|
||
'
|
||
Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
|
||
Me.ClientSize = New System.Drawing.Size(1028, 753)
|
||
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.grboxEdit, Me.GroupBox1, Me.grdResult, Me.lbltitle, Me.btnDelete, Me.btnAdminAdd})
|
||
Me.Name = "AdminInfo"
|
||
Me.Text = "<EFBFBD><EFBFBD>ڰ<EFBFBD><EFBFBD><EFBFBD>"
|
||
CType(Me.grdResult, System.ComponentModel.ISupportInitialize).EndInit()
|
||
Me.GroupBox1.ResumeLayout(False)
|
||
Me.grboxEdit.ResumeLayout(False)
|
||
Me.ResumeLayout(False)
|
||
|
||
End Sub
|
||
|
||
#End Region
|
||
|
||
|
||
Private Sub AdminInfo_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
|
||
|
||
'Dim ITextAdminInfo As New TextAdminInfo()
|
||
'Dim ITextButton As New TextButton()
|
||
'Dim ITextMSG As New TextMSG()
|
||
|
||
|
||
ProcessPacket.IAdminInfo = Me
|
||
|
||
cboSearchType.Items.Add(ITextAdminInfo.cbosearchtypeitem_total)
|
||
cboSearchType.Items.Add(ITextAdminInfo.cbosearchtypeitem_adminid)
|
||
|
||
Me.lbladminid.Text = ITextAdminInfo.admininfo_adminid
|
||
Me.lblip.Text = ITextAdminInfo.admininfo_ip
|
||
Me.lblname.Text = ITextAdminInfo.admininfo_name
|
||
Me.lblpass.Text = ITextAdminInfo.admininfo_pass
|
||
Me.lblpass2.Text = ITextAdminInfo.admininfo_pass2
|
||
Me.lblrights.Text = ITextAdminInfo.admininfo_rights
|
||
Me.lbltitle.Text = ITextAdminInfo.AdminInfo_Title
|
||
Me.Text = ITextAdminInfo.AdminInfo_Header
|
||
|
||
Me.btnAdminAdd.Text = ITextButton.btnCreate
|
||
Me.btnAdminReg.Text = ITextButton.btnCreate_Real
|
||
Me.btnDelete.Text = ITextButton.btnDelete
|
||
Me.btnEdit.Text = ITextButton.btnEdit
|
||
Me.btnSearch.Text = ITextButton.btnSearch
|
||
Me.Button1.Text = ITextButton.btnSetting
|
||
|
||
cboSearchType.SelectedIndex = 0
|
||
|
||
txtId.Visible = False
|
||
txtId.MaxLength = 15
|
||
|
||
btnAdminReg.Visible = False
|
||
lblpass2.Visible = False
|
||
txtPass2.Visible = False
|
||
|
||
txtAdminid.MaxLength = 15
|
||
txtPass.MaxLength = 15
|
||
txtName.MaxLength = 6
|
||
txtip1.MaxLength = 3
|
||
txtip2.MaxLength = 3
|
||
txtip3.MaxLength = 3
|
||
txtip4.MaxLength = 3
|
||
|
||
txtAdminid.Enabled = False
|
||
|
||
grdResult.DataSource = ds.Tables(AdminTableIndex)
|
||
|
||
End Sub
|
||
|
||
Private Sub AdminInfo_Unload(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Closed
|
||
|
||
ProcessPacket.IAdminInfo = Nothing
|
||
ProcessPacket.IRylMDI.IAdminInfo = Nothing
|
||
|
||
End Sub
|
||
|
||
'Searching...
|
||
Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSearch.Click
|
||
|
||
RefreshAdmin()
|
||
|
||
End Sub
|
||
|
||
Public Sub RefreshAdmin()
|
||
|
||
txtAdminid.Text = ""
|
||
txtip1.Text = ""
|
||
txtip2.Text = ""
|
||
txtip3.Text = ""
|
||
txtip4.Text = ""
|
||
txtPass.Text = ""
|
||
txtPass2.Text = ""
|
||
txtName.Text = ""
|
||
|
||
'<27><> <20>ʱ<EFBFBD>ȭ
|
||
cboAdminKind.Items.Clear()
|
||
|
||
txtAdminid.Enabled = False
|
||
lblpass2.Visible = False
|
||
txtPass2.Visible = False
|
||
btnAdminReg.Visible = False
|
||
btnEdit.Visible = True
|
||
'grid<69><64> <20>ʱ<EFBFBD>ȭ <20>Ѵ<EFBFBD>.
|
||
grdResult.Refresh()
|
||
|
||
btnSearch.Enabled = False
|
||
|
||
'<27><> <20>ʱ<EFBFBD>ȭ
|
||
ds.Tables(AdminTableIndex).Clear()
|
||
|
||
If cboSearchType.SelectedIndex = 1 Then
|
||
|
||
If txtId.Text = "" Then
|
||
|
||
MsgBox(ITextMSG.msg_inputadminid, MsgBoxStyle.OKOnly, ITextMSG.msg_error)
|
||
txtId.Focus()
|
||
btnSearch.Enabled = True
|
||
Exit Sub
|
||
|
||
Else
|
||
'Ư<><C6AF> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ID <20>˻<EFBFBD> <20><>Ŷ
|
||
Dim sendb(15) As Byte
|
||
Encoding.GetEncoding(Code).GetBytes(txtId.Text, 0, Min(16, txtId.Text.Length), sendb, 0)
|
||
IClientSocket.Send(3, sendb)
|
||
|
||
End If
|
||
|
||
ElseIf cboSearchType.SelectedIndex = 0 Then
|
||
|
||
'<27><>ü <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>˻<EFBFBD> <20><>Ŷ
|
||
Dim sendb(0) As Byte
|
||
IClientSocket.Send(4, sendb)
|
||
|
||
End If
|
||
|
||
btnSearch.Enabled = True
|
||
|
||
End Sub
|
||
|
||
|
||
Private Sub cboSearchType_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboSearchType.SelectedIndexChanged
|
||
|
||
If cboSearchType.SelectedIndex = 0 Then
|
||
txtId.Visible = False
|
||
ElseIf cboSearchType.SelectedIndex = 1 Then
|
||
txtId.Visible = True
|
||
End If
|
||
End Sub
|
||
|
||
'<27><EFBFBD><EEBFB5> <20><><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD> <20><>ư
|
||
Private Sub btnAdminAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdminAdd.Click
|
||
|
||
txtAdminid.Text = ""
|
||
txtip1.Text = ""
|
||
txtip2.Text = ""
|
||
txtip3.Text = ""
|
||
txtip4.Text = ""
|
||
txtPass.Text = ""
|
||
txtPass2.Text = ""
|
||
txtName.Text = ""
|
||
|
||
'<27><> <20>ʱ<EFBFBD>ȭ
|
||
cboAdminKind.Items.Clear()
|
||
|
||
cboAdminKind.Items.Add(ITextAdminInfo.cboadminkind_admin)
|
||
cboAdminKind.Items.Add(ITextAdminInfo.cboadminkind_subadmin)
|
||
cboAdminKind.Items.Add(ITextAdminInfo.cboadminkind_part)
|
||
cboAdminKind.SelectedIndex = 2
|
||
|
||
'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϲ<EFBFBD>ư Ȱ<><C8B0>ȭ<EFBFBD>ϱ<EFBFBD>
|
||
btnAdminReg.Visible = True
|
||
lblpass2.Visible = True
|
||
txtPass2.Visible = True
|
||
|
||
'<27><><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD> <20><>ư<EFBFBD><C6B0> <20><>Ȱ<EFBFBD><C8B0>ȭ<EFBFBD>Ѵ<EFBFBD>.
|
||
btnEdit.Visible = False
|
||
txtAdminid.Enabled = True
|
||
|
||
End Sub
|
||
|
||
'new adminid registering....
|
||
Private Sub btnAdminReg_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdminReg.Click
|
||
|
||
If txtAdminid.Text = "" Then
|
||
MsgBox(ITextMSG.msg_regadmin, MsgBoxStyle.OKOnly, ITextMSG.msg_error)
|
||
txtAdminid.Focus()
|
||
Exit Sub
|
||
End If
|
||
|
||
If (txtPass.Text <> txtPass2.Text) And (txtPass.Text = "") Then
|
||
MsgBox(ITextMSG.msg_passadmin, MsgBoxStyle.OKOnly, ITextMSG.msg_error)
|
||
txtPass.Focus()
|
||
Exit Sub
|
||
End If
|
||
|
||
btnAdminReg.Enabled = False
|
||
|
||
Dim ip As String
|
||
ip = Trim(txtip1.Text) + "." + Trim(txtip2.Text) + "." + Trim(txtip3.Text) + "." + Trim(txtip4.Text)
|
||
Dim AdminKind As Char
|
||
|
||
Select Case cboAdminKind.SelectedIndex
|
||
Case 0
|
||
AdminKind = "T"
|
||
Case 1
|
||
AdminKind = "M"
|
||
Case 2
|
||
AdminKind = "G"
|
||
End Select
|
||
|
||
' send packet - 56bytes
|
||
Dim sendb(55) As Byte
|
||
Encoding.GetEncoding(Code).GetBytes(txtAdminid.Text, 0, Min(16, txtAdminid.Text.Length), sendb, 0)
|
||
Encoding.GetEncoding(Code).GetBytes(txtPass.Text, 0, Min(16, txtPass.Text.Length), sendb, 16)
|
||
Encoding.GetEncoding(Code).GetBytes(ip, 0, Min(16, ip.Length), sendb, 32)
|
||
|
||
' <20>ѱ<EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||
Encoding.GetEncoding(Code).GetBytes(txtName.Text, 0, Min(16, txtName.Text.Length), sendb, 48)
|
||
sendb(55) = Asc(AdminKind)
|
||
|
||
IClientSocket.Send(2, sendb)
|
||
|
||
End Sub
|
||
|
||
'<27><EFBFBD><EEBFB5> <20><><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD>
|
||
Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click
|
||
|
||
'<27><><EFBFBD><EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD> row<6F><77> <20>ε<EFBFBD><CEB5><EFBFBD><EFBFBD><EFBFBD>ȣ(0<><30><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.)
|
||
Dim CurrentIndex As Integer
|
||
Dim DeleteYesNo As Integer
|
||
Dim DeleteAdmin As String
|
||
|
||
CurrentIndex = grdResult.CurrentRowIndex
|
||
DeleteAdmin = grdResult.Item(CurrentIndex, 0)
|
||
|
||
btnDelete.Enabled = False
|
||
DeleteYesNo = MsgBox(DeleteAdmin + " " + ITextMSG.msg_confirmdel, MsgBoxStyle.YesNo, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<><C8AE>")
|
||
|
||
If DeleteYesNo = vbYes Then
|
||
|
||
Dim sendb(15) As Byte
|
||
Encoding.GetEncoding(Code).GetBytes(DeleteAdmin, 0, Min(16, DeleteAdmin.Length), sendb, 0)
|
||
IClientSocket.Send(5, sendb)
|
||
|
||
Else
|
||
MsgBox(ITextMSG.msg_cancel, MsgBoxStyle.OKOnly, "Cancel")
|
||
End If
|
||
btnDelete.Enabled = True
|
||
End Sub
|
||
|
||
'editing...
|
||
Private Sub btnEdit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEdit.Click
|
||
|
||
If txtAdminid.Text = "" Then
|
||
MsgBox(ITextMSG.msg_confirmedit, MsgBoxStyle.OKOnly, "<EFBFBD><EFBFBD><EFBFBD>̵<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD>")
|
||
Exit Sub
|
||
End If
|
||
|
||
Dim ip As String
|
||
ip = Trim(txtip1.Text) + "." + Trim(txtip2.Text) + "." + Trim(txtip3.Text) + "." + Trim(txtip4.Text)
|
||
Dim sendb(64) As Byte
|
||
Dim AdminKind As Char
|
||
Select Case cboAdminKind.SelectedIndex
|
||
Case 0
|
||
AdminKind = "T"
|
||
Case 1
|
||
AdminKind = "M"
|
||
Case 2
|
||
AdminKind = "G"
|
||
End Select
|
||
|
||
Encoding.GetEncoding(Code).GetBytes(txtAdminid.Text, 0, Min(16, txtAdminid.Text.Length), sendb, 0)
|
||
Encoding.GetEncoding(Code).GetBytes(txtPass.Text, 0, Min(16, txtPass.Text.Length), sendb, 16)
|
||
Encoding.GetEncoding(Code).GetBytes(ip, 0, Min(16, ip.Length), sendb, 32)
|
||
Encoding.GetEncoding(Code).GetBytes(txtName.Text, 0, Min(16, txtName.Text.Length), sendb, 48)
|
||
sendb(64) = Asc(AdminKind) '1<><31><EFBFBD><EFBFBD>Ʈ
|
||
|
||
IClientSocket.Send(6, sendb)
|
||
End Sub
|
||
|
||
'<27>ش<EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
Private Sub grdResult_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles grdResult.DoubleClick
|
||
'<27><><EFBFBD><EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD> row<6F><77> <20>ε<EFBFBD><CEB5><EFBFBD><EFBFBD><EFBFBD>ȣ(0<><30><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.)
|
||
'Dim SelectedCellText As String = grdResult.Item(grdResult.CurrentCell)
|
||
Dim CurrentIndex As Integer = grdResult.CurrentRowIndex
|
||
Dim Right As String
|
||
Dim IP As String
|
||
Dim ippart(4) As String
|
||
|
||
cboAdminKind.Items.Clear()
|
||
|
||
cboAdminKind.Items.Add(ITextAdminInfo.cboadminkind_admin)
|
||
cboAdminKind.Items.Add(ITextAdminInfo.cboadminkind_subadmin)
|
||
cboAdminKind.Items.Add(ITextAdminInfo.cboadminkind_part)
|
||
|
||
|
||
'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>н<EFBFBD><D0BD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>Ǹ<EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
|
||
txtAdminid.Text = grdResult.Item(CurrentIndex, 0)
|
||
txtPass.Text = grdResult.Item(CurrentIndex, 1)
|
||
Right = grdResult.Item(CurrentIndex, 2)
|
||
txtName.Text = grdResult.Item(CurrentIndex, 3)
|
||
'IP.Split(".", 4)
|
||
IP = grdResult.Item(CurrentIndex, 4)
|
||
|
||
If Not (Trim(txtAdminid.Text) = "admin") Then
|
||
ippart = IP.Split(".", 4)
|
||
txtip1.Text = ippart(0)
|
||
txtip2.Text = ippart(1)
|
||
txtip3.Text = ippart(2)
|
||
txtip4.Text = ippart(3)
|
||
End If
|
||
|
||
If Right = "T" Then
|
||
cboAdminKind.SelectedIndex = 0 '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
ElseIf Right = "M" Then
|
||
cboAdminKind.SelectedIndex = 1 '<27>ؿ<D8BF><EEBFB5>
|
||
ElseIf Right = "G" Then
|
||
cboAdminKind.SelectedIndex = 2 '<27>Ϲݿ<DDBF><EEBFB5>
|
||
End If
|
||
|
||
'ICharBugItem.ShowDialog()
|
||
'ICharBugItem.MdiParent = IMuhonMDI
|
||
End Sub
|
||
|
||
'<27><><EFBFBD>Ѽ<EFBFBD><D1BC><EFBFBD><EFBFBD>ϱ<EFBFBD>
|
||
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
|
||
Dim IAdminSetting As New AdminSetting()
|
||
IAdminSetting.ShowDialog()
|
||
End Sub
|
||
End Class
|