Author: cwittich
Date: Wed Jun 21 22:23:20 2006
New Revision: 22478
URL:
http://svn.reactos.ru/svn/reactos?rev=22478&view=rev
Log:
-display free drive letters in VDK combobox
Modified:
trunk/tools/Qemu GUI/Qemu GUI.suo
trunk/tools/Qemu GUI/frmMain.cs
Modified: trunk/tools/Qemu GUI/Qemu GUI.suo
URL:
http://svn.reactos.ru/svn/reactos/trunk/tools/Qemu%20GUI/Qemu%20GUI.suo?rev…
==============================================================================
Binary files - no diff available.
Modified: trunk/tools/Qemu GUI/frmMain.cs
URL:
http://svn.reactos.ru/svn/reactos/trunk/tools/Qemu%20GUI/frmMain.cs?rev=224…
==============================================================================
--- trunk/tools/Qemu GUI/frmMain.cs (original)
+++ trunk/tools/Qemu GUI/frmMain.cs Wed Jun 21 22:23:20 2006
@@ -330,7 +330,6 @@
this.cboMachine.Name = "cboMachine";
this.cboMachine.Size = new System.Drawing.Size(239, 21);
this.cboMachine.TabIndex = 20;
- this.cboMachine.SelectedIndexChanged += new
System.EventHandler(this.cboMachineFrom_SelectedIndexChanged);
//
// HardDisk2
//
@@ -907,6 +906,7 @@
this.btnVDKImage.TabIndex = 8;
this.btnVDKImage.Text = "...";
this.btnVDKImage.UseVisualStyleBackColor = true;
+ this.btnVDKImage.Click += new System.EventHandler(this.btnVDKImage_Click);
//
// btnUnmount
//
@@ -1393,10 +1393,6 @@
//
this.openFile.Title = "Path to VDK";
this.openFile.ValidateNames = false;
- //
- // folderBrowserDialog1
- //
- this.folderBrowserDialog1.HelpRequest += new
System.EventHandler(this.folderBrowserDialog1_HelpRequest);
//
// btnLoad
//
@@ -1710,13 +1706,26 @@
{
qemu = new QEmu();
+ /* Fill a list with possible free driveletters */
+ ArrayList DriveLetters = new ArrayList();
+ for (int i = 100; i < 123; i++)
+ {
+ DriveLetters.Add(Convert.ToChar(i).ToString().ToUpper() +
@":\");
+ }
+
DriveInfo[] drives = DriveInfo.GetDrives();
foreach (DriveInfo drive in drives)
{
+ /* remove all driveletters which are in use */
+ DriveLetters.Remove(drive.RootDirectory.ToString());
if (drive.DriveType == DriveType.CDRom)
cboCDROM.Items.Add(drive.RootDirectory);
}
+ foreach (object o in DriveLetters)
+ cboVDKDrive.Items.Add(o);
+
+ cboVDKDrive.SelectedIndex = 0;
cboCDROM.SelectedIndex = 0;
cboBootFrom.SelectedIndex = 1;
cboImageFormat.SelectedIndex = 4;
@@ -1922,15 +1931,13 @@
#endregion
- private void folderBrowserDialog1_HelpRequest(object sender, EventArgs e)
- {
-
- }
-
- private void cboMachineFrom_SelectedIndexChanged(object sender, EventArgs e)
- {
-
-
+ private void btnVDKImage_Click(object sender, EventArgs e)
+ {
+ openFile.Filter = "VMWare Images (*.vmdk)|*.vmdk";
+ if (openFile.ShowDialog() == DialogResult.OK)
+ {
+ txtVDKImage.Text = openFile.FileName;
+ }
}