summaryrefslogtreecommitdiffstats
path: root/win/C#/Functions
diff options
context:
space:
mode:
authorsr55 <[email protected]>2010-05-23 15:35:57 +0000
committersr55 <[email protected]>2010-05-23 15:35:57 +0000
commita28717d0b3d41674934d6e0e24ee70344576fb1e (patch)
treef82bcc5c983d0de0bf83a4fc65800926a83cbe76 /win/C#/Functions
parentf89416ee188a36566bd420d36488d1110a7ca1d5 (diff)
WinGui:
- Added some new events to the Queue for future refactoring. - Refactor / Cleanup / Remove more stylecop warnings. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3315 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Functions')
-rw-r--r--win/C#/Functions/Main.cs16
-rw-r--r--win/C#/Functions/PresetLoader.cs2
-rw-r--r--win/C#/Functions/QueryGenerator.cs1
-rw-r--r--win/C#/Functions/System.cs2
-rw-r--r--win/C#/Functions/Win32.cs14
5 files changed, 31 insertions, 4 deletions
diff --git a/win/C#/Functions/Main.cs b/win/C#/Functions/Main.cs
index 6d960efcf..d7380b2b1 100644
--- a/win/C#/Functions/Main.cs
+++ b/win/C#/Functions/Main.cs
@@ -815,5 +815,21 @@ namespace Handbrake.Functions
return sb.ToString().Trim();
}
+
+ /// <summary>
+ /// Show the Exception Window
+ /// </summary>
+ /// <param name="shortError">
+ /// The short error.
+ /// </param>
+ /// <param name="longError">
+ /// The long error.
+ /// </param>
+ public static void ShowExceptiowWindow(string shortError, string longError)
+ {
+ frmExceptionWindow exceptionWindow = new frmExceptionWindow();
+ exceptionWindow.Setup(shortError, longError);
+ exceptionWindow.Show();
+ }
}
} \ No newline at end of file
diff --git a/win/C#/Functions/PresetLoader.cs b/win/C#/Functions/PresetLoader.cs
index e2762af12..f10bd0073 100644
--- a/win/C#/Functions/PresetLoader.cs
+++ b/win/C#/Functions/PresetLoader.cs
@@ -232,7 +232,7 @@ namespace Handbrake.Functions
break;
case "H.264 (x264)":
double cqStep = Properties.Settings.Default.x264cqstep;
- sliderValue = (int)((51.0 / cqStep) - (value/cqStep));
+ sliderValue = (int)((51.0 / cqStep) - (value / cqStep));
break;
case "VP3 (Theora)":
sliderValue = (int)value;
diff --git a/win/C#/Functions/QueryGenerator.cs b/win/C#/Functions/QueryGenerator.cs
index 2edfc9e30..e4557df6f 100644
--- a/win/C#/Functions/QueryGenerator.cs
+++ b/win/C#/Functions/QueryGenerator.cs
@@ -442,7 +442,6 @@ namespace Handbrake.Functions
if (Properties.Settings.Default.noDvdNav)
query += " --no-dvdnav";
-
return query;
}
diff --git a/win/C#/Functions/System.cs b/win/C#/Functions/System.cs
index 212579ebc..fb830fb8d 100644
--- a/win/C#/Functions/System.cs
+++ b/win/C#/Functions/System.cs
@@ -25,7 +25,7 @@ namespace Handbrake.Functions
Win32.GlobalMemoryStatus(ref memStatus);
uint memoryInfo = memStatus.dwTotalPhys;
- memoryInfo = memoryInfo/1024/1024;
+ memoryInfo = memoryInfo / 1024 / 1024;
return memoryInfo;
}
diff --git a/win/C#/Functions/Win32.cs b/win/C#/Functions/Win32.cs
index e7da9d5b6..89a0c29bb 100644
--- a/win/C#/Functions/Win32.cs
+++ b/win/C#/Functions/Win32.cs
@@ -3,7 +3,6 @@
Homepage: <http://handbrake.fr>.
It may be used under the terms of the GNU General Public License. */
-
namespace Handbrake.Functions
{
using System;
@@ -63,6 +62,7 @@ namespace Handbrake.Functions
public UInt32 dwMemoryLoad;
/// <summary>
+ /// Total Physical Memory
/// </summary>
public UInt32 dwTotalPhys; // Used
@@ -104,6 +104,18 @@ namespace Handbrake.Functions
ref MEMORYSTATUS lpBuffer
);
+ /// <summary>
+ /// Generate a Console Ctrl Event
+ /// </summary>
+ /// <param name="sigevent">
+ /// The sigevent.
+ /// </param>
+ /// <param name="dwProcessGroupId">
+ /// The dw process group id.
+ /// </param>
+ /// <returns>
+ /// Bool true is sucess
+ /// </returns>
[DllImport("kernel32.dll", SetLastError = true)]
public static extern bool GenerateConsoleCtrlEvent(ConsoleCtrlEvent sigevent, int dwProcessGroupId);