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>
227 lines
7.8 KiB
VB.net
227 lines
7.8 KiB
VB.net
|
||
Imports System.Text
|
||
|
||
Public Class UserLogin
|
||
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 grdResult As System.Windows.Forms.DataGrid
|
||
Friend WithEvents btnLogOut As System.Windows.Forms.Button
|
||
Friend WithEvents lblhanaccount 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.btnSearch = New System.Windows.Forms.Button()
|
||
Me.txtSearchID = New System.Windows.Forms.TextBox()
|
||
Me.grdResult = New System.Windows.Forms.DataGrid()
|
||
Me.btnLogOut = New System.Windows.Forms.Button()
|
||
Me.lblhanaccount = New System.Windows.Forms.Label()
|
||
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("Gulim", 14.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
|
||
Me.lbltitle.Location = New System.Drawing.Point(440, 48)
|
||
Me.lbltitle.Name = "lbltitle"
|
||
Me.lbltitle.Size = New System.Drawing.Size(261, 24)
|
||
Me.lbltitle.TabIndex = 0
|
||
Me.lbltitle.Text = "<EFBFBD>α<EFBFBD><EFBFBD><EFBFBD> üũ / <20><><EFBFBD><EFBFBD> <20>αƿ<D7BE>"
|
||
'
|
||
'GroupBox1
|
||
'
|
||
Me.GroupBox1.Controls.AddRange(New System.Windows.Forms.Control() {Me.lblhanaccount, Me.btnSearch, Me.txtSearchID})
|
||
Me.GroupBox1.Location = New System.Drawing.Point(80, 88)
|
||
Me.GroupBox1.Name = "GroupBox1"
|
||
Me.GroupBox1.Size = New System.Drawing.Size(528, 64)
|
||
Me.GroupBox1.TabIndex = 1
|
||
Me.GroupBox1.TabStop = False
|
||
'
|
||
'btnSearch
|
||
'
|
||
Me.btnSearch.Location = New System.Drawing.Point(320, 24)
|
||
Me.btnSearch.Name = "btnSearch"
|
||
Me.btnSearch.Size = New System.Drawing.Size(88, 24)
|
||
Me.btnSearch.TabIndex = 1
|
||
Me.btnSearch.Text = "<EFBFBD>˻<EFBFBD>"
|
||
'
|
||
'txtSearchID
|
||
'
|
||
Me.txtSearchID.Location = New System.Drawing.Point(144, 24)
|
||
Me.txtSearchID.Name = "txtSearchID"
|
||
Me.txtSearchID.Size = New System.Drawing.Size(136, 21)
|
||
Me.txtSearchID.TabIndex = 0
|
||
Me.txtSearchID.Text = ""
|
||
'
|
||
'grdResult
|
||
'
|
||
Me.grdResult.DataMember = ""
|
||
Me.grdResult.HeaderForeColor = System.Drawing.SystemColors.ControlText
|
||
Me.grdResult.Location = New System.Drawing.Point(80, 160)
|
||
Me.grdResult.Name = "grdResult"
|
||
Me.grdResult.Size = New System.Drawing.Size(848, 216)
|
||
Me.grdResult.TabIndex = 2
|
||
'
|
||
'btnLogOut
|
||
'
|
||
Me.btnLogOut.Location = New System.Drawing.Point(496, 408)
|
||
Me.btnLogOut.Name = "btnLogOut"
|
||
Me.btnLogOut.Size = New System.Drawing.Size(128, 32)
|
||
Me.btnLogOut.TabIndex = 3
|
||
Me.btnLogOut.Text = "<EFBFBD>αƿ<EFBFBD>"
|
||
'
|
||
'lblhanaccount
|
||
'
|
||
Me.lblhanaccount.AutoSize = True
|
||
Me.lblhanaccount.Location = New System.Drawing.Point(72, 29)
|
||
Me.lblhanaccount.Name = "lblhanaccount"
|
||
Me.lblhanaccount.Size = New System.Drawing.Size(66, 14)
|
||
Me.lblhanaccount.TabIndex = 3
|
||
Me.lblhanaccount.Text = "<EFBFBD>Ѱ<EFBFBD><EFBFBD>Ӱ<EFBFBD><EFBFBD><EFBFBD>"
|
||
'
|
||
'UserLogin
|
||
'
|
||
Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
|
||
Me.ClientSize = New System.Drawing.Size(1028, 693)
|
||
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.btnLogOut, Me.grdResult, Me.GroupBox1, Me.lbltitle})
|
||
Me.Name = "UserLogin"
|
||
Me.Text = "<EFBFBD>α<EFBFBD><EFBFBD><EFBFBD> üũ / <20><><EFBFBD><EFBFBD> <20>αƿ<D7BE>"
|
||
Me.GroupBox1.ResumeLayout(False)
|
||
CType(Me.grdResult, System.ComponentModel.ISupportInitialize).EndInit()
|
||
Me.ResumeLayout(False)
|
||
|
||
End Sub
|
||
|
||
#End Region
|
||
|
||
|
||
Private Sub UserLogin_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
|
||
|
||
ProcessPacket.IUserLogin = Me
|
||
|
||
txtSearchID.MaxLength = 15
|
||
|
||
Me.Text = ITextUserLogOut.formheader_curr
|
||
Me.lbltitle.Text = ITextUserLogOut.formheader_curr
|
||
btnSearch.Text = ITextButton.btnSearch
|
||
btnLogOut.Text = ITextButton.btnLogOut
|
||
|
||
ds.Tables(CurrentUserIndex).Clear()
|
||
grdResult.DataSource = ds.Tables(CurrentUserIndex)
|
||
|
||
|
||
If IToolAdminRight.currentUserLogin = False Then
|
||
btnSearch.Enabled = False
|
||
Else
|
||
btnSearch.Enabled = True
|
||
End If
|
||
|
||
If IToolAdminRight.DoingLogout = False Then
|
||
btnLogOut.Enabled = False
|
||
Else
|
||
btnLogOut.Enabled = True
|
||
End If
|
||
|
||
End Sub
|
||
|
||
Private Sub UserLogin_Unload(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Closed
|
||
|
||
ProcessPacket.IUserLogin = Nothing
|
||
ProcessPacket.IRylMDI.IUserLogin = Nothing
|
||
|
||
End Sub
|
||
|
||
'<27>˻<EFBFBD><CBBB>ϱ<EFBFBD>
|
||
Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSearch.Click
|
||
|
||
ds.Tables(CurrentUserIndex).Clear()
|
||
CurrentUserRefresh()
|
||
|
||
End Sub
|
||
|
||
Public Sub CurrentUserRefresh()
|
||
|
||
btnSearch.Enabled = False
|
||
|
||
If txtSearchID.Text = "" Then
|
||
MsgBox(ITextMSG.msg_inputadminid, MsgBoxStyle.OKOnly, ITextMSG.msg_confirm)
|
||
txtSearchID.Focus()
|
||
btnSearch.Enabled = True
|
||
Exit Sub
|
||
End If
|
||
|
||
'Ư<><C6AF> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ID <20>˻<EFBFBD> <20><>Ŷ
|
||
Dim sendb(15) As Byte
|
||
Encoding.GetEncoding(Code).GetBytes(txtSearchID.Text, 0, Min(16, txtSearchID.Text.Length), sendb, 0)
|
||
|
||
IClientSocket.Send(7, sendb)
|
||
|
||
btnSearch.Enabled = True
|
||
|
||
End Sub
|
||
|
||
Private Sub btnLogOut_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogOut.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 SelectedCellText As String = grdResult.Item(grdResult.CurrentCell)
|
||
Dim CurrentIndex As Integer = grdResult.CurrentRowIndex
|
||
|
||
Dim ClientID As String = grdResult.Item(CurrentIndex, 0)
|
||
Dim UID As Int32 = grdResult.Item(CurrentIndex, 3)
|
||
Dim ServerID As Int32 = grdResult.Item(CurrentIndex, 5)
|
||
|
||
btnLogOut.Enabled = False
|
||
|
||
Dim DeleteYesNo As Integer = _
|
||
MsgBox(ClientID + " " + ITextMSG.msg_logout, MsgBoxStyle.YesNo, ITextMSG.msg_confirm)
|
||
|
||
If DeleteYesNo = vbYes Then
|
||
|
||
Dim sendb(7) As Byte
|
||
|
||
Array.Copy(BitConverter.GetBytes(UID), 0, sendb, 0, 4)
|
||
Array.Copy(BitConverter.GetBytes(ServerID), 0, sendb, 4, 4)
|
||
IClientSocket.Send(8, sendb)
|
||
|
||
Else
|
||
MsgBox(ITextMSG.msg_cancel, MsgBoxStyle.OKOnly, "Cancel")
|
||
End If
|
||
btnLogOut.Enabled = True
|
||
|
||
|
||
End Sub
|
||
End Class
|