Public Class frmMain

    Private mobjHuman As New MyClassLibrary.clsHuman

    Private Sub mprcPropertySet()

        With mobjHuman
            .pstrFamilyname = txtFamilyName.Text
            .pstrFirstname = txtFirstName.Text
            .pstrfurigana = txtFurigana.Text
            .pdteBirthday = DateTime.Parse(txtBirthday.Text)
            .plngIncome = Long.Parse(txtIncome.Text)
        End With

    End Sub

    Private Sub mprcPropertyGet()

        With mobjHuman
            txtFamilyName.Text = .pstrFamilyname
            txtFirstName.Text = .pstrFirstname
            txtFurigana.Text = .pstrfurigana
            txtBirthday.Text = .pdteBirthday.ToString
            txtIncome.Text = .plngIncome.ToString
        End With

    End Sub

    Private Sub mprcClear()

        For Each ctrMine As Control In Me.Controls
            If ctrMine.Name Like "txt*" Then
                ctrMine.Text = ""
            End If
        Next

    End Sub

    Private Sub btnSet_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSet.Click

        mprcPropertySet()

    End Sub

    Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click

        mprcClear()

    End Sub

    Private Sub btnGet_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGet.Click

        mprcPropertyGet()

    End Sub

    Private Sub btnQuit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnQuit.Click

        Me.Close()
        Application.Exit()

    End Sub
End Class
