diff options
author | sr55 <[email protected]> | 2012-03-17 18:36:35 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2012-03-17 18:36:35 +0000 |
commit | 7686ecbf127a41291a7fe76852f93fe7a6f60fb4 (patch) | |
tree | b77205d3464bc0ae3fb374acbe0acedf72916834 /win/CS/frmMain.cs | |
parent | f87e4ae9727bbb10040e5dd5cd99a6a7f1f4dd1d (diff) |
WinGui: (WPF) Wired up the Add Preset window and setup the build scripts to create Alpha Builds for this project.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4508 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/frmMain.cs')
-rw-r--r-- | win/CS/frmMain.cs | 38 |
1 files changed, 14 insertions, 24 deletions
diff --git a/win/CS/frmMain.cs b/win/CS/frmMain.cs index 8f80de22f..697932940 100644 --- a/win/CS/frmMain.cs +++ b/win/CS/frmMain.cs @@ -841,11 +841,11 @@ namespace Handbrake {
if (openPreset.ShowDialog() == DialogResult.OK)
{
- EncodeTask parsed = PlistPresetHandler.Import(openPreset.FileName);
+ Preset parsed = PlistPresetHandler.Import(openPreset.FileName);
- if (presetHandler.CheckIfPresetExists(parsed.PresetName))
+ if (presetHandler.CheckIfPresetExists(parsed.Name))
{
- if (!presetHandler.CanUpdatePreset(parsed.PresetName))
+ if (!presetHandler.CanUpdatePreset(parsed.Name))
{
MessageBox.Show(
"You can not import a preset with the same name as a built-in preset.",
@@ -861,35 +861,25 @@ namespace Handbrake MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
if (result == DialogResult.Yes)
{
- Preset preset = new Preset
- {
- Name = parsed.PresetName,
- Query = QueryGeneratorUtility.GenerateQuery(parsed),
- CropSettings = parsed.UsesPictureSettings,
- Description = string.Empty,
- AudioPassthruSettings = parsed.AllowedPassthruOptions
- };
+ parsed.Query = QueryGeneratorUtility.GenerateQuery(parsed.Task);
+ parsed.AudioPassthruSettings = parsed.Task.AllowedPassthruOptions;
+ parsed.CropSettings = false;
- presetHandler.Update(preset);
+ presetHandler.Update(parsed);
}
}
else
{
- Preset preset = new Preset
- {
- Name = parsed.PresetName,
- Query = QueryGeneratorUtility.GenerateQuery(parsed),
- CropSettings = parsed.UsesPictureSettings,
- Description = string.Empty,
- AudioPassthruSettings = parsed.AllowedPassthruOptions
- };
-
- if (presetHandler.Add(preset))
+ parsed.Query = QueryGeneratorUtility.GenerateQuery(parsed.Task);
+ parsed.AudioPassthruSettings = parsed.Task.AllowedPassthruOptions;
+ parsed.CropSettings = false;
+
+ if (presetHandler.Add(parsed))
{
- TreeNode preset_treeview = new TreeNode(parsed.PresetName)
+ TreeNode preset_treeview = new TreeNode(parsed.Name)
{
ForeColor = Color.Black,
- Tag = preset,
+ Tag = parsed,
};
treeView_presets.Nodes.Add(preset_treeview);
}
|