/// </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
}\r
}\r
\r
+ /// <summary>\r
+ /// Gets or sets the Program Status Toolbar Label\r
+ /// This indicates the status of HandBrake\r
+ /// </summary>\r
+ public string ProgramStatusLabel\r
+ {\r
+ get\r
+ {\r
+ return string.IsNullOrEmpty(this.programStatusLabel) ? "Ready" : this.programStatusLabel;\r
+ }\r
+\r
+ set\r
+ {\r
+ if (!Equals(this.statusLabel, value))\r
+ {\r
+ this.programStatusLabel = value;\r
+ this.NotifyOfPropertyChange(() => this.ProgramStatusLabel);\r
+ }\r
+ }\r
+ }\r
+\r
/// <summary>\r
/// Gets or sets the Program Status Toolbar Label\r
/// This indicates the status of HandBrake\r
\r
if (!this.IsEncoding)\r
{\r
- this.StatusLabel = string.Format("{0} Encodes Pending", this.queueProcessor.QueueManager.Count);\r
+ this.ProgramStatusLabel = string.Format("{0} Encodes Pending", this.queueProcessor.QueueManager.Count);\r
}\r
}\r
\r
this.StatusLabel = "Scanning source, please wait...";\r
this.ShowStatusWindow = true;\r
});\r
- // TODO - Disable relevant parts of the UI.\r
}\r
\r
/// <summary>\r
Execute.OnUIThread(\r
() =>\r
{\r
- this.StatusLabel =\r
+ this.ProgramStatusLabel =\r
string.Format(\r
"{0:00.00}%, FPS: {1:000.0}, Avg FPS: {2:000.0}, Time Remaining: {3}, Elapsed: {4:hh\\:mm\\:ss}, Pending Jobs {5}",\r
e.PercentComplete,\r
Execute.OnUIThread(\r
() =>\r
{\r
- this.StatusLabel = "Preparing to encode ...";\r
+ this.ProgramStatusLabel = "Preparing to encode ...";\r
this.IsEncoding = true;\r
});\r
\r
Execute.OnUIThread(\r
() =>\r
{\r
- this.StatusLabel = "Queue Finished";\r
+ this.ProgramStatusLabel = "Queue Finished";\r
this.IsEncoding = false;\r
});\r
\r
this.SelectedLangaugesToMove = new BindingList<string>();\r
\r
IDictionary<string, string> langList = LanguageUtilities.MapLanguages();\r
+ langList = (from entry in langList orderby entry.Key ascending select entry).ToDictionary(pair => pair.Key, pair => pair.Value);\r
\r
this.selectedLangauges.Clear();\r
foreach (string selectedItem in this.userSettingService.GetUserSetting<StringCollection>(UserSettingConstants.SelectedLanguages))\r
/// </summary>\r
public void LanguageMoveLeft()\r
{\r
- if (this.SelectedLangauges.Count > 0)\r
+ if (this.SelectedAvailableToMove.Count > 0)\r
{\r
List<string> copiedList = SelectedAvailableToMove.ToList();\r
foreach (string item in copiedList)\r
this.AvailableLanguages.Add(item);\r
}\r
}\r
+\r
+ this.AvailableLanguages = new BindingList<string>(this.AvailableLanguages.OrderBy(o => o).ToList());\r
}\r
\r
/// <summary>\r
this.SelectedLangauges.Clear();\r
}\r
\r
- /// <summary>\r
- /// Audio List Language Move UP\r
- /// </summary>\r
- public void LanguageMoveUp()\r
- {\r
- List<string> langauges = this.SelectedLangauges.ToList();\r
- foreach (string item in langauges)\r
- {\r
- if (this.SelectedLangaugesToMove.Contains(item))\r
- {\r
- int index = this.SelectedLangauges.IndexOf(item);\r
- if (index != 0)\r
- {\r
- this.SelectedLangauges.Remove(item);\r
- this.SelectedLangauges.Insert(index - 1, item);\r
- }\r
- }\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Audio List Language Move Down\r
- /// </summary>\r
- public void LanguageMoveDown()\r
- {\r
- List<string> langauges = this.SelectedLangauges.ToList();\r
- int count = this.SelectedLangauges.Count;\r
- foreach (string item in langauges)\r
- {\r
- if (this.SelectedLangaugesToMove.Contains(item))\r
- {\r
- int index = this.SelectedLangauges.IndexOf(item);\r
- if ((index + 1) != count)\r
- {\r
- this.SelectedLangauges.Remove(item);\r
- this.SelectedLangauges.Insert(index + 1, item);\r
- }\r
- }\r
- }\r
- }\r
-\r
/// <summary>\r
/// Browse - Log Path\r
/// </summary>\r
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"\r
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:cal="http://www.caliburnproject.org"\r
xmlns:Helpers="clr-namespace:HandBrakeWPF.Helpers"\r
- xmlns:Options="clr-namespace:HandBrakeWPF.Converters.Options" Background="White">\r
+ xmlns:Options="clr-namespace:HandBrakeWPF.Converters.Options"\r
+ xmlns:dd="clr-namespace:GongSolutions.Wpf.DragDrop;assembly=GongSolutions.Wpf.DragDrop"\r
+ Background="White">\r
\r
<UserControl.Resources>\r
<Style TargetType="Button">\r
- <Setter Property="Foreground" Value="DarkOrange" />\r
<Setter Property="FontWeight" Value="Bold" />\r
<Setter Property="Padding" Value="5,0.5" />\r
<Setter Property="FontSize" Value="11.5" />\r
<Border BorderThickness="0 0 0 1" BorderBrush="LightGray" Margin="0,0,0,10">\r
<TextBlock Text="Preferences" FontSize="16" />\r
</Border>\r
- \r
+\r
<ListBox ItemsSource="{Binding OptionTabs}" SelectedItem="{Binding SelectedTab}"\r
BorderThickness="0" Background="Transparent">\r
</ListBox>\r
- \r
+\r
</StackPanel>\r
\r
<ScrollViewer Grid.Column="1">\r
<TextBox Name="vlcPath" Text="{Binding VLCPath}" Width="250" />\r
<Button Content="Browse" cal:Message.Attach="[Event Click] = [Action BrowseVlcPath]" Margin="5,0,0,0" Width="55"/>\r
</StackPanel>\r
- <TextBlock Text="This path is used for the video preview feature only." />\r
+ <TextBlock Margin="30,0,0,0" Text="This path is used for the video preview feature only." />\r
\r
</StackPanel>\r
</StackPanel>\r
<Border BorderThickness="0 0 0 1" BorderBrush="LightGray">\r
<TextBlock Text="Automatic Language Selection" FontSize="16" />\r
</Border>\r
- \r
+\r
<TextBlock Text="Audio and Subtitle Language Selection" Grid.Column="0" Margin="10,10,0,0" FontSize="14"/>\r
\r
<Grid Margin="20,10,0,0" >\r
<ColumnDefinition Width="*" />\r
<ColumnDefinition Width="*" />\r
<ColumnDefinition Width="*" />\r
- <ColumnDefinition Width="*" />\r
</Grid.ColumnDefinitions>\r
\r
<StackPanel Orientation="Vertical" Grid.Column="0">\r
<StackPanel Orientation="Vertical" Grid.Column="2">\r
<TextBlock Text="Selected Langauges" Margin="0,0,0,5"/>\r
<ListBox Name="selectedLangauges" ItemsSource="{Binding SelectedLangauges}" Helpers:ListBoxHelper.SelectedItems="{Binding SelectedLangaugesToMove}" \r
- SelectionMode="Extended" Width="140" Height="140" />\r
+ SelectionMode="Extended" Width="140" Height="140"\r
+ dd:DragDrop.DropHandler="{Binding}"\r
+ dd:DragDrop.IsDragSource="True"\r
+ dd:DragDrop.IsDropTarget="True"/>\r
</StackPanel>\r
-\r
- <DockPanel Grid.Column="3" Margin="10,0,10,0">\r
- <StackPanel Orientation="Vertical" VerticalAlignment="Center">\r
- <Button VerticalAlignment="Center" Margin="0,0,0,5" cal:Message.Attach="[Event Click] = [Action LanguageMoveUp]" >\r
- <Image Source="Images/arrow_up.png" Width="16" Height="16" />\r
- </Button>\r
- <Button VerticalAlignment="Center" Margin="0,0,0,5" cal:Message.Attach="[Event Click] = [Action LanguageMoveDown]" >\r
- <Image Source="Images/arrow_down.png" Width="16" Height="16" />\r
- </Button>\r
- </StackPanel>\r
- </DockPanel>\r
-\r
</Grid>\r
</StackPanel>\r
</Grid>\r
\r
<StackPanel Name="Advanced" Orientation="Vertical" Margin="10,10,0,0"\r
Visibility="{Binding SelectedTab, Converter={StaticResource tabConverter}, ConverterParameter='Advanced'}">\r
- \r
+\r
<Border BorderThickness="0 0 0 1" BorderBrush="LightGray">\r
<TextBlock Text="Advanced" FontSize="16" />\r
</Border>\r
<StackPanel Orientation="Vertical" Margin="0,10,0,20">\r
\r
<TextBlock Text="Advanced Options" Grid.Column="0" FontSize="14" Margin="0,0,0,10"/>\r
- \r
+\r
<StackPanel Orientation="Vertical" Grid.Column="1" Margin="20,0,0,0">\r
<CheckBox Content="Prevent the system from sleeping while encoding" IsChecked="{Binding PreventSleep}" />\r
<CheckBox Content="Minimize to system tray (Requires Restart)" Visibility="Collapsed" IsChecked="{Binding MinimiseToTray}" />\r
<TextBox Name="MinTitleLength" Text="{Binding MinLength}" Width="120"/>\r
<!-- Find a control for this-->\r
</StackPanel>\r
- <StackPanel Orientation="Horizontal" Grid.Column="1">\r
- <TextBlock Text="Priority Level:" VerticalAlignment="Center" />\r
+ <StackPanel Orientation="Horizontal" Margin="0,5,0,0">\r
+ <TextBlock Text="Priority Level:" Width="250" VerticalAlignment="Center" />\r
<ComboBox Name="processPriorityLevel" ItemsSource="{Binding PriorityLevelOptions}" SelectedItem="{Binding SelectedPriority}" Width="120" />\r
</StackPanel>\r
\r
\r
<StackPanel Orientation="Vertical" Grid.Column="1" Margin="20,0,0,0">\r
<StackPanel Orientation="Horizontal" Grid.Column="1">\r
- <TextBlock Text="Log Verbosity Level:" VerticalAlignment="Center" />\r
+ <TextBlock Text="Log Verbosity Level:" Width="250" VerticalAlignment="Center" />\r
<ComboBox Name="logVerbosityLevel" ItemsSource="{Binding LogVerbosityOptions}" SelectedItem="{Binding SelectedVerbosity}" Width="120" />\r
</StackPanel>\r
\r
- <CheckBox Content="Put a copy of individual encode logs in the same location as the encoded video" IsChecked="{Binding CopyLogToEncodeDirectory}" />\r
- <CheckBox Content="Put a copy of individual encode logs in a specified location: " IsChecked="{Binding CopyLogToSepcficedLocation}" />\r
+ <CheckBox Content="Put a copy of individual encode logs in the same location as the encoded video" Margin="0,5,0,0" IsChecked="{Binding CopyLogToEncodeDirectory}" />\r
+ <CheckBox Content="Put a copy of individual encode logs in a specified location: " Margin="0,5,0,0" IsChecked="{Binding CopyLogToSepcficedLocation}" />\r
<StackPanel Orientation="Horizontal" Margin="0,10,0,0" Grid.Column="1">\r
<TextBlock Text="Log Path:" VerticalAlignment="Center" />\r
<TextBox Width="120" Text="{Binding LogDirectory}" />\r