@@ -762,24 +762,7 @@ Public Class GetPkgInfoDlg
762762 Thread.Sleep( 500 )
763763 End While
764764 End If
765- DynaLog.LogMessage( "Checking if mounted image detector is busy..." )
766- If MainForm.MountedImageDetectorBW.IsBusy Then
767- DynaLog.LogMessage( "Mounted image detector is busy. Stopping it..." )
768- MainForm.MountedImageDetectorBWRestarterTimer.Enabled = False
769- MainForm.MountedImageDetectorBW.CancelAsync()
770- While MainForm.MountedImageDetectorBW.IsBusy
771- Application.DoEvents()
772- Thread.Sleep( 500 )
773- End While
774- End If
775- DynaLog.LogMessage( "Checking if image status watchers are busy..." )
776- MainForm.WatcherTimer.Enabled = False
777- DynaLog.LogMessage( "Image status watchers might be busy. Stopping them if they are..." )
778- If MainForm.WatcherBW.IsBusy Then MainForm.WatcherBW.CancelAsync()
779- While MainForm.WatcherBW.IsBusy
780- Application.DoEvents()
781- Thread.Sleep( 100 )
782- End While
765+ MainForm.StopMountedImageDetector()
783766 cPropPathView.Nodes.Clear()
784767 cPropName.Text = ""
785768 cPropValue.Text = ""
@@ -1163,24 +1146,7 @@ Public Class GetPkgInfoDlg
11631146 Thread.Sleep( 500 )
11641147 End While
11651148 End If
1166- DynaLog.LogMessage( "Checking if mounted image detector is busy..." )
1167- If MainForm.MountedImageDetectorBW.IsBusy Then
1168- DynaLog.LogMessage( "Mounted image detector is busy. Stopping it..." )
1169- MainForm.MountedImageDetectorBWRestarterTimer.Enabled = False
1170- MainForm.MountedImageDetectorBW.CancelAsync()
1171- While MainForm.MountedImageDetectorBW.IsBusy
1172- Application.DoEvents()
1173- Thread.Sleep( 500 )
1174- End While
1175- End If
1176- DynaLog.LogMessage( "Checking if image status watchers are busy..." )
1177- MainForm.WatcherTimer.Enabled = False
1178- DynaLog.LogMessage( "Image status watchers might be busy. Stopping them if they are..." )
1179- If MainForm.WatcherBW.IsBusy Then MainForm.WatcherBW.CancelAsync()
1180- While MainForm.WatcherBW.IsBusy
1181- Application.DoEvents()
1182- Thread.Sleep( 100 )
1183- End While
1149+ MainForm.StopMountedImageDetector()
11841150 Select Case MainForm.Language
11851151 Case 0
11861152 Select Case My.Computer.Info.InstalledUICulture.ThreeLetterWindowsLanguageName
@@ -1487,8 +1453,7 @@ Public Class GetPkgInfoDlg
14871453 End Sub
14881454
14891455 Private Sub GetPkgInfoDlg_FormClosing(sender As Object , e As FormClosingEventArgs) Handles MyBase .FormClosing
1490- If Not MainForm.MountedImageDetectorBW.IsBusy Then Call MainForm.MountedImageDetectorBW.RunWorkerAsync()
1491- MainForm.WatcherTimer.Enabled = True
1456+ MainForm.StartMountedImageDetector()
14921457 End Sub
14931458
14941459 Private Sub Button4_Click(sender As Object , e As EventArgs) Handles Button4.Click
0 commit comments