/// <summary> /// Get the number of virtual drive /// </summary> /// <param name="type">If specified, count only this type of virtual drives</param> /// <returns>The number of virtual drives</returns> public static int CountDrv(VirtualDriveType type = VirtualDriveType.NONE) { string command = "-get_count"; if (type != VirtualDriveType.NONE) { command += " " + type.ToString(); } return(Exec(command)); }
/// <summary> /// Get the letter of a virtual drive /// </summary> /// <param name="type">Type of virtual drive</param> /// <param name="num">Number of virtual drive</param> /// <returns>Letter of virtual drive</returns> public static char GetLetter(VirtualDriveType type, int num) { if (type != VirtualDriveType.NONE) { int ret = Exec("-get_letter " + type.ToString() + "," + num); if (ret < 0 || ret > 25) { return('?'); } return((char)(ret + 65)); } return(' '); }
public bool Reload() { Options tmp = Load(); if (tmp == null) { return(false); } _virtualDriveNum = tmp.VirtualDrive.Num; _virtualDriveType = tmp.VirtualDrive.Type; _listView = tmp.ListView; return(true); }
public VirtualDrive(VirtualDriveType type, int num) { _type = type; _num = num; _letter = DT.GetLetter(type, num); }
public bool Reload() { Options tmp = Load(); if (tmp == null) return false; _virtualDriveNum = tmp.VirtualDrive.Num; _virtualDriveType = tmp.VirtualDrive.Type; _listView = tmp.ListView; return true; }
public VirtualDrive(VirtualDriveType type, int num) { _type = type; _num = num; _letter = DT.GetLetter(type, num); }
/// <summary> /// Get the letter of a virtual drive /// </summary> /// <param name="type">Type of virtual drive</param> /// <param name="num">Number of virtual drive</param> /// <returns>Letter of virtual drive</returns> public static char GetLetter(VirtualDriveType type, int num) { if (type != VirtualDriveType.NONE) { int ret = Exec("-get_letter " + type.ToString() + "," + num); if(ret < 0 || ret > 25) return '?'; return (char)(ret + 65); } return ' '; }
/// <summary> /// Get the number of virtual drive /// </summary> /// <param name="type">If specified, count only this type of virtual drives</param> /// <returns>The number of virtual drives</returns> public static int CountDrv(VirtualDriveType type = VirtualDriveType.NONE) { string command = "-get_count"; if (type != VirtualDriveType.NONE) { command += " " + type.ToString(); } return Exec(command); }