Implemented basic theme engine as well as a dark theme. For time being, dark theme is the default theme.
This commit is contained in:
Generated
+17
-16
@@ -34,9 +34,9 @@ Partial Class frmMain
|
||||
Me.gMonTraySetup = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonTraySetupAddWizard = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonTraySetupGameManager = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonTraySetupCustomVariables = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonTraySetupTags = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonTraySetupProcessManager = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonTraySetupCustomVariables = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonTrayTools = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonTrayToolsCompact = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonTrayToolsLog = New System.Windows.Forms.ToolStripMenuItem()
|
||||
@@ -64,9 +64,9 @@ Partial Class frmMain
|
||||
Me.gMonSetup = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonSetupGameManager = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonSetupAddWizard = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonSetupCustomVariables = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonSetupTags = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonSetupProcessManager = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonSetupCustomVariables = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonTools = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonToolsCompact = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonToolsLog = New System.Windows.Forms.ToolStripMenuItem()
|
||||
@@ -162,12 +162,6 @@ Partial Class frmMain
|
||||
Me.gMonTraySetupGameManager.Size = New System.Drawing.Size(201, 22)
|
||||
Me.gMonTraySetupGameManager.Text = "&Game Manager..."
|
||||
'
|
||||
'gMonTraySetupCustomVariables
|
||||
'
|
||||
Me.gMonTraySetupCustomVariables.Name = "gMonTraySetupCustomVariables"
|
||||
Me.gMonTraySetupCustomVariables.Size = New System.Drawing.Size(201, 22)
|
||||
Me.gMonTraySetupCustomVariables.Text = "Custom Path &Variables..."
|
||||
'
|
||||
'gMonTraySetupTags
|
||||
'
|
||||
Me.gMonTraySetupTags.Name = "gMonTraySetupTags"
|
||||
@@ -180,6 +174,12 @@ Partial Class frmMain
|
||||
Me.gMonTraySetupProcessManager.Size = New System.Drawing.Size(201, 22)
|
||||
Me.gMonTraySetupProcessManager.Text = "&Process Manager..."
|
||||
'
|
||||
'gMonTraySetupCustomVariables
|
||||
'
|
||||
Me.gMonTraySetupCustomVariables.Name = "gMonTraySetupCustomVariables"
|
||||
Me.gMonTraySetupCustomVariables.Size = New System.Drawing.Size(201, 22)
|
||||
Me.gMonTraySetupCustomVariables.Text = "Custom Path &Variables..."
|
||||
'
|
||||
'gMonTrayTools
|
||||
'
|
||||
Me.gMonTrayTools.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonTrayToolsCompact, Me.gMonTrayToolsLog, Me.gMonTrayToolsSessions, Me.gMonTrayToolsSyncGameID})
|
||||
@@ -270,6 +270,7 @@ Partial Class frmMain
|
||||
'
|
||||
'gMonStatusStrip
|
||||
'
|
||||
Me.gMonStatusStrip.BackColor = System.Drawing.Color.Transparent
|
||||
Me.gMonStatusStrip.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.gMonStatusStrip.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonStripAdminButton, Me.gMonStripTxtStatus, Me.gMonStripStatusButton})
|
||||
Me.gMonStatusStrip.Location = New System.Drawing.Point(0, 379)
|
||||
@@ -291,7 +292,7 @@ Partial Class frmMain
|
||||
'
|
||||
Me.gMonStripTxtStatus.Margin = New System.Windows.Forms.Padding(5, 0, 0, 0)
|
||||
Me.gMonStripTxtStatus.Name = "gMonStripTxtStatus"
|
||||
Me.gMonStripTxtStatus.Size = New System.Drawing.Size(400, 22)
|
||||
Me.gMonStripTxtStatus.Size = New System.Drawing.Size(369, 22)
|
||||
Me.gMonStripTxtStatus.Spring = True
|
||||
Me.gMonStripTxtStatus.Text = "Monitor Status"
|
||||
Me.gMonStripTxtStatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
@@ -308,7 +309,7 @@ Partial Class frmMain
|
||||
Me.gMonMainMenu.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonFile, Me.gMonSetup, Me.gMonTools, Me.gMonHelp, Me.gMonNotification})
|
||||
Me.gMonMainMenu.Location = New System.Drawing.Point(0, 0)
|
||||
Me.gMonMainMenu.Name = "gMonMainMenu"
|
||||
Me.gMonMainMenu.RenderMode = System.Windows.Forms.ToolStripRenderMode.System
|
||||
Me.gMonMainMenu.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional
|
||||
Me.gMonMainMenu.Size = New System.Drawing.Size(524, 24)
|
||||
Me.gMonMainMenu.TabIndex = 0
|
||||
Me.gMonMainMenu.Text = "MenuStrip1"
|
||||
@@ -367,12 +368,6 @@ Partial Class frmMain
|
||||
Me.gMonSetupAddWizard.Size = New System.Drawing.Size(201, 22)
|
||||
Me.gMonSetupAddWizard.Text = "Add Game &Wizard..."
|
||||
'
|
||||
'gMonSetupCustomVariables
|
||||
'
|
||||
Me.gMonSetupCustomVariables.Name = "gMonSetupCustomVariables"
|
||||
Me.gMonSetupCustomVariables.Size = New System.Drawing.Size(201, 22)
|
||||
Me.gMonSetupCustomVariables.Text = "Custom Path &Variables..."
|
||||
'
|
||||
'gMonSetupTags
|
||||
'
|
||||
Me.gMonSetupTags.Name = "gMonSetupTags"
|
||||
@@ -385,6 +380,12 @@ Partial Class frmMain
|
||||
Me.gMonSetupProcessManager.Size = New System.Drawing.Size(201, 22)
|
||||
Me.gMonSetupProcessManager.Text = "&Process Manager..."
|
||||
'
|
||||
'gMonSetupCustomVariables
|
||||
'
|
||||
Me.gMonSetupCustomVariables.Name = "gMonSetupCustomVariables"
|
||||
Me.gMonSetupCustomVariables.Size = New System.Drawing.Size(201, 22)
|
||||
Me.gMonSetupCustomVariables.Text = "Custom Path &Variables..."
|
||||
'
|
||||
'gMonTools
|
||||
'
|
||||
Me.gMonTools.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonToolsCompact, Me.gMonToolsLog, Me.gMonToolsSessions, Me.gMonToolsSyncGameID})
|
||||
|
||||
@@ -1564,6 +1564,25 @@ Public Class frmMain
|
||||
pbTime.Image = Icon_Clock
|
||||
AddHandler mgrMonitorList.UpdateLog, AddressOf UpdateLog
|
||||
ResetGameInfo()
|
||||
|
||||
'Initialise theme engine
|
||||
Dim oThemeEngine As New mgrThemeEngine
|
||||
oThemeEngine.SetTheme(mgrThemeEngine.eTheme.Dark)
|
||||
BackColor = oThemeEngine.colBase
|
||||
gMonMainMenu.BackColor = oThemeEngine.colBase
|
||||
gMonMainMenu.ForeColor = oThemeEngine.colHighlightAlt
|
||||
gMonStatusStrip.BackColor = oThemeEngine.colBase
|
||||
gMonStripTxtStatus.ForeColor = oThemeEngine.colHightlight
|
||||
gMonStripStatusButton.ForeColor = oThemeEngine.colHightlight
|
||||
lblGameTitle.ForeColor = oThemeEngine.colHightlight
|
||||
lblStatus1.ForeColor = oThemeEngine.colHightlight
|
||||
lblStatus2.ForeColor = oThemeEngine.colHightlight
|
||||
lblStatus3.ForeColor = oThemeEngine.colHightlight
|
||||
lblTimeSpent.ForeColor = oThemeEngine.colHightlight
|
||||
lblLastActionTitle.ForeColor = oThemeEngine.colHightlight
|
||||
lblLastAction.ForeColor = oThemeEngine.colHightlight
|
||||
txtLog.BackColor = oThemeEngine.colBaseAlt
|
||||
txtLog.ForeColor = oThemeEngine.colHightlight
|
||||
End Sub
|
||||
|
||||
Private Function BuildChildProcesses() As Integer
|
||||
|
||||
@@ -123,6 +123,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Classes\clsGameProcess.vb" />
|
||||
<Compile Include="Managers\mgrThemeEngine.vb" />
|
||||
<Compile Include="Classes\clsWineData.vb" />
|
||||
<Compile Include="Classes\clsProcess.vb" />
|
||||
<Compile Include="Classes\clsGameFilter.vb" />
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
Imports GBM.My.Resources
|
||||
|
||||
Public Class mgrThemeEngine
|
||||
|
||||
Public ReadOnly Property colBase As Color
|
||||
Public ReadOnly Property colBaseAlt As Color
|
||||
Public ReadOnly Property colHightlight As Color
|
||||
Public ReadOnly Property colHighlightAlt As Color
|
||||
|
||||
|
||||
Public Enum eTheme
|
||||
Dark
|
||||
End Enum
|
||||
|
||||
Public Function SetTheme(thm As eTheme)
|
||||
Dim selectedColor As Color
|
||||
Select Case thm
|
||||
Case eTheme.Dark
|
||||
_colBase = New ColorConverter().ConvertFromString(mgrThemeEngine_Color_Dark)
|
||||
_colBaseAlt = New ColorConverter().ConvertFromString(mgrThemeEngine_Color_Black)
|
||||
_colHightlight = New ColorConverter().ConvertFromString(mgrThemeEngine_Color_White)
|
||||
_colHighlightAlt = New ColorConverter().ConvertFromString(mgrThemeEngine_Color_Blue)
|
||||
End Select
|
||||
Return selectedColor
|
||||
End Function
|
||||
End Class
|
||||
Generated
+36
@@ -6825,6 +6825,42 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to 0,0,0.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property mgrThemeEngine_Color_Black() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("mgrThemeEngine_Color_Black", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to 0,131,255.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property mgrThemeEngine_Color_Blue() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("mgrThemeEngine_Color_Blue", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to 25,25,25.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property mgrThemeEngine_Color_Dark() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("mgrThemeEngine_Color_Dark", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to 255,255,255.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property mgrThemeEngine_Color_White() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("mgrThemeEngine_Color_White", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to An error occured exporting the XML data.[BR][BR][PARAM].
|
||||
'''</summary>
|
||||
|
||||
@@ -2374,4 +2374,16 @@
|
||||
<data name="mgrCommon_FolderSelection" xml:space="preserve">
|
||||
<value>Current Folder</value>
|
||||
</data>
|
||||
<data name="mgrThemeEngine_Color_Black" xml:space="preserve">
|
||||
<value>0,0,0</value>
|
||||
</data>
|
||||
<data name="mgrThemeEngine_Color_Blue" xml:space="preserve">
|
||||
<value>0,131,255</value>
|
||||
</data>
|
||||
<data name="mgrThemeEngine_Color_Dark" xml:space="preserve">
|
||||
<value>25,25,25</value>
|
||||
</data>
|
||||
<data name="mgrThemeEngine_Color_White" xml:space="preserve">
|
||||
<value>255,255,255</value>
|
||||
</data>
|
||||
</root>
|
||||
Reference in New Issue
Block a user