Author: gedmurphy Date: Wed Jun 27 17:00:45 2007 New Revision: 27288
URL: http://svn.reactos.org/svn/reactos?rev=27288&view=rev Log: - fix a bug in the database (requires deletion of the generated main config.xml) - populate floppy page
Modified: trunk/tools/RosTE/GUI/SettingsForm.cs trunk/tools/RosTE/GUI/VMConfig.xsd trunk/tools/RosTE/GUI/VirtualMachine.cs
Modified: trunk/tools/RosTE/GUI/SettingsForm.cs URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosTE/GUI/SettingsForm.cs?rev... ============================================================================== --- trunk/tools/RosTE/GUI/SettingsForm.cs (original) +++ trunk/tools/RosTE/GUI/SettingsForm.cs Wed Jun 27 17:00:45 2007 @@ -85,11 +85,39 @@ } }
+ private void LoadFloppyPage() + { + DriveInfo[] drives = DriveInfo.GetDrives(); + + foreach (DriveInfo drive in drives) + { + if (drive.DriveType == DriveType.Removable) + floppyPhyDrvCombo.Items.Add(drive); + } + + floppyEnableChkBox.Checked = VirtMach.FloppyEnable; + + int id = floppyPhyDrvCombo.FindString(VirtMach.FloppyPhysDrv); + if (id == -1) id = 0; + floppyPhyDrvCombo.SelectedIndex = id; + + if (VirtMach.CdRomUsePhys) + { + floppyPhyDrvRadio.Checked = true; + } + else + { + floppyImgRadio.Checked = true; + floppyImgTxtBox.Text = VirtMach.FloppyIsoImg; + } + } + private void LoadFormData() { if (!LoadMemoryPage()) MessageBox.Show("An error occured whilst loading memory page data"); LoadCdRomPage(); + LoadFloppyPage(); }
private void SettingsForm_Load(object sender, EventArgs e)
Modified: trunk/tools/RosTE/GUI/VMConfig.xsd URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosTE/GUI/VMConfig.xsd?rev=27... ============================================================================== --- trunk/tools/RosTE/GUI/VMConfig.xsd (original) +++ trunk/tools/RosTE/GUI/VMConfig.xsd Wed Jun 27 17:00:45 2007 @@ -16,7 +16,7 @@ <xs:element name="CdRomIsoImg" type="xs:string" /> <xs:element name="FloppyEnable" type="xs:boolean" /> <xs:element name="FloppyUsePhys" type="xs:boolean" /> - <xs:element name="FloppyPhyDrive" type="xs:string" /> + <xs:element name="FloppyPhysDrv" type="xs:string" /> <xs:element name="FloppyUseImg" type="xs:boolean" /> <xs:element name="FloppyIsoImg" type="xs:string" /> </xs:sequence>
Modified: trunk/tools/RosTE/GUI/VirtualMachine.cs URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosTE/GUI/VirtualMachine.cs?r... ============================================================================== --- trunk/tools/RosTE/GUI/VirtualMachine.cs (original) +++ trunk/tools/RosTE/GUI/VirtualMachine.cs Wed Jun 27 17:00:45 2007 @@ -226,12 +226,12 @@ dataRow["SetClockToHost"] = true; dataRow["CdRomEnable"] = true; dataRow["CdRomUsePhys"] = true; - dataRow["CdRomPhysDrv"] = "R:"; + dataRow["CdRomPhysDrv"] = string.Empty; dataRow["CdRomUseIso"] = false; dataRow["CdRomIsoImg"] = string.Empty; dataRow["FloppyEnable"] = true; dataRow["FloppyUsePhys"] = true; - dataRow["FloppyPhyDrive"] = "A:"; + dataRow["FloppyPhysDrv"] = string.Empty; dataRow["FloppyUseImg"] = false; dataRow["FloppyIsoImg"] = string.Empty;
@@ -241,7 +241,8 @@ } catch (Exception e) { - MessageBox.Show("error populating VM database: " + e.Message); + ErrorForm err = new ErrorForm(e.Message); + err.ShowDialog(); }
return ret;