first visual basic code upload

This commit is contained in:
ghassan committed 2020-02-16 03:39:56 +03:00
1 parent 93697318e4
commit 5e53ab7d73
101 files changed
+21213

No files matched your search

@@ -0,0 +1,104 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frm_update_logo
Inherits System.Windows.Forms.Form
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.cbo_clubs = New System.Windows.Forms.ComboBox()
Me.btn_save = New System.Windows.Forms.Button()
Me.btn_open = New System.Windows.Forms.Button()
Me.pb_logo = New System.Windows.Forms.PictureBox()
CType(Me.pb_logo, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'cbo_clubs
'
Me.cbo_clubs.BackColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
Me.cbo_clubs.DropDownHeight = 100
Me.cbo_clubs.Font = New System.Drawing.Font("Microsoft Sans Serif", 18.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World, CType(0, Byte))
Me.cbo_clubs.ForeColor = System.Drawing.Color.White
Me.cbo_clubs.FormattingEnabled = True
Me.cbo_clubs.IntegralHeight = False
Me.cbo_clubs.Location = New System.Drawing.Point(5, 335)
Me.cbo_clubs.Name = "cbo_clubs"
Me.cbo_clubs.Size = New System.Drawing.Size(325, 30)
Me.cbo_clubs.TabIndex = 9
'
'btn_save
'
Me.btn_save.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btn_save.Font = New System.Drawing.Font("Microsoft Sans Serif", 18.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World, CType(0, Byte))
Me.btn_save.ForeColor = System.Drawing.Color.White
Me.btn_save.Location = New System.Drawing.Point(170, 370)
Me.btn_save.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.btn_save.Name = "btn_save"
Me.btn_save.Size = New System.Drawing.Size(160, 45)
Me.btn_save.TabIndex = 8
Me.btn_save.Text = "Save"
Me.btn_save.UseVisualStyleBackColor = True
'
'btn_open
'
Me.btn_open.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btn_open.Font = New System.Drawing.Font("Microsoft Sans Serif", 18.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World, CType(0, Byte))
Me.btn_open.ForeColor = System.Drawing.Color.White
Me.btn_open.Location = New System.Drawing.Point(5, 370)
Me.btn_open.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.btn_open.Name = "btn_open"
Me.btn_open.Size = New System.Drawing.Size(160, 45)
Me.btn_open.TabIndex = 7
Me.btn_open.Text = "Open"
Me.btn_open.UseVisualStyleBackColor = True
'
'pb_logo
'
Me.pb_logo.Location = New System.Drawing.Point(5, 5)
Me.pb_logo.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.pb_logo.Name = "pb_logo"
Me.pb_logo.Size = New System.Drawing.Size(325, 325)
Me.pb_logo.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage
Me.pb_logo.TabIndex = 6
Me.pb_logo.TabStop = False
'
'frm_update_logo
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.BackColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
Me.ClientSize = New System.Drawing.Size(336, 421)
Me.Controls.Add(Me.cbo_clubs)
Me.Controls.Add(Me.btn_save)
Me.Controls.Add(Me.btn_open)
Me.Controls.Add(Me.pb_logo)
Me.ForeColor = System.Drawing.Color.White
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.Name = "frm_update_logo"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "Update Club Logo"
CType(Me.pb_logo, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
End Sub
Friend WithEvents cbo_clubs As ComboBox
Friend WithEvents btn_save As Button
Friend WithEvents btn_open As Button
Friend WithEvents pb_logo As PictureBox
End Class
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
@@ -0,0 +1,54 @@
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