}\r
}\r
\r
- /// <summary>\r
- /// Looks up a localized string similar to The x264 Preset / Tune / Profile and Level options are currently in use on the Video Tab. \r
- ///\r
- ///To enable this tab, check the "Use Advanced Tab instead" option on the Video Tab.\r
- ///\r
- ///If you do not use this tab, it can be hidden from: Tools Menu > Options > Advanced..\r
- /// </summary>\r
- public static string Advanced_NotInUse {\r
- get {\r
- return ResourceManager.GetString("Advanced_NotInUse", resourceCulture);\r
- }\r
- }\r
- \r
/// <summary>\r
/// Looks up a localized string similar to Psychovisual Rate Distortion means x264 tries to retain detail, for better quality to the human eye, \r
///as opposed to trying to maximize quality the way a computer understands it, through signal-to-noise ratios that have trouble telling apart fine detail and noise..\r
}\r
}\r
\r
- /// <summary>\r
- /// Looks up a localized string similar to Allow use of 'Advanced' Tab for x264 options. (Deprecated).\r
- /// </summary>\r
- public static string Options_AdvancedTab {\r
- get {\r
- return ResourceManager.GetString("Options_AdvancedTab", resourceCulture);\r
- }\r
- }\r
- \r
/// <summary>\r
/// Looks up a localized string similar to Arguments:.\r
/// </summary>\r
}\r
}\r
\r
- /// <summary>\r
- /// Looks up a localized string similar to Use Advanced Tab instead.\r
- /// </summary>\r
- public static string VideoView_UseAdvancedTab {\r
- get {\r
- return ResourceManager.GetString("VideoView_UseAdvancedTab", resourceCulture);\r
- }\r
- }\r
- \r
/// <summary>\r
/// Looks up a localized string similar to Variable Framerate.\r
/// </summary>\r
You should have received a copy of the GNU General Public License\r
along with this program; if not, write to the Free Software\r
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</value>\r
- </data>\r
- <data name="Advanced_NotInUse" xml:space="preserve">\r
- <value>The x264 Preset / Tune / Profile and Level options are currently in use on the Video Tab. \r
-\r
-To enable this tab, check the "Use Advanced Tab instead" option on the Video Tab.\r
-\r
-If you do not use this tab, it can be hidden from: Tools Menu > Options > Advanced.</value>\r
</data>\r
<data name="QueueSelection_AutoNameWarning" xml:space="preserve">\r
<value>WARNING: You do not have automatic file naming turned on. Please enable this in options.</value>\r
<data name="Options_AdvancedOptions" xml:space="preserve">\r
<value>Advanced Options</value>\r
</data>\r
- <data name="Options_AdvancedTab" xml:space="preserve">\r
- <value>Allow use of 'Advanced' Tab for x264 options. (Deprecated)</value>\r
- </data>\r
<data name="Options_Arguments" xml:space="preserve">\r
<value>Arguments:</value>\r
</data>\r
<data name="VideoView_TurboFirstPass" xml:space="preserve">\r
<value>Turbo first pass</value>\r
</data>\r
- <data name="VideoView_UseAdvancedTab" xml:space="preserve">\r
- <value>Use Advanced Tab instead</value>\r
- </data>\r
<data name="VideoView_VariableFramerate" xml:space="preserve">\r
<value>Variable Framerate</value>\r
</data>\r
this.userSettings.Add(item.Key, item.Value);\r
this.Save();\r
}\r
+\r
+ // Legacy Settings forced Reset.\r
+ this.userSettings[UserSettingConstants.ShowAdvancedTab] = false;\r
}\r
catch (Exception exc)\r
{\r
private bool updateAvailable;\r
private int downloadProgressPercentage;\r
private UpdateCheckInformation updateInfo;\r
- private bool showAdvancedTab;\r
private bool removePunctuation;\r
private bool resetWhenDoneAction;\r
private bool enableQuickSyncDecoding;\r
}\r
}\r
\r
- /// <summary>\r
- /// Gets or sets a value indicating whether enable lib hb.\r
- /// </summary>\r
- public bool ShowAdvancedTab\r
- {\r
- get\r
- {\r
- return this.showAdvancedTab;\r
- }\r
- set\r
- {\r
- this.showAdvancedTab = value;\r
- this.NotifyOfPropertyChange(() => this.ShowAdvancedTab);\r
- }\r
- }\r
-\r
#endregion\r
\r
#region Video\r
// Minimise to Tray\r
this.MinimiseToTray = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.MainWindowMinimize);\r
this.ClearQueueOnEncodeCompleted = userSettingService.GetUserSetting<bool>(UserSettingConstants.ClearCompletedFromQueue);\r
- this.ShowAdvancedTab = userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowAdvancedTab);\r
\r
// Set the preview count\r
this.PreviewPicturesToScan.Clear();\r
userSettingService.SetUserSetting(UserSettingConstants.ClearCompletedFromQueue, this.ClearQueueOnEncodeCompleted);\r
userSettingService.SetUserSetting(UserSettingConstants.PreviewScanCount, this.SelectedPreviewCount);\r
userSettingService.SetUserSetting(UserSettingConstants.X264Step, double.Parse(this.SelectedGranulairty, CultureInfo.InvariantCulture));\r
- userSettingService.SetUserSetting(UserSettingConstants.ShowAdvancedTab, this.ShowAdvancedTab);\r
\r
int value;\r
if (int.TryParse(this.MinLength.ToString(CultureInfo.InvariantCulture), out value))\r
using System.ComponentModel;\r
using System.Globalization;\r
using System.Linq;\r
+ using System.Windows;\r
\r
using Caliburn.Micro;\r
\r
\r
private const string SameAsSource = "Same as source";\r
private readonly IUserSettingService userSettingService;\r
+ private readonly IErrorService errorService;\r
\r
private bool displayOptimiseOptions;\r
private int qualityMax;\r
/// <param name="userSettingService">\r
/// The user Setting Service.\r
/// </param>\r
- public VideoViewModel(IUserSettingService userSettingService)\r
+ public VideoViewModel(IUserSettingService userSettingService, IErrorService errorService)\r
{\r
this.Task = new EncodeTask { VideoEncoder = VideoEncoder.X264 };\r
this.userSettingService = userSettingService;\r
+ this.errorService = errorService;\r
this.QualityMin = 0;\r
this.QualityMax = 51;\r
this.IsConstantQuantity = true;\r
Clipboard.SetDataObject(this.SelectedVideoEncoder == VideoEncoder.X264 || this.SelectedVideoEncoder == VideoEncoder.X264_10 ? this.GetActualx264Query() : this.ExtraArguments);\r
}\r
\r
+ public void ToggleAdvancedTab()\r
+ {\r
+ if (!this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowAdvancedTab))\r
+ {\r
+ this.errorService.ShowMessageBox(\r
+ "The 'Advanced' tab is no longer supported and will be removed in an upcoming release. We strongly recommend using the video tab instead.",\r
+ "Advanced Tab Deprecated",\r
+ MessageBoxButton.OK,\r
+ MessageBoxImage.Information);\r
+ this.userSettingService.SetUserSetting(UserSettingConstants.ShowAdvancedTab, true);\r
+ this.UseAdvancedTab = true;\r
+ }\r
+ else\r
+ {\r
+ this.userSettingService.SetUserSetting(UserSettingConstants.ShowAdvancedTab, false);\r
+ this.UseAdvancedTab = false;\r
+ }\r
+ }\r
+\r
#endregion\r
\r
protected virtual void OnTabStatusChanged(TabStatusEventArgs e)\r
{\r
if (e.PropertyName == UserSettingConstants.ShowAdvancedTab)\r
{\r
- ShowX264AdvancedOptions = this.Task.ShowAdvancedTab;\r
- this.NotifyOfPropertyChange(() => ShowX264AdvancedOptions);\r
this.NotifyOfPropertyChange(() => this.AdvancedOptionsString);\r
\r
- if (ShowX264AdvancedOptions)\r
+ if (this.Task.ShowAdvancedTab)\r
{\r
this.UpdateUIFromAdvancedOptions();\r
}\r
\r
#region Properties\r
\r
- /// <summary>\r
- /// Gets or sets a value indicating whether show x 264 advanced options.\r
- /// </summary>\r
- public bool ShowX264AdvancedOptions { get; set; }\r
\r
/// <summary>\r
/// Gets or sets AdaptiveBFrames.\r
this.Task = task;\r
this.Task.PropertyChanged += this.Task_PropertyChanged;\r
this.AdvancedOptionsString = preset.Task.AdvancedEncoderOptions;\r
-\r
- if (task.ShowAdvancedTab && (task.VideoEncoder == VideoEncoder.X264 || task.VideoEncoder == VideoEncoder.X264_10))\r
- {\r
- this.ShowX264AdvancedOptions = true;\r
- this.NotifyOfPropertyChange(() => ShowX264AdvancedOptions);\r
- }\r
}\r
\r
/// <summary>\r
<StackPanel Orientation="Vertical" Margin="20,0,0,0">\r
<CheckBox Content="{x:Static Properties:Resources.Options_MinimiseTray}" IsChecked="{Binding MinimiseToTray}" />\r
<CheckBox Content="{x:Static Properties:Resources.Options_ClearCompleted}" IsChecked="{Binding ClearQueueOnEncodeCompleted}" />\r
- <CheckBox Content="{x:Static Properties:Resources.Options_AdvancedTab}" IsChecked="{Binding ShowAdvancedTab}" />\r
<CheckBox Content="{x:Static Properties:Resources.OptionsView_ShowStatusInTitleBar}" IsChecked="{Binding ShowStatusInTitleBar}" />\r
<CheckBox Content="{x:Static Properties:Resources.OptionsView_ShowPreviewOnSummaryTab}" IsChecked="{Binding ShowPreviewOnSummaryTab}" />\r
</StackPanel>\r
\r
<TextBlock Text="{x:Static Properties:Resources.VideoView_OptimiseVideo}" Margin="0,0,0,0" Grid.Row="0" Grid.ColumnSpan="2" FontWeight="Bold" VerticalAlignment="Center" />\r
\r
- <CheckBox Content="{x:Static Properties:Resources.VideoView_UseAdvancedTab}" Grid.Row="1" IsChecked="{Binding UseAdvancedTab}" Margin="0,5,0,0"\r
+ <CheckBox Content="Use Legacy Advanced Tab" Grid.Row="1" IsChecked="{Binding UseAdvancedTab}" Margin="0,5,0,0"\r
Visibility="{Binding IsAdvancedTabOptionEnabled, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}"\r
ToolTip="{x:Static Properties:ResourcesTooltips.Video_AdvancedOptions}" />\r
\r
<TextBox.ContextMenu>\r
<ContextMenu>\r
<MenuItem Header="Copy Full Query" cal:Message.Attach="[Event Click] = [Action CopyQuery]" />\r
+ <MenuItem Header="Toggle Advanced Tab (Deprecated)" cal:Message.Attach="[Event Click] = [Action ToggleAdvancedTab]" />\r
</ContextMenu>\r
</TextBox.ContextMenu>\r
</TextBox>\r
\r
<!-- X264 Query -->\r
\r
- <TextBlock Text="{x:Static Properties:Resources.Advanced_NotInUse}" Grid.Row="0"\r
- TextWrapping="Wrap" Width="480" Margin="0, 100, 0, 0" FontSize="12"\r
- Visibility="{Binding ShowX264AdvancedOptions, Converter={StaticResource BooleanVisibilityConverter}, ConverterParameter=true}" />\r
-\r
- <Grid Grid.Row="1" Visibility="{Binding ShowX264AdvancedOptions, Converter={StaticResource BooleanVisibilityConverter}, ConverterParameter=false}">\r
+ <Grid Grid.Row="1">\r
<Grid.RowDefinitions>\r
<RowDefinition Height="Auto" />\r
<RowDefinition Height="*" />\r
<TextBlock Grid.Row="2" Margin="10,5,10,0"\r
VerticalAlignment="Center"\r
FontWeight="Bold"\r
- Text="x264 Encoder Options:"\r
- Visibility="{Binding ShowX264AdvancedOptions, Converter={StaticResource BooleanVisibilityConverter}, ConverterParameter=false}" />\r
+ Text="x264 Encoder Options:" />\r
\r
<TextBox Grid.Row="3"\r
Margin="10,2,10, 2"\r
ToolTip="{x:Static Properties:Resources.Advanced_EncoderOptions}"\r
Text="{Binding AdvancedOptionsString, UpdateSourceTrigger=PropertyChanged}"\r
TextWrapping="Wrap"\r
- Visibility="{Binding ShowX264AdvancedOptions, Converter={StaticResource BooleanVisibilityConverter}, ConverterParameter=false}"\r
/>\r
</Grid>\r
</UserControl>
\ No newline at end of file