Imports System.Windows.Forms

Public Class NewEntry

    Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click
        Dim aItem As String
        Dim description As String
        aItem = Me.itemTextBox.Text
        description = Me.descriptionTextBox.Text
        If aItem = "" Or description = "" Then
            Me.DialogResult = Windows.Forms.DialogResult.None
        Else
            Me.DialogResult = System.Windows.Forms.DialogResult.OK
            Me.Close()
        End If
    End Sub

    Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
        Me.Close()
    End Sub

End Class
