Untitled

 avatar
unknown
plain_text
3 years ago
3.5 kB
7
Indexable
Option Strict On
Public Class SPPerfection
    Private Sub SPPerfection_Load(sender As Object, e As EventArgs) Handles MyBase.Load

        AddHandler TextBox_SPP.TextChanged, AddressOf TextBox_TextChanged
        AddHandler TextBox_SPPAtk.TextChanged, AddressOf TextBox_TextChanged
        AddHandler TextBox_SPPDef.TextChanged, AddressOf TextBox_TextChanged
        AddHandler TextBox_SPPProp.TextChanged, AddressOf TextBox_TextChanged
        AddHandler TextBox_SPPHPMP.TextChanged, AddressOf TextBox_TextChanged
        AddHandler TextBox_SPPFire.TextChanged, AddressOf TextBox_TextChanged
        AddHandler TextBox_SPPWater.TextChanged, AddressOf TextBox_TextChanged
        AddHandler TextBox_SPPLight.TextChanged, AddressOf TextBox_TextChanged
        AddHandler TextBox_SPPShadow.TextChanged, AddressOf TextBox_TextChanged
        AddHandler TextBox_SPPName.TextChanged, AddressOf TextBox_TextChanged

    End Sub

    Private Sub TextBox_SPPSlot_TextChanged(sender As Object, e As EventArgs) Handles TextBox_SPPSlot.TextChanged

        If TextBox_SPPSlot.Text = "" Then TextBox_SPPSlot.Text = "0"
        Dim changed As TextBox = DirectCast(sender, TextBox)
        TextBox_SPPCommand.Text = $"$Perfection {TextBox_SPPSlot.Text}"

    End Sub

    Private Sub TextBox_TextChanged(sender As Object, e As EventArgs)

        Dim changed As TextBox = DirectCast(sender, TextBox)
        TextBox_SPPCommand.Text = $"$Perfection {TextBox_SPPSlot.Text} {changed.Tag} {changed.Text}"

    End Sub

    Private Sub GunaImageButton_ClipSPP_Click(sender As Object, e As EventArgs) Handles GunaImageButton_ClipSPP.Click

        'Clipboard Function
        Clipboard.SetText(TextBox_SPPCommand.Text)
        '<<<------>>>
        TextBox_SPPSlot.Clear()
        TextBox_SPP.Clear()
        TextBox_SPPAtk.Clear()
        TextBox_SPPDef.Clear()
        TextBox_SPPProp.Clear()
        TextBox_SPPHPMP.Clear()
        TextBox_SPPFire.Clear()
        TextBox_SPPWater.Clear()
        TextBox_SPPLight.Clear()
        TextBox_SPPShadow.Clear()
        TextBox_SPPName.Clear()
        TextBox_SPPCommand.Clear()


    End Sub

    Private Sub GunaImageButton_ClipSPP_MouseClick(sender As Object, e As MouseEventArgs) Handles GunaImageButton_ClipSPP.MouseClick

        'A Hide Clipboard Icon & Show Checkmark Icon
        GunaImageButton_ClipSPP.Visible = False
        GunaImageButton_CheckmarkSPP.Visible = True
        '<<<------>>>

    End Sub

    Private Sub TextBox_SPPCommand_TextChanged(sender As Object, e As EventArgs) Handles TextBox_SPPCommand.TextChanged

        'When Empty don't show Clipboard Icon
        If TextBox_SPPCommand.Text = "" Then
            GunaImageButton_ClipSPP.Visible = False
        End If
        '<<<------>>>

        'Show Clipboard Icon & Hide Checkmark Icon
        GunaImageButton_ClipSPP.Visible = True
        GunaImageButton_CheckmarkSPP.Visible = False
        '<<<------>>>

    End Sub

    Private Sub GunaCheckBox_SPPE_CheckedChanged(sender As Object, e As EventArgs) Handles GunaCheckBox_SPPE.CheckedChanged

        Label_SPPName.Visible = GunaCheckBox_SPPE.Checked
        TextBox_SPPName.Visible = GunaCheckBox_SPPE.Checked

        TextBox_SPPCommand.Text = "$edit "
        TextBox_SPPName.Clear()

    End Sub

    Private Sub TextBox_SPPName_TextChanged(sender As Object, e As EventArgs) Handles TextBox_SPPName.TextChanged

    End Sub

End Class