Fix #181
This commit is contained in:
@@ -353,7 +353,7 @@ Public Class frmMain
|
|||||||
If oSettings.DisableConfirmation Then
|
If oSettings.DisableConfirmation Then
|
||||||
bDoBackup = True
|
bDoBackup = True
|
||||||
Else
|
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
|
bDoBackup = True
|
||||||
Else
|
Else
|
||||||
bDoBackup = False
|
bDoBackup = False
|
||||||
|
|||||||
@@ -530,6 +530,31 @@ Public Class mgrCommon
|
|||||||
Return oResult
|
Return oResult
|
||||||
End Function
|
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
|
'Handles single parameter stings
|
||||||
Public Shared Function ShowMessage(ByVal sMsg As String, ByVal sParam As String, ByVal oType As MsgBoxStyle) As MsgBoxResult
|
Public Shared Function ShowMessage(ByVal sMsg As String, ByVal sParam As String, ByVal oType As MsgBoxStyle) As MsgBoxResult
|
||||||
Dim oResult As MsgBoxResult
|
Dim oResult As MsgBoxResult
|
||||||
@@ -537,6 +562,31 @@ Public Class mgrCommon
|
|||||||
Return oResult
|
Return oResult
|
||||||
End Function
|
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
|
'Handles multi-parameter strings
|
||||||
Public Shared Function ShowMessage(ByVal sMsg As String, ByVal sParams As String(), ByVal oType As MsgBoxStyle) As MsgBoxResult
|
Public Shared Function ShowMessage(ByVal sMsg As String, ByVal sParams As String(), ByVal oType As MsgBoxStyle) As MsgBoxResult
|
||||||
Dim oResult As MsgBoxResult
|
Dim oResult As MsgBoxResult
|
||||||
@@ -544,6 +594,31 @@ Public Class mgrCommon
|
|||||||
Return oResult
|
Return oResult
|
||||||
End Function
|
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
|
'Handles no extra parameters
|
||||||
Public Shared Function FormatString(ByVal sString As String) As String
|
Public Shared Function FormatString(ByVal sString As String) As String
|
||||||
sString = sString.Replace("[BR]", vbCrLf)
|
sString = sString.Replace("[BR]", vbCrLf)
|
||||||
|
|||||||
@@ -587,8 +587,8 @@ Public Class mgrPath
|
|||||||
If bNoAuto Then
|
If bNoAuto Then
|
||||||
sMessage = mgrCommon.FormatString(mgrPath_ConfirmManualPath, sSearchReason)
|
sMessage = mgrCommon.FormatString(mgrPath_ConfirmManualPath, sSearchReason)
|
||||||
|
|
||||||
If mgrCommon.ShowMessage(sMessage, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
If mgrCommon.ShowPriorityMessage(sMessage, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||||
sFolder = SetManualgamePath()
|
sFolder = SetManualGamePath()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return sFolder
|
Return sFolder
|
||||||
@@ -596,8 +596,9 @@ Public Class mgrPath
|
|||||||
|
|
||||||
sMessage = mgrCommon.FormatString(mgrPath_ConfirmAutoPath, sSearchReason)
|
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.ShowDialog()
|
||||||
|
frmFind.BringToFront()
|
||||||
|
|
||||||
If frmFind.FoundItem <> String.Empty Then
|
If frmFind.FoundItem <> String.Empty Then
|
||||||
Return frmFind.FoundItem
|
Return frmFind.FoundItem
|
||||||
@@ -612,7 +613,7 @@ Public Class mgrPath
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If mgrCommon.ShowMessage(sMessage, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
If mgrCommon.ShowMessage(sMessage, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||||
sFolder = SetManualgamePath()
|
sFolder = SetManualGamePath()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
frmFind.Dispose()
|
frmFind.Dispose()
|
||||||
|
|||||||
Reference in New Issue
Block a user