summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2007-11-13 17:44:33 +0000
committersr55 <[email protected]>2007-11-13 17:44:33 +0000
commitaddd8819bde47cfa732e33333e989e41f9206a1d (patch)
tree0e86d580d233808a50830eaaac9305d265f05142 /win
parent089f31b2c2e04c0dcbad5a4763d34d3c98c3241a (diff)
WinGui:
- User default settings now uses the new Preset Parser function. This cuts down on a significant amount of code. - Added system resolution to the resolution checker message box. For future debugging. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1056 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r--win/C#/Functions/QueryParser.cs5
-rw-r--r--win/C#/HandBrakeCS.csproj26
-rw-r--r--win/C#/Program.cs2
-rw-r--r--win/C#/Properties/Settings.Designer.cs438
-rw-r--r--win/C#/Properties/Settings.settings110
-rw-r--r--win/C#/app.config104
-rw-r--r--win/C#/frmMain.cs144
7 files changed, 51 insertions, 778 deletions
diff --git a/win/C#/Functions/QueryParser.cs b/win/C#/Functions/QueryParser.cs
index a4bd1c1e5..681602ec4 100644
--- a/win/C#/Functions/QueryParser.cs
+++ b/win/C#/Functions/QueryParser.cs
@@ -774,6 +774,10 @@ namespace Handbrake.Functions
#endregion
//
+ //H264 tab and other
+ //
+ #region h264 and other
+ //
//H264 Tab
//
if (x264.Success != false)
@@ -785,6 +789,7 @@ namespace Handbrake.Functions
//Progam Options
//
thisQuery.q_verbose = verbose.Success;
+ #endregion
}
catch (Exception exc)
{
diff --git a/win/C#/HandBrakeCS.csproj b/win/C#/HandBrakeCS.csproj
index 1b55daa15..a9c549b9b 100644
--- a/win/C#/HandBrakeCS.csproj
+++ b/win/C#/HandBrakeCS.csproj
@@ -197,6 +197,32 @@
<None Include="Resources\Delete.png" />
<None Include="Resources\Burn.png" />
</ItemGroup>
+ <ItemGroup>
+ <COMReference Include="AxMSComctlLib">
+ <Guid>{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}</Guid>
+ <VersionMajor>2</VersionMajor>
+ <VersionMinor>0</VersionMinor>
+ <Lcid>0</Lcid>
+ <WrapperTool>aximp</WrapperTool>
+ <Isolated>False</Isolated>
+ </COMReference>
+ <COMReference Include="MSComctlLib">
+ <Guid>{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}</Guid>
+ <VersionMajor>2</VersionMajor>
+ <VersionMinor>0</VersionMinor>
+ <Lcid>0</Lcid>
+ <WrapperTool>primary</WrapperTool>
+ <Isolated>False</Isolated>
+ </COMReference>
+ <COMReference Include="stdole">
+ <Guid>{00020430-0000-0000-C000-000000000046}</Guid>
+ <VersionMajor>2</VersionMajor>
+ <VersionMinor>0</VersionMinor>
+ <Lcid>0</Lcid>
+ <WrapperTool>primary</WrapperTool>
+ <Isolated>False</Isolated>
+ </COMReference>
+ </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
diff --git a/win/C#/Program.cs b/win/C#/Program.cs
index aec5ce10b..b5af0d74c 100644
--- a/win/C#/Program.cs
+++ b/win/C#/Program.cs
@@ -35,7 +35,7 @@ namespace Handbrake
System.Windows.Forms.Screen scr = System.Windows.Forms.Screen.PrimaryScreen;
if ((scr.Bounds.Width < 1024) || (scr.Bounds.Height < 720))
{
- MessageBox.Show("Your system does not meet the minimum requirements for HandBrake. \n Screen resolution is too Low. Must be 1024x768 or greater", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ MessageBox.Show("Your system does not meet the minimum requirements for HandBrake. \n" + "Your screen is running at: " + scr.Bounds.Width.ToString() + "x" + scr.Bounds.Height.ToString() + " \nScreen resolution is too Low. Must be 1024x720 or greater", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
launch = false;
}
diff --git a/win/C#/Properties/Settings.Designer.cs b/win/C#/Properties/Settings.Designer.cs
index 7238dc836..ddc8dcf11 100644
--- a/win/C#/Properties/Settings.Designer.cs
+++ b/win/C#/Properties/Settings.Designer.cs
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version:2.0.50727.832
+// Runtime Version:2.0.50727.1378
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -109,413 +109,6 @@ namespace Handbrake.Properties {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string DVDSource {
- get {
- return ((string)(this["DVDSource"]));
- }
- set {
- this["DVDSource"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string DVDTitle {
- get {
- return ((string)(this["DVDTitle"]));
- }
- set {
- this["DVDTitle"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string ChapterStart {
- get {
- return ((string)(this["ChapterStart"]));
- }
- set {
- this["ChapterStart"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string ChapterFinish {
- get {
- return ((string)(this["ChapterFinish"]));
- }
- set {
- this["ChapterFinish"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string VideoDest {
- get {
- return ((string)(this["VideoDest"]));
- }
- set {
- this["VideoDest"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string VideoEncoder {
- get {
- return ((string)(this["VideoEncoder"]));
- }
- set {
- this["VideoEncoder"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string AudioEncoder {
- get {
- return ((string)(this["AudioEncoder"]));
- }
- set {
- this["AudioEncoder"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string Width {
- get {
- return ((string)(this["Width"]));
- }
- set {
- this["Width"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string Height {
- get {
- return ((string)(this["Height"]));
- }
- set {
- this["Height"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string CroppingOption {
- get {
- return ((string)(this["CroppingOption"]));
- }
- set {
- this["CroppingOption"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string CropTop {
- get {
- return ((string)(this["CropTop"]));
- }
- set {
- this["CropTop"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string CropBottom {
- get {
- return ((string)(this["CropBottom"]));
- }
- set {
- this["CropBottom"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string CropLeft {
- get {
- return ((string)(this["CropLeft"]));
- }
- set {
- this["CropLeft"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string CropRight {
- get {
- return ((string)(this["CropRight"]));
- }
- set {
- this["CropRight"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string Subtitles {
- get {
- return ((string)(this["Subtitles"]));
- }
- set {
- this["Subtitles"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string VideoBitrate {
- get {
- return ((string)(this["VideoBitrate"]));
- }
- set {
- this["VideoBitrate"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string VideoFilesize {
- get {
- return ((string)(this["VideoFilesize"]));
- }
- set {
- this["VideoFilesize"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string TwoPass {
- get {
- return ((string)(this["TwoPass"]));
- }
- set {
- this["TwoPass"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string DeInterlace {
- get {
- return ((string)(this["DeInterlace"]));
- }
- set {
- this["DeInterlace"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string Grayscale {
- get {
- return ((string)(this["Grayscale"]));
- }
- set {
- this["Grayscale"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string Framerate {
- get {
- return ((string)(this["Framerate"]));
- }
- set {
- this["Framerate"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string PixelRatio {
- get {
- return ((string)(this["PixelRatio"]));
- }
- set {
- this["PixelRatio"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string turboFirstPass {
- get {
- return ((string)(this["turboFirstPass"]));
- }
- set {
- this["turboFirstPass"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string largeFile {
- get {
- return ((string)(this["largeFile"]));
- }
- set {
- this["largeFile"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string AudioBitrate {
- get {
- return ((string)(this["AudioBitrate"]));
- }
- set {
- this["AudioBitrate"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string AudioSampleRate {
- get {
- return ((string)(this["AudioSampleRate"]));
- }
- set {
- this["AudioSampleRate"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string AudioChannels {
- get {
- return ((string)(this["AudioChannels"]));
- }
- set {
- this["AudioChannels"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string CRF {
- get {
- return ((string)(this["CRF"]));
- }
- set {
- this["CRF"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string H264 {
- get {
- return ((string)(this["H264"]));
- }
- set {
- this["H264"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public int VideoQuality {
- get {
- return ((int)(this["VideoQuality"]));
- }
- set {
- this["VideoQuality"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string FullDVDInfo {
- get {
- return ((string)(this["FullDVDInfo"]));
- }
- set {
- this["FullDVDInfo"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string denoise {
- get {
- return ((string)(this["denoise"]));
- }
- set {
- this["denoise"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string detelecine {
- get {
- return ((string)(this["detelecine"]));
- }
- set {
- this["detelecine"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string deblock {
- get {
- return ((string)(this["deblock"]));
- }
- set {
- this["deblock"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0.9.2")]
public string CliVersion {
get {
@@ -577,17 +170,6 @@ namespace Handbrake.Properties {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public global::System.Collections.Specialized.StringCollection BuiltInPresets {
- get {
- return ((global::System.Collections.Specialized.StringCollection)(this["BuiltInPresets"]));
- }
- set {
- this["BuiltInPresets"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string hidePresets {
get {
@@ -601,24 +183,12 @@ namespace Handbrake.Properties {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
- public string selectedPreset {
- get {
- return ((string)(this["selectedPreset"]));
- }
- set {
- this["selectedPreset"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string chapterMarker {
+ public string defaultUserSettings {
get {
- return ((string)(this["chapterMarker"]));
+ return ((string)(this["defaultUserSettings"]));
}
set {
- this["chapterMarker"] = value;
+ this["defaultUserSettings"] = value;
}
}
}
diff --git a/win/C#/Properties/Settings.settings b/win/C#/Properties/Settings.settings
index 5063e1101..468b350be 100644
--- a/win/C#/Properties/Settings.settings
+++ b/win/C#/Properties/Settings.settings
@@ -23,108 +23,6 @@
<Setting Name="verbose" Type="System.String" Scope="User">
<Value Profile="(Default)">Checked</Value>
</Setting>
- <Setting Name="DVDSource" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="DVDTitle" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="ChapterStart" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="ChapterFinish" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="VideoDest" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="VideoEncoder" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="AudioEncoder" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="Width" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="Height" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="CroppingOption" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="CropTop" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="CropBottom" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="CropLeft" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="CropRight" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="Subtitles" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="VideoBitrate" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="VideoFilesize" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="TwoPass" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="DeInterlace" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="Grayscale" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="Framerate" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="PixelRatio" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="turboFirstPass" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="largeFile" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="AudioBitrate" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="AudioSampleRate" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="AudioChannels" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="CRF" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="H264" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="VideoQuality" Type="System.Int32" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="FullDVDInfo" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="denoise" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="detelecine" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="deblock" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
<Setting Name="CliVersion" Type="System.String" Scope="User">
<Value Profile="(Default)">0.9.2</Value>
</Setting>
@@ -140,16 +38,10 @@
<Setting Name="CompletionOption" Type="System.String" Scope="User">
<Value Profile="(Default)">Do Nothing</Value>
</Setting>
- <Setting Name="BuiltInPresets" Type="System.Collections.Specialized.StringCollection" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
<Setting Name="hidePresets" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
- <Setting Name="selectedPreset" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="chapterMarker" Type="System.String" Scope="User">
+ <Setting Name="defaultUserSettings" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
</Settings>
diff --git a/win/C#/app.config b/win/C#/app.config
index bfb9526ee..a19ca4b90 100644
--- a/win/C#/app.config
+++ b/win/C#/app.config
@@ -28,105 +28,6 @@
<setting name="verbose" serializeAs="String">
<value>Checked</value>
</setting>
- <setting name="DVDSource" serializeAs="String">
- <value />
- </setting>
- <setting name="DVDTitle" serializeAs="String">
- <value />
- </setting>
- <setting name="ChapterStart" serializeAs="String">
- <value />
- </setting>
- <setting name="ChapterFinish" serializeAs="String">
- <value />
- </setting>
- <setting name="VideoDest" serializeAs="String">
- <value />
- </setting>
- <setting name="VideoEncoder" serializeAs="String">
- <value />
- </setting>
- <setting name="AudioEncoder" serializeAs="String">
- <value />
- </setting>
- <setting name="Width" serializeAs="String">
- <value />
- </setting>
- <setting name="Height" serializeAs="String">
- <value />
- </setting>
- <setting name="CroppingOption" serializeAs="String">
- <value />
- </setting>
- <setting name="CropTop" serializeAs="String">
- <value />
- </setting>
- <setting name="CropBottom" serializeAs="String">
- <value />
- </setting>
- <setting name="CropLeft" serializeAs="String">
- <value />
- </setting>
- <setting name="CropRight" serializeAs="String">
- <value />
- </setting>
- <setting name="Subtitles" serializeAs="String">
- <value />
- </setting>
- <setting name="VideoBitrate" serializeAs="String">
- <value />
- </setting>
- <setting name="VideoFilesize" serializeAs="String">
- <value />
- </setting>
- <setting name="TwoPass" serializeAs="String">
- <value />
- </setting>
- <setting name="DeInterlace" serializeAs="String">
- <value />
- </setting>
- <setting name="Grayscale" serializeAs="String">
- <value />
- </setting>
- <setting name="Framerate" serializeAs="String">
- <value />
- </setting>
- <setting name="PixelRatio" serializeAs="String">
- <value />
- </setting>
- <setting name="turboFirstPass" serializeAs="String">
- <value />
- </setting>
- <setting name="largeFile" serializeAs="String">
- <value />
- </setting>
- <setting name="AudioBitrate" serializeAs="String">
- <value />
- </setting>
- <setting name="AudioSampleRate" serializeAs="String">
- <value />
- </setting>
- <setting name="AudioChannels" serializeAs="String">
- <value />
- </setting>
- <setting name="CRF" serializeAs="String">
- <value />
- </setting>
- <setting name="H264" serializeAs="String">
- <value />
- </setting>
- <setting name="FullDVDInfo" serializeAs="String">
- <value />
- </setting>
- <setting name="denoise" serializeAs="String">
- <value />
- </setting>
- <setting name="detelecine" serializeAs="String">
- <value />
- </setting>
- <setting name="deblock" serializeAs="String">
- <value />
- </setting>
<setting name="CliVersion" serializeAs="String">
<value>0.9.2</value>
</setting>
@@ -145,10 +46,7 @@
<setting name="hidePresets" serializeAs="String">
<value />
</setting>
- <setting name="selectedPreset" serializeAs="String">
- <value />
- </setting>
- <setting name="chapterMarker" serializeAs="String">
+ <setting name="defaultUserSettings" serializeAs="String">
<value />
</setting>
</Handbrake.Properties.Settings>
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index bf00e2223..12d7a5d4d 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -141,99 +141,22 @@ namespace Handbrake
private void loadUserDefaults()
{
+ string userDefaults = Properties.Settings.Default.defaultUserSettings;
try
{
- // Load the users default settings or if the user has not got this option enabled, load the normal preset.
- if (Properties.Settings.Default.defaultSettings == "Checked")
- {
- // Source
- text_source.Text = Properties.Settings.Default.DVDSource;
- drp_dvdtitle.Text = Properties.Settings.Default.DVDTitle;
- drop_chapterStart.Text = Properties.Settings.Default.ChapterStart;
- drop_chapterFinish.Text = Properties.Settings.Default.ChapterFinish;
-
- // Destination
- text_destination.Text = Properties.Settings.Default.VideoDest;
- drp_videoEncoder.Text = Properties.Settings.Default.VideoEncoder;
- drp_audioCodec.Text = Properties.Settings.Default.AudioEncoder;
- text_width.Text = Properties.Settings.Default.Width;
- text_height.Text = Properties.Settings.Default.Height;
-
- // Picture Settings Tab
- drp_crop.Text = Properties.Settings.Default.CroppingOption;
- text_top.Text = Properties.Settings.Default.CropTop;
- text_bottom.Text = Properties.Settings.Default.CropBottom;
- text_left.Text = Properties.Settings.Default.CropLeft;
- text_right.Text = Properties.Settings.Default.CropRight;
- drp_subtitle.Text = Properties.Settings.Default.Subtitles;
-
- // Video Settings Tab
- text_bitrate.Text = Properties.Settings.Default.VideoBitrate;
- text_filesize.Text = Properties.Settings.Default.VideoFilesize;
- slider_videoQuality.Value = Properties.Settings.Default.VideoQuality;
-
- if (Properties.Settings.Default.TwoPass == "Checked")
- {
- check_2PassEncode.CheckState = CheckState.Checked;
- }
-
- drp_deInterlace_option.Text = Properties.Settings.Default.DeInterlace;
- drp_deNoise.Text = Properties.Settings.Default.denoise;
-
- if (Properties.Settings.Default.detelecine == "Checked")
- {
- check_detelecine.CheckState = CheckState.Checked;
- }
-
- if (Properties.Settings.Default.detelecine == "Checked")
- {
- check_deblock.CheckState = CheckState.Checked;
- }
-
-
- if (Properties.Settings.Default.Grayscale == "Checked")
- {
- check_grayscale.CheckState = CheckState.Checked;
- }
-
- drp_videoFramerate.Text = Properties.Settings.Default.Framerate;
-
- if (Properties.Settings.Default.PixelRatio == "Checked")
- {
- CheckPixelRatio.CheckState = CheckState.Checked;
- }
- if (Properties.Settings.Default.turboFirstPass == "Checked")
- {
- check_turbo.CheckState = CheckState.Checked;
- }
- if (Properties.Settings.Default.largeFile == "Checked")
- {
- check_largeFile.CheckState = CheckState.Checked;
- }
-
- if (Properties.Settings.Default.chapterMarker == "Checked")
- {
- Check_ChapterMarkers.CheckState = CheckState.Checked;
- }
-
- // Audio Settings Tab
- drp_audioBitrate.Text = Properties.Settings.Default.AudioBitrate;
- drp_audioSampleRate.Text = Properties.Settings.Default.AudioSampleRate;
- drp_audioChannels.Text = Properties.Settings.Default.AudioChannels;
+ // Some things that need to be done to reset some gui components:
+ CheckPixelRatio.CheckState = CheckState.Unchecked;
- // H264 Tab
- if (Properties.Settings.Default.CRF == "Checked")
- {
- CheckCRF.CheckState = CheckState.Checked;
- }
- rtf_h264advanced.Text = Properties.Settings.Default.H264;
+ // Send the query from the file to the Query Parser class
+ Functions.QueryParser presetQuery = Functions.QueryParser.Parse(userDefaults);
- groupBox_output.Text = "Output Settings (Preset: " + Properties.Settings.Default.selectedPreset + ")";
- }
+ // Now load the preset
+ presetLoader(presetQuery, "User Defaults ");
}
- catch (Exception)
+ catch (Exception exc)
{
- // No real need to alert the user. Try/Catch only in just incase there is a problem reading the settings xml file.
+ MessageBox.Show("Unable to load profile.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
+ MessageBox.Show(exc.ToString());
}
}
@@ -255,7 +178,7 @@ namespace Handbrake
Boolean update = ((verdata > vergui) || (verd1 > cliversion));
- lbl_update.Visible = update;
+ //lbl_update.Visible = update;
return update;
}
@@ -663,48 +586,8 @@ namespace Handbrake
private void btn_setDefault_Click(object sender, EventArgs e)
{
- //Source
- Properties.Settings.Default.DVDSource = text_source.Text;
- Properties.Settings.Default.DVDTitle = drp_dvdtitle.Text;
- Properties.Settings.Default.ChapterStart = drop_chapterStart.Text;
- Properties.Settings.Default.ChapterFinish = drop_chapterFinish.Text;
- //Destination
- Properties.Settings.Default.VideoDest = text_destination.Text;
- Properties.Settings.Default.VideoEncoder = drp_videoEncoder.Text;
- Properties.Settings.Default.AudioEncoder = drp_audioCodec.Text;
- Properties.Settings.Default.Width = text_width.Text;
- Properties.Settings.Default.Height = text_height.Text;
- //Picture Settings Tab
- Properties.Settings.Default.CroppingOption = drp_crop.Text;
- Properties.Settings.Default.CropTop = text_top.Text;
- Properties.Settings.Default.CropBottom = text_bottom.Text;
- Properties.Settings.Default.CropLeft = text_left.Text;
- Properties.Settings.Default.CropRight = text_right.Text;
- Properties.Settings.Default.Subtitles = drp_subtitle.Text;
- //Video Settings Tab
- Properties.Settings.Default.VideoBitrate = text_bitrate.Text;
- Properties.Settings.Default.VideoFilesize = text_filesize.Text;
- Properties.Settings.Default.VideoQuality = slider_videoQuality.Value;
- Properties.Settings.Default.TwoPass = check_2PassEncode.CheckState.ToString();
- Properties.Settings.Default.DeInterlace = drp_deInterlace_option.Text;
- Properties.Settings.Default.Grayscale = check_grayscale.CheckState.ToString();
- Properties.Settings.Default.Framerate = drp_videoFramerate.Text;
- Properties.Settings.Default.PixelRatio = CheckPixelRatio.CheckState.ToString();
- Properties.Settings.Default.turboFirstPass = check_turbo.CheckState.ToString();
- Properties.Settings.Default.largeFile = check_largeFile.CheckState.ToString();
- Properties.Settings.Default.detelecine = check_detelecine.CheckState.ToString();
- Properties.Settings.Default.denoise = drp_deNoise.Text;
- Properties.Settings.Default.deblock = check_deblock.CheckState.ToString();
- Properties.Settings.Default.chapterMarker = Check_ChapterMarkers.CheckState.ToString();
- //Audio Settings Tab
- Properties.Settings.Default.AudioBitrate = drp_audioBitrate.Text;
- Properties.Settings.Default.AudioSampleRate = drp_audioSampleRate.Text;
- Properties.Settings.Default.AudioChannels = drp_audioChannels.Text;
- //H264 Tab
- Properties.Settings.Default.CRF = CheckCRF.CheckState.ToString();
- Properties.Settings.Default.H264 = rtf_h264advanced.Text;
- //Preset
- Properties.Settings.Default.selectedPreset = groupBox_output.Text.Replace("Output Settings (Preset: ", "").Replace("\"", "").Replace(")", "");
+ String query = GenerateTheQuery();
+ Properties.Settings.Default.defaultUserSettings = query;
// Save the new default Settings
Properties.Settings.Default.Save();
MessageBox.Show("New default settings saved.", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
@@ -1909,7 +1792,6 @@ namespace Handbrake
}
#endregion
-
// This is the END of the road ------------------------------------------------------------------------------
}
} \ No newline at end of file