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>
This commit is contained in:
359
Server/ToolProject/RCMS_Tool/CharRestraint.vb
Normal file
359
Server/ToolProject/RCMS_Tool/CharRestraint.vb
Normal file
@@ -0,0 +1,359 @@
|
||||
Imports System.Text
|
||||
|
||||
Public Class CharRestraint
|
||||
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 txtSearchID As System.Windows.Forms.TextBox
|
||||
Friend WithEvents btnSearch As System.Windows.Forms.Button
|
||||
Friend WithEvents cboServerID As System.Windows.Forms.ComboBox
|
||||
Friend WithEvents grdResult As System.Windows.Forms.DataGrid
|
||||
Friend WithEvents btnReg As System.Windows.Forms.Button
|
||||
Friend WithEvents cboType As System.Windows.Forms.ComboBox
|
||||
Friend WithEvents btnBlockClose As System.Windows.Forms.Button
|
||||
Friend WithEvents lblsearchwide As System.Windows.Forms.Label
|
||||
Friend WithEvents lbluid As System.Windows.Forms.Label
|
||||
Friend WithEvents lblserver As System.Windows.Forms.Label
|
||||
Friend WithEvents lbltitle As System.Windows.Forms.Label
|
||||
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
|
||||
Me.lbltitle = New System.Windows.Forms.Label()
|
||||
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
|
||||
Me.cboType = New System.Windows.Forms.ComboBox()
|
||||
Me.lblsearchwide = New System.Windows.Forms.Label()
|
||||
Me.lbluid = New System.Windows.Forms.Label()
|
||||
Me.lblserver = New System.Windows.Forms.Label()
|
||||
Me.btnSearch = New System.Windows.Forms.Button()
|
||||
Me.txtSearchID = New System.Windows.Forms.TextBox()
|
||||
Me.cboServerID = New System.Windows.Forms.ComboBox()
|
||||
Me.grdResult = New System.Windows.Forms.DataGrid()
|
||||
Me.btnReg = New System.Windows.Forms.Button()
|
||||
Me.btnBlockClose = New System.Windows.Forms.Button()
|
||||
Me.GroupBox1.SuspendLayout()
|
||||
CType(Me.grdResult, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
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(440, 56)
|
||||
Me.lbltitle.Name = "lbltitle"
|
||||
Me.lbltitle.Size = New System.Drawing.Size(128, 24)
|
||||
Me.lbltitle.TabIndex = 1
|
||||
Me.lbltitle.Text = "캐릭터 제재 "
|
||||
'
|
||||
'GroupBox1
|
||||
'
|
||||
Me.GroupBox1.Controls.AddRange(New System.Windows.Forms.Control() {Me.cboType, Me.lblsearchwide, Me.lbluid, Me.lblserver, Me.btnSearch, Me.txtSearchID, Me.cboServerID})
|
||||
Me.GroupBox1.Location = New System.Drawing.Point(48, 96)
|
||||
Me.GroupBox1.Name = "GroupBox1"
|
||||
Me.GroupBox1.Size = New System.Drawing.Size(576, 80)
|
||||
Me.GroupBox1.TabIndex = 2
|
||||
Me.GroupBox1.TabStop = False
|
||||
Me.GroupBox1.Text = "제재된 캐릭터 조회하기"
|
||||
'
|
||||
'cboType
|
||||
'
|
||||
Me.cboType.Location = New System.Drawing.Point(336, 24)
|
||||
Me.cboType.Name = "cboType"
|
||||
Me.cboType.Size = New System.Drawing.Size(112, 20)
|
||||
Me.cboType.TabIndex = 12
|
||||
'
|
||||
'lblsearchwide
|
||||
'
|
||||
Me.lblsearchwide.AutoSize = True
|
||||
Me.lblsearchwide.Location = New System.Drawing.Point(248, 28)
|
||||
Me.lblsearchwide.Name = "lblsearchwide"
|
||||
Me.lblsearchwide.Size = New System.Drawing.Size(79, 14)
|
||||
Me.lblsearchwide.TabIndex = 11
|
||||
Me.lblsearchwide.Text = "조회범위선택"
|
||||
'
|
||||
'lbluid
|
||||
'
|
||||
Me.lbluid.AutoSize = True
|
||||
Me.lbluid.Location = New System.Drawing.Point(16, 52)
|
||||
Me.lbluid.Name = "lbluid"
|
||||
Me.lbluid.Size = New System.Drawing.Size(97, 14)
|
||||
Me.lbluid.TabIndex = 8
|
||||
Me.lbluid.Text = "UID(유저인덱스)"
|
||||
'
|
||||
'lblserver
|
||||
'
|
||||
Me.lblserver.AutoSize = True
|
||||
Me.lblserver.Location = New System.Drawing.Point(56, 29)
|
||||
Me.lblserver.Name = "lblserver"
|
||||
Me.lblserver.Size = New System.Drawing.Size(54, 14)
|
||||
Me.lblserver.TabIndex = 6
|
||||
Me.lblserver.Text = "서버선택"
|
||||
'
|
||||
'btnSearch
|
||||
'
|
||||
Me.btnSearch.Location = New System.Drawing.Point(456, 24)
|
||||
Me.btnSearch.Name = "btnSearch"
|
||||
Me.btnSearch.Size = New System.Drawing.Size(96, 40)
|
||||
Me.btnSearch.TabIndex = 4
|
||||
Me.btnSearch.Text = "검색"
|
||||
'
|
||||
'txtSearchID
|
||||
'
|
||||
Me.txtSearchID.Location = New System.Drawing.Point(120, 48)
|
||||
Me.txtSearchID.Name = "txtSearchID"
|
||||
Me.txtSearchID.Size = New System.Drawing.Size(112, 21)
|
||||
Me.txtSearchID.TabIndex = 3
|
||||
Me.txtSearchID.Text = ""
|
||||
'
|
||||
'cboServerID
|
||||
'
|
||||
Me.cboServerID.Location = New System.Drawing.Point(120, 24)
|
||||
Me.cboServerID.Name = "cboServerID"
|
||||
Me.cboServerID.Size = New System.Drawing.Size(112, 20)
|
||||
Me.cboServerID.TabIndex = 1
|
||||
'
|
||||
'grdResult
|
||||
'
|
||||
Me.grdResult.DataMember = ""
|
||||
Me.grdResult.HeaderForeColor = System.Drawing.SystemColors.ControlText
|
||||
Me.grdResult.Location = New System.Drawing.Point(48, 184)
|
||||
Me.grdResult.Name = "grdResult"
|
||||
Me.grdResult.Size = New System.Drawing.Size(904, 336)
|
||||
Me.grdResult.TabIndex = 3
|
||||
'
|
||||
'btnReg
|
||||
'
|
||||
Me.btnReg.Location = New System.Drawing.Point(648, 120)
|
||||
Me.btnReg.Name = "btnReg"
|
||||
Me.btnReg.Size = New System.Drawing.Size(80, 48)
|
||||
Me.btnReg.TabIndex = 4
|
||||
Me.btnReg.Text = "제재등록"
|
||||
'
|
||||
'btnBlockClose
|
||||
'
|
||||
Me.btnBlockClose.Location = New System.Drawing.Point(768, 120)
|
||||
Me.btnBlockClose.Name = "btnBlockClose"
|
||||
Me.btnBlockClose.Size = New System.Drawing.Size(80, 48)
|
||||
Me.btnBlockClose.TabIndex = 5
|
||||
Me.btnBlockClose.Text = "제재해제"
|
||||
'
|
||||
'CharRestraint
|
||||
'
|
||||
Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
|
||||
Me.ClientSize = New System.Drawing.Size(1028, 701)
|
||||
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.btnBlockClose, Me.btnReg, Me.grdResult, Me.GroupBox1, Me.lbltitle})
|
||||
Me.Name = "CharRestraint"
|
||||
Me.Text = "캐릭터제재"
|
||||
Me.GroupBox1.ResumeLayout(False)
|
||||
CType(Me.grdResult, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Private Sub CharRestraint_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
|
||||
|
||||
ProcessPacket.ICharRestraint = Me
|
||||
|
||||
DBConn.SetServerNames(cboServerID)
|
||||
|
||||
cboServerID.SelectedIndex = 0
|
||||
|
||||
txtSearchID.Visible = False
|
||||
|
||||
lbluid.Visible = False
|
||||
txtSearchID.Visible = False
|
||||
|
||||
Me.Text = ITextCharRestraint.formheader
|
||||
lbltitle.Text = ITextCharRestraint.formheader
|
||||
lblserver.Text = ITextCharRestraint.lblserver
|
||||
lblsearchwide.Text = ITextCharRestraint.lblsearchwide
|
||||
Me.lbluid.Text = ITextCharRestraint.lbluid
|
||||
btnSearch.Text = ITextButton.btnSearch
|
||||
btnReg.Text = ITextAdminSetting.chkRestraintReg
|
||||
Me.btnBlockClose.Text = ITextAdminSetting.chkRestraintRelease
|
||||
|
||||
|
||||
cboType.Items.Add(ITextCharRestraint.cboType_1)
|
||||
cboType.Items.Add(ITextCharRestraint.cboType_2)
|
||||
cboType.SelectedIndex = 0
|
||||
grdResult.DataSource = ds.Tables(CharRestraintIndex)
|
||||
|
||||
If IToolAdminRight.RestraintReg = False Then
|
||||
btnReg.Enabled = False
|
||||
Else
|
||||
btnReg.Enabled = True
|
||||
End If
|
||||
|
||||
If IToolAdminRight.RestraintRelease = False Then
|
||||
btnBlockClose.Enabled = False
|
||||
Else
|
||||
btnBlockClose.Enabled = True
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CharRestraint_UnLoad(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Closed
|
||||
|
||||
ProcessPacket.ICharRestraint = Nothing
|
||||
ProcessPacket.IRylMDI.ICharRestraint = Nothing
|
||||
|
||||
End Sub
|
||||
|
||||
'searching ...
|
||||
Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSearch.Click
|
||||
|
||||
If cboType.SelectedIndex = 1 And txtSearchID.Text = "" Then
|
||||
MsgBox(ITextMSG.msg_inputadminid, MsgBoxStyle.OKOnly, ITextMSG.msg_error)
|
||||
txtSearchID.Focus()
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
ViewRestraintList()
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub ViewRestraintList()
|
||||
|
||||
ds.Tables(CharRestraintIndex).Clear()
|
||||
|
||||
Dim serverid As Byte
|
||||
|
||||
Select Case cboServerID.SelectedIndex
|
||||
Case 0
|
||||
serverid = 0
|
||||
Case 1
|
||||
serverid = 1
|
||||
Case 2
|
||||
serverid = 2
|
||||
Case 3
|
||||
serverid = 3
|
||||
Case 4
|
||||
serverid = 4
|
||||
Case 5
|
||||
serverid = 5
|
||||
Case 6
|
||||
serverid = 6
|
||||
|
||||
End Select
|
||||
|
||||
If cboType.SelectedIndex = 0 Then
|
||||
' 재제 검색
|
||||
' Flag(1) / ServerID(1) / UID(4)
|
||||
Dim sendb(5) As Byte
|
||||
sendb(0) = 1 ' Flag
|
||||
sendb(1) = serverid ' ServerID
|
||||
|
||||
Dim dwUID As Int32 = 0 ' UID
|
||||
Array.Copy(BitConverter.GetBytes(dwUID), 0, sendb, 2, 4)
|
||||
|
||||
IClientSocket.Send(9, sendb)
|
||||
Else
|
||||
'부분검색
|
||||
' 재제 검색
|
||||
' Flag(1) / ServerID(1) / UID(4)
|
||||
Dim sendb(5) As Byte
|
||||
sendb(0) = 2 ' Flag
|
||||
sendb(1) = serverid ' ServerID
|
||||
|
||||
Dim dwUID As Int32 = CInt(txtSearchID.Text) ' UID
|
||||
Array.Copy(BitConverter.GetBytes(dwUID), 0, sendb, 2, 4)
|
||||
IClientSocket.Send(9, sendb)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub btnReg_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReg.Click
|
||||
|
||||
Dim ICharRestraintReg As New CharRestraintReg()
|
||||
ICharRestraintReg.ShowDialog()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub cboType_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboType.SelectedIndexChanged
|
||||
|
||||
If cboType.SelectedIndex = 1 Then
|
||||
lbluid.Visible = True
|
||||
txtSearchID.Visible = True
|
||||
Else
|
||||
lbluid.Visible = False
|
||||
txtSearchID.Visible = False
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
'제재해제
|
||||
Private Sub btnBlockClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBlockClose.Click
|
||||
'현재 클릭된 row의 인덱스번호(0부터 시작한다.)
|
||||
|
||||
Dim SelectedCellText As String = grdResult.Item(grdResult.CurrentCell)
|
||||
Dim CurrentIndex As Integer = grdResult.CurrentRowIndex
|
||||
|
||||
Dim encoding As Encoding = encoding.GetEncoding(Code)
|
||||
|
||||
Dim serverid As Byte
|
||||
|
||||
Select Case cboServerID.SelectedIndex
|
||||
Case 0
|
||||
serverid = 0
|
||||
Case 1
|
||||
serverid = 1
|
||||
Case 2
|
||||
serverid = 2
|
||||
Case 3
|
||||
serverid = 3
|
||||
Case 4
|
||||
serverid = 4
|
||||
Case 5
|
||||
serverid = 5
|
||||
Case 6
|
||||
serverid = 6
|
||||
|
||||
End Select
|
||||
|
||||
' 제재 삭제
|
||||
' ServerID(1) / UID(4) / CharName(16)
|
||||
Dim sendb(20) As Byte
|
||||
|
||||
sendb(0) = serverid ' ServerID
|
||||
|
||||
Dim dwDeleteUID As Int32 = CInt(grdResult.Item(CurrentIndex, 0)) ' UID - dwDeleteUID 의 타입은 반드시 int32이어야 함
|
||||
Array.Copy(BitConverter.GetBytes(dwDeleteUID), 0, sendb, 1, 4)
|
||||
|
||||
Dim szDeleteCharName As String = grdResult.Item(CurrentIndex, 2) ' 제재 캐릭터 이름
|
||||
encoding.GetBytes(szDeleteCharName, 0, Min(16, szDeleteCharName.Length), sendb, 5)
|
||||
|
||||
IClientSocket.Send(12, sendb)
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user