}\r
\r
/// <summary>\r
- /// Clear all the encode log files.\r
- /// </summary>\r
- public static void ClearLogs()\r
- {\r
- string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";\r
- if (Directory.Exists(logDir))\r
- {\r
- DirectoryInfo info = new DirectoryInfo(logDir);\r
- FileInfo[] logFiles = info.GetFiles("*.txt");\r
- foreach (FileInfo file in logFiles)\r
- {\r
- if (!file.Name.Contains("last_scan_log") && !file.Name.Contains("last_encode_log"))\r
- File.Delete(file.FullName);\r
- }\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Clear old log files x days in the past\r
- /// </summary>\r
- public static void ClearOldLogs()\r
- {\r
- string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";\r
- if (Directory.Exists(logDir))\r
- {\r
- DirectoryInfo info = new DirectoryInfo(logDir);\r
- FileInfo[] logFiles = info.GetFiles("*.txt");\r
-\r
- foreach (FileInfo file in logFiles)\r
- {\r
- if (file.LastWriteTime < DateTime.Now.AddDays(-30))\r
- {\r
- if (!file.Name.Contains("last_scan_log.txt") && !file.Name.Contains("last_encode_log.txt"))\r
- File.Delete(file.FullName);\r
- }\r
- }\r
- }\r
- }\r
-\r
- /// <summary>\r
/// Map languages and their iso639_2 value into a IDictionary\r
/// </summary>\r
/// <returns>A Dictionary containing the language and iso code</returns>\r
}\r
\r
/// <summary>\r
- /// Get a list of available DVD drives which are ready and contain DVD content.\r
- /// </summary>\r
- /// <returns>A List of Drives with their details</returns>\r
- public static List<DriveInformation> GetDrives()\r
- {\r
- List<DriveInformation> drives = new List<DriveInformation>();\r
- DriveInfo[] theCollectionOfDrives = DriveInfo.GetDrives();\r
- int id = 0;\r
- foreach (DriveInfo curDrive in theCollectionOfDrives)\r
- {\r
- if (curDrive.DriveType == DriveType.CDRom && curDrive.IsReady &&\r
- File.Exists(curDrive.RootDirectory + "VIDEO_TS\\VIDEO_TS.IFO"))\r
- {\r
- drives.Add(new DriveInformation\r
- {\r
- Id = id,\r
- VolumeLabel = curDrive.VolumeLabel,\r
- RootDirectory = curDrive.RootDirectory + "VIDEO_TS"\r
- });\r
- id++;\r
- }\r
- }\r
- return drives;\r
- }\r
-\r
- /// <summary>\r
/// Change a string to Title Case/\r
/// </summary>\r
/// <param name="input">\r
-namespace HandBrake.ApplicationServices.Functions\r
+/* Converters.cs $\r
+ This file is part of the HandBrake source code.\r
+ Homepage: <http://handbrake.fr>.\r
+ It may be used under the terms of the GNU General Public License. */\r
+\r
+namespace HandBrake.ApplicationServices.Functions\r
{\r
using System;\r
- using System.Collections.Generic;\r
using System.Text.RegularExpressions;\r
\r
/// <summary>\r
\r
return converted;\r
}\r
-\r
- /// <summary>\r
- /// Video Framerate Converter\r
- /// </summary>\r
- private static readonly Dictionary<double, int> vrates = new Dictionary<double, int>\r
- {\r
- {5, 5400000},\r
- {10, 2700000},\r
- {12, 2250000},\r
- {15, 1800000},\r
- {23.976, 1126125},\r
- {24, 1125000},\r
- {25, 1080000},\r
- {29.97, 900900}\r
- };\r
-\r
- /// <summary>\r
- /// Convert the desired framerate to the video rate.\r
- /// </summary>\r
- /// <param name="framerate">\r
- /// The framerate.\r
- /// </param>\r
- /// <returns>\r
- /// The Video Rate.\r
- /// </returns>\r
- /// <exception cref="ArgumentException">\r
- /// </exception>\r
- public static int FramerateToVrate(double framerate)\r
- {\r
- if (!vrates.ContainsKey(framerate))\r
- {\r
- throw new ArgumentException("Framerate not recognized.", "framerate");\r
- }\r
-\r
- return vrates[framerate];\r
- }\r
}\r
}\r
\r
namespace HandBrake.ApplicationServices.Functions\r
{\r
+ using System;\r
using System.ComponentModel;\r
using System.Reflection;\r
- using System;\r
\r
/// <summary>\r
/// Enum Helpers\r
+++ /dev/null
-/* Logging.cs $\r
- This file is part of the HandBrake source code.\r
- Homepage: <http://handbrake.fr>.\r
- It may be used under the terms of the GNU General Public License. */\r
-\r
-namespace HandBrake.ApplicationServices.Functions\r
-{\r
- using System;\r
- using System.IO;\r
- using System.Text;\r
- using System.Windows.Forms;\r
-\r
- using HandBrake.ApplicationServices.Model;\r
-\r
- /// <summary>\r
- /// The System Information.\r
- /// </summary>\r
- public class Logging\r
- {\r
- /// <summary>\r
- /// Add the CLI Query to the Log File.\r
- /// </summary>\r
- /// <param name="encJob">\r
- /// The Encode Job Object\r
- /// </param>\r
- /// <returns>\r
- /// The create cli log header.\r
- /// </returns>\r
- public static string CreateCliLogHeader(QueueTask encJob)\r
- {\r
- StringBuilder logHeader = new StringBuilder();\r
-\r
- logHeader.AppendLine(String.Format("# {0}", Init.HandBrakeGuiVersionString));\r
- logHeader.AppendLine(String.Format("# Running: {0}", Environment.OSVersion));\r
- logHeader.AppendLine(String.Format("# CPU: {0}", SystemInfo.GetCpuCount));\r
- logHeader.AppendLine(String.Format("# Ram: {0} MB", SystemInfo.TotalPhysicalMemory));\r
- logHeader.AppendLine(String.Format("# Screen: {0}x{1}", SystemInfo.ScreenBounds.Bounds.Width, SystemInfo.ScreenBounds.Bounds.Height));\r
- logHeader.AppendLine(String.Format("# Temp Dir: {0}", Path.GetTempPath()));\r
- logHeader.AppendLine(String.Format("# Install Dir: {0}", Application.StartupPath));\r
- logHeader.AppendLine(String.Format("# Data Dir: {0}\n", Application.UserAppDataPath));\r
-\r
- if (encJob != null)\r
- {\r
- logHeader.AppendLine(String.Format("# CLI Query: {0}", encJob.Query));\r
- logHeader.AppendLine(String.Format("# User Query: {0}", encJob.CustomQuery));\r
- }\r
- logHeader.AppendLine("-------------------------------------------");\r
-\r
- return logHeader.ToString();\r
- }\r
- }\r
-}
\ No newline at end of file
+++ /dev/null
-/* Main.cs $\r
- This file is part of the HandBrake source code.\r
- Homepage: <http://handbrake.fr>.\r
- It may be used under the terms of the GNU General Public License. */\r
-\r
-namespace HandBrake.ApplicationServices.Functions\r
-{\r
- using System.Diagnostics;\r
-\r
- /// <summary>\r
- /// Useful functions which various screens can use.\r
- /// </summary>\r
- public static class Main\r
- {\r
- /// <summary>\r
- /// Get the Process ID of HandBrakeCLI for the current instance.\r
- /// </summary>\r
- /// <returns>A list of processes</returns>\r
- public static Process[] GetCliProcess()\r
- {\r
- return Process.GetProcessesByName("HandBrakeCLI");\r
- }\r
- }\r
-}
\ No newline at end of file
<Compile Include="EventArgs\ScanProgressEventArgs.cs" />\r
<Compile Include="Functions\Converters.cs" />\r
<Compile Include="Functions\EnumHelper.cs" />\r
- <Compile Include="Functions\Logging.cs" />\r
<Compile Include="Functions\GrowlCommunicator.cs" />\r
- <Compile Include="Functions\Main.cs" />\r
<Compile Include="Functions\System.cs" />\r
<Compile Include="Functions\Win32.cs" />\r
<Compile Include="Functions\Win7.cs" />\r
<Compile Include="Init.cs" />\r
+ <Compile Include="Model\DriveInformation.cs" />\r
<Compile Include="Model\Encoding\AudioTrack.cs" />\r
<Compile Include="Model\Encoding\Anamorphic.cs" />\r
<Compile Include="Model\Encoding\AudioEncoder.cs" />\r
<Compile Include="Model\Encoding\OutputFormat.cs" />\r
<Compile Include="Model\Encoding\SubtitleTrack.cs" />\r
<Compile Include="Model\Encoding\VideoEncoder.cs" />\r
- <Compile Include="Model\Encoding\VideoEncodeRateType.cs" />\r
+ <Compile Include="Model\Encoding\VideoEncodeMode.cs" />\r
<Compile Include="Model\QueueTask.cs" />\r
<Compile Include="Model\Encoding\SubtitleType.cs" />\r
<Compile Include="Parsing\AudioTrack.cs" />\r
<Compile Include="Services\LibScan.cs" />\r
<Compile Include="Services\QueueManager.cs" />\r
<Compile Include="Services\QueueProcessor.cs" />\r
- <Compile Include="Services\Scan.cs" />\r
+ <Compile Include="Services\ScanService.cs" />\r
+ <Compile Include="Services\UtilityService.cs" />\r
</ItemGroup>\r
<ItemGroup>\r
<None Include="app.config" />\r
Homepage: <http://handbrake.fr>.\r
It may be used under the terms of the GNU General Public License. */\r
\r
-namespace Handbrake.Model\r
+namespace HandBrake.ApplicationServices.Model\r
{\r
/// <summary>\r
/// Information about a DVD drive\r
public string RootDirectory { get; set; }\r
\r
/// <summary>\r
+ /// Gets or sets a value indicating whether this is a BluRay Drive.\r
+ /// </summary>\r
+ public bool IsBluRay { get; set; }\r
+\r
+ /// <summary>\r
/// Returns "Drive" + Id (e.g Drive2)\r
/// </summary>\r
/// <returns>\r
/// </returns>\r
public override string ToString()\r
{\r
- return "Drive" + Id;\r
+ return "Drive" + this.Id;\r
}\r
}\r
}
\ No newline at end of file
/// <summary>\r
/// Gets or sets VideoEncodeRateType.\r
/// </summary>\r
- public VideoEncodeRateType VideoEncodeRateType { get; set; }\r
+ public VideoEncodeMode VideoEncodeRateType { get; set; }\r
\r
/// <summary>\r
/// Gets or sets Quality.\r
-namespace HandBrake.ApplicationServices.Model.Encoding\r
+/* Anamorphic.cs $\r
+ This file is part of the HandBrake source code.\r
+ Homepage: <http://handbrake.fr>.\r
+ It may be used under the terms of the GNU General Public License. */\r
+\r
+namespace HandBrake.ApplicationServices.Model.Encoding\r
{\r
using System.ComponentModel;\r
\r
-namespace HandBrake.ApplicationServices.Model.Encoding\r
+/* AudioEncoder.cs $\r
+ This file is part of the HandBrake source code.\r
+ Homepage: <http://handbrake.fr>.\r
+ It may be used under the terms of the GNU General Public License. */\r
+\r
+namespace HandBrake.ApplicationServices.Model.Encoding\r
{\r
using System.ComponentModel;\r
\r
-namespace HandBrake.ApplicationServices.Model.Encoding\r
+/* Decomb.cs $\r
+ This file is part of the HandBrake source code.\r
+ Homepage: <http://handbrake.fr>.\r
+ It may be used under the terms of the GNU General Public License. */\r
+\r
+namespace HandBrake.ApplicationServices.Model.Encoding\r
{\r
/// <summary>\r
/// Decomb Mode\r
-namespace HandBrake.ApplicationServices.Model.Encoding\r
+/* Deinterlace.cs $\r
+ This file is part of the HandBrake source code.\r
+ Homepage: <http://handbrake.fr>.\r
+ It may be used under the terms of the GNU General Public License. */\r
+\r
+namespace HandBrake.ApplicationServices.Model.Encoding\r
{\r
+ /// <summary>\r
+ /// The Deinterlace Filter\r
+ /// </summary>\r
public enum Deinterlace\r
{\r
Off = 0,\r
-namespace HandBrake.ApplicationServices.Model.Encoding\r
+/* Denoise.cs $\r
+ This file is part of the HandBrake source code.\r
+ Homepage: <http://handbrake.fr>.\r
+ It may be used under the terms of the GNU General Public License. */\r
+\r
+namespace HandBrake.ApplicationServices.Model.Encoding\r
{\r
+ /// <summary>\r
+ /// The Denose Filters\r
+ /// </summary>\r
public enum Denoise\r
{\r
Off = 0,\r
-namespace HandBrake.ApplicationServices.Model.Encoding\r
+/* Detelecine.cs $\r
+ This file is part of the HandBrake source code.\r
+ Homepage: <http://handbrake.fr>.\r
+ It may be used under the terms of the GNU General Public License. */\r
+\r
+namespace HandBrake.ApplicationServices.Model.Encoding\r
{\r
+ /// <summary>\r
+ /// Detelecine Filter\r
+ /// </summary>\r
public enum Detelecine\r
{\r
Off = 0,\r
-namespace HandBrake.ApplicationServices.Model.Encoding\r
+/* Mixdown.cs $\r
+ This file is part of the HandBrake source code.\r
+ Homepage: <http://handbrake.fr>.\r
+ It may be used under the terms of the GNU General Public License. */\r
+\r
+namespace HandBrake.ApplicationServices.Model.Encoding\r
{\r
using System.ComponentModel;\r
\r
-namespace HandBrake.ApplicationServices.Model.Encoding\r
+/* OutputFormat.cs $\r
+ This file is part of the HandBrake source code.\r
+ Homepage: <http://handbrake.fr>.\r
+ It may be used under the terms of the GNU General Public License. */\r
+\r
+namespace HandBrake.ApplicationServices.Model.Encoding\r
{\r
using System.ComponentModel;\r
\r
-namespace HandBrake.ApplicationServices.Model.Encoding\r
+/* PointToPoint.cs $\r
+ This file is part of the HandBrake source code.\r
+ Homepage: <http://handbrake.fr>.\r
+ It may be used under the terms of the GNU General Public License. */\r
+\r
+namespace HandBrake.ApplicationServices.Model.Encoding\r
{\r
/// <summary>\r
/// Point to Point Mode\r
-/* Subtitle.cs $\r
+/* SubtitleTrack.cs $\r
This file is part of the HandBrake source code.\r
Homepage: <http://handbrake.fr>.\r
It may be used under the terms of the GNU General Public License. */\r
--- /dev/null
+/* VideoEncoderMode.cs $\r
+ This file is part of the HandBrake source code.\r
+ Homepage: <http://handbrake.fr>.\r
+ It may be used under the terms of the GNU General Public License. */\r
+\r
+namespace HandBrake.ApplicationServices.Model.Encoding\r
+{\r
+ /// <summary>\r
+ /// The Mode of Video Encoding. Bitrate, Filesize or Quality\r
+ /// </summary>\r
+ public enum VideoEncodeMode\r
+ {\r
+ TargetSize = 0,\r
+ AverageBitrate,\r
+ ConstantQuality\r
+ }\r
+}\r
+++ /dev/null
-namespace HandBrake.ApplicationServices.Model.Encoding\r
-{\r
- public enum VideoEncodeRateType\r
- {\r
- TargetSize = 0,\r
- AverageBitrate,\r
- ConstantQuality\r
- }\r
-}\r
-namespace HandBrake.ApplicationServices.Model.Encoding\r
+/* VideoEncoder.cs $\r
+ This file is part of the HandBrake source code.\r
+ Homepage: <http://handbrake.fr>.\r
+ It may be used under the terms of the GNU General Public License. */\r
+\r
+namespace HandBrake.ApplicationServices.Model.Encoding\r
{\r
using System.ComponentModel;\r
\r
+ /// <summary>\r
+ /// The Video Encoder\r
+ /// </summary>\r
public enum VideoEncoder\r
{\r
[Description("H.264 (x264)")]\r
-/* QueueItem.cs $\r
+/* QueueTask.cs $\r
This file is part of the HandBrake source code.\r
Homepage: <http://handbrake.fr>.\r
It may be used under the terms of the GNU General Public License. */\r
namespace HandBrake.ApplicationServices.Model\r
{\r
/// <summary>\r
- /// The job.\r
+ /// The QueueTask.\r
/// </summary>\r
public class QueueTask\r
{\r
/// </summary>\r
public Title()\r
{\r
- AudioTracks = new List<AudioTrack>();\r
- Chapters = new List<Chapter>();\r
- Subtitles = new List<Subtitle>();\r
+ this.AudioTracks = new List<AudioTrack>();\r
+ this.Chapters = new List<Chapter>();\r
+ this.Subtitles = new List<Subtitle>();\r
}\r
\r
#region Properties\r
/// <summary>\r
/// Parse the Title Information\r
/// </summary>\r
- /// <param name="output">A stingreader of output data</param>\r
- /// <returns>A Title</returns>\r
+ /// <param name="output">A StringReader of output data</param>\r
+ /// <returns>A Title Object</returns>\r
public static Title Parse(StringReader output)\r
{\r
var thisTitle = new Title();\r
\r
fileWriter = new StreamWriter(logFile) { AutoFlush = true };\r
\r
- fileWriter.WriteLine(Logging.CreateCliLogHeader(encodeQueueTask));\r
- logBuffer.AppendLine(Logging.CreateCliLogHeader(encodeQueueTask));\r
+ fileWriter.WriteLine(UtilityService.CreateCliLogHeader(encodeQueueTask));\r
+ logBuffer.AppendLine(UtilityService.CreateCliLogHeader(encodeQueueTask));\r
}\r
catch (Exception)\r
{\r
using System.Windows.Forms;\r
\r
using HandBrake.ApplicationServices.EventArgs;\r
- using HandBrake.ApplicationServices.Functions;\r
using HandBrake.ApplicationServices.Parsing;\r
using HandBrake.ApplicationServices.Services.Interfaces;\r
\r
// Only write the log file to disk if it's less than 100MB.\r
if (this.readData.Buffer.Length < 100000000)\r
{\r
- scanLog.WriteLine(Logging.CreateCliLogHeader(null));\r
+ scanLog.WriteLine(UtilityService.CreateCliLogHeader(null));\r
scanLog.Write(this.readData.Buffer);\r
logBuffer.AppendLine(this.readData.Buffer.ToString());\r
}\r
logFilePosition = 0;\r
logBuffer = new StringBuilder();\r
if (addHeader)\r
- logBuffer.AppendLine(Logging.CreateCliLogHeader(null));\r
+ logBuffer.AppendLine(UtilityService.CreateCliLogHeader(null));\r
}\r
\r
/// <summary>\r
--- /dev/null
+/* UtilityService.cs $\r
+ This file is part of the HandBrake source code.\r
+ Homepage: <http://handbrake.fr>.\r
+ It may be used under the terms of the GNU General Public License. */\r
+\r
+namespace HandBrake.ApplicationServices.Services\r
+{\r
+ using System;\r
+ using System.Collections.Generic;\r
+ using System.Diagnostics;\r
+ using System.IO;\r
+ using System.Text;\r
+ using System.Windows.Forms;\r
+\r
+ using HandBrake.ApplicationServices.Functions;\r
+ using HandBrake.ApplicationServices.Model;\r
+\r
+ /// <summary>\r
+ /// A Set of Static Utilites\r
+ /// </summary>\r
+ public class UtilityService\r
+ {\r
+ /// <summary>\r
+ /// The Default Log Directory\r
+ /// </summary>\r
+ private static readonly string LogDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";\r
+\r
+ /// <summary>\r
+ /// Clear all the log files older than 30 Days\r
+ /// </summary>\r
+ /// <param name="daysToKeep">\r
+ /// The Number of Days to Keep\r
+ /// </param>\r
+ public static void ClearLogFiles(int daysToKeep)\r
+ {\r
+ if (Directory.Exists(LogDir))\r
+ {\r
+ // Get all the log files\r
+ DirectoryInfo info = new DirectoryInfo(LogDir);\r
+ FileInfo[] logFiles = info.GetFiles("*.txt");\r
+\r
+ // Delete Them\r
+ foreach (FileInfo file in logFiles)\r
+ {\r
+ if (file.LastWriteTime < DateTime.Now.AddDays(-daysToKeep))\r
+ {\r
+ if (!file.Name.Contains("last_scan_log.txt") && !file.Name.Contains("last_encode_log.txt"))\r
+ {\r
+ File.Delete(file.FullName);\r
+ }\r
+ else if (file.Length > 104857600)\r
+ {\r
+ File.Delete(file.FullName);\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+\r
+ /// <summary>\r
+ /// Get a list of available DVD drives which are ready and contain DVD content.\r
+ /// </summary>\r
+ /// <returns>A List of Drives with their details</returns>\r
+ public static List<DriveInformation> GetDrives()\r
+ {\r
+ List<DriveInformation> drives = new List<DriveInformation>();\r
+ DriveInfo[] theCollectionOfDrives = DriveInfo.GetDrives();\r
+ int id = 0;\r
+ foreach (DriveInfo curDrive in theCollectionOfDrives)\r
+ {\r
+ if (curDrive.DriveType == DriveType.CDRom && curDrive.IsReady)\r
+ {\r
+ if (Directory.Exists(curDrive.RootDirectory + "VIDEO_TS") || Directory.Exists(curDrive.RootDirectory + "BDMV"))\r
+ {\r
+ drives.Add(\r
+ new DriveInformation\r
+ {\r
+ Id = id,\r
+ VolumeLabel = curDrive.VolumeLabel,\r
+ RootDirectory = curDrive.RootDirectory.ToString()\r
+ });\r
+ id++;\r
+ }\r
+ }\r
+ }\r
+\r
+ return drives;\r
+ }\r
+\r
+ /// <summary>\r
+ /// Get the Process ID of HandBrakeCLI for the current instance.\r
+ /// </summary>\r
+ /// <returns>A list of processes</returns>\r
+ public static Process[] GetCliProcess()\r
+ {\r
+ return Process.GetProcessesByName("HandBrakeCLI");\r
+ }\r
+\r
+ /// <summary>\r
+ /// Add the CLI Query to the Log File.\r
+ /// </summary>\r
+ /// <param name="encJob">\r
+ /// The Encode Job Object\r
+ /// </param>\r
+ /// <returns>\r
+ /// The create cli log header.\r
+ /// </returns>\r
+ public static string CreateCliLogHeader(QueueTask encJob)\r
+ {\r
+ StringBuilder logHeader = new StringBuilder();\r
+\r
+ logHeader.AppendLine(String.Format("# {0}", Init.HandBrakeGuiVersionString));\r
+ logHeader.AppendLine(String.Format("# Running: {0}", Environment.OSVersion));\r
+ logHeader.AppendLine(String.Format("# CPU: {0}", SystemInfo.GetCpuCount));\r
+ logHeader.AppendLine(String.Format("# Ram: {0} MB", SystemInfo.TotalPhysicalMemory));\r
+ logHeader.AppendLine(String.Format("# Screen: {0}x{1}", SystemInfo.ScreenBounds.Bounds.Width, SystemInfo.ScreenBounds.Bounds.Height));\r
+ logHeader.AppendLine(String.Format("# Temp Dir: {0}", Path.GetTempPath()));\r
+ logHeader.AppendLine(String.Format("# Install Dir: {0}", Application.StartupPath));\r
+ logHeader.AppendLine(String.Format("# Data Dir: {0}\n", Application.UserAppDataPath));\r
+\r
+ if (encJob != null)\r
+ {\r
+ logHeader.AppendLine(String.Format("# CLI Query: {0}", encJob.Query));\r
+ logHeader.AppendLine(String.Format("# User Query: {0}", encJob.CustomQuery));\r
+ }\r
+ logHeader.AppendLine("-------------------------------------------");\r
+\r
+ return logHeader.ToString();\r
+ }\r
+ }\r
+}\r
<Abbreviation Text="SRT" />\r
<Abbreviation Text="CLI" />\r
<Abbreviation Text="MP" />\r
+ <Abbreviation Text="II" />\r
</Naming2>\r
<CustomMemberReorderingPatterns><![CDATA[<?xml version="1.0" encoding="utf-8"?>\r
<Patterns xmlns="urn:shemas-jetbrains-com:member-reordering-patterns">\r
<Compile Include="frmActivityWindow.Designer.cs">\r
<DependentUpon>frmActivityWindow.cs</DependentUpon>\r
</Compile>\r
- <Compile Include="Model\DriveInformation.cs" />\r
<Compile Include="Model\SourceType.cs" />\r
<Compile Include="Presets\PlistPresetHandler.cs" />\r
<Compile Include="Presets\Preset.cs" />\r
// We have a drive, selected as a folder.\r
if (this.sourcePath.EndsWith("\\"))\r
{\r
- drives = Main.GetDrives();\r
+ drives = UtilityService.GetDrives();\r
foreach (DriveInformation item in drives)\r
{\r
if (item.RootDirectory.Contains(this.sourcePath))\r
// Clear the log files in the background\r
if (Settings.Default.clearOldLogs)\r
{\r
- Thread clearLog = new Thread(Main.ClearOldLogs);\r
+ Thread clearLog = new Thread(() => UtilityService.ClearLogFiles(30));\r
clearLog.Start();\r
}\r
\r
return;\r
}\r
\r
- drives = Main.GetDrives();\r
+ drives = UtilityService.GetDrives();\r
\r
List<ToolStripMenuItem> menuItems = new List<ToolStripMenuItem>();\r
foreach (DriveInformation drive in drives)\r
using System.Windows.Forms;\r
\r
using HandBrake.ApplicationServices;\r
+ using HandBrake.ApplicationServices.Services;\r
\r
using Handbrake.Functions;\r
using Handbrake.Model;\r
MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);\r
if (result == DialogResult.Yes)\r
{\r
- Main.ClearLogs();\r
+ UtilityService.ClearLogFiles(30);\r
MessageBox.Show(this, "HandBrake's Log file directory has been cleared!", "Notice", MessageBoxButtons.OK,\r
MessageBoxIcon.Information);\r
}\r