-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFrm09_MoreInformations.vb
136 lines (99 loc) · 6.08 KB
/
Frm09_MoreInformations.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
Imports System.Globalization
Public Class Frm09_MoreInformations
#Region " Values "
' Application executable location
ReadOnly Locate As String = My.Application.Info.DirectoryPath
' Windows NT Kernel version
ReadOnly Win_NT_Version As String = $"{Environment.OSVersion.Version.Major}.{Environment.OSVersion.Version.Minor}"
' Build number
ReadOnly Win_BuildNbr As String = Environment.OSVersion.Version.Build
' Software compile date
ReadOnly CompileDate As New DateTime(My.Resources.BUILD_DATE_YEAR, My.Resources.BUILD_DATE_MONTH, My.Resources.BUILD_DATE_DAY)
#End Region
Private Sub Frm09_MoreInformations_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Icon = My.Resources.AppIcon
Select Case My.Settings.UI_DARK_MODE
Case True
ForeColor = Color.White
BackColor = Color.FromArgb(36, 36, 36)
UI_StatPanel.BackColor = Color.FromArgb(25, 25, 25)
UI_BtmBar_Panel.BackColor = Color.FromArgb(25, 25, 25)
UI_HeaderBorder.BackgroundImage = My.Resources.UI_BorderLineBottom
UI_BtmBar_Panel.BackgroundImage = My.Resources.UI_BottomBar
For Each Tabs As TabPage In {UI_Tab01_LegalNotice, UI_Tab02_License, UI_Tab03_Changelog, UI_Tab04_OtherCredits}
Tabs.BackColor = Color.FromArgb(36, 36, 36)
Next
For Each TxtBx As RichTextBox In {Licence_TextBox, Changelog_TextBox}
TxtBx.BackColor = Color.FromArgb(25, 25, 25)
TxtBx.ForeColor = Color.White
Next
For Each Panels As Panel In {UI_LicensePanel, UI_ChangelogPanel}
Panels.BackColor = Color.FromArgb(25, 25, 25)
Next
For Each Title As Label In {LegalNotice_Text01, OtherCredits_Text01}
Title.ForeColor = Color.White
Next
Developement_Tool_GroupBox_Pic.Image = My.Resources.VSLogo_Dark
End Select
' Hiding the title and the window icon
Select Case My.Settings.HIDE_TITLE
Case True
Text = Nothing
End Select
Select Case My.Settings.HIDE_ICON
Case True
Select Case My.Settings.BLANK_ICON
Case True
Icon = My.Resources.Blank16x16
Case False
ShowIcon = False
End Select
End Select
' Window opacity
Select Case My.Settings.APP_OPACITY_TOGGLE
Case True
Select Case My.Settings.APP_OPACITY_APPLY_MODE
Case Is >= 1
Opacity = My.Settings.APP_OPACITY / 100
End Select
End Select
' Dynamic values
Select Case My.Computer.Info.InstalledUICulture.ToString.Contains("fr")
Case True
Licence_TextBox.Text = My.Resources.SMWMTL_License_fr.Replace("$version", $"{My.Resources.APP_VERSION} (Build {My.Resources.APP_VERSION_BUILD}{If(My.Settings.IS_PRERELEASE = True, $" • {My.Resources.RELEASE_STATE}", "")})").Replace("$Author", My.Resources.APP_AUTHOR).Replace("$Year", $"{If(Year(Now) > My.Resources.BUILD_DATE_YEAR, Year(Now), My.Resources.BUILD_DATE_YEAR)}").Replace("$CompileDate", $"{CultureInfo.CurrentCulture.TextInfo.ToTitleCase(CompileDate.ToString(If(My.Computer.Info.InstalledUICulture.ToString().Contains("fr"), "dd MMMM yyyy", "MMMM dd, yyyy"), CultureInfo.CreateSpecificCulture(If(My.Computer.Info.InstalledUICulture.ToString().Contains("fr"), "fr-FR", "en-US"))))}")
Changelog_TextBox.Text = If(My.Resources.IS_LTS = "True", My.Resources.SMWMTL_Changelog_LTS_fr, My.Resources.SMWMTL_Changelog_fr)
Case False
Licence_TextBox.Text = My.Resources.SMWMTL_License.Replace("$version", $"{My.Resources.APP_VERSION} (Build {My.Resources.APP_VERSION_BUILD}{If(My.Settings.IS_PRERELEASE = True, $" • {My.Resources.RELEASE_STATE}", "")})").Replace("$Author", My.Resources.APP_AUTHOR).Replace("$Year", $"{If(Year(Now) > My.Resources.BUILD_DATE_YEAR, Year(Now), My.Resources.BUILD_DATE_YEAR)}").Replace("$CompileDate", $"{CultureInfo.CurrentCulture.TextInfo.ToTitleCase(CompileDate.ToString(If(My.Computer.Info.InstalledUICulture.ToString().Contains("fr"), "dd MMMM yyyy", "MMMM dd, yyyy"), CultureInfo.CreateSpecificCulture(If(My.Computer.Info.InstalledUICulture.ToString().Contains("fr"), "fr-FR", "en-US"))))}")
Changelog_TextBox.Text = If(My.Resources.IS_LTS = "True", My.Resources.SMWMTL_Changelog_LTS, My.Resources.SMWMTL_Changelog)
End Select
LegalNotice_Text02.Text = LegalNotice_Text02.Text.Replace("$Author$", My.Resources.APP_AUTHOR)
Developement_Tool_GroupBox_Text.Text = Developement_Tool_GroupBox_Text.Text.Replace("BUILDN", My.Resources.APP_VERSION_BUILD).Trim()
End Sub
' Bottom bar buttons
' "Legal notice" button
Private Sub UI_LegalNoticeBtn_Click(sender As Object, e As EventArgs) Handles UI_LegalNoticeBtn.Click
InformationsTabControl.SelectedIndex = 0
UI_StatPanel_Title.Text = UI_LegalNoticeBtn.Text
End Sub
' "SMWMTL License" button
Private Sub UI_AppLicenseBtn_Click(sender As Object, e As EventArgs) Handles UI_AppLicenseBtn.Click
InformationsTabControl.SelectedIndex = 1
UI_StatPanel_Title.Text = UI_AppLicenseBtn.Text
End Sub
' "SMWMTL changelog" button
Private Sub UI_AppChangelogBtn_Click(sender As Object, e As EventArgs) Handles UI_AppChangelogBtn.Click
InformationsTabControl.SelectedIndex = 2
UI_StatPanel_Title.Text = UI_AppChangelogBtn.Text
End Sub
' "Other credits" button
Private Sub UI_OtherCreditsBtn_Click(sender As Object, e As EventArgs) Handles UI_OtherCreditsBtn.Click
InformationsTabControl.SelectedIndex = 3
UI_StatPanel_Title.Text = UI_OtherCreditsBtn.Text
End Sub
' "Close" button
Private Sub CloseBtn_Click(sender As Object, e As EventArgs) Handles CloseBtn.Click
Close()
End Sub
' Page end
End Class