summaryrefslogtreecommitdiffstats
path: root/win/C#/Functions/Main.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2010-01-31 14:28:23 +0000
committersr55 <[email protected]>2010-01-31 14:28:23 +0000
commit138ea1180443c3b73b81e47da016a54bf133f133 (patch)
treec1ef697788b661d597a8e696af73e150361b6b71 /win/C#/Functions/Main.cs
parentcc9508040bff9c2277be1255c4d91ea19f13e665 (diff)
WinGui:
- Refacotring Code. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3091 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Functions/Main.cs')
-rw-r--r--win/C#/Functions/Main.cs23
1 files changed, 23 insertions, 0 deletions
diff --git a/win/C#/Functions/Main.cs b/win/C#/Functions/Main.cs
index 6e66f49a2..3071cf5d0 100644
--- a/win/C#/Functions/Main.cs
+++ b/win/C#/Functions/Main.cs
@@ -14,6 +14,7 @@ using System.Xml.Serialization;
using System.Threading;
using Handbrake.EncodeQueue;
using System.Net;
+using Handbrake.Model;
namespace Handbrake.Functions
{
@@ -633,5 +634,27 @@ namespace Handbrake.Functions
};
return languageMap;
}
+
+ /// <summary>
+ /// Get a list of available DVD drives which are ready and contain DVD content.
+ /// </summary>
+ /// <returns></returns>
+ public static List<DriveInformation> GetDrives()
+ {
+ List<DriveInformation> drives = new List<DriveInformation>();
+ DriveInfo[] theCollectionOfDrives = DriveInfo.GetDrives();
+ foreach (DriveInfo curDrive in theCollectionOfDrives)
+ {
+ if (curDrive.DriveType == DriveType.CDRom && curDrive.IsReady && File.Exists(curDrive.RootDirectory + "VIDEO_TS\\VIDEO_TS.IFO"))
+ {
+ drives.Add(new DriveInformation
+ {
+ VolumeLabel = curDrive.VolumeLabel,
+ RootDirectory = curDrive.RootDirectory + "VIDEO_TS"
+ });
+ }
+ }
+ return drives;
+ }
}
} \ No newline at end of file