Files
mRemoteNG/mRemoteV1/UI/UI.Window.About.vb

264 lines
14 KiB
VB.net

Imports WeifenLuo.WinFormsUI.Docking
Imports System.IO
Imports mRemote.App.Runtime
Namespace UI
Namespace Window
Public Class About
Inherits UI.Window.Base
#Region "Form Init"
Friend WithEvents lblCopyright As System.Windows.Forms.Label
Friend WithEvents lblTitle As System.Windows.Forms.Label
Friend WithEvents lblVersion As System.Windows.Forms.Label
Friend WithEvents lblLicense As System.Windows.Forms.Label
Friend WithEvents txtChangeLog As System.Windows.Forms.TextBox
Friend WithEvents lblChangeLog As System.Windows.Forms.Label
Friend WithEvents pnlBottom As System.Windows.Forms.Panel
Friend WithEvents pbLogo As System.Windows.Forms.PictureBox
Friend WithEvents lblEdition As System.Windows.Forms.Label
Friend WithEvents llblCopyright3 As System.Windows.Forms.LinkLabel
Friend WithEvents pnlTop As System.Windows.Forms.Panel
Private Sub InitializeComponent()
Me.pnlTop = New System.Windows.Forms.Panel
Me.lblEdition = New System.Windows.Forms.Label
Me.pbLogo = New System.Windows.Forms.PictureBox
Me.pnlBottom = New System.Windows.Forms.Panel
Me.llblCopyright3 = New System.Windows.Forms.LinkLabel
Me.txtChangeLog = New System.Windows.Forms.TextBox
Me.lblTitle = New System.Windows.Forms.Label
Me.lblVersion = New System.Windows.Forms.Label
Me.lblChangeLog = New System.Windows.Forms.Label
Me.lblLicense = New System.Windows.Forms.Label
Me.lblCopyright = New System.Windows.Forms.Label
Me.pnlTop.SuspendLayout()
CType(Me.pbLogo, System.ComponentModel.ISupportInitialize).BeginInit()
Me.pnlBottom.SuspendLayout()
Me.SuspendLayout()
'
'pnlTop
'
Me.pnlTop.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.pnlTop.BackColor = System.Drawing.Color.Black
Me.pnlTop.Controls.Add(Me.lblEdition)
Me.pnlTop.Controls.Add(Me.pbLogo)
Me.pnlTop.ForeColor = System.Drawing.Color.White
Me.pnlTop.Location = New System.Drawing.Point(-1, -1)
Me.pnlTop.Name = "pnlTop"
Me.pnlTop.Size = New System.Drawing.Size(788, 145)
Me.pnlTop.TabIndex = 0
'
'lblEdition
'
Me.lblEdition.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.lblEdition.BackColor = System.Drawing.Color.Black
Me.lblEdition.ForeColor = System.Drawing.Color.White
Me.lblEdition.Location = New System.Drawing.Point(512, 112)
Me.lblEdition.Name = "lblEdition"
Me.lblEdition.Size = New System.Drawing.Size(264, 24)
Me.lblEdition.TabIndex = 0
Me.lblEdition.Text = "Edition"
Me.lblEdition.TextAlign = System.Drawing.ContentAlignment.BottomRight
Me.lblEdition.Visible = False
'
'pbLogo
'
Me.pbLogo.Image = Global.mRemote.My.Resources.Resources.Logo
Me.pbLogo.Location = New System.Drawing.Point(8, 8)
Me.pbLogo.Name = "pbLogo"
Me.pbLogo.Size = New System.Drawing.Size(492, 128)
Me.pbLogo.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize
Me.pbLogo.TabIndex = 1
Me.pbLogo.TabStop = False
'
'pnlBottom
'
Me.pnlBottom.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.pnlBottom.BackColor = System.Drawing.SystemColors.Control
Me.pnlBottom.Controls.Add(Me.llblCopyright3)
Me.pnlBottom.Controls.Add(Me.txtChangeLog)
Me.pnlBottom.Controls.Add(Me.lblTitle)
Me.pnlBottom.Controls.Add(Me.lblVersion)
Me.pnlBottom.Controls.Add(Me.lblChangeLog)
Me.pnlBottom.Controls.Add(Me.lblLicense)
Me.pnlBottom.Controls.Add(Me.lblCopyright)
Me.pnlBottom.ForeColor = System.Drawing.SystemColors.ControlText
Me.pnlBottom.Location = New System.Drawing.Point(-1, 144)
Me.pnlBottom.Name = "pnlBottom"
Me.pnlBottom.Size = New System.Drawing.Size(788, 418)
Me.pnlBottom.TabIndex = 1
'
'llblCopyright3
'
Me.llblCopyright3.AutoSize = True
Me.llblCopyright3.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.llblCopyright3.ForeColor = System.Drawing.SystemColors.ControlText
Me.llblCopyright3.LinkColor = System.Drawing.Color.Blue
Me.llblCopyright3.Location = New System.Drawing.Point(16, 116)
Me.llblCopyright3.Name = "llblCopyright3"
Me.llblCopyright3.Size = New System.Drawing.Size(79, 22)
Me.llblCopyright3.TabIndex = 4
Me.llblCopyright3.TabStop = True
Me.llblCopyright3.Text = "Copyright3"
Me.llblCopyright3.UseCompatibleTextRendering = True
'
'txtChangeLog
'
Me.txtChangeLog.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.txtChangeLog.BackColor = System.Drawing.SystemColors.Control
Me.txtChangeLog.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.txtChangeLog.Cursor = System.Windows.Forms.Cursors.Default
Me.txtChangeLog.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.txtChangeLog.ForeColor = System.Drawing.SystemColors.ControlText
Me.txtChangeLog.Location = New System.Drawing.Point(24, 184)
Me.txtChangeLog.Multiline = True
Me.txtChangeLog.Name = "txtChangeLog"
Me.txtChangeLog.ReadOnly = True
Me.txtChangeLog.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
Me.txtChangeLog.Size = New System.Drawing.Size(761, 232)
Me.txtChangeLog.TabIndex = 7
Me.txtChangeLog.TabStop = False
'
'lblTitle
'
Me.lblTitle.AutoSize = True
Me.lblTitle.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblTitle.ForeColor = System.Drawing.SystemColors.ControlText
Me.lblTitle.Location = New System.Drawing.Point(16, 16)
Me.lblTitle.Name = "lblTitle"
Me.lblTitle.Size = New System.Drawing.Size(122, 27)
Me.lblTitle.TabIndex = 0
Me.lblTitle.Text = "mRemoteNG"
Me.lblTitle.UseCompatibleTextRendering = True
'
'lblVersion
'
Me.lblVersion.AutoSize = True
Me.lblVersion.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblVersion.ForeColor = System.Drawing.SystemColors.ControlText
Me.lblVersion.Location = New System.Drawing.Point(16, 56)
Me.lblVersion.Name = "lblVersion"
Me.lblVersion.Size = New System.Drawing.Size(57, 22)
Me.lblVersion.TabIndex = 1
Me.lblVersion.Text = "Version"
Me.lblVersion.UseCompatibleTextRendering = True
'
'lblChangeLog
'
Me.lblChangeLog.AutoSize = True
Me.lblChangeLog.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblChangeLog.ForeColor = System.Drawing.SystemColors.ControlText
Me.lblChangeLog.Location = New System.Drawing.Point(16, 160)
Me.lblChangeLog.Name = "lblChangeLog"
Me.lblChangeLog.Size = New System.Drawing.Size(92, 22)
Me.lblChangeLog.TabIndex = 6
Me.lblChangeLog.Text = "Change Log:"
Me.lblChangeLog.UseCompatibleTextRendering = True
'
'lblLicense
'
Me.lblLicense.AutoSize = True
Me.lblLicense.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblLicense.ForeColor = System.Drawing.SystemColors.ControlText
Me.lblLicense.Location = New System.Drawing.Point(16, 96)
Me.lblLicense.Name = "lblLicense"
Me.lblLicense.Size = New System.Drawing.Size(58, 22)
Me.lblLicense.TabIndex = 5
Me.lblLicense.Text = "License"
Me.lblLicense.UseCompatibleTextRendering = True
'
'lblCopyright
'
Me.lblCopyright.AutoSize = True
Me.lblCopyright.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblCopyright.ForeColor = System.Drawing.SystemColors.ControlText
Me.lblCopyright.Location = New System.Drawing.Point(16, 76)
Me.lblCopyright.Name = "lblCopyright"
Me.lblCopyright.Size = New System.Drawing.Size(70, 22)
Me.lblCopyright.TabIndex = 2
Me.lblCopyright.Text = "Copyright"
Me.lblCopyright.UseCompatibleTextRendering = True
'
'About
'
Me.BackColor = System.Drawing.SystemColors.Control
Me.ClientSize = New System.Drawing.Size(784, 564)
Me.Controls.Add(Me.pnlTop)
Me.Controls.Add(Me.pnlBottom)
Me.ForeColor = System.Drawing.SystemColors.ControlText
Me.Icon = Global.mRemote.My.Resources.Resources.mRemote_Icon
Me.MaximumSize = New System.Drawing.Size(20000, 10000)
Me.Name = "About"
Me.TabText = "About"
Me.Text = "About"
Me.pnlTop.ResumeLayout(False)
Me.pnlTop.PerformLayout()
CType(Me.pbLogo, System.ComponentModel.ISupportInitialize).EndInit()
Me.pnlBottom.ResumeLayout(False)
Me.pnlBottom.PerformLayout()
Me.ResumeLayout(False)
End Sub
#End Region
#Region "Public Methods"
Public Sub New(ByVal Panel As DockContent)
Me.WindowType = Type.About
Me.DockPnl = Panel
Me.InitializeComponent()
App.Runtime.FontOverride(Me)
End Sub
#End Region
#Region "Form Stuff"
Private Sub About_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
ApplyLanguage()
ApplyEditions()
Try
Me.lblVersion.Text = "Version " & My.Application.Info.Version.Major & "." & My.Application.Info.Version.Minor
Me.lblLicense.Text = Language.Base.ReleasedUnderGPL
Me.lblCopyright.Text = My.Application.Info.Copyright
Me.llblCopyright3.Text = "Includes icons by FAMFAMFAM"
Me.llblCopyright3.Links.Add(18, 9, (App.Info.General.FamFamFamURL))
If File.Exists(My.Application.Info.DirectoryPath & "\CHANGELOG.TXT") Then
Dim sR As New StreamReader(My.Application.Info.DirectoryPath & "\CHANGELOG.TXT")
Me.txtChangeLog.Text = sR.ReadToEnd
sR.Close()
End If
Catch ex As Exception
mC.AddMessage(Messages.MessageClass.ErrorMsg, "Loading About failed" & vbNewLine & ex.Message, True)
End Try
End Sub
Private Sub ApplyLanguage()
lblChangeLog.Text = Language.Base.ChangeLog
lblLicense.Text = Language.Base.License
TabText = Language.Base.About
Text = Language.Base.About
End Sub
Private Sub ApplyEditions()
If App.Editions.Spanlink.Enabled Then
lblEdition.Text = "Spanlink Communications"
lblEdition.Visible = True
End If
End Sub
Private Sub llblCopyright3_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles llblCopyright3.LinkClicked
App.Runtime.GoToURL(App.Info.General.FamFamFamURL)
End Sub
#End Region
End Class
End Namespace
End Namespace