private static extern void LockWorkStation();\r
[DllImport("user32.dll")]\r
private static extern int ExitWindowsEx(int uFlags, int dwReason);\r
-\r
- // Declarations\r
- Process hbProc = new Process();\r
-\r
+ \r
/// <summary>\r
/// Execute a HandBrakeCLI process.\r
/// </summary>\r
/// <param name="query">The CLI Query</param>\r
public Process runCli(string query)\r
{\r
+ Process hbProc = new Process();\r
try\r
{\r
string handbrakeCLIPath = Path.Combine(Application.StartupPath, "HandBrakeCLI.exe");\r
string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";\r
string logPath = Path.Combine(logDir, "last_encode_log.txt");\r
-\r
string strCmdLine = String.Format(@" CMD /c """"{0}"" {1} 2>""{2}"" """, handbrakeCLIPath, query, logPath);\r
\r
ProcessStartInfo cliStart = new ProcessStartInfo("CMD.exe", strCmdLine);\r
+ if (Properties.Settings.Default.enocdeStatusInGui == "Checked")\r
+ {\r
+ cliStart.RedirectStandardOutput = true;\r
+ cliStart.UseShellExecute = false;\r
+ }\r
if (Properties.Settings.Default.cli_minimized == "Checked")\r
cliStart.WindowStyle = ProcessWindowStyle.Minimized;\r
+\r
+ Process[] before = Process.GetProcesses(); // Get a list of running processes before starting.\r
hbProc = Process.Start(cliStart);\r
- processID = hbProc.Id;\r
+ processID = Main.getCliProcess(before);\r
isEncoding = true;\r
currentQuery = query;\r
\r
{\r
MessageBox.Show("An error occured in runCli()\n Error Information: \n\n" + exc);\r
}\r
+\r
return hbProc;\r
}\r
\r
/// <summary>\r
+ /// Kill the CLI process\r
+ /// </summary>\r
+ public void closeCLI()\r
+ {\r
+ Process[] prs = Process.GetProcesses();\r
+ foreach (Process process in prs)\r
+ {\r
+ if (process.Id == processID)\r
+ {\r
+ process.Refresh();\r
+ if (!process.HasExited)\r
+ process.Kill();\r
+\r
+ process.WaitForExit();\r
+ }\r
+ } \r
+ }\r
+\r
+ /// <summary>\r
/// Perform an action after an encode. e.g a shutdown, standby, restart etc.\r
/// </summary>\r
public void afterEncodeAction()\r
using System.Text.RegularExpressions;\r
using System.Collections.Generic;\r
using System.Xml.Serialization;\r
+using System.Threading;\r
\r
namespace Handbrake.Functions\r
{\r
}\r
}\r
\r
+ /// <summary>\r
+ /// Get the Process ID of HandBrakeCLI for the current instance.\r
+ /// </summary>\r
+ /// <param name="before">List of processes before the new process was started</param>\r
+ /// <returns>Int - Process ID</returns>\r
+ public static int getCliProcess(Process[] before)\r
+ {\r
+ // This is a bit of a cludge. Maybe someone has a better idea on how to impliment this.\r
+ // Since we used CMD to start HandBrakeCLI, we don't get the process ID from hbProc.\r
+ // Instead we take the processes before and after, and get the ID of HandBrakeCLI.exe\r
+ // avoiding any previous instances of HandBrakeCLI.exe in before.\r
+ // Kill the current process.\r
+\r
+ Process[] hbProcesses = Process.GetProcessesByName("HandBrakeCLI");\r
+\r
+ // Another hack. We maybe need to wait a few seconds for HandBrakeCLI to launch\r
+ if (hbProcesses.Length == 0)\r
+ {\r
+ Thread.Sleep(2000);\r
+ hbProcesses = Process.GetProcessesByName("HandBrakeCLI");\r
+ }\r
+\r
+ Process hbProcess = null;\r
+ if (hbProcesses.Length > 0)\r
+ foreach (Process process in hbProcesses)\r
+ {\r
+ Boolean found = false;\r
+ // Check if the current CLI instance was running before we started the current one\r
+ foreach (Process bprocess in before)\r
+ {\r
+ if (process.Id == bprocess.Id)\r
+ found = true;\r
+ }\r
+\r
+ // If it wasn't running before, we found the process we want.\r
+ if (!found)\r
+ {\r
+ hbProcess = process;\r
+ break;\r
+ }\r
+ }\r
+ if (hbProcess != null)\r
+ return hbProcess.Id;\r
+\r
+ return -1;\r
+ }\r
+\r
}\r
}\r
\r
using System.IO;\r
using System.Text.RegularExpressions;\r
+using System;\r
+using System.Globalization;\r
\r
namespace Handbrake.Parsing\r
{\r
public delegate void ScanProgressEventHandler(object Sender, int CurrentTitle, int TitleCount);\r
\r
/// <summary>\r
+ /// A delegate to handle encode progress updates // EXPERIMENTAL\r
+ /// </summary>\r
+ /// <param name="Sender">The object which raised the event</param>\r
+ /// <param name="CurrentTask">The current task being processed from the queue</param>\r
+ /// <param name="TaskCount">The total number of tasks in queue</param>\r
+ /// <param name="PercentComplete">The percentage this task is complete</param>\r
+ /// <param name="CurrentFps">The current encoding fps</param>\r
+ /// <param name="AverageFps">The average encoding fps for this task</param>\r
+ /// <param name="TimeRemaining">The estimated time remaining for this task to complete</param>\r
+ public delegate void EncodeProgressEventHandler(object Sender, int CurrentTask, int TaskCount, float PercentComplete, float CurrentFps, float AverageFps, TimeSpan TimeRemaining);\r
+\r
+ \r
+ /// <summary>\r
/// A simple wrapper around a StreamReader to keep track of the entire output from a cli process\r
/// </summary>\r
internal class Parser : StreamReader\r
/// </summary>\r
public event ScanProgressEventHandler OnScanProgress;\r
\r
+ #region Experimetnal Code\r
+ /// <summary>\r
+ /// Raised upon the catching of a "Scanning title # of #..." in the stream\r
+ /// </summary>\r
+ public event EncodeProgressEventHandler OnEncodeProgress;\r
+ #endregion\r
\r
/// <summary>\r
/// Default constructor for this object\r
/// </summary>\r
/// <param name="baseStream">The stream to parse from</param>\r
- public Parser(Stream baseStream)\r
- : base(baseStream)\r
+ public Parser(Stream baseStream) : base(baseStream)\r
{\r
m_buffer = string.Empty;\r
}\r
\r
return tmp;\r
}\r
+\r
+ /// <summary>\r
+ /// Pase the CLI status output (from standard output)\r
+ /// </summary>\r
+ public void readEncodeStatus()\r
+ {\r
+ CultureInfo culture = CultureInfo.CreateSpecificCulture("en-US");\r
+ string tmp = base.ReadLine();\r
+\r
+ Match m = Regex.Match(tmp, @"^Encoding: task ([0-9]*) of ([0-9]*), ([0-9]*\.[0-9]*) %( \(([0-9]*\.[0-9]*) fps, avg ([0-9]*\.[0-9]*) fps, ETA ([0-9]{2})h([0-9]{2})m([0-9]{2})s\))?");\r
+ if (m.Success && OnEncodeProgress != null)\r
+ {\r
+ int currentTask = int.Parse(m.Groups[1].Value);\r
+ int totalTasks = int.Parse(m.Groups[2].Value);\r
+ float percent = float.Parse(m.Groups[3].Value, culture);\r
+ float currentFps = m.Groups[5].Value == string.Empty ? 0.0F : float.Parse(m.Groups[5].Value, culture);\r
+ float avgFps = m.Groups[6].Value == string.Empty ? 0.0F : float.Parse(m.Groups[6].Value, culture);\r
+ TimeSpan remaining = TimeSpan.Zero;\r
+ if (m.Groups[7].Value != string.Empty)\r
+ {\r
+ remaining = TimeSpan.Parse(m.Groups[7].Value + ":" + m.Groups[8].Value + ":" + m.Groups[9].Value);\r
+ }\r
+ OnEncodeProgress(this, currentTask, totalTasks, percent, currentFps, avgFps, remaining);\r
+ }\r
+ }\r
}\r
}\r
this["presetNotification"] = value;\r
}\r
}\r
+ \r
+ [global::System.Configuration.UserScopedSettingAttribute()]\r
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+ [global::System.Configuration.DefaultSettingValueAttribute("")]\r
+ public string enocdeStatusInGui {\r
+ get {\r
+ return ((string)(this["enocdeStatusInGui"]));\r
+ }\r
+ set {\r
+ this["enocdeStatusInGui"] = value;\r
+ }\r
+ }\r
}\r
}\r
<Setting Name="presetNotification" Type="System.String" Scope="User">\r
<Value Profile="(Default)" />\r
</Setting>\r
+ <Setting Name="enocdeStatusInGui" Type="System.String" Scope="User">\r
+ <Value Profile="(Default)" />\r
+ </Setting>\r
</Settings>\r
</SettingsFile>
\ No newline at end of file
{\r
public class QueueHandler\r
{\r
- readonly Encode encodeHandler = new Encode();\r
+ Encode encodeHandler = new Encode();\r
private static XmlSerializer ser = new XmlSerializer(typeof(List<QueueItem>));\r
List<QueueItem> queue = new List<QueueItem>();\r
int id; // Unique identifer number for each job\r
/// Get the last query that was returned by getNextItemForEncoding()\r
/// </summary>\r
/// <returns></returns>\r
- public QueueItem lastQueueItem { get; set; } \r
+ public QueueItem lastQueueItem { get; set; }\r
\r
/// <summary>\r
/// Add's a new item to the queue\r
/// <param name="destination"></param>\r
public void add(string query, string source, string destination)\r
{\r
- QueueItem newJob = new QueueItem {Id = id, Query = query, Source = source, Destination = destination};\r
+ QueueItem newJob = new QueueItem { Id = id, Query = query, Source = source, Destination = destination };\r
id++;\r
\r
queue.Add(newJob);\r
public Boolean isEncodeStarted { get; private set; }\r
public Boolean isPaused { get; private set; }\r
public Boolean isEncoding { get; private set; }\r
+ public Process hbProc { get; set; }\r
\r
public void startEncode()\r
{\r
isPaused = false;\r
try\r
{\r
- theQueue = new Thread(startProc) {IsBackground = true};\r
+ theQueue = new Thread(startProc) { IsBackground = true };\r
theQueue.Start();\r
}\r
catch (Exception exc)\r
isPaused = true;\r
EncodePaused(null);\r
}\r
+ public void endEncode()\r
+ {\r
+ encodeHandler.closeCLI();\r
+ }\r
\r
private void startProc(object state)\r
{\r
- Process hbProc;\r
try\r
{\r
// Run through each item on the queue\r
string query = getNextItemForEncoding();\r
write2disk("hb_queue_recovery.xml"); // Update the queue recovery file\r
\r
- EncodeStarted(null);\r
hbProc = encodeHandler.runCli(query);\r
+ EncodeStarted(null);\r
hbProc.WaitForExit();\r
\r
encodeHandler.addCLIQueryToLog(query);\r
<setting name="presetNotification" serializeAs="String">\r
<value />\r
</setting>\r
+ <setting name="enocdeStatusInGui" serializeAs="String">\r
+ <value />\r
+ </setting>\r
</Handbrake.Properties.Settings>\r
</userSettings>\r
<startup><supportedRuntime version="v2.0.50727"/></startup></configuration>\r
{\r
lastAction = "encode";\r
setEncodeStarted();\r
+\r
+ // Experimental HBProc Process Monitoring.\r
+ if (Properties.Settings.Default.enocdeStatusInGui == "Checked")\r
+ {\r
+ HBProcess = encodeQueue.hbProc;\r
+ Thread EncodeMon = new Thread(encodeMonitorThread);\r
+ EncodeMon.Start();\r
+ }\r
}\r
private void encodeEnded(object sender, EventArgs e)\r
{\r
{\r
// Pause The Queue\r
encodeQueue.pauseEncode();\r
-\r
- // Kill the current process.\r
- Process[] aProc = Process.GetProcessesByName("HandBrakeCLI");\r
- Process HandBrakeCLI;\r
- if (aProc.Length > 0)\r
- {\r
- HandBrakeCLI = aProc[0];\r
- HandBrakeCLI.Kill();\r
- }\r
+ encodeQueue.endEncode();\r
\r
// Update the GUI\r
setEncodeFinished();\r
\r
setEncodeStarted(); // Encode is running, so setup the GUI appropriately\r
encodeQueue.startEncode(); // Start The Queue Encoding Process\r
-\r
}\r
else if (text_source.Text == string.Empty || text_source.Text == "Click 'Source' to continue" || text_destination.Text == string.Empty)\r
MessageBox.Show("No source OR destination selected.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
-\r
}\r
}\r
private void btn_add2Queue_Click(object sender, EventArgs e)\r
Boolean cleanExit = true;\r
using (hbproc = Process.Start(hbParseDvd))\r
{\r
- scanProcessID = hbproc.Id;\r
+ Process[] before = Process.GetProcesses(); // Get a list of running processes before starting.\r
+ scanProcessID = Main.getCliProcess(before); \r
hbproc.WaitForExit();\r
if (hbproc.ExitCode != 0)\r
cleanExit = false;\r
{\r
enableGUI();\r
resetGUI();\r
- \r
+\r
Process[] prs = Process.GetProcesses();\r
foreach (Process process in prs)\r
{\r
}\r
#endregion\r
\r
+ #region In-GUI Encode Status (Experimental)\r
+ private Process HBProcess { get; set; }\r
+\r
+ private void encodeMonitorThread()\r
+ {\r
+ try\r
+ {\r
+ Parser encode = new Parser(HBProcess.StandardOutput.BaseStream);\r
+ encode.OnEncodeProgress += encode_OnEncodeProgress;\r
+ while (!encode.EndOfStream)\r
+ {\r
+ encode.readEncodeStatus();\r
+ }\r
+ }\r
+ catch (Exception exc)\r
+ {\r
+ MessageBox.Show(exc.ToString());\r
+ }\r
+ }\r
+\r
+ private void encode_OnEncodeProgress(object Sender, int CurrentTask, int TaskCount, float PercentComplete, float CurrentFps, float AverageFps, TimeSpan TimeRemaining)\r
+ {\r
+ if (this.InvokeRequired)\r
+ {\r
+ this.BeginInvoke(new EncodeProgressEventHandler(encode_OnEncodeProgress),\r
+ new object[] { Sender, CurrentTask, TaskCount, PercentComplete, CurrentFps, AverageFps, TimeRemaining });\r
+ return;\r
+ }\r
+ lbl_encode.Text = string.Format("Encode Progress: {0}%, FPS: {1}, Avg FPS: {2}, Time Remaining: {3} ", PercentComplete, CurrentFps, AverageFps, TimeRemaining);\r
+ }\r
+ #endregion\r
+\r
+\r
// This is the END of the road ****************************************\r
}\r
}
\ No newline at end of file
this.drp_processors = new System.Windows.Forms.ComboBox();\r
this.Label4 = new System.Windows.Forms.Label();\r
this.tab_advanced = new System.Windows.Forms.TabPage();\r
+ this.check_disablePresetNotification = new System.Windows.Forms.CheckBox();\r
this.check_dvdnav = new System.Windows.Forms.CheckBox();\r
this.label32 = new System.Windows.Forms.Label();\r
this.label30 = new System.Windows.Forms.Label();\r
this.label26 = new System.Windows.Forms.Label();\r
this.label27 = new System.Windows.Forms.Label();\r
this.openFile_vlc = new System.Windows.Forms.OpenFileDialog();\r
- this.check_disablePresetNotification = new System.Windows.Forms.CheckBox();\r
+ this.check_inGuiStatus = new System.Windows.Forms.CheckBox();\r
this.tab_options.SuspendLayout();\r
this.tab_general.SuspendLayout();\r
this.tab_picture.SuspendLayout();\r
this.btn_close.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
this.btn_close.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
this.btn_close.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
- this.btn_close.Location = new System.Drawing.Point(430, 370);\r
+ this.btn_close.Location = new System.Drawing.Point(430, 382);\r
this.btn_close.Name = "btn_close";\r
this.btn_close.Size = new System.Drawing.Size(72, 22);\r
this.btn_close.TabIndex = 53;\r
this.tab_options.Location = new System.Drawing.Point(12, 55);\r
this.tab_options.Name = "tab_options";\r
this.tab_options.SelectedIndex = 0;\r
- this.tab_options.Size = new System.Drawing.Size(490, 309);\r
+ this.tab_options.Size = new System.Drawing.Size(490, 321);\r
this.tab_options.TabIndex = 58;\r
// \r
// tab_general\r
// \r
// tab_advanced\r
// \r
+ this.tab_advanced.Controls.Add(this.check_inGuiStatus);\r
this.tab_advanced.Controls.Add(this.check_disablePresetNotification);\r
this.tab_advanced.Controls.Add(this.check_dvdnav);\r
this.tab_advanced.Controls.Add(this.label32);\r
this.tab_advanced.Location = new System.Drawing.Point(4, 22);\r
this.tab_advanced.Name = "tab_advanced";\r
this.tab_advanced.Padding = new System.Windows.Forms.Padding(3);\r
- this.tab_advanced.Size = new System.Drawing.Size(482, 283);\r
+ this.tab_advanced.Size = new System.Drawing.Size(482, 295);\r
this.tab_advanced.TabIndex = 4;\r
this.tab_advanced.Text = "Advanced / Other";\r
this.tab_advanced.UseVisualStyleBackColor = true;\r
// \r
+ // check_disablePresetNotification\r
+ // \r
+ this.check_disablePresetNotification.AutoSize = true;\r
+ this.check_disablePresetNotification.BackColor = System.Drawing.Color.Transparent;\r
+ this.check_disablePresetNotification.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+ this.check_disablePresetNotification.Location = new System.Drawing.Point(76, 87);\r
+ this.check_disablePresetNotification.Name = "check_disablePresetNotification";\r
+ this.check_disablePresetNotification.Size = new System.Drawing.Size(261, 17);\r
+ this.check_disablePresetNotification.TabIndex = 91;\r
+ this.check_disablePresetNotification.Text = "Disable Built-in preset update notification";\r
+ this.ToolTip.SetToolTip(this.check_disablePresetNotification, "Disables the notification you recieve when presets are updated when a new version" +\r
+ " of HandBrake is installed.");\r
+ this.check_disablePresetNotification.UseVisualStyleBackColor = false;\r
+ this.check_disablePresetNotification.CheckedChanged += new System.EventHandler(this.check_disablePresetNotification_CheckedChanged);\r
+ // \r
// check_dvdnav\r
// \r
this.check_dvdnav.AutoSize = true;\r
this.check_dvdnav.BackColor = System.Drawing.Color.Transparent;\r
this.check_dvdnav.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
- this.check_dvdnav.Location = new System.Drawing.Point(76, 209);\r
+ this.check_dvdnav.Location = new System.Drawing.Point(76, 232);\r
this.check_dvdnav.Name = "check_dvdnav";\r
this.check_dvdnav.Size = new System.Drawing.Size(297, 17);\r
this.check_dvdnav.TabIndex = 90;\r
// \r
this.label32.AutoSize = true;\r
this.label32.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
- this.label32.Location = new System.Drawing.Point(38, 209);\r
+ this.label32.Location = new System.Drawing.Point(38, 232);\r
this.label32.Name = "label32";\r
this.label32.Size = new System.Drawing.Size(32, 13);\r
this.label32.TabIndex = 89;\r
// label30\r
// \r
this.label30.AutoSize = true;\r
- this.label30.Location = new System.Drawing.Point(73, 167);\r
+ this.label30.Location = new System.Drawing.Point(73, 190);\r
this.label30.Name = "label30";\r
this.label30.Size = new System.Drawing.Size(230, 13);\r
this.label30.TabIndex = 87;\r
"0.50",\r
"0.25",\r
"0.20"});\r
- this.drop_x264step.Location = new System.Drawing.Point(312, 164);\r
+ this.drop_x264step.Location = new System.Drawing.Point(312, 187);\r
this.drop_x264step.Name = "drop_x264step";\r
this.drop_x264step.Size = new System.Drawing.Size(111, 21);\r
this.drop_x264step.TabIndex = 86;\r
// \r
this.label28.AutoSize = true;\r
this.label28.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
- this.label28.Location = new System.Drawing.Point(27, 167);\r
+ this.label28.Location = new System.Drawing.Point(27, 190);\r
this.label28.Name = "label28";\r
this.label28.Size = new System.Drawing.Size(43, 13);\r
this.label28.TabIndex = 85;\r
// \r
this.lbl_appcastUnstable.AutoSize = true;\r
this.lbl_appcastUnstable.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
- this.lbl_appcastUnstable.Location = new System.Drawing.Point(6, 130);\r
+ this.lbl_appcastUnstable.Location = new System.Drawing.Point(6, 153);\r
this.lbl_appcastUnstable.Name = "lbl_appcastUnstable";\r
this.lbl_appcastUnstable.Size = new System.Drawing.Size(64, 13);\r
this.lbl_appcastUnstable.TabIndex = 83;\r
this.check_snapshot.AutoSize = true;\r
this.check_snapshot.BackColor = System.Drawing.Color.Transparent;\r
this.check_snapshot.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
- this.check_snapshot.Location = new System.Drawing.Point(76, 129);\r
+ this.check_snapshot.Location = new System.Drawing.Point(76, 152);\r
this.check_snapshot.Name = "check_snapshot";\r
this.check_snapshot.Size = new System.Drawing.Size(273, 17);\r
this.check_snapshot.TabIndex = 80;\r
this.openFile_vlc.DefaultExt = "exe";\r
this.openFile_vlc.Filter = "exe|*.exe";\r
// \r
- // check_disablePresetNotification\r
+ // check_inGuiStatus\r
// \r
- this.check_disablePresetNotification.AutoSize = true;\r
- this.check_disablePresetNotification.BackColor = System.Drawing.Color.Transparent;\r
- this.check_disablePresetNotification.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
- this.check_disablePresetNotification.Location = new System.Drawing.Point(76, 87);\r
- this.check_disablePresetNotification.Name = "check_disablePresetNotification";\r
- this.check_disablePresetNotification.Size = new System.Drawing.Size(261, 17);\r
- this.check_disablePresetNotification.TabIndex = 91;\r
- this.check_disablePresetNotification.Text = "Disable Built-in preset update notification";\r
- this.ToolTip.SetToolTip(this.check_disablePresetNotification, "Disables the notification you recieve when presets are updated when a new version" +\r
- " of HandBrake is installed.");\r
- this.check_disablePresetNotification.UseVisualStyleBackColor = false;\r
- this.check_disablePresetNotification.CheckedChanged += new System.EventHandler(this.check_disablePresetNotification_CheckedChanged);\r
+ this.check_inGuiStatus.AutoSize = true;\r
+ this.check_inGuiStatus.BackColor = System.Drawing.Color.Transparent;\r
+ this.check_inGuiStatus.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+ this.check_inGuiStatus.Location = new System.Drawing.Point(76, 110);\r
+ this.check_inGuiStatus.Name = "check_inGuiStatus";\r
+ this.check_inGuiStatus.Size = new System.Drawing.Size(281, 17);\r
+ this.check_inGuiStatus.TabIndex = 92;\r
+ this.check_inGuiStatus.Text = "Enable in-GUI Encode status. (Experimental)";\r
+ this.ToolTip.SetToolTip(this.check_inGuiStatus, "Displays the CLI status in the GUI windows instead of the CLI window.");\r
+ this.check_inGuiStatus.UseVisualStyleBackColor = false;\r
+ this.check_inGuiStatus.CheckedChanged += new System.EventHandler(this.check_inGuiStatus_CheckedChanged);\r
// \r
// frmOptions\r
// \r
- this.ClientSize = new System.Drawing.Size(514, 402);\r
+ this.ClientSize = new System.Drawing.Size(514, 413);\r
this.Controls.Add(this.label8);\r
this.Controls.Add(this.pictureBox2);\r
this.Controls.Add(this.tab_options);\r
private System.Windows.Forms.Label label32;\r
internal System.Windows.Forms.CheckBox check_logsInSpecifiedLocation;\r
internal System.Windows.Forms.CheckBox check_disablePresetNotification;\r
+ internal System.Windows.Forms.CheckBox check_inGuiStatus;\r
}\r
}
\ No newline at end of file
if (Properties.Settings.Default.QueryEditorTab == "Checked")\r
check_queryEditorTab.CheckState = CheckState.Checked;\r
\r
+ // Preset update notification\r
if (Properties.Settings.Default.presetNotification == "Checked")\r
check_disablePresetNotification.CheckState = CheckState.Checked;\r
\r
+ // Experimental In-GUI encode status indicator.\r
+ if (Properties.Settings.Default.enocdeStatusInGui == "Checked")\r
+ check_inGuiStatus.CheckState = CheckState.Checked;\r
+\r
// Enable snapshot updating\r
if (Properties.Settings.Default.MainWindowMinimize == "Checked")\r
check_mainMinimize.CheckState = CheckState.Checked;\r
Properties.Settings.Default.presetNotification = check_disablePresetNotification.CheckState.ToString();\r
}\r
\r
+ private void check_inGuiStatus_CheckedChanged(object sender, EventArgs e)\r
+ {\r
+ Properties.Settings.Default.enocdeStatusInGui = check_inGuiStatus.CheckState.ToString();\r
+ } \r
+\r
private void check_snapshot_CheckedChanged(object sender, EventArgs e)\r
{\r
Properties.Settings.Default.checkSnapshot = check_snapshot.CheckState.ToString();\r
{\r
Properties.Settings.Default.Save(); // Small hack for Vista. Seems to work fine on XP without this\r
this.Close();\r
- } \r
+ }\r
+\r
}\r
}
\ No newline at end of file