Option Strict Off
Option Explicit On
Friend Class ComboEditor
	Inherits System.Windows.Forms.Form
	'UPGRADE_WARNING: Arrays can't be declared with New. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="CC9D3AE5-6B95-4B43-91C7-28276302A5E8"'
    Private Combos() As combo = ADGEDotNetUt.ArrayUt(Of combo).NewArray1(44)

	Public selectedcombo As Short
	Public subchange As Boolean
	
	
    Public Sub modifiedcombo(ByVal num As Short)

        Dim i As Short
        Dim atk As Short

        i = num

        'UPGRADE_WARNING: Couldn't resolve default property of object ComboList.List(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
        ComboList.Items(i - 1).Text = zerostr(i - 1, 2)
        atk = Combos(i).attack1 + 1
        If atk > 0 And atk <= 44 Then
            'UPGRADE_WARNING: Couldn't resolve default property of object ComboList.List(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            ComboList.Items(i - 1).SubItems(1).Text = App.graphics.f560.attack(atk).name
        Else
            'UPGRADE_WARNING: Couldn't resolve default property of object ComboList.List(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            ComboList.Items(i - 1).SubItems(1).Text = "-"
        End If

        atk = Combos(i).attack2 + 1
        If atk > 0 And atk <= 44 Then
            'UPGRADE_WARNING: Couldn't resolve default property of object ComboList.List(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            ComboList.Items(i - 1).SubItems(2).Text = App.graphics.f560.attack(atk).name
        Else
            'UPGRADE_WARNING: Couldn't resolve default property of object ComboList.List(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            ComboList.Items(i - 1).SubItems(2).Text = "-"
        End If

        atk = Combos(i).attack3 + 1
        If atk > 0 And atk <= 44 Then
            'UPGRADE_WARNING: Couldn't resolve default property of object ComboList.List(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            ComboList.Items(i - 1).SubItems(3).Text = App.graphics.f560.attack(atk).name
        Else
            'UPGRADE_WARNING: Couldn't resolve default property of object ComboList.List(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            ComboList.Items(i - 1).SubItems(3).Text = "-"
        End If

    End Sub
    Public Sub init()
        Dim i As Short

        ComboList.Items.Clear()

        For i = 1 To 44
            Combos(i).attack1 = App.graphics.f560.Combo(i).attack1
            Combos(i).attack2 = App.graphics.f560.Combo(i).attack2
            Combos(i).attack3 = App.graphics.f560.Combo(i).attack3
            Combos(i).byte4 = App.graphics.f560.Combo(i).byte4
            Combos(i).byte5 = App.graphics.f560.Combo(i).byte5
            Combos(i).byte6 = App.graphics.f560.Combo(i).byte6
            Combos(i).unused1 = App.graphics.f560.Combo(i).unused1
            Combos(i).unused2 = App.graphics.f560.Combo(i).unused2

            ComboList.Items.Add("1").SubItems.AddRange("2,3,4".Split(","))
            modifiedcombo(i)
        Next

        A1CBAttack.Items.Clear()
        For i = 1 To 44
            A1CBAttack.Items.Add(App.graphics.f560.attack(i).name)
            A2CBAttack.Items.Add(App.graphics.f560.attack(i).name)
            A3CBAttack.Items.Add(App.graphics.f560.attack(i).name)
        Next
        A1CBAttack.Items.Add("---")
        A2CBAttack.Items.Add("---")
        A3CBAttack.Items.Add("---")

        A1CBDifficulty.Items.Clear()
        A1CBDifficulty.Items.Add("---")
        A1CBDifficulty.Items.Add("neophyte")
        A1CBDifficulty.Items.Add("novice")
        A1CBDifficulty.Items.Add("apprentice")
        A1CBDifficulty.Items.Add("journeyman")
        A1CBDifficulty.Items.Add("craftsman")
        A1CBDifficulty.Items.Add("artisan")
        A1CBDifficulty.Items.Add("adept")
        A1CBDifficulty.Items.Add("expert")
        A1CBDifficulty.Items.Add("l1 master")
        A1CBDifficulty.Items.Add("l2 master")
        A1CBDifficulty.Items.Add("l3 master")
        A1CBDifficulty.Items.Add("l4 master")
        A1CBDifficulty.Items.Add("l5 master")
        A1CBDifficulty.Items.Add("l6 master")
        A1CBDifficulty.Items.Add("archmaster")

        A2CBDifficulty.Items.Clear()
        A2CBDifficulty.Items.Add("---")
        A2CBDifficulty.Items.Add("neophyte")
        A2CBDifficulty.Items.Add("novice")
        A2CBDifficulty.Items.Add("apprentice")
        A2CBDifficulty.Items.Add("journeyman")
        A2CBDifficulty.Items.Add("craftsman")
        A2CBDifficulty.Items.Add("artisan")
        A2CBDifficulty.Items.Add("adept")
        A2CBDifficulty.Items.Add("expert")
        A2CBDifficulty.Items.Add("l1 master")
        A2CBDifficulty.Items.Add("l2 master")
        A2CBDifficulty.Items.Add("l3 master")
        A2CBDifficulty.Items.Add("l4 master")
        A2CBDifficulty.Items.Add("l5 master")
        A2CBDifficulty.Items.Add("l6 master")
        A2CBDifficulty.Items.Add("archmaster")

        A3CBDifficulty.Items.Clear()
        A3CBDifficulty.Items.Add("---")
        A3CBDifficulty.Items.Add("neophyte")
        A3CBDifficulty.Items.Add("novice")
        A3CBDifficulty.Items.Add("apprentice")
        A3CBDifficulty.Items.Add("journeyman")
        A3CBDifficulty.Items.Add("craftsman")
        A3CBDifficulty.Items.Add("artisan")
        A3CBDifficulty.Items.Add("adept")
        A3CBDifficulty.Items.Add("expert")
        A3CBDifficulty.Items.Add("l1 master")
        A3CBDifficulty.Items.Add("l2 master")
        A3CBDifficulty.Items.Add("l3 master")
        A3CBDifficulty.Items.Add("l4 master")
        A3CBDifficulty.Items.Add("l5 master")
        A3CBDifficulty.Items.Add("l6 master")
        A3CBDifficulty.Items.Add("archmaster")

        selectcombo(1)
    End Sub
	
    Public Sub selectcombo(ByVal num As Short)
        selectedcombo = num
        ComboList.Items(num - 1).Focused = True
        MyUt.CheckSel(ComboList, num - 1, "BlueGem")

        A1Attack.Text = CStr(Combos(num).attack1)
        A2Attack.Text = CStr(Combos(num).attack2)
        A3Attack.Text = CStr(Combos(num).attack3)

        If Combos(num).attack1 >= 0 And Combos(num).attack1 < 44 Then
            A1CBAttack.SelectedIndex = Combos(num).attack1
            A1AttackEdit.Enabled = True
        Else
            A1CBAttack.SelectedIndex = 44
            A1AttackEdit.Enabled = False
        End If
        If Combos(num).attack2 >= 0 And Combos(num).attack2 < 44 Then
            A2CBAttack.SelectedIndex = Combos(num).attack2
            A2AttackEdit.Enabled = True
        Else
            A2CBAttack.SelectedIndex = 44
            A2AttackEdit.Enabled = False
        End If
        If Combos(num).attack3 >= 0 And Combos(num).attack3 < 44 Then
            A3CBAttack.SelectedIndex = Combos(num).attack3
            A3AttackEdit.Enabled = True
        Else
            A3CBAttack.SelectedIndex = 44
            A3AttackEdit.Enabled = False
        End If

        A1Difficulty.Text = Str(Combos(num).skill1)
        A2Difficulty.Text = Str(Combos(num).skill2)
        A3Difficulty.Text = Str(Combos(num).skill3)

        A1CBDifficulty.SelectedIndex = Combos(num).skill1
        A2CBDifficulty.SelectedIndex = Combos(num).skill2
        A3CBDifficulty.SelectedIndex = Combos(num).skill3

        A1UsesCharges.CheckState = Combos(num).charges1
        A2UsesCharges.CheckState = Combos(num).charges2
        A3UsesCharges.CheckState = Combos(num).charges3

        Unused1.Text = Str(Combos(num).unused1)
        Unused2.Text = Str(Combos(num).unused2)

        init_itemlist()
    End Sub
	
    Public Sub init_itemlist()

        ItemList.Items.Clear()
        ItemList.FocusedItem = Nothing

        Dim i As Short
        Dim j As Short
        j = 0
        For i = 1 To 180
            If App.graphics.f559.obj(i).Combos = selectedcombo - 1 Then
                ItemList.Items.Add(zerostr(i - 1, 3)).SubItems.Add(App.graphics.f556.objstring(App.graphics.f559.obj(i).ItemType + 1))
                j = j + 1
            End If
        Next

    End Sub
	
	'UPGRADE_WARNING: Event A1Attack.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub A1Attack_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles A1Attack.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		
		Combos(selectedcombo).attack1 = App.EFChange8(A1Attack, 0, 255)
		
		If Combos(selectedcombo).attack1 >= 0 And Combos(selectedcombo).attack1 < 44 Then
			A1CBAttack.SelectedIndex = Combos(selectedcombo).attack1
			A1AttackEdit.Enabled = True
		Else
			A1CBAttack.SelectedIndex = 44
			A1AttackEdit.Enabled = False
		End If
		Dim selstart As Short
		selstart = A1Attack.SelectionStart
		modifiedcombo(selectedcombo)
		A1Attack.SelectionStart = selstart
		
		subchange = False
	End Sub
	
	Private Sub A1AttackEdit_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles A1AttackEdit.Click
		App.dlg_attackeditor.init()
		App.dlg_attackeditor.selectattack(Combos(selectedcombo).attack1 + 1)
		App.dlg_attackeditor.Show()
	End Sub
	Private Sub A2AttackEdit_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles A2AttackEdit.Click
		App.dlg_attackeditor.init()
		App.dlg_attackeditor.selectattack(Combos(selectedcombo).attack2 + 1)
		App.dlg_attackeditor.Show()
	End Sub
	Private Sub A3AttackEdit_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles A3AttackEdit.Click
		App.dlg_attackeditor.init()
		App.dlg_attackeditor.selectattack(Combos(selectedcombo).attack3 + 1)
		App.dlg_attackeditor.Show()
	End Sub
	
	'UPGRADE_WARNING: Event A2Attack.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub A2Attack_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles A2Attack.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Combos(selectedcombo).attack2 = App.EFChange8(A2Attack, 0, 255)
		
		If Combos(selectedcombo).attack2 >= 0 And Combos(selectedcombo).attack2 < 44 Then
			A2CBAttack.SelectedIndex = Combos(selectedcombo).attack2
			A2AttackEdit.Enabled = True
		Else
			A2CBAttack.SelectedIndex = 44
			A2AttackEdit.Enabled = False
		End If
		modifiedcombo(selectedcombo)
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event A3Attack.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub A3Attack_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles A3Attack.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Combos(selectedcombo).attack3 = App.EFChange8(A3Attack, 0, 255)
		
		If Combos(selectedcombo).attack3 >= 0 And Combos(selectedcombo).attack3 < 44 Then
			A3CBAttack.SelectedIndex = Combos(selectedcombo).attack3
			A3AttackEdit.Enabled = True
		Else
			A3CBAttack.SelectedIndex = 44
			A3AttackEdit.Enabled = False
		End If
		modifiedcombo(selectedcombo)
		subchange = False
	End Sub
	
	'UPGRADE_WARNING: Event A1CBAttack.SelectedIndexChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub A1CBAttack_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles A1CBAttack.SelectedIndexChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		If A1CBAttack.SelectedIndex = 44 Then '255 it
			Combos(selectedcombo).attack1 = 255
		Else
			Combos(selectedcombo).attack1 = A1CBAttack.SelectedIndex
		End If
		A1Attack.Text = Str(Combos(selectedcombo).attack1)
		If Combos(selectedcombo).attack1 >= 0 And Combos(selectedcombo).attack1 < 44 Then
			A1AttackEdit.Enabled = True
		Else
			A1AttackEdit.Enabled = False
		End If
		modifiedcombo(selectedcombo)
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event A2CBAttack.SelectedIndexChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub A2CBAttack_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles A2CBAttack.SelectedIndexChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		If A2CBAttack.SelectedIndex = 44 Then '255 it
			Combos(selectedcombo).attack2 = 255
		Else
			Combos(selectedcombo).attack2 = A2CBAttack.SelectedIndex
		End If
		
		A2Attack.Text = Str(Combos(selectedcombo).attack2)
		If Combos(selectedcombo).attack2 >= 0 And Combos(selectedcombo).attack2 < 44 Then
			A2AttackEdit.Enabled = True
		Else
			A2AttackEdit.Enabled = False
		End If
		modifiedcombo(selectedcombo)
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event A3CBAttack.SelectedIndexChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub A3CBAttack_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles A3CBAttack.SelectedIndexChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		If A3CBAttack.SelectedIndex = 44 Then '255 it
			Combos(selectedcombo).attack3 = 255
		Else
			Combos(selectedcombo).attack3 = A3CBAttack.SelectedIndex
		End If
		
		A3Attack.Text = Str(Combos(selectedcombo).attack3)
		If Combos(selectedcombo).attack3 >= 0 And Combos(selectedcombo).attack3 < 44 Then
			A3AttackEdit.Enabled = True
		Else
			A3AttackEdit.Enabled = False
		End If
		modifiedcombo(selectedcombo)
		subchange = False
	End Sub
	
	'UPGRADE_WARNING: Event A1CBDifficulty.SelectedIndexChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub A1CBDifficulty_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles A1CBDifficulty.SelectedIndexChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Combos(selectedcombo).setskill1((A1CBDifficulty.SelectedIndex))
		A1Difficulty.Text = Str(Combos(selectedcombo).skill1)
		
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event A2CBDifficulty.SelectedIndexChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub A2CBDifficulty_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles A2CBDifficulty.SelectedIndexChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Combos(selectedcombo).setskill2((A2CBDifficulty.SelectedIndex))
		A2Difficulty.Text = Str(Combos(selectedcombo).skill2)
		
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event A3CBDifficulty.SelectedIndexChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub A3CBDifficulty_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles A3CBDifficulty.SelectedIndexChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Combos(selectedcombo).setskill3((A3CBDifficulty.SelectedIndex))
		A3Difficulty.Text = Str(Combos(selectedcombo).skill3)
		
		subchange = False
	End Sub
	
	'UPGRADE_WARNING: Event A1Difficulty.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub A1Difficulty_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles A1Difficulty.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Combos(selectedcombo).setskill1(App.EFChange8(A1Difficulty, 0, 127))
		If Combos(selectedcombo).skill1 > 15 Then
			A1CBDifficulty.SelectedIndex = 15
		Else
			A1CBDifficulty.SelectedIndex = Combos(selectedcombo).skill1
		End If
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event A2Difficulty.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub A2Difficulty_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles A2Difficulty.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Combos(selectedcombo).setskill2(App.EFChange8(A2Difficulty, 0, 127))
		If Combos(selectedcombo).skill2 > 15 Then
			A2CBDifficulty.SelectedIndex = 15
		Else
			A2CBDifficulty.SelectedIndex = Combos(selectedcombo).skill2
		End If
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event A3Difficulty.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub A3Difficulty_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles A3Difficulty.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Combos(selectedcombo).setskill3(App.EFChange8(A3Difficulty, 0, 127))
		If Combos(selectedcombo).skill3 > 15 Then
			A3CBDifficulty.SelectedIndex = 15
		Else
			A3CBDifficulty.SelectedIndex = Combos(selectedcombo).skill3
		End If
		subchange = False
	End Sub
	
	'UPGRADE_WARNING: Event A1UsesCharges.CheckStateChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub A1UsesCharges_CheckStateChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles A1UsesCharges.CheckStateChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Combos(selectedcombo).setcharges1((A1UsesCharges.CheckState))
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event A2UsesCharges.CheckStateChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub A2UsesCharges_CheckStateChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles A2UsesCharges.CheckStateChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Combos(selectedcombo).setcharges2((A2UsesCharges.CheckState))
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event A3UsesCharges.CheckStateChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub A3UsesCharges_CheckStateChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles A3UsesCharges.CheckStateChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Combos(selectedcombo).setcharges3((A3UsesCharges.CheckState))
		subchange = False
	End Sub
	
    Private Sub Cancel_ClickEvent(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Cancel.Click
        Hide()

    End Sub
	
	
    Private Sub ComboList_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles ComboList.SelectedIndexChanged
        If ComboList.FocusedItem Is Nothing Then Exit Sub

        selectcombo(ComboList.FocusedItem.Index + 1)
    End Sub
	
	'UPGRADE_NOTE: graphics was upgraded to graphics_Renamed. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="A9E4979A-37FA-4718-9994-97DD76ED70A7"'
    Private Sub ItemList_DblClick(ByVal eventSender As System.Object, ByVal eventArgs As EventArgs) Handles ItemList.DoubleClick
        'Dim dlg_miscobjecteditor As MiscObjectEditor
        'Set dlg_miscobjecteditor = New MiscObjectEditor
        'dlg_miscobjecteditor.itemnum = val(Mid(ItemList.List(ItemList.ListIndex, 0), 2) + 1)
        'dlg_miscobjecteditor.init
        'dlg_miscobjecteditor.parenttype = 1
        'Set dlg_miscobjecteditor.dlg_comboeditor = Me
        'dlg_miscobjecteditor.Show

        Dim itemnum As Short
        Dim ItemType As String

        'itemnum = ObjectList.ListIndex + 1
        'UPGRADE_WARNING: Couldn't resolve default property of object ItemList.List(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
        itemnum = Val(CStr((ItemList.FocusedItem.Text) + 1))
        'UPGRADE_WARNING: Couldn't resolve default property of object graphics.f556. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
        ItemType = graphics.f556.objtype(itemnum)

        Dim dlg_foodeditor As FoodEditor
        Dim dlg_armoreditor As ArmorEditor
        Dim dlg_weaponeditor As WeaponEditor
        Dim dlg_miscobjecteditor As MiscObjectEditor
        If ItemType = "Food" Then
            dlg_foodeditor = New FoodEditor
            dlg_foodeditor.itemnum = itemnum
            dlg_foodeditor.init()
            dlg_foodeditor.parenttype = 1
            dlg_foodeditor.dlg_comboeditor = Me
            dlg_foodeditor.Show()
        ElseIf ItemType = "Armor" Then
            dlg_armoreditor = New ArmorEditor
            dlg_armoreditor.itemnum = itemnum
            dlg_armoreditor.init()
            dlg_armoreditor.parenttype = 1
            dlg_armoreditor.dlg_comboeditor = Me
            dlg_armoreditor.Show()

        ElseIf ItemType = "Weapon" Then
            dlg_weaponeditor = New WeaponEditor
            dlg_weaponeditor.itemnum = itemnum
            dlg_weaponeditor.init()
            dlg_weaponeditor.parenttype = 1
            dlg_weaponeditor.dlg_comboeditor = Me
            dlg_weaponeditor.Show()
        ElseIf ItemType = "Misc" Then
            dlg_miscobjecteditor = New MiscObjectEditor
            dlg_miscobjecteditor.itemnum = itemnum
            dlg_miscobjecteditor.init()
            dlg_miscobjecteditor.parenttype = 1
            dlg_miscobjecteditor.dlg_comboeditor = Me
            dlg_miscobjecteditor.Show()
        Else
            MsgBox("Invalid item type")
        End If
    End Sub
	
    Private Sub Ok_ClickEvent(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Ok.Click
        Dim i As Integer
        For i = 1 To 44
            App.graphics.f560.Combo(i).attack1 = Combos(i).attack1
            App.graphics.f560.Combo(i).attack2 = Combos(i).attack2
            App.graphics.f560.Combo(i).attack3 = Combos(i).attack3
            App.graphics.f560.Combo(i).byte4 = Combos(i).byte4
            App.graphics.f560.Combo(i).byte5 = Combos(i).byte5
            App.graphics.f560.Combo(i).byte6 = Combos(i).byte6
            App.graphics.f560.Combo(i).unused1 = Combos(i).unused1
            App.graphics.f560.Combo(i).unused2 = Combos(i).unused2
        Next
        App.graphics.f560.update()
        Hide()
    End Sub
	
	'UPGRADE_WARNING: Event Unused1.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub Unused1_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Unused1.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Combos(selectedcombo).Unused1 = App.EFChange8(Unused1, 0, 255)
		subchange = False
	End Sub
	
	'UPGRADE_WARNING: Event unused2.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub unused2_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles unused2.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Combos(selectedcombo).Unused2 = App.EFChange8(Unused2, 0, 255)
		subchange = False
	End Sub

    Private Sub ComboEditor_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
        If e.CloseReason = CloseReason.UserClosing Then
            e.Cancel = True
            Hide()
        End If
    End Sub

    Private Sub ComboEditor_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ComboList.SmallImageList = App.JewelIL
        ItemList.SmallImageList = App.JewelIL
    End Sub
End Class