diff options
author | Scott <[email protected]> | 2015-10-09 22:22:28 +0100 |
---|---|---|
committer | Scott <[email protected]> | 2015-10-24 19:50:57 +0100 |
commit | f08c123b7723df0a84b5b72cbb485c052cb7747a (patch) | |
tree | 3acdac3073e292557c70e1e6c9c161750aa72054 /win/CS | |
parent | 913ca255c13ba8cdc35e9b2bf1c1c6bdc6c42fba (diff) |
Initial commit to allow the Queue Window to be embedded in the main window. Still some UX/UI stuff to tidy up later.
Diffstat (limited to 'win/CS')
-rw-r--r-- | win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs | 9 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Properties/ResourcesUI.resx | 3 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/UserSettingConstants.cs | 5 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/Interfaces/IQueueViewModel.cs | 7 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 159 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs | 214 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs | 45 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/MainView.xaml | 15 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/OptionsView.xaml | 1 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/QueueView.xaml | 19 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/QueueView.xaml.cs | 3 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/defaultsettings.xml | 8 |
12 files changed, 136 insertions, 352 deletions
diff --git a/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs b/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs index c2aee92a6..766fb27ab 100644 --- a/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs +++ b/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs @@ -1267,6 +1267,15 @@ namespace HandBrakeWPF.Properties { }
/// <summary>
+ /// Looks up a localized string similar to Show Queue in place of the tab controls when toggled on..
+ /// </summary>
+ public static string Options_ShowQueueInline {
+ get {
+ return ResourceManager.GetString("Options_ShowQueueInline", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Change case to Title Case.
/// </summary>
public static string Options_TitleCase {
diff --git a/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx b/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx index ad6e0450f..f61aa17c6 100644 --- a/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx +++ b/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx @@ -834,4 +834,7 @@ <data name="Options_x264Granularity" xml:space="preserve">
<value>Constant quality fractional granularity:</value>
</data>
+ <data name="Options_ShowQueueInline" xml:space="preserve">
+ <value>Show Queue in place of the tab controls when toggled on.</value>
+ </data>
</root>
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/UserSettingConstants.cs b/win/CS/HandBrakeWPF/UserSettingConstants.cs index f41b0d9e7..408f4061c 100644 --- a/win/CS/HandBrakeWPF/UserSettingConstants.cs +++ b/win/CS/HandBrakeWPF/UserSettingConstants.cs @@ -206,6 +206,11 @@ namespace HandBrakeWPF /// </summary>
public const string ClearCompletedFromQueue = "ClearCompletedFromQueue";
+ /// <summary>
+ /// The Show Queue in-line option.
+ /// </summary>
+ public const string ShowQueueInline = "ShowQueueInline";
+
#endregion
}
}
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IQueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IQueueViewModel.cs index 3530e84c1..865454a82 100644 --- a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IQueueViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IQueueViewModel.cs @@ -14,5 +14,12 @@ namespace HandBrakeWPF.ViewModels.Interfaces /// </summary>
public interface IQueueViewModel
{
+ /// <summary>
+ /// Activate this window. Either in-line or displayed as a window.
+ /// </summary>
+ /// <param name="isInline">
+ /// The is inline.
+ /// </param>
+ void Activate(bool isInline);
}
}
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index a9ec52071..7a1f586a2 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -62,144 +62,36 @@ namespace HandBrakeWPF.ViewModels {
#region Private Variables and Services
- /// <summary>
- /// The Encode Service
- /// </summary>
private readonly IQueueProcessor queueProcessor;
-
- /// <summary>
- /// The preset service
- /// </summary>
private readonly IPresetService presetService;
-
- /// <summary>
- /// The Error Service Backing field.
- /// </summary>
private readonly IErrorService errorService;
-
- /// <summary>
- /// Backing field for the update serivce.
- /// </summary>
private readonly IUpdateService updateService;
-
private readonly IWindowManager windowManager;
-
- /// <summary>
- /// Backing field for the user setting service.
- /// </summary>
private readonly IUserSettingService userSettingService;
-
- /// <summary>
- /// The Source Scan Service.
- /// </summary>
private readonly IScan scanService;
-
- /// <summary>
- /// The Encode Service
- /// </summary>
private readonly IEncode encodeService;
-
- /// <summary>
- /// Windows 7 API Pack wrapper
- /// </summary>
private readonly Win7 windowsSeven = new Win7();
-
- /// <summary>
- /// HandBrakes Main Window Title
- /// </summary>
private string windowName;
-
- /// <summary>
- /// The Source Label
- /// </summary>
private string sourceLabel;
-
- /// <summary>
- /// The Selected Output Format Backing Field
- /// </summary>
private OutputFormat selectedOutputFormat;
-
- /// <summary>
- /// Is a MKV file backing field
- /// </summary>
private bool isMkv;
-
- /// <summary>
- /// The Toolbar Status Label
- /// </summary>
private string statusLabel;
-
- /// <summary>
- /// Program Status Label
- /// </summary>
private string programStatusLabel;
-
- /// <summary>
- /// Backing field for the scanned source.
- /// </summary>
private Source scannedSource;
-
- /// <summary>
- /// Backing field for the selected title.
- /// </summary>
private Title selectedTitle;
-
- /// <summary>
- /// Backing field for duration
- /// </summary>
private string duration;
-
- /// <summary>
- /// Is Encoding Backing Field
- /// </summary>
private bool isEncoding;
-
- /// <summary>
- /// An Indicated to show the status window
- /// </summary>
private bool showStatusWindow;
-
- /// <summary>
- /// Backing field for the selected preset.
- /// </summary>
private Preset selectedPreset;
-
- /// <summary>
- /// Queue Edit Task
- /// </summary>
private EncodeTask queueEditTask;
-
- /// <summary>
- /// The last percentage complete value.
- /// </summary>
private int lastEncodePercentage;
-
- /// <summary>
- /// The is preset panel showing.
- /// </summary>
private bool isPresetPanelShowing;
-
- /// <summary>
- /// The show source selection.
- /// </summary>
private bool showSourceSelection;
-
- /// <summary>
- /// The drives.
- /// </summary>
private BindingList<SourceMenuItem> drives;
-
- /// <summary>
- /// The can pause.
- /// </summary>
private bool canPause;
-
private bool showAlertWindow;
-
private string alertWindowHeader;
-
private string alertWindowText;
-
private bool hasSource;
#endregion
@@ -257,11 +149,15 @@ namespace HandBrakeWPF.ViewModels /// <param name="staticPreviewViewModel">
/// The static Preview View Model.
/// </param>
+ /// <param name="queueViewModel">
+ /// The queue View Model.
+ /// </param>
public MainViewModel(IUserSettingService userSettingService, IScan scanService, IEncode encodeService, IPresetService presetService,
IErrorService errorService, IUpdateService updateService,
IPrePostActionService whenDoneService, IWindowManager windowManager, IPictureSettingsViewModel pictureSettingsViewModel, IVideoViewModel videoViewModel,
IFiltersViewModel filtersViewModel, IAudioViewModel audioViewModel, ISubtitlesViewModel subtitlesViewModel,
- IAdvancedViewModel advancedViewModel, IChaptersViewModel chaptersViewModel, IStaticPreviewViewModel staticPreviewViewModel)
+ IAdvancedViewModel advancedViewModel, IChaptersViewModel chaptersViewModel, IStaticPreviewViewModel staticPreviewViewModel,
+ IQueueViewModel queueViewModel)
{
this.scanService = scanService;
this.encodeService = encodeService;
@@ -269,6 +165,7 @@ namespace HandBrakeWPF.ViewModels this.errorService = errorService;
this.updateService = updateService;
this.windowManager = windowManager;
+ this.QueueViewModel = queueViewModel;
this.userSettingService = userSettingService;
this.queueProcessor = IoC.Get<IQueueProcessor>();
@@ -341,6 +238,16 @@ namespace HandBrakeWPF.ViewModels /// </summary>
public IFiltersViewModel FiltersViewModel { get; set; }
+ /// <summary>
+ /// Gets or sets the queue view model.
+ /// </summary>
+ public IQueueViewModel QueueViewModel { get; set; }
+
+ /// <summary>
+ /// Gets or sets the static preview view model.
+ /// </summary>
+ public IStaticPreviewViewModel StaticPreviewViewModel { get; set; }
+
#endregion
#region Properties
@@ -1076,11 +983,6 @@ namespace HandBrakeWPF.ViewModels }
/// <summary>
- /// Gets or sets the static preview view model.
- /// </summary>
- public IStaticPreviewViewModel StaticPreviewViewModel { get; set; }
-
- /// <summary>
/// Gets the cancel action.
/// </summary>
public Action CancelAction
@@ -1204,6 +1106,11 @@ namespace HandBrakeWPF.ViewModels }
}
+ /// <summary>
+ /// Flag to indicate if the queue is showing on the main view. (I.e inline queue display)
+ /// </summary>
+ public bool IsQueueShowingInLine { get; set; } = false;
+
#endregion
#region Load and Shutdown Handling
@@ -1309,15 +1216,29 @@ namespace HandBrakeWPF.ViewModels /// </summary>
public void OpenQueueWindow()
{
- Window window = Application.Current.Windows.Cast<Window>().FirstOrDefault(x => x.GetType() == typeof(QueueView));
-
- if (window != null)
+ if (this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowQueueInline))
{
- window.Activate();
+ this.IsQueueShowingInLine = !this.IsQueueShowingInLine;
+ this.NotifyOfPropertyChange(() => this.IsQueueShowingInLine);
+ this.QueueViewModel.Activate(true);
}
else
{
- this.windowManager.ShowWindow(IoC.Get<IQueueViewModel>());
+ this.IsQueueShowingInLine = false;
+ this.NotifyOfPropertyChange(() => this.IsQueueShowingInLine);
+
+ this.QueueViewModel.Activate(false);
+ Window window = Application.Current.Windows.Cast<Window>().FirstOrDefault(x => x.Content.GetType() == typeof(QueueView));
+
+ if (window != null)
+ {
+ window.Activate();
+ }
+ else
+ {
+ // TODO to control the size of this window, we will probably have to create a new window for hosting the queue.
+ this.windowManager.ShowWindow(this.QueueViewModel);
+ }
}
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs index ab7fde81a..4d7ea3a80 100644 --- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs @@ -39,245 +39,55 @@ namespace HandBrakeWPF.ViewModels {
#region Constants and Fields
- /// <summary>
- /// Backing field for the user setting service.
- /// </summary>
private readonly IUserSettingService userSettingService;
-
- /// <summary>
- /// Backing field for the update service.
- /// </summary>
private readonly IUpdateService updateService;
-
- /// <summary>
- /// The arguments.
- /// </summary>
private string arguments;
-
- /// <summary>
- /// The auto name default path.
- /// </summary>
private string autoNameDefaultPath;
-
- /// <summary>
- /// The automatically name files.
- /// </summary>
private bool automaticallyNameFiles;
-
- /// <summary>
- /// The autoname format.
- /// </summary>
private string autonameFormat;
-
- /// <summary>
- /// The change to title case.
- /// </summary>
private bool changeToTitleCase;
-
- /// <summary>
- /// The check for updates.
- /// </summary>
private bool checkForUpdates;
-
- /// <summary>
- /// The check for updates frequencies.
- /// </summary>
private BindingList<string> checkForUpdatesFrequencies = new BindingList<string>();
-
- /// <summary>
- /// The check for updates frequency.
- /// </summary>
private int checkForUpdatesFrequency;
-
- /// <summary>
- /// The clear old olgs.
- /// </summary>
private bool clearOldOlgs;
-
- /// <summary>
- /// The constant quality granularity.
- /// </summary>
private BindingList<string> constantQualityGranularity = new BindingList<string>();
-
- /// <summary>
- /// The copy log to encode directory.
- /// </summary>
private bool copyLogToEncodeDirectory;
-
- /// <summary>
- /// The copy log to sepcficed location.
- /// </summary>
private bool copyLogToSepcficedLocation;
-
- /// <summary>
- /// The disable libdvd nav.
- /// </summary>
private bool disableLibdvdNav;
-
- /// <summary>
- /// The log directory.
- /// </summary>
private string logDirectory;
-
- /// <summary>
- /// The log verbosity options.
- /// </summary>
private BindingList<int> logVerbosityOptions = new BindingList<int>();
-
- /// <summary>
- /// The min length.
- /// </summary>
private long minLength;
-
- /// <summary>
- /// The minimise to tray.
- /// </summary>
private bool minimiseToTray;
-
- /// <summary>
- /// The mp 4 extension options.
- /// </summary>
private BindingList<string> mp4ExtensionOptions = new BindingList<string>();
-
- /// <summary>
- /// The prevent sleep.
- /// </summary>
private bool preventSleep;
-
- /// <summary>
- /// The preview pictures to scan.
- /// </summary>
private BindingList<int> previewPicturesToScan = new BindingList<int>();
-
- /// <summary>
- /// The priority level options.
- /// </summary>
private BindingList<string> priorityLevelOptions = new BindingList<string>();
-
- /// <summary>
- /// The remove underscores.
- /// </summary>
private bool removeUnderscores;
-
- /// <summary>
- /// The selected granulairty.
- /// </summary>
private string selectedGranulairty;
-
- /// <summary>
- /// The selected mp 4 extension.
- /// </summary>
private int selectedMp4Extension;
-
- /// <summary>
- /// The selected preview count.
- /// </summary>
private int selectedPreviewCount;
-
- /// <summary>
- /// The selected priority.
- /// </summary>
private string selectedPriority;
-
- /// <summary>
- /// The selected verbosity.
- /// </summary>
private int selectedVerbosity;
-
- /// <summary>
- /// The send file after encode.
- /// </summary>
private bool sendFileAfterEncode;
-
- /// <summary>
- /// The send file to.
- /// </summary>
private string sendFileTo;
-
- /// <summary>
- /// The send file to Path.
- /// </summary>
private string sendFileToPath;
-
- /// <summary>
- /// The vlc path.
- /// </summary>
private string vlcPath;
-
- /// <summary>
- /// The when done.
- /// </summary>
private string whenDone;
-
- /// <summary>
- /// The when done options.
- /// </summary>
private BindingList<string> whenDoneOptions = new BindingList<string>();
-
- /// <summary>
- /// Backing field for clear queue on encode completed.
- /// </summary>
private bool clearQueueOnEncodeCompleted;
-
- /// <summary>
- /// The options tab that is selected.
- /// </summary>
private OptionsTab selectedTab;
-
- /// <summary>
- /// Update Message
- /// </summary>
private string updateMessage;
-
- /// <summary>
- /// Update Available
- /// </summary>
private bool updateAvailable;
-
- /// <summary>
- /// Download progress backing field.
- /// </summary>
private int downloadProgressPercentage;
-
- /// <summary>
- /// Backing field for update info.
- /// </summary>
private UpdateCheckInformation updateInfo;
-
- /// <summary>
- /// The show advanced tab backing field.
- /// </summary>
private bool showAdvancedTab;
-
- /// <summary>
- /// The remove punctuation.
- /// </summary>
private bool removePunctuation;
-
- /// <summary>
- /// The reset when done action.
- /// </summary>
private bool resetWhenDoneAction;
-
- /// <summary>
- /// The selected scaling mode.
- /// </summary>
private VideoScaler selectedScalingMode;
-
- /// <summary>
- /// The enable dxva decoding.
- /// </summary>
private bool enableDxvaDecoding;
-
- /// <summary>
- /// The disable quick sync decoding.
- /// </summary>
private bool disableQuickSyncDecoding;
-
- /// <summary>
- /// The is cl scaling.
- /// </summary>
private bool isClScaling;
+ private bool showQueueInline;
#endregion
@@ -509,6 +319,26 @@ namespace HandBrakeWPF.ViewModels }
}
+ /// <summary>
+ /// Gets or sets a value indicating whether show queue inline.
+ /// </summary>
+ public bool ShowQueueInline
+ {
+ get
+ {
+ return this.showQueueInline;
+ }
+ set
+ {
+ if (value == this.showQueueInline)
+ {
+ return;
+ }
+ this.showQueueInline = value;
+ this.NotifyOfPropertyChange(() => this.ShowQueueInline);
+ }
+ }
+
#endregion
#region Output Files
@@ -1310,6 +1140,7 @@ namespace HandBrakeWPF.ViewModels this.SendFileToPath = this.userSettingService.GetUserSetting<string>(UserSettingConstants.SendFileTo) ?? string.Empty;
this.Arguments = this.userSettingService.GetUserSetting<string>(UserSettingConstants.SendFileToArgs) ?? string.Empty;
this.ResetWhenDoneAction = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ResetWhenDoneAction);
+ this.ShowQueueInline = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowQueueInline);
// #############################
// Output Settings
@@ -1436,6 +1267,7 @@ namespace HandBrakeWPF.ViewModels this.userSettingService.SetUserSetting(UserSettingConstants.SendFile, this.SendFileAfterEncode);
this.userSettingService.SetUserSetting(UserSettingConstants.SendFileToArgs, this.Arguments);
this.userSettingService.SetUserSetting(UserSettingConstants.ResetWhenDoneAction, this.ResetWhenDoneAction);
+ this.userSettingService.SetUserSetting(UserSettingConstants.ShowQueueInline, this.ShowQueueInline);
/* Output Files */
this.userSettingService.SetUserSetting(UserSettingConstants.AutoNaming, this.AutomaticallyNameFiles);
diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs index 324d9efe2..18bb49284 100644 --- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs @@ -39,39 +39,12 @@ namespace HandBrakeWPF.ViewModels {
#region Constants and Fields
- /// <summary>
- /// The Error Service Backing field
- /// </summary>
private readonly IErrorService errorService;
-
- /// <summary>
- /// The User Setting Service Backing Field.
- /// </summary>
private readonly IUserSettingService userSettingService;
-
- /// <summary>
- /// Queue Processor Backing field
- /// </summary>
private readonly IQueueProcessor queueProcessor;
-
- /// <summary>
- /// IsEncoding Backing field
- /// </summary>
private bool isEncoding;
-
- /// <summary>
- /// Job Status Backing field.
- /// </summary>
private string jobStatus;
-
- /// <summary>
- /// Jobs pending backing field
- /// </summary>
private string jobsPending;
-
- /// <summary>
- /// Backing field for the when done action description
- /// </summary>
private string whenDoneAction;
#endregion
@@ -99,6 +72,7 @@ namespace HandBrakeWPF.ViewModels this.JobsPending = Resources.QueueViewModel_NoEncodesPending;
this.JobStatus = Resources.QueueViewModel_NoJobsPending;
this.SelectedItems = new BindingList<QueueTask>();
+ this.DisplayName = "Queue";
}
#endregion
@@ -186,7 +160,12 @@ namespace HandBrakeWPF.ViewModels /// <summary>
/// Gets or sets the selected items.
/// </summary>
- public BindingList<QueueTask> SelectedItems { get; set; }
+ public BindingList<QueueTask> SelectedItems { get; set; }
+
+ /// <summary>
+ /// Display the current job status information.
+ /// </summary>
+ public bool DisplayJobStatusInfo { get; set; } = false;
#endregion
@@ -408,6 +387,16 @@ namespace HandBrakeWPF.ViewModels mvm.EditQueueJob(new EncodeTask(task.Task));
}
+ /// <summary>
+ /// Activate this window in the correct mode
+ /// </summary>
+ /// <param name="isInline">Indicdates if this panel is displayed in-line with the main view.</param>
+ public void Activate(bool isInline)
+ {
+ this.DisplayJobStatusInfo = !isInline;
+ this.NotifyOfPropertyChange(() => this.DisplayJobStatusInfo);
+ }
+
#endregion
#region Methods
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml index da7c7d0cc..9cdbfb626 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml @@ -484,11 +484,12 @@ <!-- Tab Control -->
<TabControl Name="tabControl"
- Grid.Row="3"
+ Grid.Row="4"
Margin="10,10,5,5"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
MinHeight="350" MinWidth="720"
+ Visibility="{Binding IsQueueShowingInLine, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}"
>
<TabItem Name="pictureTab" Header="{x:Static Properties:ResourcesUI.MainView_PictureTab}">
<ContentControl x:Name="PictureSettingsViewModel" />
@@ -513,6 +514,18 @@ </TabItem>
</TabControl>
+ <!-- Queue in-line display if enabled -->
+ <Grid Grid.Row="3" Margin="10,10,5,5" Visibility="{Binding IsQueueShowingInLine, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}"
+ HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="*" />
+ </Grid.RowDefinitions>
+ <Label Content="Queue" FontWeight="Bold" Grid.Row="0"/>
+ <ContentControl x:Name="QueueViewModel" Grid.Row="1" />
+ </Grid>
+
+
<!-- Presets -->
<GroupBox Grid.RowSpan="4"
Grid.Column="1"
diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml b/win/CS/HandBrakeWPF/Views/OptionsView.xaml index d8c6ee802..1cde94b01 100644 --- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml +++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml @@ -148,6 +148,7 @@ <CheckBox Content="{x:Static Properties:ResourcesUI.Options_MinimiseTray}" IsChecked="{Binding MinimiseToTray}" />
<CheckBox Content="{x:Static Properties:ResourcesUI.Options_ClearCompleted}" IsChecked="{Binding ClearQueueOnEncodeCompleted}" />
<CheckBox Content="{x:Static Properties:ResourcesUI.Options_AdvancedTab}" IsChecked="{Binding ShowAdvancedTab}" />
+ <CheckBox Content="{x:Static Properties:ResourcesUI.Options_ShowQueueInline}" IsChecked="{Binding ShowQueueInline}" />
</StackPanel>
</StackPanel>
</StackPanel>
diff --git a/win/CS/HandBrakeWPF/Views/QueueView.xaml b/win/CS/HandBrakeWPF/Views/QueueView.xaml index 9a7460015..13df0e626 100644 --- a/win/CS/HandBrakeWPF/Views/QueueView.xaml +++ b/win/CS/HandBrakeWPF/Views/QueueView.xaml @@ -1,4 +1,4 @@ -<Window x:Class="HandBrakeWPF.Views.QueueView"
+<UserControl x:Class="HandBrakeWPF.Views.QueueView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:cal="http://www.caliburnproject.org"
@@ -14,16 +14,13 @@ xmlns:commands="clr-namespace:HandBrakeWPF.Commands"
xmlns:helpers="clr-namespace:HandBrakeWPF.Helpers"
xmlns:Properties="clr-namespace:HandBrakeWPF.Properties"
- Title="{Binding Title}"
- Width="700"
- Height="500"
+
MinWidth="350"
MinHeight="250"
- WindowStartupLocation="CenterScreen"
TextOptions.TextFormattingMode="Display"
mc:Ignorable="d">
- <Window.Resources>
+ <UserControl.Resources>
<Converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
<Converters:FullPathToFileNameConverter x:Key="filePathToFilenameConverter" />
<Converters:EnumComboConverter x:Key="enumComboConverter" />
@@ -33,13 +30,11 @@ <video:EncoderOptionsTooltipConverter x:Key="encoderOptionsTooltipConverter" />
<video:VideoOptionsTooltipConverter x:Key="videoOptionsTooltipConverter" />
-
-
<Style x:Key="LongToolTipHolder" TargetType="FrameworkElement">
<Setter Property="ToolTipService.ShowDuration" Value="10000" />
</Style>
- </Window.Resources>
+ </UserControl.Resources>
<Grid>
@@ -181,13 +176,13 @@ </DockPanel>
</ToolBar>
- <StackPanel Grid.Row="1" Margin="10,20,10,20">
+ <StackPanel Grid.Row="1" Margin="10,20,10,0" Visibility="{Binding DisplayJobStatusInfo, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}">
<TextBlock Text="{Binding JobsPending}" />
<TextBlock Text="{Binding JobStatus}" />
</StackPanel>
<ListBox Grid.Row="2"
- Margin="10,0,10,10"
+ Margin="10,20,10,10"
dd:DragDrop.DropHandler="{Binding}"
dd:DragDrop.IsDragSource="True"
dd:DragDrop.IsDropTarget="True"
@@ -420,4 +415,4 @@ </Grid>
-</Window>
+</UserControl>
diff --git a/win/CS/HandBrakeWPF/Views/QueueView.xaml.cs b/win/CS/HandBrakeWPF/Views/QueueView.xaml.cs index ea01a20fb..e69dabe77 100644 --- a/win/CS/HandBrakeWPF/Views/QueueView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/QueueView.xaml.cs @@ -10,11 +10,12 @@ namespace HandBrakeWPF.Views
{
using System.Windows;
+ using System.Windows.Controls;
/// <summary>
/// Interaction logic for VideoView
/// </summary>
- public partial class QueueView : Window
+ public partial class QueueView : UserControl
{
/// <summary>
/// Initializes a new instance of the <see cref="QueueView"/> class.
diff --git a/win/CS/HandBrakeWPF/defaultsettings.xml b/win/CS/HandBrakeWPF/defaultsettings.xml index b50cf7e91..224923acf 100644 --- a/win/CS/HandBrakeWPF/defaultsettings.xml +++ b/win/CS/HandBrakeWPF/defaultsettings.xml @@ -448,4 +448,12 @@ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">false</anyType>
</value>
</item>
+ <item>
+ <key>
+ <string>ShowQueueInline</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">false</anyType>
+ </value>
+ </item>
</dictionary>
\ No newline at end of file |