This commit is contained in:
MikeMaximus
2019-03-04 09:54:09 -06:00
parent 967b0d80cc
commit 5d8a1954a2
3 changed files with 81 additions and 5 deletions
+1 -1
View File
@@ -353,7 +353,7 @@ Public Class frmMain
If oSettings.DisableConfirmation Then
bDoBackup = True
Else
If mgrCommon.ShowMessage(frmMain_ConfirmBackup, oProcess.GameInfo.Name, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
If mgrCommon.ShowPriorityMessage(frmMain_ConfirmBackup, oProcess.GameInfo.Name, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
bDoBackup = True
Else
bDoBackup = False
+75
View File
@@ -530,6 +530,31 @@ Public Class mgrCommon
Return oResult
End Function
'Handles no extra parameters
Public Shared Function ShowPriorityMessage(ByVal sMsg As String, ByVal oType As MsgBoxStyle) As MsgBoxResult
Dim frmFake As Form
'Create a fake mostly invisible form to get top focus
frmFake = New Form
frmFake.FormBorderStyle = FormBorderStyle.None
frmFake.ShowInTaskbar = False
frmFake.Size = New Size(0, 0)
frmFake.StartPosition = FormStartPosition.CenterScreen
frmFake.Show()
frmFake.Focus()
frmFake.BringToFront()
frmFake.TopMost = True
frmFake.Visible = False
Dim oResult As MsgBoxResult
oResult = ShowMessage(sMsg, oType)
frmFake.TopMost = False
frmFake.Dispose()
Return oResult
End Function
'Handles single parameter stings
Public Shared Function ShowMessage(ByVal sMsg As String, ByVal sParam As String, ByVal oType As MsgBoxStyle) As MsgBoxResult
Dim oResult As MsgBoxResult
@@ -537,6 +562,31 @@ Public Class mgrCommon
Return oResult
End Function
'Handles single parameter stings
Public Shared Function ShowPriorityMessage(ByVal sMsg As String, ByVal sParam As String, ByVal oType As MsgBoxStyle) As MsgBoxResult
Dim frmFake As Form
'Create a fake mostly invisible form to get top focus
frmFake = New Form
frmFake.FormBorderStyle = FormBorderStyle.None
frmFake.ShowInTaskbar = False
frmFake.Size = New Size(0, 0)
frmFake.StartPosition = FormStartPosition.CenterScreen
frmFake.Show()
frmFake.Focus()
frmFake.BringToFront()
frmFake.TopMost = True
frmFake.Visible = False
Dim oResult As MsgBoxResult
oResult = ShowMessage(sMsg, sParam, oType)
frmFake.TopMost = False
frmFake.Dispose()
Return oResult
End Function
'Handles multi-parameter strings
Public Shared Function ShowMessage(ByVal sMsg As String, ByVal sParams As String(), ByVal oType As MsgBoxStyle) As MsgBoxResult
Dim oResult As MsgBoxResult
@@ -544,6 +594,31 @@ Public Class mgrCommon
Return oResult
End Function
'Handles multi-parameter strings
Public Shared Function ShowPriorityMessage(ByVal sMsg As String, ByVal sParams As String(), ByVal oType As MsgBoxStyle) As MsgBoxResult
Dim frmFake As Form
'Create a fake mostly invisible form to get top focus
frmFake = New Form
frmFake.FormBorderStyle = FormBorderStyle.None
frmFake.ShowInTaskbar = False
frmFake.Size = New Size(0, 0)
frmFake.StartPosition = FormStartPosition.CenterScreen
frmFake.Show()
frmFake.Focus()
frmFake.BringToFront()
frmFake.TopMost = True
frmFake.Visible = False
Dim oResult As MsgBoxResult
oResult = ShowMessage(sMsg, sParams, oType)
frmFake.TopMost = False
frmFake.Dispose()
Return oResult
End Function
'Handles no extra parameters
Public Shared Function FormatString(ByVal sString As String) As String
sString = sString.Replace("[BR]", vbCrLf)
+5 -4
View File
@@ -587,8 +587,8 @@ Public Class mgrPath
If bNoAuto Then
sMessage = mgrCommon.FormatString(mgrPath_ConfirmManualPath, sSearchReason)
If mgrCommon.ShowMessage(sMessage, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
sFolder = SetManualgamePath()
If mgrCommon.ShowPriorityMessage(sMessage, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
sFolder = SetManualGamePath()
End If
Return sFolder
@@ -596,8 +596,9 @@ Public Class mgrPath
sMessage = mgrCommon.FormatString(mgrPath_ConfirmAutoPath, sSearchReason)
If mgrCommon.ShowMessage(sMessage, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
If mgrCommon.ShowPriorityMessage(sMessage, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
frmFind.ShowDialog()
frmFind.BringToFront()
If frmFind.FoundItem <> String.Empty Then
Return frmFind.FoundItem
@@ -612,7 +613,7 @@ Public Class mgrPath
End If
If mgrCommon.ShowMessage(sMessage, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
sFolder = SetManualgamePath()
sFolder = SetManualGamePath()
End If
frmFind.Dispose()