You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 23, 2025. It is now read-only.
pauseToolStripMenuItem.ToolTipText="Resume this virtual machine";
539
+
540
+
VMSort(sortColumn,sortOrder);
528
541
}
529
542
530
543
//Resumes the selected VM
@@ -540,6 +553,8 @@ private void VMResume()
540
553
btnStart.Enabled=true;
541
554
btnConfigure.Enabled=true;
542
555
pauseToolStripMenuItem.ToolTipText="Pause this virtual machine";
556
+
557
+
VMSort(sortColumn,sortOrder);
543
558
}
544
559
545
560
//Starts the selected VM
@@ -622,6 +637,8 @@ private void VMStart()
622
637
{
623
638
MessageBox.Show("An error has occurred. Please provide the following information to the developer:\n"+ex.Message+"\n"+ex.StackTrace,"Error",MessageBoxButtons.OK,MessageBoxIcon.Error);
624
639
}
640
+
641
+
VMSort(sortColumn,sortOrder);
625
642
}
626
643
627
644
//Stops a running/paused VM
@@ -667,6 +684,8 @@ private void VMStop()
667
684
{
668
685
MessageBox.Show("An error occurred trying to stop the selected virtual machine.","Error",MessageBoxButtons.OK,MessageBoxIcon.Error);
669
686
}
687
+
688
+
VMSort(sortColumn,sortOrder);
670
689
}
671
690
672
691
//Start VM if it's stopped or stop it if it's running/paused
@@ -751,6 +770,8 @@ private void VMConfigure()
751
770
MessageBox.Show("This virtual machine could not be started. Please provide the following information to the developer:\n"+ex.Message+"\n"+ex.StackTrace,"Error",MessageBoxButtons.OK,MessageBoxIcon.Error);
@@ -915,6 +936,7 @@ public void VMEdit(string name, string desc)
915
936
regkey.Close();
916
937
917
938
MessageBox.Show("Virtual machine \""+vm.Name+"\" was successfully modified. Please update its configuration so that any folder paths (e.g. for hard disk images) point to the new folder.","Success",MessageBoxButtons.OK,MessageBoxIcon.Information);
MessageBox.Show("Virtual machine \""+vm.Name+"\" is currently running and cannot be removed. Please stop virtual machines before attempting to remove them.","Error",MessageBoxButtons.OK,MessageBoxIcon.Error);
catch(Exceptionex)//Catches "regkey doesn't exist" exceptions and such
943
970
{
944
971
MessageBox.Show("Virtual machine \""+vm.Name+"\" could not be removed due to the following error:\n\n"+ex.Message,"Error",MessageBoxButtons.OK,MessageBoxIcon.Error);
945
-
return;
972
+
continue;
946
973
}
947
974
948
975
DialogResultresult2=MessageBox.Show("Virtual machine \""+vm.Name+"\" was successfully removed. Would you like to delete its files as well?","Virtual machine removed",MessageBoxButtons.YesNo,MessageBoxIcon.Question);
@@ -955,27 +982,28 @@ private void VMRemove()
955
982
catch(UnauthorizedAccessException)//Files are read-only or protected by privileges
956
983
{
957
984
MessageBox.Show("86Box Manager was unable to delete the files of this virtual machine because they are read-only or you don't have sufficient privileges to delete them.\n\nMake sure the files are free for deletion, then remove them manually.","Error",MessageBoxButtons.OK,MessageBoxIcon.Error);
958
-
return;
985
+
continue;
959
986
}
960
987
catch(DirectoryNotFoundException)//Directory not found
961
988
{
962
989
MessageBox.Show("86Box Manager was unable to delete the files of this virtual machine because they no longer exist.","Error",MessageBoxButtons.OK,MessageBoxIcon.Error);
963
-
return;
990
+
continue;
964
991
}
965
992
catch(IOException)//Files are in use by another process
966
993
{
967
994
MessageBox.Show("86Box Manager was unable to delete some files of this virtual machine because they are currently in use by another process.\n\nMake sure the files are free for deletion, then remove them manually.","Error",MessageBoxButtons.OK,MessageBoxIcon.Error);
968
-
return;
995
+
continue;
969
996
}
970
997
catch(Exceptionex)
971
998
{//Other exceptions
972
999
MessageBox.Show("The following error occurred while trying to remove the files of this virtual machine:\n\n"+ex.Message,"Error",MessageBoxButtons.OK,MessageBoxIcon.Error);
973
-
return;
1000
+
continue;
974
1001
}
975
1002
MessageBox.Show("Files of virtual machine \""+vm.Name+"\" were successfully deleted.","Virtual machine files removed",MessageBoxButtons.OK,MessageBoxIcon.Information);
DialogResult=MessageBox.Show("Wiping a virtual machine deletes its configuration and nvr files. You'll have to reconfigure the virtual machine (and the BIOS if applicable).\n\n Are you sure you wish to wipe the virtual machine \""+vm.Name+"\"?","Warning",MessageBoxButtons.YesNo,MessageBoxIcon.Warning);
1385
1445
if(DialogResult==DialogResult.Yes)
1386
1446
{
1447
+
if(vm.Status!=VM.STATUS_STOPPED)
1448
+
{
1449
+
MessageBox.Show("The virtual machine \""+vm.Name+"\" is currently running and cannot be wiped. Please stop virtual machines before attempting to wipe them.","Success",MessageBoxButtons.OK,MessageBoxIcon.Error);
1450
+
continue;
1451
+
}
1387
1452
try
1388
1453
{
1389
1454
System.IO.File.Delete(vm.Path+@"\86box.cfg");
1390
1455
Directory.Delete(vm.Path+@"\nvr",true);
1391
-
MessageBox.Show("The virtual machine \""+vm.Name+"\" was successfully wiped.","Success",MessageBoxButtons.OK,MessageBoxIcon.Information);;
1456
+
MessageBox.Show("The virtual machine \""+vm.Name+"\" was successfully wiped.","Success",MessageBoxButtons.OK,MessageBoxIcon.Information);
1392
1457
}
1393
1458
catch(Exceptionex)
1394
1459
{
1395
1460
MessageBox.Show("An error occurred trying to wipe the virtual machine \""+vm.Name+"\".","Error",MessageBoxButtons.OK,MessageBoxIcon.Error);
0 commit comments