Option Strict Off
Option Explicit On
Imports Microsoft.VisualBasic.PowerPacks
Friend Class MonsterGraphicInfoEditor
	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 MonsterGraphicInfos() As monstergraphicinfo = ADGEDotNetUt.ArrayUt(Of monstergraphicinfo).NewArray1(27)
    Public selectedmonstergraphicinfos As Short
	Public subchange As Boolean
	
    Public Sub init()
        Dim i As Short

        MonsterGraphicInfoList.Items.Clear()

        Dim c As Integer
        Dim rows As String() = DUt.Read_Dic_Creature()
        For c = 0 To 27 - 1
            MonsterGraphicInfoList.Items.Add(c.ToString("00")).SubItems.Add(rows(c))
        Next

        For i = 1 To 27
            MonsterGraphicInfos(i).byte0 = App.graphics.f558.monstergraphicinfo(i).byte0
            MonsterGraphicInfos(i).byte10 = App.graphics.f558.monstergraphicinfo(i).byte10
            MonsterGraphicInfos(i).byte11 = App.graphics.f558.monstergraphicinfo(i).byte11
            MonsterGraphicInfos(i).byte2 = App.graphics.f558.monstergraphicinfo(i).byte2
            MonsterGraphicInfos(i).byte3 = App.graphics.f558.monstergraphicinfo(i).byte3
            MonsterGraphicInfos(i).widthattack = App.graphics.f558.monstergraphicinfo(i).widthattack
            MonsterGraphicInfos(i).widthfront = App.graphics.f558.monstergraphicinfo(i).widthfront
            MonsterGraphicInfos(i).widthside = App.graphics.f558.monstergraphicinfo(i).widthside
            MonsterGraphicInfos(i).heightattack = App.graphics.f558.monstergraphicinfo(i).heightattack
            MonsterGraphicInfos(i).heightfront = App.graphics.f558.monstergraphicinfo(i).heightfront
            MonsterGraphicInfos(i).heightside = App.graphics.f558.monstergraphicinfo(i).heightside
            MonsterGraphicInfos(i).graphicnum = App.graphics.f558.monstergraphicinfo(i).graphicnum
        Next
        subchange = True
        selectmonstergraphicinfo(1)
        subchange = False
    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"'
    Public Sub load_graphics()
        Dim i As Integer
        Dim GWidth As Integer
        Dim GHeight As Integer



        'graphics.resetmodifiedcolorarray
        graphics.curPalette = graphics.gPALETTE_CUSTOM
        graphics.copypalette(graphics.gPALETTE_MAIN, graphics.gPALETTE_CUSTOM)
        i = MonsterGraphicInfos(selectedmonstergraphicinfos).graphicnum + 446
        If MonsterGraphicInfos(selectedmonstergraphicinfos).colora > 0 Then
            graphics.setpalette(graphics.gPALETTE_CUSTOM, 10, graphics.f558.palettetocolor(App.graphics.f558.palette(MonsterGraphicInfos(selectedmonstergraphicinfos).colora, 1)))
        End If
        If MonsterGraphicInfos(selectedmonstergraphicinfos).colorb > 0 Then
            graphics.setpalette(graphics.gPALETTE_CUSTOM, 9, graphics.f558.palettetocolor(App.graphics.f558.palette(MonsterGraphicInfos(selectedmonstergraphicinfos).colorb, 1)))
        End If
        GWidth = MonsterGraphicInfos(selectedmonstergraphicinfos).widthfront * 2
        GHeight = MonsterGraphicInfos(selectedmonstergraphicinfos).heightfront
        GraphicA.Left = ((LineA.X2) - (LineA.X1)) / 2 + (LineA.X1) - GWidth / 2 - 2
        GraphicA.Width = GWidth + 4
        GraphicA.Height = GHeight + 4
        If True Then
            Dim offscreen As New Drawing.Bitmap(GWidth, GHeight)
            Using cv As Drawing.Graphics = Drawing.Graphics.FromImage(offscreen)
                graphics.stretchbmp(cv, i, 0, 0, GWidth, GHeight, 0, 0)
            End Using
            GraphicA.Image = offscreen
        End If
        GraphicA.Refresh()

        i = i + 1
        If graphics.f559.monster(selectedmonstergraphicinfos).w4_sideimage > 0 Then
            GWidth = MonsterGraphicInfos(selectedmonstergraphicinfos).widthside * 2
            GHeight = MonsterGraphicInfos(selectedmonstergraphicinfos).heightside
            GraphicB.Left = ((LineB.X2) - (LineB.X1)) / 2 + (LineB.X1) - GWidth / 2 - 2
            GraphicB.Width = GWidth + 4
            GraphicB.Height = GHeight + 4
            If True Then
                Dim offscreen As New Drawing.Bitmap(GWidth, GHeight)
                Using cv As Drawing.Graphics = Drawing.Graphics.FromImage(offscreen)
                    graphics.stretchbmp(cv, i, 0, 0, GWidth, GHeight, 0, 0)
                End Using
                GraphicB.Image = offscreen
            End If
            GraphicB.Refresh()
            i = i + 1
            GraphicB.Visible = True
        Else
            GraphicB.Visible = False
        End If
        'UPGRADE_WARNING: Couldn't resolve default property of object graphics.f559. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
        If graphics.f559.monster(selectedmonstergraphicinfos).w4_backimage > 0 Then
            'UPGRADE_WARNING: Couldn't resolve default property of object GWidth. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            GWidth = MonsterGraphicInfos(selectedmonstergraphicinfos).widthfront * 2
            GHeight = MonsterGraphicInfos(selectedmonstergraphicinfos).heightfront
            'UPGRADE_WARNING: Couldn't resolve default property of object GWidth. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            GraphicC.Left = ((LineC.X2) - (LineC.X1)) / 2 + (LineC.X1) - GWidth / 2 - 2
            'UPGRADE_WARNING: Couldn't resolve default property of object GWidth. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            GraphicC.Width = GWidth + 4
            GraphicC.Height = GHeight + 4
            'UPGRADE_ISSUE: PictureBox property GraphicC.hdc was not upgraded. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="CC4C7EC0-C903-48FC-ACCC-81861D12DA4A"'
            'UPGRADE_WARNING: Couldn't resolve default property of object graphics.stretchbmp. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'

            If True Then
                Dim offscreen As New Drawing.Bitmap(GWidth, GHeight)
                Using cv As Drawing.Graphics = Drawing.Graphics.FromImage(offscreen)
                    graphics.stretchbmp(cv, i, 0, 0, GWidth, GHeight, 0, 0)
                End Using
                GraphicC.Image = offscreen
            End If
            GraphicC.Refresh()
            i = i + 1
            GraphicC.Visible = True
        Else
            GraphicC.Visible = False
        End If
        'UPGRADE_WARNING: Couldn't resolve default property of object graphics.f559. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
        If graphics.f559.monster(selectedmonstergraphicinfos).w4_attackimage > 0 Then
            'UPGRADE_WARNING: Couldn't resolve default property of object GWidth. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            GWidth = MonsterGraphicInfos(selectedmonstergraphicinfos).widthattack * 2
            GHeight = MonsterGraphicInfos(selectedmonstergraphicinfos).heightattack
            'UPGRADE_WARNING: Couldn't resolve default property of object GWidth. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            GraphicD.Left = ((LineD.X2) - (LineD.X1)) / 2 + (LineD.X1) - GWidth / 2 - 2
            'UPGRADE_WARNING: Couldn't resolve default property of object GWidth. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            GraphicD.Width = GWidth + 4
            GraphicD.Height = GHeight + 4
            'UPGRADE_ISSUE: PictureBox property GraphicD.hdc was not upgraded. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="CC4C7EC0-C903-48FC-ACCC-81861D12DA4A"'
            'UPGRADE_WARNING: Couldn't resolve default property of object graphics.stretchbmp. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            If True Then
                Dim offscreen As New Drawing.Bitmap(GWidth, GHeight)
                Using cv As Drawing.Graphics = Drawing.Graphics.FromImage(offscreen)
                    graphics.stretchbmp(cv, i, 0, 0, GWidth, GHeight, 0, 0)
                End Using
                GraphicD.Image = offscreen
            End If
            GraphicD.Refresh()
            i = i + 1
            GraphicD.Visible = True
        Else
            GraphicD.Visible = False
        End If
    End Sub
    Public Sub selectmonstergraphicinfo(ByVal num As Short)
        selectedmonstergraphicinfos = num

        MonsterGraphicInfoList.Items(selectedmonstergraphicinfos - 1).Focused = True
        MyUt.CheckSel(MonsterGraphicInfoList, selectedmonstergraphicinfos - 1, "BlueGem")
        Byte0.Text = Str(MonsterGraphicInfos(num).byte0)
        Byte2.Text = Str(MonsterGraphicInfos(num).byte2)
        Byte3.Text = Str(MonsterGraphicInfos(num).byte3)
        GraphicNum.Text = Str(MonsterGraphicInfos(num).graphicnum)
        HeightAttack.Text = Str(MonsterGraphicInfos(num).heightattack)
        HeightFront.Text = Str(MonsterGraphicInfos(num).heightfront)
        HeightSide.Text = Str(MonsterGraphicInfos(num).heightside)
        WidthFront.Text = Str(MonsterGraphicInfos(num).widthfront)
        WidthSide.Text = Str(MonsterGraphicInfos(num).widthside)
        WidthAttack.Text = Str(MonsterGraphicInfos(num).widthattack)
        GraphicGroup.Text = Str(MonsterGraphicInfos(num).graphicgroup)
        TransparentPixel.Text = Str(MonsterGraphicInfos(num).transparentpixel)
        ColorA.Text = Str(MonsterGraphicInfos(num).colora)
        ColorB.Text = Str(MonsterGraphicInfos(num).colorb)
        BColorA.BackColor = graphics.f558.palettetocolor(App.graphics.f558.palette(MonsterGraphicInfos(num).colora, 1))
        BColorB.BackColor = graphics.f558.palettetocolor(App.graphics.f558.palette(MonsterGraphicInfos(num).colorb, 1))
        BColorTransparent.BackColor = graphics.getpalette(graphics.gPALETTE_MAIN, MonsterGraphicInfos(num).transparentpixel)
        load_graphics()
    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 AutoCalcSizes_ClickEvent(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles AutoCalcSizes.Click

        Dim i As Integer
        Dim GWidth As Integer
        Dim GHeight As Integer

        subchange = True

        'graphics.resetmodifiedcolorarray
        i = MonsterGraphicInfos(selectedmonstergraphicinfos).graphicnum + 446
        GWidth = graphics.getgbitmapwidth(i) / 2
        GHeight = graphics.getgbitmapheight(i)
        MonsterGraphicInfos(selectedmonstergraphicinfos).widthfront = GWidth
        MonsterGraphicInfos(selectedmonstergraphicinfos).heightfront = GHeight

        i = i + 1
        If graphics.f559.monster(selectedmonstergraphicinfos).w4_sideimage > 0 Then
            GWidth = graphics.getgbitmapwidth(i) / 2
            GHeight = graphics.getgbitmapheight(i)
            MonsterGraphicInfos(selectedmonstergraphicinfos).widthside = GWidth
            MonsterGraphicInfos(selectedmonstergraphicinfos).heightside = GHeight
            i = i + 1
        End If
        If graphics.f559.monster(selectedmonstergraphicinfos).w4_backimage > 0 Then
            i = i + 1
        End If
        If graphics.f559.monster(selectedmonstergraphicinfos).w4_attackimage > 0 Then
            GWidth = graphics.getgbitmapwidth(i) / 2
            GHeight = graphics.getgbitmapheight(i)
            MonsterGraphicInfos(selectedmonstergraphicinfos).widthattack = GWidth
            MonsterGraphicInfos(selectedmonstergraphicinfos).heightattack = GHeight
        End If
        HeightAttack.Text = Str(MonsterGraphicInfos(selectedmonstergraphicinfos).heightattack)
        HeightFront.Text = Str(MonsterGraphicInfos(selectedmonstergraphicinfos).heightfront)
        HeightSide.Text = Str(MonsterGraphicInfos(selectedmonstergraphicinfos).heightside)
        WidthFront.Text = Str(MonsterGraphicInfos(selectedmonstergraphicinfos).widthfront)
        WidthSide.Text = Str(MonsterGraphicInfos(selectedmonstergraphicinfos).widthside)
        WidthAttack.Text = Str(MonsterGraphicInfos(selectedmonstergraphicinfos).widthattack)

        load_graphics()
        subchange = False
    End Sub

    Private Sub BColorA_ClickEvent(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles BColorA.Click
        Dim p As PaletteEditor
        p = New PaletteEditor
        p.Show()
        p.init()
        p.txtbox = ColorA
        p.selectpalette(MonsterGraphicInfos(selectedmonstergraphicinfos).colora)
    End Sub
    Private Sub BColorB_ClickEvent(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles BColorB.Click
        Dim p As PaletteEditor
        p = New PaletteEditor
        p.Show()
        p.init()
        p.txtbox = ColorB
        p.selectpalette(MonsterGraphicInfos(selectedmonstergraphicinfos).colorb)
    End Sub

    'UPGRADE_WARNING: Event byte0.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 byte0_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Byte0.TextChanged
        If subchange = True Then
            Exit Sub
        End If
        subchange = True
        MonsterGraphicInfos(selectedmonstergraphicinfos).byte0 = App.EFChange8(Byte0, 0, 255)
        subchange = False
    End Sub

    'UPGRADE_WARNING: Event Byte2.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 Byte2_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Byte2.TextChanged

        If subchange = True Then
            Exit Sub
        End If
        subchange = True
        MonsterGraphicInfos(selectedmonstergraphicinfos).byte2 = App.EFChange8(Byte2, 0, 255)
        subchange = False
    End Sub

    'UPGRADE_WARNING: Event Byte3.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 Byte3_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Byte3.TextChanged

        If subchange = True Then
            Exit Sub
        End If
        subchange = True
        MonsterGraphicInfos(selectedmonstergraphicinfos).byte3 = App.EFChange8(Byte3, 0, 255)
        subchange = False
    End Sub

    Private Sub Cancel_ClickEvent(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Cancel.Click
        Hide()

    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"'
    'UPGRADE_WARNING: Event ColorA.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 ColorA_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles ColorA.TextChanged

        If subchange = True Then
            Exit Sub
        End If
        subchange = True
        MonsterGraphicInfos(selectedmonstergraphicinfos).setcolora(App.EFChange8(ColorA, 0, 13))
        'UPGRADE_WARNING: Couldn't resolve default property of object graphics.f558. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
        BColorA.BackColor = graphics.f558.palettetocolor(App.graphics.f558.palette(MonsterGraphicInfos(selectedmonstergraphicinfos).colora, 1))
        load_graphics()
        subchange = False
    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"'
    'UPGRADE_WARNING: Event ColorB.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 ColorB_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles ColorB.TextChanged

        If subchange = True Then
            Exit Sub
        End If
        subchange = True
        MonsterGraphicInfos(selectedmonstergraphicinfos).setcolorb(App.EFChange8(ColorB, 0, 13))
        'UPGRADE_WARNING: Couldn't resolve default property of object graphics.f558. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
        BColorB.BackColor = graphics.f558.palettetocolor(App.graphics.f558.palette(MonsterGraphicInfos(selectedmonstergraphicinfos).colorb, 1))
        load_graphics()
        subchange = False
    End Sub



    'UPGRADE_WARNING: Event GraphicGroup.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 GraphicGroup_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles GraphicGroup.TextChanged
        If subchange = True Then
            Exit Sub
        End If
        subchange = True
        MonsterGraphicInfos(selectedmonstergraphicinfos).setgraphicgroup(App.EFChange8(GraphicGroup, 0, 15))
        GraphicGroup.Text = Str(MonsterGraphicInfos(selectedmonstergraphicinfos).graphicgroup)
        subchange = False
    End Sub

    'UPGRADE_WARNING: Event GraphicNum.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 GraphicNum_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles GraphicNum.TextChanged
        If subchange = True Then
            Exit Sub
        End If
        subchange = True
        MonsterGraphicInfos(selectedmonstergraphicinfos).graphicnum = App.EFChange8(GraphicNum, 0, 255)
        load_graphics()
        subchange = False
    End Sub

    Private Sub monstergraphicinfoList_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MonsterGraphicInfoList.SelectedIndexChanged
        If MonsterGraphicInfoList.FocusedItem Is Nothing Then Exit Sub
        If subchange = True Then
            Exit Sub
        End If
        subchange = True
        selectmonstergraphicinfo(MonsterGraphicInfoList.FocusedItem.Index + 1)
        subchange = False
    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 27

            'UPGRADE_WARNING: Couldn't resolve default property of object i. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            App.graphics.f558.monstergraphicinfo(i).byte0 = MonsterGraphicInfos(i).byte0
            'UPGRADE_WARNING: Couldn't resolve default property of object i. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            App.graphics.f558.monstergraphicinfo(i).byte10 = MonsterGraphicInfos(i).byte10
            'UPGRADE_WARNING: Couldn't resolve default property of object i. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            App.graphics.f558.monstergraphicinfo(i).byte11 = MonsterGraphicInfos(i).byte11
            'UPGRADE_WARNING: Couldn't resolve default property of object i. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            App.graphics.f558.monstergraphicinfo(i).byte2 = MonsterGraphicInfos(i).byte2
            'UPGRADE_WARNING: Couldn't resolve default property of object i. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            App.graphics.f558.monstergraphicinfo(i).byte3 = MonsterGraphicInfos(i).byte3
            'UPGRADE_WARNING: Couldn't resolve default property of object i. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            App.graphics.f558.monstergraphicinfo(i).widthattack = MonsterGraphicInfos(i).widthattack
            'UPGRADE_WARNING: Couldn't resolve default property of object i. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            App.graphics.f558.monstergraphicinfo(i).widthfront = MonsterGraphicInfos(i).widthfront
            'UPGRADE_WARNING: Couldn't resolve default property of object i. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            App.graphics.f558.monstergraphicinfo(i).widthside = MonsterGraphicInfos(i).widthside
            'UPGRADE_WARNING: Couldn't resolve default property of object i. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            App.graphics.f558.monstergraphicinfo(i).heightattack = MonsterGraphicInfos(i).heightattack
            'UPGRADE_WARNING: Couldn't resolve default property of object i. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            App.graphics.f558.monstergraphicinfo(i).heightfront = MonsterGraphicInfos(i).heightfront
            'UPGRADE_WARNING: Couldn't resolve default property of object i. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            App.graphics.f558.monstergraphicinfo(i).heightside = MonsterGraphicInfos(i).heightside
            'UPGRADE_WARNING: Couldn't resolve default property of object i. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            App.graphics.f558.monstergraphicinfo(i).graphicnum = MonsterGraphicInfos(i).graphicnum
        Next
        App.graphics.f558.update()
        Hide()
    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"'
    'UPGRADE_WARNING: Event TransparentPixel.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 TransparentPixel_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles TransparentPixel.TextChanged


        If subchange = True Then
            Exit Sub
        End If
        subchange = True
        MonsterGraphicInfos(selectedmonstergraphicinfos).settransparentpixel(App.EFChange8(TransparentPixel, 0, 15))
        TransparentPixel.Text = Str(MonsterGraphicInfos(selectedmonstergraphicinfos).transparentpixel)
        'UPGRADE_WARNING: Couldn't resolve default property of object graphics.gPALETTE_MAIN. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
        'UPGRADE_WARNING: Couldn't resolve default property of object graphics.getpalette. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
        BColorTransparent.BackColor = graphics.getpalette(graphics.gPALETTE_MAIN, MonsterGraphicInfos(selectedmonstergraphicinfos).transparentpixel)
        subchange = False
    End Sub
	
	
	
	'UPGRADE_WARNING: Event WidthFront.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 WidthFront_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles WidthFront.TextChanged
		
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		MonsterGraphicInfos(selectedmonstergraphicinfos).WidthFront = App.EFChange8(WidthFront, 0, 255)
		'ImageA.width = 2 * MonsterGraphicInfos(selectedmonstergraphicinfos).WidthFront + 4
		'ImageC.width = 2 * MonsterGraphicInfos(selectedmonstergraphicinfos).WidthFront + 4
		load_graphics()
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event Widthside.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 Widthside_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Widthside.TextChanged
		
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		MonsterGraphicInfos(selectedmonstergraphicinfos).WidthSide = App.EFChange8(WidthSide, 0, 255)
		'ImageB.width = 2 * MonsterGraphicInfos(selectedmonstergraphicinfos).WidthSide + 4
		load_graphics()
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event Widthattack.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 Widthattack_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Widthattack.TextChanged
		
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		MonsterGraphicInfos(selectedmonstergraphicinfos).WidthAttack = App.EFChange8(WidthAttack, 0, 255)
		'ImageD.width = 2 * MonsterGraphicInfos(selectedmonstergraphicinfos).WidthAttack + 4
		load_graphics()
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event heightFront.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 heightFront_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles heightFront.TextChanged
		
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		MonsterGraphicInfos(selectedmonstergraphicinfos).HeightFront = App.EFChange8(HeightFront, 0, 255)
		
		'ImageA.height = MonsterGraphicInfos(selectedmonstergraphicinfos).HeightFront + 4
		'ImageC.height = MonsterGraphicInfos(selectedmonstergraphicinfos).HeightFront + 4
		load_graphics()
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event heightside.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 heightside_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles heightside.TextChanged
		
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		MonsterGraphicInfos(selectedmonstergraphicinfos).HeightSide = App.EFChange8(HeightSide, 0, 255)
		'ImageB.height = MonsterGraphicInfos(selectedmonstergraphicinfos).HeightSide + 4
		load_graphics()
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event heightattack.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 heightattack_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles heightattack.TextChanged
		
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		MonsterGraphicInfos(selectedmonstergraphicinfos).HeightAttack = App.EFChange8(HeightAttack, 0, 255)
		'ImageD.height = MonsterGraphicInfos(selectedmonstergraphicinfos).HeightAttack + 4
		load_graphics()
		subchange = False
	End Sub

    Private Sub MonsterGraphicInfoEditor_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 MonsterGraphicInfoEditor_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        MonsterGraphicInfoList.SmallImageList = App.JewelIL
    End Sub
End Class