VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form frmCharacters 
   BorderStyle     =   4  'Fixed ToolWindow
   Caption         =   "Realm Characters"
   ClientHeight    =   3240
   ClientLeft      =   45
   ClientTop       =   315
   ClientWidth     =   8565
   BeginProperty Font 
      Name            =   "Verdana"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "frmCharacters.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3240
   ScaleWidth      =   8565
   StartUpPosition =   2  'CenterScreen
   Begin VB.CommandButton cmdLogin 
      Caption         =   "Login"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   7320
      TabIndex        =   0
      Top             =   2760
      Width           =   1095
   End
   Begin VB.CommandButton cmdUpgrade 
      Caption         =   "Upgrade"
      Height          =   375
      Left            =   6120
      TabIndex        =   3
      Top             =   2760
      Width           =   1095
   End
   Begin VB.CommandButton cmdDelete 
      Caption         =   "Delete"
      Height          =   375
      Left            =   4920
      TabIndex        =   2
      Top             =   2760
      Width           =   1095
   End
   Begin VB.CommandButton cmdCreate 
      Caption         =   "Create"
      Height          =   375
      Left            =   120
      TabIndex        =   1
      Top             =   2760
      Width           =   975
   End
   Begin MSComctlLib.ListView lvChar 
      Height          =   2055
      Left            =   120
      TabIndex        =   4
      Top             =   600
      Width           =   8295
      _ExtentX        =   14631
      _ExtentY        =   3625
      View            =   3
      LabelEdit       =   1
      LabelWrap       =   -1  'True
      HideSelection   =   -1  'True
      FullRowSelect   =   -1  'True
      _Version        =   393217
      ForeColor       =   16777215
      BackColor       =   0
      BorderStyle     =   1
      Appearance      =   1
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Courier New"
         Size            =   9
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      NumItems        =   4
      BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         Text            =   "Character"
         Object.Width           =   4304
      EndProperty
      BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         SubItemIndex    =   1
         Text            =   "Class"
         Object.Width           =   2540
      EndProperty
      BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         SubItemIndex    =   2
         Text            =   "Level"
         Object.Width           =   2187
      EndProperty
      BeginProperty ColumnHeader(4) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         SubItemIndex    =   3
         Text            =   "Expiration"
         Object.Width           =   5009
      EndProperty
   End
   Begin VB.Label Label1 
      Caption         =   $"frmCharacters.frx":058A
      Height          =   495
      Left            =   120
      TabIndex        =   5
      Top             =   120
      Width           =   8295
   End
End
Attribute VB_Name = "frmCharacters"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Public BotIndex As Integer

Public Sub ShowOptions()
    cmdUpgrade.Enabled = (frmBot.Bot(BotIndex).Config.ProductID = "D2XP")
End Sub

Private Sub cmdCreate_Click()
    frmCreateCharacter.BotIndex = BotIndex
    frmCreateCharacter.ShowClasses frmBot.Bot(BotIndex).Config.ProductID
    frmCreateCharacter.Show vbModal, Me
End Sub

Private Sub cmdDelete_Click()
    If lvChar.ListItems.Count = 0 Then Exit Sub
    frmBot.Bot(BotIndex).SendRealmCharDelete lvChar.SelectedItem.text
End Sub

Private Sub cmdLogin_Click()
    If lvChar.ListItems.Count = 0 Then Exit Sub
    If lvChar.SelectedItem.ForeColor = vbWhite Then
        frmBot.Bot(BotIndex).SendRealmCharLogon lvChar.SelectedItem.text
    Else
        If frmBot.Bot(BotIndex).Config.ProductID = "D2XP" Then
            MsgBox "This characters needs to be upgraded before it can be logged into!", vbExclamation, "Character Login"
        Else
            MsgBox "This character is for expansion login only!", vbExclamation, "Character Login"
        End If
    End If
End Sub

Private Sub cmdUpgrade_Click()
    If lvChar.ListItems.Count = 0 Then Exit Sub
    frmBot.Bot(BotIndex).SendRealmCharUpgrade lvChar.SelectedItem.text
End Sub
