Imports System.Windows.Forms

Public Class inputText
    Public correct_message As Boolean = False
    Private Sub btnOk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOk.Click
        If txtMessage.Text = ("Inserisci qui il testo da visualizzare prima dello spegnimento...") Or txtMessage.Text = ("") Or txtMessage.Text = (" ") Then
            MsgBox("Nessun messaggio inserito!", MsgBoxStyle.Exclamation, "Avviso OffTime")
            correct_message = False
        Else
            correct_message = True
            Me.Visible = False
            Me.ShowInTaskbar = False
        End If
    End Sub

    Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click
        correct_message = False
        mainForm.cmdVisualText.Checked = False
        Me.Close()
    End Sub


    Private Sub txtMessage_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtMessage.Click
        If txtMessage.Text = ("Inserisci qui il testo da visualizzare prima dello spegnimento...") And btnClear.Enabled Then
            txtMessage.Text = String.Empty
        End If

    End Sub

    Private Sub txtinput_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        correct_message = False
        Me.Focus()
    End Sub
End Class
