Author:
水如烟
Namespace
LzmTW.uSystem.uWindows.uForms.uMainForm
Public Class SplashScreenForm
Private Sub SplashScreenForm_FormClosing( ByVal sender As Object , ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me .FormClosing
RemoveHandler SplashScreenHelper.MessageSending, AddressOf OnReceiveMessage
End Sub
Protected Overridable Sub SplashScreenForm_Load( ByVal sender As Object , ByVal e As System.EventArgs) Handles Me .Load
If Me .DesignMode Then Exit Sub
With EntryAssemblyInfo.Instance
If .Title <> "" Then
ApplicationTitleLabel.Text = .Title
Else
ApplicationTitleLabel.Text = System.IO.Path.GetFileNameWithoutExtension(.AssemblyName)
End If
VersionLabel.Text = System.String.Format(VersionLabel.Text, .Version.Major, .Version.Minor)
CopyRightLabel.Text = .Copyright
End With
LoadingLabel.Text = ""
AddHandler SplashScreenHelper.MessageSending, AddressOf OnReceiveMessage
End Sub
Private Sub OnReceiveMessage( ByVal sender As Object , ByVal Message As String )
uThreading.CrossThread.SetControlPropertyValue( Me .LoadingLabel, " Text " , Message, Nothing )
Threading.Thread.Sleep( 10 )
End Sub
End Class
End Namespace
Public Class SplashScreenForm
Private Sub SplashScreenForm_FormClosing( ByVal sender As Object , ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me .FormClosing
RemoveHandler SplashScreenHelper.MessageSending, AddressOf OnReceiveMessage
End Sub
Protected Overridable Sub SplashScreenForm_Load( ByVal sender As Object , ByVal e As System.EventArgs) Handles Me .Load
If Me .DesignMode Then Exit Sub
With EntryAssemblyInfo.Instance
If .Title <> "" Then
ApplicationTitleLabel.Text = .Title
Else
ApplicationTitleLabel.Text = System.IO.Path.GetFileNameWithoutExtension(.AssemblyName)
End If
VersionLabel.Text = System.String.Format(VersionLabel.Text, .Version.Major, .Version.Minor)
CopyRightLabel.Text = .Copyright
End With
LoadingLabel.Text = ""
AddHandler SplashScreenHelper.MessageSending, AddressOf OnReceiveMessage
End Sub
Private Sub OnReceiveMessage( ByVal sender As Object , ByVal Message As String )
uThreading.CrossThread.SetControlPropertyValue( Me .LoadingLabel, " Text " , Message, Nothing )
Threading.Thread.Sleep( 10 )
End Sub
End Class
End Namespace
Namespace
LzmTW.uSystem.uWindows.uForms.uMainForm
< Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated() > _
Partial Class SplashScreenForm
Inherits System.Windows.Forms.Form
' Form overrides dispose to clean up the component list.
< System.Diagnostics.DebuggerNonUserCode() > _
Protected Overrides Sub Dispose( ByVal disposing As Boolean )
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
MyBase .Dispose(disposing)
End Sub
' Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
' NOTE: The following procedure is required by the Windows Form Designer
' It can be modified using the Windows Form Designer.
' Do not modify it using the code editor.
< System.Diagnostics.DebuggerStepThrough() > _
Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager( GetType (SplashScreenForm))
Me .ApplicationTitleLabel = New System.Windows.Forms.Label
Me .VersionLabel = New System.Windows.Forms.Label
Me .CopyRightLabel = New System.Windows.Forms.Label
Me .LoadingLabel = New System.Windows.Forms.Label
Me .SuspendLayout()
'
' ApplicationTitleLabel
'
Me .ApplicationTitleLabel.BackColor = System.Drawing.Color.Transparent
Me .ApplicationTitleLabel.Font = New System.Drawing.Font( " Microsoft Sans Serif " , 18.0 !, System.Drawing.FontStyle.Bold)
Me .ApplicationTitleLabel.ForeColor = System.Drawing.SystemColors.ActiveCaption
Me .ApplicationTitleLabel.Location = New System.Drawing.Point( 12 , 49 )
Me .ApplicationTitleLabel.Name = " ApplicationTitleLabel "
Me .ApplicationTitleLabel.Size = New System.Drawing.Size( 369 , 29 )
Me .ApplicationTitleLabel.TabIndex = 0
Me .ApplicationTitleLabel.Text = " ApplicationTitle "
Me .ApplicationTitleLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
' VersionLabel
'
Me .VersionLabel.AutoSize = True
Me .VersionLabel.BackColor = System.Drawing.Color.Transparent
Me .VersionLabel.Font = New System.Drawing.Font( " Microsoft Sans Serif " , 9.0 !, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType ( 0 , Byte ))
Me .VersionLabel.ForeColor = System.Drawing.SystemColors.ActiveCaption
Me .VersionLabel.Location = New System.Drawing.Point( 39 , 132 )
Me .VersionLabel.Name = " VersionLabel "
Me .VersionLabel.Size = New System.Drawing.Size( 101 , 15 )
Me .VersionLabel.TabIndex = 1
Me .VersionLabel.Text = " 版本: {0}.{1:00} "
'
' CopyRightLabel
'
Me .CopyRightLabel.AutoSize = True
Me .CopyRightLabel.BackColor = System.Drawing.Color.Transparent
Me .CopyRightLabel.Font = New System.Drawing.Font( " Microsoft Sans Serif " , 9.0 !, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType ( 0 , Byte ))
Me .CopyRightLabel.ForeColor = System.Drawing.SystemColors.ActiveCaption
Me .CopyRightLabel.Location = New System.Drawing.Point( 39 , 147 )
Me .CopyRightLabel.Name = " CopyRightLabel "
Me .CopyRightLabel.Size = New System.Drawing.Size( 72 , 15 )
Me .CopyRightLabel.TabIndex = 2
Me .CopyRightLabel.Text = " CopyRight "
'
' LoadingLabel
'
Me .LoadingLabel.AutoSize = True
Me .LoadingLabel.BackColor = System.Drawing.Color.Transparent
Me .LoadingLabel.Font = New System.Drawing.Font( " Microsoft Sans Serif " , 9.0 !, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType ( 0 , Byte ))
Me .LoadingLabel.ForeColor = System.Drawing.SystemColors.ActiveCaption
Me .LoadingLabel.Location = New System.Drawing.Point( 38 , 176 )
Me .LoadingLabel.Name = " LoadingLabel "
Me .LoadingLabel.Size = New System.Drawing.Size( 59 , 15 )
Me .LoadingLabel.TabIndex = 3
Me .LoadingLabel.Text = " Loading "
'
' SplashScreenForm
'
Me .AutoScaleDimensions = New System.Drawing.SizeF( 6.0 !, 12.0 !)
Me .AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me .BackgroundImage = CType (resources.GetObject( " $this.BackgroundImage " ), System.Drawing.Image)
Me .ClientSize = New System.Drawing.Size( 393 , 241 )
Me .ControlBox = False
Me .Controls.Add( Me .LoadingLabel)
Me .Controls.Add( Me .CopyRightLabel)
Me .Controls.Add( Me .VersionLabel)
Me .Controls.Add( Me .ApplicationTitleLabel)
Me .FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
Me .MaximizeBox = False
Me .MinimizeBox = False
Me .Name = " SplashScreenForm "
Me .ShowInTaskbar = False
Me .StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me .TopMost = True
Me .ResumeLayout( False )
Me .PerformLayout()
End Sub
Protected Friend WithEvents ApplicationTitleLabel As System.Windows.Forms.Label
Protected Friend WithEvents VersionLabel As System.Windows.Forms.Label
Protected Friend WithEvents CopyRightLabel As System.Windows.Forms.Label
Protected Friend WithEvents LoadingLabel As System.Windows.Forms.Label
End Class
End Namespace
< Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated() > _
Partial Class SplashScreenForm
Inherits System.Windows.Forms.Form
' Form overrides dispose to clean up the component list.
< System.Diagnostics.DebuggerNonUserCode() > _
Protected Overrides Sub Dispose( ByVal disposing As Boolean )
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
MyBase .Dispose(disposing)
End Sub
' Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
' NOTE: The following procedure is required by the Windows Form Designer
' It can be modified using the Windows Form Designer.
' Do not modify it using the code editor.
< System.Diagnostics.DebuggerStepThrough() > _
Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager( GetType (SplashScreenForm))
Me .ApplicationTitleLabel = New System.Windows.Forms.Label
Me .VersionLabel = New System.Windows.Forms.Label
Me .CopyRightLabel = New System.Windows.Forms.Label
Me .LoadingLabel = New System.Windows.Forms.Label
Me .SuspendLayout()
'
' ApplicationTitleLabel
'
Me .ApplicationTitleLabel.BackColor = System.Drawing.Color.Transparent
Me .ApplicationTitleLabel.Font = New System.Drawing.Font( " Microsoft Sans Serif " , 18.0 !, System.Drawing.FontStyle.Bold)
Me .ApplicationTitleLabel.ForeColor = System.Drawing.SystemColors.ActiveCaption
Me .ApplicationTitleLabel.Location = New System.Drawing.Point( 12 , 49 )
Me .ApplicationTitleLabel.Name = " ApplicationTitleLabel "
Me .ApplicationTitleLabel.Size = New System.Drawing.Size( 369 , 29 )
Me .ApplicationTitleLabel.TabIndex = 0
Me .ApplicationTitleLabel.Text = " ApplicationTitle "
Me .ApplicationTitleLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
' VersionLabel
'
Me .VersionLabel.AutoSize = True
Me .VersionLabel.BackColor = System.Drawing.Color.Transparent
Me .VersionLabel.Font = New System.Drawing.Font( " Microsoft Sans Serif " , 9.0 !, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType ( 0 , Byte ))
Me .VersionLabel.ForeColor = System.Drawing.SystemColors.ActiveCaption
Me .VersionLabel.Location = New System.Drawing.Point( 39 , 132 )
Me .VersionLabel.Name = " VersionLabel "
Me .VersionLabel.Size = New System.Drawing.Size( 101 , 15 )
Me .VersionLabel.TabIndex = 1
Me .VersionLabel.Text = " 版本: {0}.{1:00} "
'
' CopyRightLabel
'
Me .CopyRightLabel.AutoSize = True
Me .CopyRightLabel.BackColor = System.Drawing.Color.Transparent
Me .CopyRightLabel.Font = New System.Drawing.Font( " Microsoft Sans Serif " , 9.0 !, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType ( 0 , Byte ))
Me .CopyRightLabel.ForeColor = System.Drawing.SystemColors.ActiveCaption
Me .CopyRightLabel.Location = New System.Drawing.Point( 39 , 147 )
Me .CopyRightLabel.Name = " CopyRightLabel "
Me .CopyRightLabel.Size = New System.Drawing.Size( 72 , 15 )
Me .CopyRightLabel.TabIndex = 2
Me .CopyRightLabel.Text = " CopyRight "
'
' LoadingLabel
'
Me .LoadingLabel.AutoSize = True
Me .LoadingLabel.BackColor = System.Drawing.Color.Transparent
Me .LoadingLabel.Font = New System.Drawing.Font( " Microsoft Sans Serif " , 9.0 !, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType ( 0 , Byte ))
Me .LoadingLabel.ForeColor = System.Drawing.SystemColors.ActiveCaption
Me .LoadingLabel.Location = New System.Drawing.Point( 38 , 176 )
Me .LoadingLabel.Name = " LoadingLabel "
Me .LoadingLabel.Size = New System.Drawing.Size( 59 , 15 )
Me .LoadingLabel.TabIndex = 3
Me .LoadingLabel.Text = " Loading "
'
' SplashScreenForm
'
Me .AutoScaleDimensions = New System.Drawing.SizeF( 6.0 !, 12.0 !)
Me .AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me .BackgroundImage = CType (resources.GetObject( " $this.BackgroundImage " ), System.Drawing.Image)
Me .ClientSize = New System.Drawing.Size( 393 , 241 )
Me .ControlBox = False
Me .Controls.Add( Me .LoadingLabel)
Me .Controls.Add( Me .CopyRightLabel)
Me .Controls.Add( Me .VersionLabel)
Me .Controls.Add( Me .ApplicationTitleLabel)
Me .FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
Me .MaximizeBox = False
Me .MinimizeBox = False
Me .Name = " SplashScreenForm "
Me .ShowInTaskbar = False
Me .StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me .TopMost = True
Me .ResumeLayout( False )
Me .PerformLayout()
End Sub
Protected Friend WithEvents ApplicationTitleLabel As System.Windows.Forms.Label
Protected Friend WithEvents VersionLabel As System.Windows.Forms.Label
Protected Friend WithEvents CopyRightLabel As System.Windows.Forms.Label
Protected Friend WithEvents LoadingLabel As System.Windows.Forms.Label
End Class
End Namespace