Imports System.Net Imports System.IO Public Class Form1 Dim wifipassword As String = "http://192.168.254.100:8080/rcmsoftware/wifipass/wifipass.txt" Dim wifiname As String = "http://192.168.254.100:8080/rcmsoftware/wifipass/wifiname.txt" Dim updateAddress As String = "http://192.168.254.100:8080/rcmsoftware/wifipass/version.txt" Dim instance As Net.WebClient = New Net.WebClient Dim returnValuePass As String Dim returnValueName As String Dim returnValueVersion As String Dim speed As Integer = 1000 Private TargetDT As DateTime Private CountDownFrom As TimeSpan = TimeSpan.FromMinutes(0.2) Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If (Process.GetProcessesByName(Process.GetCurrentProcess.ProcessName).Length > 1) Then MsgBox("Application already running.", MsgBoxStyle.OkOnly, "Error") Application.Exit() End If CheckBox1.Enabled = False Me.MaximizeBox = False Control.CheckForIllegalCrossThreadCalls = False BackgroundWorker1.RunWorkerAsync() End Sub Private Sub comparedVersion() animationTimer.Interval = speed waitTimer.Start() TargetDT = DateTime.Now.Add(CountDownFrom) PictureBox3.Visible = True Label7.Visible = False PictureBox4.Visible = False Button1.Enabled = False Button1.BackColor = Color.WhiteSmoke PictureBox1.BackColor = Color.RosyBrown Me.BackgroundWorker1.CancelAsync() End Sub Private Sub preloadForm() Try returnValueName = instance.DownloadString(wifiname) returnValuePass = instance.DownloadString(wifipassword) returnValueVersion = instance.DownloadString(updateAddress) Label9.Text = returnValueName Label5.Text = returnValueVersion If Label4.Text >= Label5.Text Then comparedVersion() Else CheckForUpdate.Show() Me.BackgroundWorker1.CancelAsync() End If Catch ex As Exception Label9.Text = " " Label7.Visible = True PictureBox4.Visible = True Button1.Enabled = True Button1.BackColor = Color.DarkSeaGreen PictureBox1.BackColor = Color.WhiteSmoke CheckBox1.Enabled = False Me.BackgroundWorker1.CancelAsync() End Try End Sub Private Sub waitTimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles waitTimer.Tick animationTimer.Start() End Sub Private Sub animationTimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles animationTimer.Tick Dim ts As TimeSpan = TargetDT.Subtract(DateTime.Now) TextBox1.Text += returnValuePass.Substring(TextBox1.Text.Length, 1) If TextBox1.Text = returnValuePass Then animationTimer.Stop() waitTimer.Stop() Label11.Text = "DONE" Label11.BackColor = Color.DarkSeaGreen CheckBox1.Enabled = True PictureBox2.Visible = True PictureBox3.Visible = False PictureBox1.BackColor = Color.DarkSeaGreen ElseIf ts.TotalMilliseconds > 0 Then Label11.Text = ts.ToString("mm\:ss") End If End Sub Private Sub BackgroundWorker1_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork If BackgroundWorker1.CancellationPending = True Then e.Cancel = True Else Label4.Text = Me.ProductVersion End If End Sub Private Sub BackgroundWorker1_RunWorkerCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BackgroundWorker1.RunWorkerCompleted preloadForm() Me.BackgroundWorker1.CancelAsync() End Sub Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged If CheckBox1.Checked Then TextBox1.PasswordChar = vbNullChar Else TextBox1.PasswordChar = "x" End If End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click preloadForm() End Sub End Class
Standard input is empty
Visual Basic.Net Compiler version 0.0.0.5943 (Mono 3.8 - tarball) Copyright (C) 2004-2010 Rolf Bjarne Kvinge. All rights reserved. /home/84ze7i/prog.vb (17,102) : error VBNC30590: Cannot find the event 'Load'. /home/84ze7i/prog.vb (19,20) : error VBNC30451: 'Process' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (21,25) : error VBNC30451: 'Application' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (24,19) : error VBNC30451: 'CheckBox1' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (25,12) : error VBNC30456: 'MaximizeBox' is not a member of 'Form1'. /home/84ze7i/prog.vb (26,17) : error VBNC30451: 'Control' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (27,27) : error VBNC30451: 'BackgroundWorker1' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (33,24) : error VBNC30451: 'animationTimer' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (34,19) : error VBNC30451: 'waitTimer' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (36,21) : error VBNC30451: 'PictureBox3' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (37,16) : error VBNC30451: 'Label7' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (38,21) : error VBNC30451: 'PictureBox4' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (39,17) : error VBNC30451: 'Button1' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (40,17) : error VBNC30451: 'Button1' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (40,34) : error VBNC30451: 'Color' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (41,21) : error VBNC30451: 'PictureBox1' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (41,38) : error VBNC30451: 'Color' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (42,12) : error VBNC30456: 'BackgroundWorker1' is not a member of 'Form1'. /home/84ze7i/prog.vb (65,20) : error VBNC30451: 'Label9' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (66,20) : error VBNC30451: 'Label7' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (67,25) : error VBNC30451: 'PictureBox4' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (68,21) : error VBNC30451: 'Button1' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (69,21) : error VBNC30451: 'Button1' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (69,38) : error VBNC30451: 'Color' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (70,25) : error VBNC30451: 'PictureBox1' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (70,42) : error VBNC30451: 'Color' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (71,23) : error VBNC30451: 'CheckBox1' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (72,16) : error VBNC30456: 'BackgroundWorker1' is not a member of 'Form1'. /home/84ze7i/prog.vb (63,17) : warning VBNC42024: Unused local variable: 'ex'. /home/84ze7i/prog.vb (53,20) : error VBNC30451: 'Label9' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (54,20) : error VBNC30451: 'Label5' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (56,22) : error VBNC30451: 'Label4' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (56,37) : error VBNC30451: 'Label5' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (59,32) : error VBNC30451: 'CheckForUpdate' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (60,20) : error VBNC30456: 'BackgroundWorker1' is not a member of 'Form1'. /home/84ze7i/prog.vb (78,110) : error VBNC30451: 'waitTimer' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (80,24) : error VBNC30451: 'animationTimer' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (84,120) : error VBNC30451: 'animationTimer' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (87,18) : error VBNC30451: 'TextBox1' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (87,61) : error VBNC30451: 'TextBox1' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (89,20) : error VBNC30451: 'TextBox1' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (91,28) : error VBNC30451: 'animationTimer' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (92,23) : error VBNC30451: 'waitTimer' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (93,21) : error VBNC30451: 'Label11' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (94,21) : error VBNC30451: 'Label11' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (94,38) : error VBNC30451: 'Color' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (95,23) : error VBNC30451: 'CheckBox1' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (96,25) : error VBNC30451: 'PictureBox2' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (97,25) : error VBNC30451: 'PictureBox3' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (98,25) : error VBNC30451: 'PictureBox1' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (98,42) : error VBNC30451: 'Color' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (102,21) : error VBNC30451: 'Label11' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (108,149) : error VBNC30451: 'BackgroundWorker1' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (110,29) : error VBNC30451: 'BackgroundWorker1' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (113,20) : error VBNC30451: 'Label4' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (113,30) : error VBNC30456: 'ProductVersion' is not a member of 'Form1'. /home/84ze7i/prog.vb (118,166) : error VBNC30451: 'BackgroundWorker1' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (121,12) : error VBNC30456: 'BackgroundWorker1' is not a member of 'Form1'. /home/84ze7i/prog.vb (125,120) : error VBNC30451: 'CheckBox1' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (127,21) : error VBNC30451: 'CheckBox1' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (129,22) : error VBNC30451: 'TextBox1' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (133,22) : error VBNC30451: 'TextBox1' is not declared. It may be inaccessible due to its protection level. /home/84ze7i/prog.vb (139,107) : error VBNC30451: 'Button1' is not declared. It may be inaccessible due to its protection level. There were 62 errors and 1 warnings. Compilation took 00:00:00.7525320
Standard output is empty