Imports System.Web.Services.Protocols

Imports BusinessWindows.ServiceReference

Public Class Form1

    Private Sub btnOpenLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOpenLogin.Click
        Dim login As New Login
        login.Show()
    End Sub

    Private Sub btnCallWithAuthentication_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCallWithAuthentication.Click
        Try
            Dim service As New Service
            service.MethodWithAuthentication()
            MessageBox.Show("処理が正常終了しました")
        Catch ex As SoapException
            MessageBox.Show("認証がされていません " + ex.ToString)
        End Try
    End Sub

    Private Sub btnCallWithoutAuthentication_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCallWithoutAuthentication.Click
        Dim service As New ServiceReference.Service()
        service.MethodWithoutAuthentication()
        MessageBox.Show("処理が正常終了しました")
    End Sub
End Class
