Option Strict Off
Option Explicit On
Friend Class TeleporterEditor
	Inherits System.Windows.Forms.Form
	
    Public Sub init()
        CGLocationList.Items.Clear()
        CGLocationList.Items.Add("00").SubItems.Add("D3Center")
        CGLocationList.Items.Add("01").SubItems.Add("D3Left")
        CGLocationList.Items.Add("02").SubItems.Add("D3Right")
        CGLocationList.Items.Add("03").SubItems.Add("D2Center")
        CGLocationList.Items.Add("04").SubItems.Add("D2Left")
        CGLocationList.Items.Add("05").SubItems.Add("D2Right")
        CGLocationList.Items.Add("06").SubItems.Add("D1Center")
        CGLocationList.Items.Add("07").SubItems.Add("D1Left")
        CGLocationList.Items.Add("08").SubItems.Add("D1Right")
        CGLocationList.Items.Add("09").SubItems.Add("D0Center")

        CGLocationList.Items(0).Focused = True
    End Sub
	
    Private Sub Cancel_ClickEvent(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Cancel.Click
        Me.Close()
    End Sub
	
    Private Sub CGLocationList_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles CGLocationList.SelectedIndexChanged
        If CGLocationList.FocusedItem Is Nothing Then Exit Sub

        MyUt.CheckSel(CGLocationList, CGLocationList.FocusedItem.Index, "BlueGem")
        Me.GGraphicAddress.Text = Str(graphics.f558.animationinfo(CGLocationList.FocusedItem.Index + 1).graphicaddress)
        Me.GGraphicNum.Text = Str(graphics.f558.animationinfo(CGLocationList.FocusedItem.Index + 1).GraphicNum)
        Me.GGraphicRand.Text = Str(graphics.f558.animationinfo(CGLocationList.FocusedItem.Index + 1).graphicrand)
        Me.GHeight.Text = Str(graphics.f558.animationinfo(CGLocationList.FocusedItem.Index + 1).height)
        Me.GSrcX.Text = Str(graphics.f558.animationinfo(CGLocationList.FocusedItem.Index + 1).srcx)
        Me.GSrcY.Text = Str(graphics.f558.animationinfo(CGLocationList.FocusedItem.Index + 1).srcy)
        Me.GTransparentPixel.Text = Str(graphics.f558.animationinfo(CGLocationList.FocusedItem.Index + 1).TransparentPixel)
        Me.GWidth.Text = Str(graphics.f558.animationinfo(CGLocationList.FocusedItem.Index + 1).width)
    End Sub
	
	
	Private Sub Ok_Click()
		Me.Close()
	End Sub

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