54 lines
1.4 KiB
VB.net
54 lines
1.4 KiB
VB.net
Imports System.IO
|
|
Imports MySql.Data.MySqlClient
|
|
|
|
Public Class frm_update_logo
|
|
|
|
|
|
Private Sub btn_open_Click(sender As Object, e As EventArgs) Handles btn_open.Click
|
|
|
|
If IsNothing(pb_logo.Image) Then
|
|
|
|
' Loads And Image And Resize It In PNG Format
|
|
ResizePicture(pb_logo, 500, 500)
|
|
|
|
ElseIf Not IsNothing(pb_logo.Image) Then
|
|
|
|
Dim iPictureUpdate As DialogResult = MessageBox.Show("Would You Like To Update The Club Logo ?", "Club Logo Update", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
|
|
|
|
If iPictureUpdate = DialogResult.Yes Then
|
|
|
|
' Loads And Image And Resize It In PNG Format
|
|
ResizePicture(pb_logo, 500, 500)
|
|
|
|
End If
|
|
|
|
End If
|
|
|
|
End Sub
|
|
|
|
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
|
|
|
' List Down Clubs
|
|
GetClubsList(cbo_clubs)
|
|
|
|
End Sub
|
|
|
|
Private Sub btn_save_Click(sender As Object, e As EventArgs) Handles btn_save.Click
|
|
|
|
' Updates A Club Logo
|
|
UpdateClubLogo(pb_logo, cbo_clubs.SelectedValue)
|
|
|
|
End Sub
|
|
|
|
Private Sub cbo_clubs_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cbo_clubs.SelectedIndexChanged
|
|
|
|
Try
|
|
' Displays Clubs Logo
|
|
GetClubLogo(pb_logo, cbo_clubs.SelectedValue)
|
|
Catch ex As Exception
|
|
|
|
End Try
|
|
|
|
End Sub
|
|
|
|
End Class |