
Imports System.Media
Imports System.Net
Imports System.Net.Http
Imports System.Security.Cryptography.X509Certificates
Imports System.Text


Public Class Form1
    Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
        lblCoppiedNotifyer.Text = ""
        Timer1.Stop()
    End Sub
    Private Sub btnEditBaseUrl_Click(sender As Object, e As EventArgs) Handles btnEditBaseUrl.Click
        Dim rawRMA As String
        rawRMA = txtRMA.Text

        Dim encodedRMA As String = Uri.EscapeDataString(rawRMA)

        txtFinalUrl.Text = "https://www.tnt.com/express/en_au/site/shipping-tools/tracking.html?searchType=ref&cons=" & encodedRMA
        My.Computer.Clipboard.SetText(txtFinalUrl.Text)
        lblCoppiedNotifyer.Text = "Copied!"
        Timer1.Interval = 5000
        Timer1.Start()
    End Sub

    Private Sub Button1_Click_1(sender As Object, e As EventArgs) Handles Button1.Click
        Dim rawRMA As String
        rawRMA = txtRMA.Text

        Dim encodedRMA As String = Uri.EscapeDataString(rawRMA)

        txtFinalUrl.Text = "https://www.tnt.com/express/en_au/site/shipping-tools/tracking.html?searchType=con&cons=" & encodedRMA
        My.Computer.Clipboard.SetText(txtFinalUrl.Text)
        lblCoppiedNotifyer.Text = "Copied!"
        Timer1.Interval = 5000
        Timer1.Start()
    End Sub

    Private Sub btnFedexShipping_Click(sender As Object, e As EventArgs) Handles btnFedexShipping.Click
        Dim rawRMA As String
        rawRMA = txtRMA.Text

        Dim encodedRMA As String = Uri.EscapeDataString(rawRMA)

        txtFinalUrl.Text = "https://www.fedex.com/apps/fedextrack/?tracknumbers=" & encodedRMA
        My.Computer.Clipboard.SetText(txtFinalUrl.Text)
        lblCoppiedNotifyer.Text = "Copied!"
        Timer1.Interval = 5000
        Timer1.Start()
    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles btnDHLShipping.Click
        Dim rawRMA As String
        rawRMA = txtRMA.Text

        Dim encodedRMA As String = Uri.EscapeDataString(rawRMA)

        txtFinalUrl.Text = "https://www.dhl.com/au-en/home/tracking/tracking-express.html?submit=1&tracking-id=" & encodedRMA
        My.Computer.Clipboard.SetText(txtFinalUrl.Text)
        lblCoppiedNotifyer.Text = "Copied!"
        Timer1.Interval = 5000
        Timer1.Start()
    End Sub

    Private Sub AboutToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AboutToolStripMenuItem.Click
        Dim box = New Form3()
        box.Show()
    End Sub

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        lblCoppiedNotifyer.Text = ""
    End Sub
End Class

