Files
Client/Server/ToolProject/RCMS_Tool/AdminInfo.vb
LGram16 dd97ddec92 Restructure repository to include all source folders
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>
2025-11-29 20:17:20 +09:00

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 = "운영자 관리"
'
'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 = "찾기"
'
'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 = "등록"
'
'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 = "삭제"
'
'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 = "권한설정"
'
'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 = "정보수정"
'
'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 = "아이피"
'
'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 = "권한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 = "성명"
'
'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 = "패스워드확인"
'
'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 = "패스워드"
'
'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 = "운영자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 등록"
'
'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 = "운영자관리"
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 = ""
'값 초기화
cboAdminKind.Items.Clear()
txtAdminid.Enabled = False
lblpass2.Visible = False
txtPass2.Visible = False
btnAdminReg.Visible = False
btnEdit.Visible = True
'grid를 초기화 한다.
grdResult.Refresh()
btnSearch.Enabled = False
'값 초기화
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
'특정 관리자 ID 검색 패킷
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
'전체 관리자 검색 패킷
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
'운영자 등록하기 버튼
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 = ""
'값 초기화
cboAdminKind.Items.Clear()
cboAdminKind.Items.Add(ITextAdminInfo.cboadminkind_admin)
cboAdminKind.Items.Add(ITextAdminInfo.cboadminkind_subadmin)
cboAdminKind.Items.Add(ITextAdminInfo.cboadminkind_part)
cboAdminKind.SelectedIndex = 2
'실제등록버튼 활성화하기
btnAdminReg.Visible = True
lblpass2.Visible = True
txtPass2.Visible = True
'수정하기 버튼을 비활성화한다.
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)
' 한글 처리시 다음과 같이 사용
Encoding.GetEncoding(Code).GetBytes(txtName.Text, 0, Min(16, txtName.Text.Length), sendb, 48)
sendb(55) = Asc(AdminKind)
IClientSocket.Send(2, sendb)
End Sub
'운영자 삭제하기
Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click
'현재 클릭된 row의 인덱스번호(0부터 시작한다.)
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, "삭제전 확인")
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, "아이디선택하기")
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바이트
IClientSocket.Send(6, sendb)
End Sub
'해당 컬럼을 클릭했을때
Private Sub grdResult_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles grdResult.DoubleClick
'현재 클릭된 row의 인덱스번호(0부터 시작한다.)
'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)
'계정명,패스워드,아이피,실명,권한,등록일자
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 '관리자
ElseIf Right = "M" Then
cboAdminKind.SelectedIndex = 1 '준운영자
ElseIf Right = "G" Then
cboAdminKind.SelectedIndex = 2 '일반운영자
End If
'ICharBugItem.ShowDialog()
'ICharBugItem.MdiParent = IMuhonMDI
End Sub
'권한설정하기
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