Bueno, ya he analizado el "SISTEMA NO OFUSCADO". Si sigues al pie de la letra las siguientes indicaciones, arreglarás todos los errores de compilación y del diseñador de Forms.
Para arreglar los errores de compilación, estos son los reemplazamientos globales de texto en la clase Form1.vb que se debe hacer:
(primero el string original, abajo el reemplazamiento)
DateAndTime.get_TimeString
DateAndTime.DateAdd(DateInterval.Day
As System.Windows.Forms.Timer
New System.Windows.Forms.Timer
Private Overridable Property
Y en la clase Cliente.vb
New Thread(New ThreadStart(AddressOf Me.LeerSocket)).Start
Dim t As New Thread(New ThreadStart(AddressOf Me.LeerSocket))
t.Start
Para arreglar el error del diseñador de forms: "Duplicate declaration of member 'size'"
Dentro del método 'Initialize' de la clase 'Form1.vb', eliminas esta linea:
Dim size As New Size(&H100, &H124)
Y esto lo dejas así:
Me.CheckedListBox1.Size = New Size(&H100, &H124)
Y luego nos quedarán 555 errores de compilación en lineas como esta:
size = New Size(280, &H98)
Me.CheckedListBox2.Size = size
Basicamente tienes que ponerle el valor de la variable "size" correspondiente a cada linea:
Me.CheckedListBox2.Size = New Size(280, &H98)
Se puede automatizar la tarea de reemplazamiento con el siguiente código de una aplicación de consola:
Public Module Module1
Public Sub Main()
Dim filepath As String = "...\SISTEMA NO OBFUSCADO\LOTERIA\Form1.vb"
Dim sb As New StringBuilder()
Dim size As String = String.Empty
Dim control As String = String.Empty
Dim lines
As IEnumerable
(Of String) = File.
ReadLines(filepath, Encoding.
Default)
For Each line As String In lines
If line.TrimStart().ToLower().StartsWith("size = new size") Then
size = line.Substring(line.IndexOf("=") + 1).TrimStart() ' "New Size(width, height)"
Continue For
End If
If line.TrimStart().ToLower().Contains(".size =") Then
If Not String.IsNullOrEmpty(size) Then
control = line.Substring(0, line.LastIndexOf("=") + 1).TrimStart() ' "Me.ControlName.Size ="
Debug.
WriteLine(control
& size
) sb.AppendLine(control & size) ' "Me.ControlName.Size = New Size(width, height)"
size = String.Empty
control = String.Empty
Continue For
End If
End If
sb.AppendLine(line)
Next line
File.
WriteAllText(".\Form1_SizeFixed.vb", sb.
ToString())
End Sub
End Module
Para arreglar el error del diseñador de forms: "Duplicate declaration of member 'point'", el procedimiento es el mismo que con 'size'.
Dentro del método 'Initialize' de la clase 'Form1.vb', eliminas esta linea:
Dim point As New Point(&H10, &H80)
Y esto lo dejas así:
Me.CheckedListBox1.Location = New Point(&H10, &H80)
Y luego nos quedarán 555 errores de compilación en lineas como esta:
point = New Point(280, &H98)
Me.CheckedListBox2.Location = point
Basicamente tienes que ponerle el valor de la variable "point" correspondiente a cada linea:
Me.CheckedListBox2.Location = New Point(280, &H98)
Se puede automatizar la tarea de reemplazamiento con el siguiente código de una aplicación de consola:
Public Module Module1
Public Sub Main()
Dim filepath As String = "..\SISTEMA NO OBFUSCADO\LOTERIA\Form1.vb"
Dim sb As New StringBuilder()
Dim point As String = String.Empty
Dim control As String = String.Empty
Dim lines
As IEnumerable
(Of String) = File.
ReadLines(filepath, Encoding.
Default)
For Each line As String In lines
If line.TrimStart().ToLower().StartsWith("point = new point") Then
point = line.Substring(line.IndexOf("=") + 1).TrimStart() ' "New Point(x, y)"
Continue For
End If
If line.TrimStart().ToLower().Contains(".location =") Then
If Not String.IsNullOrEmpty(point) Then
control = line.Substring(0, line.LastIndexOf("=") + 1).TrimStart() ' "Me.ControlName.Location ="
Debug.
WriteLine(control
& point
) sb.AppendLine(control & point) ' "Me.ControlName.Location = New Point(x, y)"
point = String.Empty
control = String.Empty
Continue For
End If
End If
sb.AppendLine(line)
Next line
File.
WriteAllText(".\Form1_PointFixed.vb", sb.
ToString())
End Sub
End Module
Para arreglar los errores del diseñador de forms: "The type 'System.Windows.Forms.Form' has no property named 'xxxxx'"
Tienes que hacer estos reemplazamientos de string SOLAMENTE en el bloque del método 'Initialize' de la clase 'Form1.vb':
Me.Button -> Me._Button
Me.CheckBox -> Me._CheckBox
Me.CheckedListBox -> Me._CheckedListBox
Me.ComboBox -> Me._ComboBox
Me.DateTimePicker -> Me._DateTimePicker
Me.GroupBox -> Me._GroupBox
Me.Label -> Me._Label
Me.ListBox -> Me._ListBox
Me.PrintDocument -> Me._PrintDocument
Me.TextBox -> Me._TextBox
Me.Timer -> Me._Timer...o dicho de otro modo: tienes que añadirle un guión bajo al principio del nombre de cada control.
Para arreglar el último error del diseñador de forms: "The variable 'manager' has no property is either undeclared or was never existed"
Simplemente elimina estas lineas dentro del método 'Initialize':
Dim manager As New ResourceManager(GetType(Form1))
Me.Icon = DirectCast(manager.GetObject("$this.Icon"), Icon)
...Por que el icono de la aplicación supongo que te dará completamente igual arreglarlo o no...
Saludos.