2018-12-28 16:38:45 +00:00
Imports System . Management
Namespace My
' Los siguientes eventos est<73> n disponibles para MyApplication:
'
' Inicio: se desencadena cuando se inicia la aplicaci<63> n, antes de que se cree el formulario de inicio.
' Apagado: generado despu<70> s de cerrar todos los formularios de la aplicaci<63> n. Este evento no se genera si la aplicaci<63> n termina de forma an<61> mala.
' UnhandledException: generado si la aplicaci<63> n detecta una excepci<63> n no controlada.
' StartupNextInstance: se desencadena cuando se inicia una aplicaci<63> n de instancia <20> nica y la aplicaci<63> n ya est<73> activa.
' NetworkAvailabilityChanged: se desencadena cuando la conexi<78> n de red est<73> conectada o desconectada.
Partial Friend Class MyApplication
Private Sub MyApplication_Startup ( ByVal sender As Object , ByVal e As Microsoft . VisualBasic . ApplicationServices . StartupEventArgs ) Handles Me . Startup
SysInfo . GetSysInfo ( )
Little updates
New Mac Wizard working, and revamped, so now you choose emulator and OS. Thank to adespoton for the Mac compatibility matrix. (https://docs.google.com/spreadsheets/d/1us6SCBgVs8NqbxofJXTmHDeK3nKQJpcgya2nWC9_t2w/edit#gid=0)
Now PearPC files can be loaded and saved (I've taken code from PearPC Config File Generator and adapted it to Virtual Mac)
Still getting the challenge of dealing with BII and SheepShaver config files. Will upload new versions of files when they work.
Updated to 0.6.1 in file version, but technically it's 0.6.1 Beta (Or 0.6.1 RC, 0.6.0, not the final 0.6.1)
Now with some investigation, the app is "translated" to Spanish and German (Please forgive the bad German translation, I used GTranslate and Virtual PC as reference points for this). To change the language, go to File > Options > Language and select the new language. Note that German(de-DE) or Spanish(es-MX) might be loaded by default if you are using these languages in you Windows installation. Note that the translation is crap, and is not complete, so many parts are still in English. Will try to fix this in 0.7.1
Still need to fix Saving BII and SS files, so this is not final 0.6.1, will release a "revision" later.
2019-02-08 17:19:10 +00:00
frmAbout . ProductNAV . Text = frmAbout . ProductNAV . Text & " " & My . Application . Info . Version . ToString & " Beta "
2018-12-28 16:38:45 +00:00
If My . Computer . FileSystem . DirectoryExists ( My . Settings . DefaultMacFolder ) = False Then
My . Settings . DefaultMacFolder = My . Computer . FileSystem . SpecialDirectories . MyDocuments & " \My Macs "
End If
If My . Settings . vMacROM = " " Then
My . Settings . vMacROM = My . Application . Info . DirectoryPath & " \Emulators\vMac\MacII.ROM "
End If
If My . Settings . BasiliskROM = " " Then
My . Settings . BasiliskROM = My . Application . Info . DirectoryPath & " \Emulators\BasiliskII\Mac_OS_ROM "
End If
If My . Settings . SheepShaverROM = " " Then
My . Settings . SheepShaverROM = My . Application . Info . DirectoryPath & " \Emulators\SheepShaver\Mac_OS_ROM "
End If
Little updates
New Mac Wizard working, and revamped, so now you choose emulator and OS. Thank to adespoton for the Mac compatibility matrix. (https://docs.google.com/spreadsheets/d/1us6SCBgVs8NqbxofJXTmHDeK3nKQJpcgya2nWC9_t2w/edit#gid=0)
Now PearPC files can be loaded and saved (I've taken code from PearPC Config File Generator and adapted it to Virtual Mac)
Still getting the challenge of dealing with BII and SheepShaver config files. Will upload new versions of files when they work.
Updated to 0.6.1 in file version, but technically it's 0.6.1 Beta (Or 0.6.1 RC, 0.6.0, not the final 0.6.1)
Now with some investigation, the app is "translated" to Spanish and German (Please forgive the bad German translation, I used GTranslate and Virtual PC as reference points for this). To change the language, go to File > Options > Language and select the new language. Note that German(de-DE) or Spanish(es-MX) might be loaded by default if you are using these languages in you Windows installation. Note that the translation is crap, and is not complete, so many parts are still in English. Will try to fix this in 0.7.1
Still need to fix Saving BII and SS files, so this is not final 0.6.1, will release a "revision" later.
2019-02-08 17:19:10 +00:00
Select Case My . Settings . Lang
Case " en-US "
My . Application . ChangeUICulture ( " en-US " )
Case " es-MX "
My . Application . ChangeUICulture ( " es-MX " )
Case " de-DE "
My . Application . ChangeUICulture ( " de-DE " )
End Select
2018-12-28 16:38:45 +00:00
If Not My . Application . CommandLineArgs . Count = 0 Then
For x As Integer = 0 To My . Application . CommandLineArgs . Count - 1
Select Case My . Application . CommandLineArgs . Item ( x )
Case " /debug "
frmMain . mnuFileDebug . Visible = True
frmMain . mnuHelpCrash . Visible = True
Case " /log "
End Select
Next
End If
Little updates
New Mac Wizard working, and revamped, so now you choose emulator and OS. Thank to adespoton for the Mac compatibility matrix. (https://docs.google.com/spreadsheets/d/1us6SCBgVs8NqbxofJXTmHDeK3nKQJpcgya2nWC9_t2w/edit#gid=0)
Now PearPC files can be loaded and saved (I've taken code from PearPC Config File Generator and adapted it to Virtual Mac)
Still getting the challenge of dealing with BII and SheepShaver config files. Will upload new versions of files when they work.
Updated to 0.6.1 in file version, but technically it's 0.6.1 Beta (Or 0.6.1 RC, 0.6.0, not the final 0.6.1)
Now with some investigation, the app is "translated" to Spanish and German (Please forgive the bad German translation, I used GTranslate and Virtual PC as reference points for this). To change the language, go to File > Options > Language and select the new language. Note that German(de-DE) or Spanish(es-MX) might be loaded by default if you are using these languages in you Windows installation. Note that the translation is crap, and is not complete, so many parts are still in English. Will try to fix this in 0.7.1
Still need to fix Saving BII and SS files, so this is not final 0.6.1, will release a "revision" later.
2019-02-08 17:19:10 +00:00
SearchForMacs ( )
If My . Settings . VerifyEmulatorPaths = True Then
If My . Settings . PearPCPath = " " Or My . Settings . QEMUPath = " " Or My . Settings . SheepShaverPath = " " _
Or My . Settings . BasiliskPath = " " Or My . Settings . vMacPath = " " Then
MsgBox ( " Some emulator(s)' path isn't set yet. In order to launch this/these emulator(s), " & _
" you must set their path. To do so, click on menu File > Options and select ''Emulator " & _
" path'' and set the paths for the emulators " , MsgBoxStyle . Exclamation , " Incorrect paths " )
End If
End If
2018-12-28 16:38:45 +00:00
End Sub
Private Sub MyApplication_StartupNextInstance ( ByVal sender As Object , ByVal e As Microsoft . VisualBasic . ApplicationServices . StartupNextInstanceEventArgs ) Handles Me . StartupNextInstance
If MsgBox ( " Virtual Mac is already running. Click Ok to show Virtual Mac Console. Click Cancel to close this dialog " , MsgBoxStyle . OkCancel , " Virtual Mac is alerady running " ) = MsgBoxResult . Ok Then
frmMain . Show ( )
End If
End Sub
Private Sub MyApplication_UnhandledException ( ByVal sender As Object , ByVal e As Microsoft . VisualBasic . ApplicationServices . UnhandledExceptionEventArgs ) Handles Me . UnhandledException
For x As Integer = 0 To My . Application . CommandLineArgs . Count - 1
Select Case My . Application . CommandLineArgs . Item ( x )
Case " /debug "
MsgBox ( e . Exception . Message )
Resume Next
Case " /log "
Resume Next
Case " "
Resume Next
End Select
Next
End Sub
Little updates
New Mac Wizard working, and revamped, so now you choose emulator and OS. Thank to adespoton for the Mac compatibility matrix. (https://docs.google.com/spreadsheets/d/1us6SCBgVs8NqbxofJXTmHDeK3nKQJpcgya2nWC9_t2w/edit#gid=0)
Now PearPC files can be loaded and saved (I've taken code from PearPC Config File Generator and adapted it to Virtual Mac)
Still getting the challenge of dealing with BII and SheepShaver config files. Will upload new versions of files when they work.
Updated to 0.6.1 in file version, but technically it's 0.6.1 Beta (Or 0.6.1 RC, 0.6.0, not the final 0.6.1)
Now with some investigation, the app is "translated" to Spanish and German (Please forgive the bad German translation, I used GTranslate and Virtual PC as reference points for this). To change the language, go to File > Options > Language and select the new language. Note that German(de-DE) or Spanish(es-MX) might be loaded by default if you are using these languages in you Windows installation. Note that the translation is crap, and is not complete, so many parts are still in English. Will try to fix this in 0.7.1
Still need to fix Saving BII and SS files, so this is not final 0.6.1, will release a "revision" later.
2019-02-08 17:19:10 +00:00
Private Sub SearchForMacs ( )
If My . Computer . FileSystem . DirectoryExists ( My . Settings . DefaultMacFolder ) = True Then
Dim Subdirectories As System . Collections . ObjectModel . ReadOnlyCollection ( Of String ) = My . Computer . FileSystem . GetDirectories ( My . Settings . DefaultMacFolder )
Dim FilesFound As String = " "
For x As Integer = 0 To Subdirectories . Count - 1
For Each FileDetected As String In My . Computer . FileSystem . GetFiles ( _
Subdirectories . Item ( x ) , _
FileIO . SearchOption . SearchAllSubDirectories , _
" *.mcf " )
If Not frmMain . VMList . Items . IndexOfKey ( System . IO . Path . GetFileNameWithoutExtension ( FileDetected ) ) = - 1 Then
Dim EmulatorType As String = InputBox ( " The file '' " & My . Computer . FileSystem . GetName ( FileDetected ) & _
" '' was detected as a possible Virtual Mac configuration file. " & _
" Possible emulators are 'Basilisk', 'SheepShaver', 'PearPC', 'QEMU'. " & _
" Please write below the emulator to which this file will be associated: " , _
" Virtual Mac Configuration file detected " )
ConfigFileHandler . CreateFromFile ( FileDetected , EmulatorType , System . IO . Path . GetFileNameWithoutExtension ( FileDetected ) )
End If
Next
Next
End If
End Sub
2018-12-28 16:38:45 +00:00
End Class
End Namespace