98 lines
3.9 KiB
VB.net
98 lines
3.9 KiB
VB.net
Imports System.IO
|
|
Imports System.Net.Mail
|
|
|
|
Public Class Form14
|
|
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
|
Try
|
|
If TextBox1.Text = "" Then
|
|
MsgBox("Vous deviez d'entrer votre message", MsgBoxStyle.Critical)
|
|
Exit Sub
|
|
End If
|
|
Dim bvr As String = ""
|
|
If beta = 0 Then
|
|
bvr = "version: officiel " & vr
|
|
Else
|
|
bvr = "version: Béta " & vr
|
|
End If
|
|
|
|
Dim nom = TextBox1.Text & vbNewLine & bvr & vbNewLine & "OS: " & My.Computer.Info.OSFullName
|
|
|
|
Dim Message As String = nom
|
|
|
|
Dim MyMailMessage As New MailMessage()
|
|
Dim SMTPServer As New SmtpClient("mail48.lwspanel.com")
|
|
|
|
MyMailMessage.From = New MailAddress("noreply@lecteur-media.fr")
|
|
MyMailMessage.To.Add("contact@lecteur-media.fr")
|
|
MyMailMessage.Subject = ("message pour le dev")
|
|
MyMailMessage.Body = (Message)
|
|
|
|
SMTPServer.Port = ("587") 'Port
|
|
SMTPServer.Credentials = New System.Net.NetworkCredential("noreply@lecteur-media.fr", "pC1*zzU9-qtZjdT")
|
|
SMTPServer.EnableSsl = True
|
|
|
|
SMTPServer.Send(MyMailMessage) 'Envoi
|
|
|
|
MsgBox("Le message a été envoyé", MsgBoxStyle.Information)
|
|
TextBox1.Text = ""
|
|
Close()
|
|
Catch ex As Exception
|
|
Timer1.Start()
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
|
|
Timer1.Stop()
|
|
Try
|
|
If TextBox1.Text = "" Then
|
|
MsgBox("Vous deviez d'entrer votre message", MsgBoxStyle.Critical)
|
|
Exit Sub
|
|
End If
|
|
Dim nom = TextBox1.Text
|
|
|
|
Dim Message As String = nom
|
|
|
|
Dim MyMailMessage As New MailMessage()
|
|
Dim SMTPServer As New SmtpClient("mail48.lwspanel.com")
|
|
|
|
MyMailMessage.From = New MailAddress("noreply@lecteur-media.fr")
|
|
MyMailMessage.To.Add("contact@lecteur-media.fr")
|
|
MyMailMessage.Subject = ("message pour le dev")
|
|
MyMailMessage.Body = (Message)
|
|
|
|
SMTPServer.Port = ("587") 'Port
|
|
SMTPServer.Credentials = New System.Net.NetworkCredential("noreply@lecteur-media.fr", "pC1*zzU9-qtZjdT")
|
|
SMTPServer.EnableSsl = True
|
|
|
|
SMTPServer.Send(MyMailMessage) 'Envoi
|
|
|
|
MsgBox("Le message a été envoyé", MsgBoxStyle.Information)
|
|
TextBox1.Text = ""
|
|
Close()
|
|
Catch ex As Exception
|
|
Timer1.Start()
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub Form14_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
|
Dim lines1a() As String = File.ReadAllLines(théme)
|
|
|
|
If lines1a(0) = 2 Then
|
|
Me.BackColor = Color.FromArgb(64, 64, 64)
|
|
Label1.ForeColor = Color.White
|
|
Button1.BackColor = Color.FromArgb(64, 64, 64)
|
|
Button1.ForeColor = Color.White
|
|
TextBox1.BackColor = Color.FromArgb(64, 64, 64)
|
|
TextBox1.ForeColor = Color.White
|
|
ElseIf lines1a(0) = 3 Then
|
|
Me.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
|
|
Label1.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
|
|
Button1.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
|
|
Button1.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
|
|
TextBox1.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
|
|
TextBox1.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
|
|
Else
|
|
|
|
End If
|
|
End Sub
|
|
End Class |