Skip to content

Commit

Permalink
Merge pull request #312 from MikeMaximus/v140
Browse files Browse the repository at this point in the history
V140
  • Loading branch information
MikeMaximus authored Oct 30, 2024
2 parents 73ddaf0 + 11990cc commit 7377671
Show file tree
Hide file tree
Showing 41 changed files with 312 additions and 51 deletions.
3 changes: 3 additions & 0 deletions GBM/Forms/frmAddWizard.vb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ Public Class frmAddWizard
Private bDisableAdminWarning As Boolean = False

Private Sub SetForm()
'Init Dark Mode
mgrDarkMode.SetDarkMode(Me)

'Set Form Name
Me.Text = frmAddWizard_FormName
Me.Icon = GBM_Icon
Expand Down
6 changes: 5 additions & 1 deletion GBM/Forms/frmAdvancedImport.vb
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,9 @@ Public Class frmAdvancedImport
End Sub

Private Sub SetForm()
'Init Dark Mode
mgrDarkMode.SetDarkMode(Me)

'Set Form Name
Me.Text = frmAdvancedImport_FormName
Me.Icon = GBM_Icon
Expand Down Expand Up @@ -695,7 +698,8 @@ Public Class frmAdvancedImport
End Sub

Private Sub lstGames_DrawColumnHeader(sender As Object, e As DrawListViewColumnHeaderEventArgs) Handles lstGames.DrawColumnHeader
e.DrawDefault = True
'Don't overwrite the dark mode draw
If Not mgrDarkMode.UseDarkMode Then e.DrawDefault = True
End Sub

Private Sub frmAdvancedImport_KeyDown(sender As Object, e As KeyEventArgs) Handles MyBase.KeyDown
Expand Down
3 changes: 3 additions & 0 deletions GBM/Forms/frmChooseGame.vb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ Public Class frmChooseGame
End Sub

Private Sub SetForm()
'Init Dark Mode
mgrDarkMode.SetDarkMode(Me)

'Set Form Name
Me.Text = frmChooseGame_FormName
Me.Icon = GBM_Icon
Expand Down
3 changes: 3 additions & 0 deletions GBM/Forms/frmConfigLinks.vb
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ Public Class frmConfigLinks
End Sub

Private Sub SetForm()
'Init Dark Mode
mgrDarkMode.SetDarkMode(Me)

'Set Form Name
If IDList.Count > 1 Then
Me.Text = frmConfigLinks_FormNameMulti
Expand Down
3 changes: 3 additions & 0 deletions GBM/Forms/frmFileFolderSearch.vb
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@ Public Class frmFileFolderSearch
End Sub

Private Sub SetForm()
'Init Dark Mode
mgrDarkMode.SetDarkMode(Me)

'Set Form Name
Me.Text = frmFileFolderSearch_FormName
Me.Icon = GBM_Icon
Expand Down
3 changes: 3 additions & 0 deletions GBM/Forms/frmFilter.vb
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,9 @@ Public Class frmFilter
End Sub

Private Sub SetForm()
'Init Dark Mode
mgrDarkMode.SetDarkMode(Me)

'Set Form Name
Me.Text = frmFilter_FormName
Me.Icon = GBM_Icon
Expand Down
4 changes: 2 additions & 2 deletions GBM/Forms/frmGameManager.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 26 additions & 3 deletions GBM/Forms/frmGameManager.vb
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ Public Class frmGameManager

sCurrentID = txtID.Text

sNewID = InputBox(frmGameManager_GameIDEditInfo, frmGameManager_GameIDEditTitle, sCurrentID).Trim
sNewID = mgrCommon.ShowInputBox(frmGameManager_GameIDEditInfo, frmGameManager_GameIDEditTitle, sCurrentID)

If sNewID <> String.Empty And sCurrentID <> sNewID Then
txtID.Text = sNewID
Expand Down Expand Up @@ -722,10 +722,18 @@ Public Class frmGameManager

If Not bRemoteData And Not bLocalData Then
btnMarkAsRestored.Enabled = False
lblLocalBackupData.ForeColor = Color.Black
If mgrDarkMode.UseDarkMode Then
lblLocalBackupData.ForeColor = Color.White
Else
lblLocalBackupData.ForeColor = Color.Black
End If
ElseIf Not bRemoteData And bLocalData Then
btnMarkAsRestored.Enabled = False
lblLocalBackupData.ForeColor = Color.Black
If mgrDarkMode.UseDarkMode Then
lblLocalBackupData.ForeColor = Color.White
Else
lblLocalBackupData.ForeColor = Color.Black
End If
ElseIf oComboItems(0).Value <> lblLocalBackupData.Text Then
lblLocalBackupData.ForeColor = Color.Red
btnMarkAsRestored.Enabled = True
Expand Down Expand Up @@ -1798,6 +1806,21 @@ Public Class frmGameManager
End Sub

Private Sub SetForm()
Dim oCustomDarkModeControls As New List(Of Control)

'Controls that must be manually themed for dark mode
With oCustomDarkModeControls
.Add(cmsAdvanced)
.Add(cmsBackupData)
.Add(cmsImport)
.Add(cmsLinks)
.Add(cmsMonitorOptions)
.Add(cmsProcessOptions)
End With

'Init Dark Mode
mgrDarkMode.SetDarkMode(Me, oCustomDarkModeControls)

'Set Form Name
Me.Text = frmGameManager_FormName
Me.Icon = GBM_Icon
Expand Down
3 changes: 3 additions & 0 deletions GBM/Forms/frmGameProcesses.vb
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ Public Class frmGameProcesses
End Sub

Private Sub SetForm()
'Init Dark Mode
mgrDarkMode.SetDarkMode(Me)

'Set Form Name
If IDList.Count > 1 Then
Me.Text = frmGameProcesses_FormNameMulti
Expand Down
3 changes: 3 additions & 0 deletions GBM/Forms/frmGameTags.vb
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ Public Class frmGameTags
End Sub

Private Sub SetForm()
'Init Dark Mode
mgrDarkMode.SetDarkMode(Me)

'Set Form Name
If IDList.Count > 1 Then
Me.Text = frmGameTags_FormNameMulti
Expand Down
5 changes: 4 additions & 1 deletion GBM/Forms/frmIncludeExclude.vb
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ Public Class frmIncludeExclude
Private Sub OpenRawEdit()
Dim sCurrentString As String = CreateNewBuilderString()
Dim sNewString As String
sNewString = InputBox(frmIncludeExclude_RawEditInfo, mgrCommon.FormatString(frmIncludeExclude_RawEditTitle, FormName), sCurrentString)
sNewString = mgrCommon.ShowInputBox(frmIncludeExclude_RawEditInfo, mgrCommon.FormatString(frmIncludeExclude_RawEditTitle, FormName), sCurrentString)
If sNewString <> String.Empty Then
ParseBuilderString(sNewString)
Else
Expand All @@ -224,6 +224,9 @@ Public Class frmIncludeExclude
End Sub

Private Sub SetForm()
'Init Dark Mode
mgrDarkMode.SetDarkMode(Me)

'Set Form Name
Me.Text = mgrCommon.FormatString(frmIncludeExclude_FormName, FormName)
Me.Icon = GBM_Icon
Expand Down
3 changes: 3 additions & 0 deletions GBM/Forms/frmLaunchConfiguration.vb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ Public Class frmLaunchConfiguration
Private Property IsLoading As Boolean = False

Private Sub SetForm()
'Init Dark Mode
mgrDarkMode.SetDarkMode(Me)

'Set Form Name
Me.Text = mgrCommon.FormatString(frmLaunchConfiguration_FormName, Game.CroppedName)
Me.Icon = GBM_Icon
Expand Down
3 changes: 3 additions & 0 deletions GBM/Forms/frmLauncherManager.vb
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,9 @@ Public Class frmLauncherManager
End Function

Private Sub SetForm()
'Init Dark Mode
mgrDarkMode.SetDarkMode(Me)

'Set Form Name
Me.Text = frmLauncherManager_FormName
Me.Icon = GBM_Icon
Expand Down
3 changes: 3 additions & 0 deletions GBM/Forms/frmLudusaviConfig.vb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Public Class frmLudusaviConfig
Public Property ImportOptions As clsLudusaviOptions

Private Sub SetForm()
'Init Dark Mode
mgrDarkMode.SetDarkMode(Me)

'Set Form Name
Me.Text = frmLudusaviConfig_FormName
Me.Icon = GBM_Icon
Expand Down
16 changes: 15 additions & 1 deletion GBM/Forms/frmMain.vb
Original file line number Diff line number Diff line change
Expand Up @@ -1291,7 +1291,7 @@ Public Class frmMain
Dim sDelimters As String = " :"
Dim cDelimters As Char() = sDelimters.ToCharArray

sFullCommand = InputBox(frmMain_EnterCommand, frmMain_DeveloperConsole)
sFullCommand = mgrCommon.ShowInputBox(frmMain_EnterCommand, frmMain_DeveloperConsole, String.Empty)

If sFullCommand <> String.Empty Then
sMainCommand = sFullCommand.Split(cDelimters, 2)(0)
Expand Down Expand Up @@ -1706,6 +1706,10 @@ Public Class frmMain
'This delay is a work-around for the "ghost window" issue that occurs in Linux when the form is hidden on start-up. It just works...
If bDelay Then Threading.Thread.Sleep(100)
Me.Visible = bVisible
'We need to re-initialize Dark Mode here each time to work-around issues with applying a theme while the form is invisible.
If bVisible Then
mgrDarkMode.SetDarkMode(Me)
End If
End Sub

Private Sub ToggleState(ByVal bVisible As Boolean)
Expand Down Expand Up @@ -2351,6 +2355,16 @@ Public Class frmMain
End Sub

Private Sub SetForm()
Dim oCustomDarkModeControls As New List(Of Control)

'Controls that must be manually themed for dark mode
With oCustomDarkModeControls
.Add(gMonTrayMenu)
End With

'Init Dark Mode
mgrDarkMode.SetDarkMode(Me, oCustomDarkModeControls)

'Set Minimum Size
Me.MinimumSize = New Size(Me.Size.Width - slcMain.SplitterDistance, Me.Size.Height - txtLog.Size.Height)

Expand Down
3 changes: 3 additions & 0 deletions GBM/Forms/frmProcessManager.vb
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ Public Class frmProcessManager
End Function

Private Sub SetForm()
'Init Dark Mode
mgrDarkMode.SetDarkMode(Me)

'Set Form Name
Me.Text = frmProcessManager_FormName
Me.Icon = GBM_Icon
Expand Down
3 changes: 3 additions & 0 deletions GBM/Forms/frmSessionExport.vb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ Public Class frmSessionExport
End Sub

Private Sub SetForm()
'Init Dark Mode
mgrDarkMode.SetDarkMode(Me)

Me.Text = frmSessionExport_FormName
Me.Icon = GBM_Icon

Expand Down
3 changes: 3 additions & 0 deletions GBM/Forms/frmSessions.vb
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ Public Class frmSessions
End Sub

Private Sub SetForm()
'Init Dark Mode
mgrDarkMode.SetDarkMode(Me)

Me.Text = frmSessions_Name
Me.Icon = GBM_Icon

Expand Down
3 changes: 3 additions & 0 deletions GBM/Forms/frmSettings.vb
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,9 @@ Public Class frmSettings
End Sub

Private Sub SetForm()
'Init Dark Mode
mgrDarkMode.SetDarkMode(Me)

'Set Form Name
Me.Text = frmSettings_FormName
Me.Icon = GBM_Icon
Expand Down
3 changes: 3 additions & 0 deletions GBM/Forms/frmStartUpWizard.vb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ Public Class frmStartUpWizard
Private eCurrentStep As eSteps = eSteps.Step1

Private Sub SetForm()
'Init Dark Mode
mgrDarkMode.SetDarkMode(Me)

'Set Form Name
Me.Text = frmStartUpWizard_FormName
Me.Icon = GBM_Icon
Expand Down
3 changes: 3 additions & 0 deletions GBM/Forms/frmSyncFields.vb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ Public Class frmSyncFields
End Sub

Private Sub SetForm()
'Init Dark Mode
mgrDarkMode.SetDarkMode(Me)

'Set Form Name
Me.Text = frmSyncFields_FormName
Me.Icon = GBM_Icon
Expand Down
3 changes: 3 additions & 0 deletions GBM/Forms/frmTags.vb
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ Public Class frmTags
End Function

Private Sub SetForm()
'Init Dark Mode
mgrDarkMode.SetDarkMode(Me)

'Set Form Name
Me.Text = frmTags_FormName
Me.Icon = GBM_Icon
Expand Down
3 changes: 3 additions & 0 deletions GBM/Forms/frmVariableManager.vb
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@ Public Class frmVariableManager
End Function

Private Sub SetForm()
'Init Dark Mode
mgrDarkMode.SetDarkMode(Me)

'Set Form Name
Me.Text = frmVariableManager_FormName
Me.Icon = GBM_Icon
Expand Down
3 changes: 3 additions & 0 deletions GBM/Forms/frmWineConfiguration.vb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ Public Class frmWineConfiguration
End Sub

Private Sub SetForm()
'Init Dark Mode
mgrDarkMode.SetDarkMode(Me)

'Set Form Name
Me.Text = mgrCommon.FormatString(frmWineConfiguration_FormName, GameName)
Me.Icon = GBM_Icon
Expand Down
10 changes: 8 additions & 2 deletions GBM/Game Backup Monitor.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@
RMDIR /S /Q Utilities\x64</PostBuildEvent>
</PropertyGroup>
<ItemGroup>
<Reference Include="DarkModeForms, Version=1.8.12.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>References\DarkModeForms.dll</HintPath>
</Reference>
<Reference Include="Mono.Data.Sqlite, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>References\Mono.Data.Sqlite.dll</HintPath>
Expand All @@ -123,8 +127,8 @@
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="YamlDotNet, Version=15.0.0.0, Culture=neutral, PublicKeyToken=ec19458f3c15af5e, processorArchitecture=MSIL">
<HintPath>..\packages\YamlDotNet.15.1.4\lib\net47\YamlDotNet.dll</HintPath>
<Reference Include="YamlDotNet, Version=16.0.0.0, Culture=neutral, PublicKeyToken=ec19458f3c15af5e, processorArchitecture=MSIL">
<HintPath>..\packages\YamlDotNet.16.1.3\lib\net47\YamlDotNet.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -306,6 +310,7 @@
<Compile Include="Forms\frmVariableManager.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Managers\mgrDarkMode.vb" />
<Compile Include="Managers\mgrBackupQueue.vb" />
<Compile Include="Managers\mgrConfigLinks.vb" />
<Compile Include="Managers\mgrGameProcesses.vb" />
Expand Down Expand Up @@ -476,6 +481,7 @@
<Content Include="License\credits.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="References\DarkModeForms.dll" />
<Content Include="References\Mono.Data.Sqlite.dll" />
<None Include="Resources\frmGameManager_Arrow_Submenu_Right.png" />
<Content Include="Resources\frmAdvancedImport_Detected.png" />
Expand Down
Loading

0 comments on commit 7377671

Please sign in to comment.