Initial commit to allow the Queue Window to be embedded in the main window. Still...
authorScott <sr55.hb@outlook.com>
Fri, 9 Oct 2015 21:22:28 +0000 (22:22 +0100)
committerScott <sr55.hb@outlook.com>
Sat, 24 Oct 2015 18:50:57 +0000 (19:50 +0100)
12 files changed:
win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs
win/CS/HandBrakeWPF/Properties/ResourcesUI.resx
win/CS/HandBrakeWPF/UserSettingConstants.cs
win/CS/HandBrakeWPF/ViewModels/Interfaces/IQueueViewModel.cs
win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
win/CS/HandBrakeWPF/Views/MainView.xaml
win/CS/HandBrakeWPF/Views/OptionsView.xaml
win/CS/HandBrakeWPF/Views/QueueView.xaml
win/CS/HandBrakeWPF/Views/QueueView.xaml.cs
win/CS/HandBrakeWPF/defaultsettings.xml

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