diff options
Diffstat (limited to 'win/CS/HandBrakeWPF/Views')
19 files changed, 322 insertions, 542 deletions
diff --git a/win/CS/HandBrakeWPF/Views/Controls/AdvancedView.xaml b/win/CS/HandBrakeWPF/Views/AdvancedView.xaml index 0eeaff7e8..ce91077ba 100644 --- a/win/CS/HandBrakeWPF/Views/Controls/AdvancedView.xaml +++ b/win/CS/HandBrakeWPF/Views/AdvancedView.xaml @@ -1,4 +1,4 @@ -<UserControl x:Class="HandBrakeWPF.Views.Controls.AdvancedView"
+<UserControl x:Class="HandBrakeWPF.Views.AdvancedView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@@ -15,7 +15,7 @@ <TextBlock Text="Advanced" FontWeight="Bold" Margin="10,5,0,0" Grid.Row="0" ></TextBlock>
- <TextBox Grid.Row="2" Margin="10" Text="{Binding Query, RelativeSource={RelativeSource AncestorType=UserControl}}"
+ <TextBox Grid.Row="2" Margin="10" Text="{Binding Query}"
VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />
</Grid>
diff --git a/win/CS/HandBrakeWPF/Views/Controls/AdvancedView.xaml.cs b/win/CS/HandBrakeWPF/Views/AdvancedView.xaml.cs index f00d972bb..a47bf3efd 100644 --- a/win/CS/HandBrakeWPF/Views/Controls/AdvancedView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/AdvancedView.xaml.cs @@ -7,9 +7,8 @@ // </summary>
// --------------------------------------------------------------------------------------------------------------------
-namespace HandBrakeWPF.Views.Controls
+namespace HandBrakeWPF.Views
{
- using System.Windows;
using System.Windows.Controls;
/// <summary>
@@ -24,26 +23,5 @@ namespace HandBrakeWPF.Views.Controls {
InitializeComponent();
}
-
- /// <summary>
- /// The "Query" Dependancy Property
- /// </summary>
- public static readonly DependencyProperty QueryProperty = DependencyProperty.Register("Query", typeof(string), typeof(AdvancedView));
-
- /// <summary>
- /// Gets or sets State.
- /// </summary>
- public string Query
- {
- get
- {
- return (string)this.GetValue(QueryProperty);
- }
-
- set
- {
- this.SetValue(QueryProperty, value);
- }
- }
}
}
diff --git a/win/CS/HandBrakeWPF/Views/Controls/AudioView.xaml b/win/CS/HandBrakeWPF/Views/AudioView.xaml index 161546a41..84616338b 100644 --- a/win/CS/HandBrakeWPF/Views/Controls/AudioView.xaml +++ b/win/CS/HandBrakeWPF/Views/AudioView.xaml @@ -1,4 +1,4 @@ -<UserControl x:Class="HandBrakeWPF.Views.Controls.AudioView"
+<UserControl x:Class="HandBrakeWPF.Views.AudioView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@@ -21,11 +21,11 @@ <ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
- <Button Content="Add Track" Click="Add" Grid.Column="0" Width="75" Margin="0,0,10,0" />
- <Button Content="Remove" Click="Remove" Grid.Column="1" Width="75" />
+ <Button Content="Add Track" cal:Message.Attach="[Event Click] = [Action Add]" Grid.Column="0" Width="75" Margin="0,0,10,0" />
+ <Button Content="Remove" cal:Message.Attach="[Event Click] = [Action Remove]" Grid.Column="1" Width="75" />
</Grid>
- <ListBox Grid.Row="2" ItemsSource="{Binding AudioTracks, RelativeSource={RelativeSource AncestorType=UserControl}}"
+ <ListBox Grid.Row="2" ItemsSource="{Binding AudioTracks}"
SelectionMode="Extended" Background="LightGray" Margin="10,10,10,10">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
@@ -44,7 +44,7 @@ </Grid.ColumnDefinitions>
<!-- Marker -->
- <Image Source="../Images/Movies.png" Width="16" Height="16" Grid.Column="0" Margin="10,0,10,0" />
+ <Image Source="Images/Movies.png" Width="16" Height="16" Grid.Column="0" Margin="10,0,10,0" />
<!-- Settings -->
<Grid Grid.Column="1" HorizontalAlignment="Stretch">
@@ -89,7 +89,7 @@ </Grid>
<!-- Delete -->
- <Image Source="../Images/delete.png" Width="16" Height="16" Grid.Column="2" Margin="10,0,10,0">
+ <Image Source="Images/delete.png" Width="16" Height="16" Grid.Column="2" Margin="10,0,10,0">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseDown">
<cal:ActionMessage MethodName="RemoveJob">
diff --git a/win/CS/HandBrakeWPF/Views/AudioView.xaml.cs b/win/CS/HandBrakeWPF/Views/AudioView.xaml.cs new file mode 100644 index 000000000..0dc1dc9b8 --- /dev/null +++ b/win/CS/HandBrakeWPF/Views/AudioView.xaml.cs @@ -0,0 +1,27 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="AudioView.xaml.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Interaction logic for AudioView.xaml
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Views
+{
+ using System.Windows.Controls;
+
+ /// <summary>
+ /// Interaction logic for AudioView.xaml
+ /// </summary>
+ public partial class AudioView : UserControl
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="AudioView"/> class.
+ /// </summary>
+ public AudioView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/win/CS/HandBrakeWPF/Views/Controls/ChaptersView.xaml b/win/CS/HandBrakeWPF/Views/ChaptersView.xaml index 1f905065d..9166dcf80 100644 --- a/win/CS/HandBrakeWPF/Views/Controls/ChaptersView.xaml +++ b/win/CS/HandBrakeWPF/Views/ChaptersView.xaml @@ -1,8 +1,8 @@ -<UserControl x:Class="HandBrakeWPF.Views.Controls.ChaptersView"
+<UserControl x:Class="HandBrakeWPF.Views.ChaptersView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:cal="http://www.caliburnproject.org"
mc:Ignorable="d" >
<Grid>
<Grid.RowDefinitions>
@@ -20,12 +20,12 @@ <ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
- <CheckBox Content="Create chapter markers" IsChecked="{Binding IncludeChapterMarkers, RelativeSource={RelativeSource AncestorType=UserControl}}" Grid.Column="0" VerticalAlignment="Center" />
- <Button Content="Import" Name="import" Grid.Column="2" Width="75" Margin="0,0,10,0" Click="Import_Click" />
- <Button Content="Export" Name="export" Grid.Column="3" Width="75" Click="Export_Click" />
+ <CheckBox Content="Create chapter markers" IsChecked="{Binding IncludeChapterMarkers}" Grid.Column="0" VerticalAlignment="Center" />
+ <Button Content="Import" Name="import" Grid.Column="2" Width="75" Margin="0,0,10,0" cal:Message.Attach="[Event Click] = [Action Import]" />
+ <Button Content="Export" Name="export" Grid.Column="3" Width="75" cal:Message.Attach="[Event Click] = [Action Export]" />
</Grid>
- <DataGrid Grid.Row="2" Margin="10" ItemsSource="{Binding Chapters, RelativeSource={RelativeSource AncestorType=UserControl}}"
+ <DataGrid Grid.Row="2" Margin="10" ItemsSource="{Binding Chapters}"
VerticalAlignment="Stretch" HorizontalAlignment="Stretch" AutoGenerateColumns="False"
CanUserSortColumns="False" CanUserReorderColumns="False" CanUserResizeColumns="False" CanUserResizeRows="False">
<DataGrid.Columns>
diff --git a/win/CS/HandBrakeWPF/Views/ChaptersView.xaml.cs b/win/CS/HandBrakeWPF/Views/ChaptersView.xaml.cs new file mode 100644 index 000000000..c53e4cbe5 --- /dev/null +++ b/win/CS/HandBrakeWPF/Views/ChaptersView.xaml.cs @@ -0,0 +1,27 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="ChaptersView.xaml.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Interaction logic for ChaptersView.xaml
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Views
+{
+ using System.Windows.Controls;
+
+ /// <summary>
+ /// Interaction logic for ChaptersView.xaml
+ /// </summary>
+ public partial class ChaptersView : UserControl
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ChaptersView"/> class.
+ /// </summary>
+ public ChaptersView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/win/CS/HandBrakeWPF/Views/Controls/AudioView.xaml.cs b/win/CS/HandBrakeWPF/Views/Controls/AudioView.xaml.cs deleted file mode 100644 index 417a1226c..000000000 --- a/win/CS/HandBrakeWPF/Views/Controls/AudioView.xaml.cs +++ /dev/null @@ -1,75 +0,0 @@ -// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="AudioView.xaml.cs" company="HandBrake Project (http://handbrake.fr)">
-// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
-// </copyright>
-// <summary>
-// Interaction logic for AudioView.xaml
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
-
-namespace HandBrakeWPF.Views.Controls
-{
- using System;
- using System.Collections.ObjectModel;
- using System.Windows;
- using System.Windows.Controls;
-
- using HandBrake.ApplicationServices.Model.Encoding;
-
- /// <summary>
- /// Interaction logic for AudioView.xaml
- /// </summary>
- public partial class AudioView : UserControl
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="AudioView"/> class.
- /// </summary>
- public AudioView()
- {
- InitializeComponent();
- }
-
- /// <summary>
- /// The "Query" Dependancy Property
- /// </summary>
- public static readonly DependencyProperty AudioTracksProperty = DependencyProperty.Register("AudioTracks", typeof(ObservableCollection<AudioTrack>), typeof(AudioView));
-
- /// <summary>
- /// Gets or sets State.
- /// </summary>
- public ObservableCollection<AudioTrack> AudioTracks
- {
- get { return (ObservableCollection<AudioTrack>)this.GetValue(AudioTracksProperty); }
- set { this.SetValue(AudioTracksProperty, value); }
- }
-
-
- /// <summary>
- /// Add a new Track
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- public void Add(object sender, RoutedEventArgs e)
- {
- this.AudioTracks.Add(new AudioTrack());
- }
-
- /// <summary>
- /// Remove a Track
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- public void Remove(object sender, RoutedEventArgs e)
- {
- throw new NotImplementedException();
- }
- }
-}
diff --git a/win/CS/HandBrakeWPF/Views/Controls/ChaptersView.xaml.cs b/win/CS/HandBrakeWPF/Views/Controls/ChaptersView.xaml.cs deleted file mode 100644 index 247378875..000000000 --- a/win/CS/HandBrakeWPF/Views/Controls/ChaptersView.xaml.cs +++ /dev/null @@ -1,197 +0,0 @@ -// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="ChaptersView.xaml.cs" company="HandBrake Project (http://handbrake.fr)">
-// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
-// </copyright>
-// <summary>
-// Interaction logic for ChaptersView.xaml
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
-
-namespace HandBrakeWPF.Views.Controls
-{
- using System;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using System.IO;
- using System.Windows;
- using System.Windows.Controls;
-
- using HandBrake.ApplicationServices.Exceptions;
- using HandBrake.ApplicationServices.Model.Encoding;
- using HandBrake.ApplicationServices.Parsing;
-
- using Ookii.Dialogs.Wpf;
-
- /// <summary>
- /// Interaction logic for ChaptersView.xaml
- /// </summary>
- public partial class ChaptersView : UserControl
- {
- /// <summary>
- /// Gets or sets SourceChapterList.
- /// </summary>
- private ObservableCollection<Chapter> SourceChapterList { get; set; }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="ChaptersView"/> class.
- /// </summary>
- public ChaptersView()
- {
- InitializeComponent();
- this.SourceChapterList = new ObservableCollection<Chapter>();
- }
-
- /// <summary>
- /// The "Chapters" Dependancy Property
- /// </summary>
- public static readonly DependencyProperty ChaptersProperty = DependencyProperty.Register("Chapters", typeof(ObservableCollection<ChapterMarker>), typeof(ChaptersView));
-
- /// <summary>
- /// The "EnableChapterMarkers" Dependancy Property
- /// </summary>
- public static readonly DependencyProperty IncludeChaptersProperty = DependencyProperty.Register("IncludeChapterMarkers", typeof(bool), typeof(ChaptersView));
-
- /// <summary>
- /// Gets or sets State.
- /// </summary>
- public ObservableCollection<ChapterMarker> Chapters
- {
- get { return (ObservableCollection<ChapterMarker>)this.GetValue(ChaptersProperty); }
- set { this.SetValue(ChaptersProperty, value); }
- }
-
- /// <summary>
- /// Gets or sets a value indicating whether chapter markers are enabled.
- /// </summary>
- public bool IncludeChapterMarkers
- {
- get { return (bool)this.GetValue(IncludeChaptersProperty); }
- set { this.SetValue(IncludeChaptersProperty, value); }
- }
-
- /// <summary>
- /// Set the Source Chapters List
- /// </summary>
- /// <param name="sourceChapters">
- /// The source chapters.
- /// </param>
- public void SetSourceChapters(IEnumerable<Chapter> sourceChapters)
- {
- // Cache the chapters in this screen
- this.SourceChapterList = new ObservableCollection<Chapter>(sourceChapters);
- this.Chapters.Clear();
-
- // Then Add new Chapter Markers.
- foreach (Chapter chapter in SourceChapterList)
- {
- ChapterMarker marker = new ChapterMarker(chapter.ChapterNumber, chapter.ChapterName);
- this.Chapters.Add(marker);
- }
- }
-
- /// <summary>
- /// Export the Chapter Markers to a CSV file
- /// </summary>
- /// <param name="filename">
- /// The filename.
- /// </param>
- /// <exception cref="GeneralApplicationException">
- /// Thrown when exporting fails.
- /// </exception>
- public void ExportChaptersToCSV(string filename)
- {
- try
- {
- string csv = string.Empty;
-
- foreach (ChapterMarker row in this.Chapters)
- {
- csv += row.ChapterNumber.ToString();
- csv += ",";
- csv += row.ChapterName.Replace(",", "\\,");
- csv += Environment.NewLine;
- }
- StreamWriter file = new StreamWriter(filename);
- file.Write(csv);
- file.Close();
- file.Dispose();
- }
- catch (Exception exc)
- {
- throw new GeneralApplicationException("Unable to save Chapter Makrers file! ", "Chapter marker names will NOT be saved in your encode.", exc);
- }
- }
-
- /// <summary>
- /// Import a CSV file
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The RoutedEventArgs.
- /// </param>
- private void Import_Click(object sender, RoutedEventArgs e)
- {
- VistaOpenFileDialog dialog = new VistaOpenFileDialog { Filter = "CSV files (*.csv)|*.csv", CheckFileExists = true };
- dialog.ShowDialog();
- string filename = dialog.FileName;
-
- if (string.IsNullOrEmpty(filename))
- {
- return;
- }
-
- IDictionary<int, string> chapterMap = new Dictionary<int, string>();
- try
- {
- StreamReader sr = new StreamReader(filename);
- string csv = sr.ReadLine();
- while (csv != null)
- {
- if (csv.Trim() != string.Empty)
- {
- csv = csv.Replace("\\,", "<!comma!>");
- string[] contents = csv.Split(',');
- int chapter;
- int.TryParse(contents[0], out chapter);
- chapterMap.Add(chapter, contents[1].Replace("<!comma!>", ","));
- }
- csv = sr.ReadLine();
- }
- }
- catch (Exception)
- {
- // Do Nothing
- }
-
- // Now iterate over each chatper we have, and set it's name
- foreach (ChapterMarker item in Chapters)
- {
- string chapterName;
- chapterMap.TryGetValue(item.ChapterNumber, out chapterName);
- item.ChapterName = chapterName;
- // TODO force a fresh of this property
- }
- }
-
- /// <summary>
- /// Export a CSV file.
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The RoutedEventArgs.
- /// </param>
- private void Export_Click(object sender, RoutedEventArgs e)
- {
- VistaSaveFileDialog saveFileDialog = new VistaSaveFileDialog { Filter = "Csv File|*.csv", DefaultExt = "csv", CheckPathExists = true };
- saveFileDialog.ShowDialog();
- if (!string.IsNullOrEmpty(saveFileDialog.FileName))
- {
- this.ExportChaptersToCSV(saveFileDialog.FileName);
- }
- }
- }
-}
diff --git a/win/CS/HandBrakeWPF/Views/Controls/PictureSettingsView.xaml.cs b/win/CS/HandBrakeWPF/Views/Controls/PictureSettingsView.xaml.cs deleted file mode 100644 index c86e0f8e0..000000000 --- a/win/CS/HandBrakeWPF/Views/Controls/PictureSettingsView.xaml.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace HandBrakeWPF.Views.Controls
-{
- using System.Windows.Controls;
-
- /// <summary>
- /// Interaction logic for PictureSettingsView.xaml
- /// </summary>
- public partial class PictureSettingsView : UserControl
- {
- public PictureSettingsView()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/win/CS/HandBrakeWPF/Views/Controls/SubtitlesView.xaml.cs b/win/CS/HandBrakeWPF/Views/Controls/SubtitlesView.xaml.cs deleted file mode 100644 index 44922c1a6..000000000 --- a/win/CS/HandBrakeWPF/Views/Controls/SubtitlesView.xaml.cs +++ /dev/null @@ -1,88 +0,0 @@ -// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="SubtitlesView.xaml.cs" company="HandBrake Project (http://handbrake.fr)">
-// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
-// </copyright>
-// <summary>
-// Interaction logic for SubtitlesView.xaml
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
-
-namespace HandBrakeWPF.Views.Controls
-{
- using System;
- using System.Collections.ObjectModel;
- using System.Windows;
- using System.Windows.Controls;
-
- using HandBrake.ApplicationServices.Model.Encoding;
-
- /// <summary>
- /// Interaction logic for SubtitlesView.xaml
- /// </summary>
- public partial class SubtitlesView : UserControl
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="SubtitlesView"/> class.
- /// </summary>
- public SubtitlesView()
- {
- InitializeComponent();
- }
-
- /// <summary>
- /// The "Query" Dependancy Property
- /// </summary>
- public static readonly DependencyProperty SubtitleTracksProperty = DependencyProperty.Register("SubtitleTracks", typeof(ObservableCollection<SubtitleTrack>), typeof(SubtitlesView));
-
- /// <summary>
- /// Gets or sets State.
- /// </summary>
- public ObservableCollection<SubtitleTrack> SubtitleTracks
- {
- get { return (ObservableCollection<SubtitleTrack>)this.GetValue(SubtitleTracksProperty); }
- set { this.SetValue(SubtitleTracksProperty, value); }
- }
-
- /// <summary>
- /// Add a new Track
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- public void Add(object sender, RoutedEventArgs e)
- {
- this.SubtitleTracks.Add(new SubtitleTrack());
- }
-
- /// <summary>
- /// Remove a Track
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- public void Remove(object sender, RoutedEventArgs e)
- {
- throw new NotImplementedException();
- }
-
- /// <summary>
- /// Import an SRT File.
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- public void ImportSrt(object sender, RoutedEventArgs e)
- {
- throw new NotImplementedException();
- }
- }
-}
diff --git a/win/CS/HandBrakeWPF/Views/FiltersView.xaml b/win/CS/HandBrakeWPF/Views/FiltersView.xaml new file mode 100644 index 000000000..c472a84da --- /dev/null +++ b/win/CS/HandBrakeWPF/Views/FiltersView.xaml @@ -0,0 +1,58 @@ +<UserControl x:Class="HandBrakeWPF.Views.FiltersView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ mc:Ignorable="d" >
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="*" />
+ </Grid.RowDefinitions>
+
+ <TextBlock Text="Filters" FontWeight="Bold" Margin="10,5,0,0" Grid.Row="0" ></TextBlock>
+
+ <StackPanel Orientation="Vertical" Grid.Row="1" Margin="10,10,0,0">
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="100" />
+ <ColumnDefinition Width="130" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+
+ <TextBlock Text="Detelecine:" Grid.Row="0" Grid.Column="0" Margin="0,0,0,10" />
+ <ComboBox Width="120" Grid.Row="0" Grid.Column="1" Margin="0,0,0,10"/>
+ <TextBox Width="120" Grid.Row="0" Grid.Column="2" Margin="0,0,0,10"/>
+
+ <TextBlock Text="Decomb:" Grid.Row="1" Grid.Column="0" Margin="0,0,0,10"/>
+ <ComboBox Width="120" Grid.Row="1" Grid.Column="1" Margin="0,0,0,10"/>
+ <TextBox Width="120" Grid.Row="1" Grid.Column="2" Margin="0,0,0,10"/>
+
+ <TextBlock Text="Deinterlace:" Grid.Row="2" Grid.Column="0" Margin="0,0,0,10"/>
+ <ComboBox Width="120" Grid.Row="2" Grid.Column="1" Margin="0,0,0,10"/>
+ <TextBox Width="120" Grid.Row="2" Grid.Column="2" Margin="0,0,0,10"/>
+
+ <TextBlock Text="Denoise:" Grid.Row="3" Grid.Column="0" Margin="0,0,0,10"/>
+ <ComboBox Width="120" Grid.Row="3" Grid.Column="1" Margin="0,0,0,10"/>
+ <TextBox Width="120" Grid.Row="3" Grid.Column="2" Margin="0,0,0,10"/>
+
+ <TextBlock Text="Deblock:" Grid.Row="4" Grid.Column="0" Margin="0,0,0,10"/>
+ <Slider Width="120" Grid.Row="4" Grid.Column="1" Margin="0,0,0,10"/>
+ <TextBlock Text="Off" Grid.Row="4" Grid.Column="2" Margin="0,0,0,10"/>
+
+ <CheckBox Content="Grayscale" Grid.Row="5" Grid.Column="1" Margin="0,0,0,10"/>
+ </Grid>
+
+ </StackPanel>
+
+ </Grid>
+</UserControl>
diff --git a/win/CS/HandBrakeWPF/Views/FiltersView.xaml.cs b/win/CS/HandBrakeWPF/Views/FiltersView.xaml.cs new file mode 100644 index 000000000..35e978b7f --- /dev/null +++ b/win/CS/HandBrakeWPF/Views/FiltersView.xaml.cs @@ -0,0 +1,27 @@ +using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace HandBrakeWPF.Views
+{
+ /// <summary>
+ /// Interaction logic for FiltersView.xaml
+ /// </summary>
+ public partial class FiltersView : UserControl
+ {
+ public FiltersView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml index 4fb29ae7c..a92948ce2 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml @@ -2,7 +2,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Data="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
xmlns:Converters="clr-namespace:HandBrakeWPF.Converters"
- xmlns:Micro="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro" xmlns:Controls="clr-namespace:HandBrakeWPF.Views.Controls"
+ xmlns:Micro="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"
Title="{Data:Binding Path=WindowTitle}" Height="655" Width="1015" FontSize="11" Background="#FFF0F0F0">
<Window.Resources>
@@ -120,7 +120,7 @@ <Label Content="Preview" Margin="8,0,0,0" VerticalAlignment="Center" />
</StackPanel>
</Button>
-
+
<Button Name="ActivityWindow" Micro:Message.Attach="[Event Click] = [Action OpenLogWindow]">
<StackPanel Orientation="Horizontal">
<Image Source="Images/ActivityWindow.png" Height="32" Width="32" />
@@ -187,136 +187,25 @@ <!-- Tab Control -->
<TabControl HorizontalAlignment="Left" VerticalAlignment="Stretch" Width="725" Height="330" Margin="10,10,10,10" Name="tabControl" >
<TabItem Header="Picture" Name="pictureTab">
- <Controls:PictureSettingsView x:Name="pictureSettingsView"></Controls:PictureSettingsView>
+ <ContentControl x:Name="PictureSettingsViewModel" ></ContentControl>
</TabItem>
<TabItem Header="Video Filters" Name="filtersTab">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
-
- <TextBlock Text="Filters" FontWeight="Bold" Margin="10,5,0,0" Grid.Row="0" ></TextBlock>
-
- <StackPanel Orientation="Vertical" Grid.Row="1" Margin="10,10,0,0">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="100" />
- <ColumnDefinition Width="130" />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
-
- <TextBlock Text="Detelecine:" Grid.Row="0" Grid.Column="0" Margin="0,0,0,10" />
- <ComboBox Width="120" Grid.Row="0" Grid.Column="1" Margin="0,0,0,10"/>
- <TextBox Width="120" Grid.Row="0" Grid.Column="2" Margin="0,0,0,10"/>
-
- <TextBlock Text="Decomb:" Grid.Row="1" Grid.Column="0" Margin="0,0,0,10"/>
- <ComboBox Width="120" Grid.Row="1" Grid.Column="1" Margin="0,0,0,10"/>
- <TextBox Width="120" Grid.Row="1" Grid.Column="2" Margin="0,0,0,10"/>
-
- <TextBlock Text="Deinterlace:" Grid.Row="2" Grid.Column="0" Margin="0,0,0,10"/>
- <ComboBox Width="120" Grid.Row="2" Grid.Column="1" Margin="0,0,0,10"/>
- <TextBox Width="120" Grid.Row="2" Grid.Column="2" Margin="0,0,0,10"/>
-
- <TextBlock Text="Denoise:" Grid.Row="3" Grid.Column="0" Margin="0,0,0,10"/>
- <ComboBox Width="120" Grid.Row="3" Grid.Column="1" Margin="0,0,0,10"/>
- <TextBox Width="120" Grid.Row="3" Grid.Column="2" Margin="0,0,0,10"/>
-
- <TextBlock Text="Deblock:" Grid.Row="4" Grid.Column="0" Margin="0,0,0,10"/>
- <Slider Width="120" Grid.Row="4" Grid.Column="1" Margin="0,0,0,10"/>
- <TextBlock Text="Off" Grid.Row="4" Grid.Column="2" Margin="0,0,0,10"/>
-
- <CheckBox Content="Grayscale" Grid.Row="5" Grid.Column="1" Margin="0,0,0,10"/>
- </Grid>
-
- </StackPanel>
-
- </Grid>
+ <ContentControl x:Name="FiltersViewModel" ></ContentControl>
</TabItem>
-
<TabItem Header="Video" Name="videoTab">
- <Grid Margin="10,5,0,0">
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
-
-
- <Grid Grid.Row="1">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
-
- <StackPanel Orientation="Vertical" Grid.Column="0" >
-
- <TextBlock Text="Video" FontWeight="Bold" Margin="0,0,0,10"/>
-
- <StackPanel Orientation="Horizontal" Margin="0,0,0,10" >
- <TextBlock Text="Video Codec:" Width="100" />
- <ComboBox Width="120"/>
- </StackPanel>
-
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="Franerate (FPS):" Width="100"/>
- <StackPanel Orientation="Vertical">
- <ComboBox Width="120" />
- <RadioButton Content="Constant Framerate" />
- <RadioButton Content="Variable Framerate" />
- <RadioButton Content="Peak Framerate" />
- </StackPanel>
- </StackPanel>
- </StackPanel>
-
-
- <StackPanel Orientation="Vertical" Grid.Column="1" >
- <TextBlock Text="Quality" FontWeight="Bold" Margin="0,0,0,10"/>
-
- <StackPanel Orientation="Horizontal" Margin="0,0,0,10" >
- <RadioButton Content="Constant Quality:" Margin="0,0,10,0"/>
- <TextBlock Text="0" Width="25" />
- <TextBlock Text="RF" FontWeight="Bold" />
- </StackPanel>
-
- <Slider Width="240" Margin="0,0,0,20" />
-
- <StackPanel Orientation="Horizontal" Margin="0,0,0,10">
- <RadioButton Content="Avg Bitrate (kbps):" Margin="0,0,10,0"/>
- <TextBox Width="75" />
- </StackPanel>
-
- <StackPanel Orientation="Horizontal" Margin="30,0,0,0">
- <CheckBox Content="2-Pass Encoding" Margin="0,0,10,0" />
- <CheckBox Content="Turbo first pass" />
- </StackPanel>
-
- </StackPanel>
-
-
- </Grid>
-
- </Grid>
+ <ContentControl x:Name="VideoViewModel" ></ContentControl>
</TabItem>
<TabItem Header="Audio" Name="audioTab">
- <Controls:AudioView AudioTracks="{Binding CurrentTask.AudioTracks, Mode=TwoWay}"></Controls:AudioView>
+ <ContentControl x:Name="AudioViewModel" ></ContentControl>
</TabItem>
<TabItem Header="Subtitles" Name="subtitlesTab">
- <Controls:SubtitlesView SubtitleTracks="{Binding CurrentTask.SubtitleTracks, Mode=TwoWay}"></Controls:SubtitlesView>
+ <ContentControl x:Name="SubtitleViewModel"></ContentControl>
</TabItem>
<TabItem Header="Chapters" Name="chaptersTab">
- <Controls:ChaptersView IncludeChapterMarkers="{Binding CurrentTask.IncludeChapterMarkers, Mode=TwoWay}" Chapters="{Binding CurrentTask.ChapterNames, Mode=TwoWay}"></Controls:ChaptersView>
+ <ContentControl x:Name="ChaptersViewModel"></ContentControl>
</TabItem>
<TabItem Header="Advanced" Name="advancedTab">
- <Controls:AdvancedView Query="{Binding CurrentTask.AdvancedEncoderOptions, Mode=TwoWay}"></Controls:AdvancedView>
+ <ContentControl x:Name="AdvancedViewModel"></ContentControl>
</TabItem>
</TabControl>
@@ -368,8 +257,8 @@ <MenuItem Header="Reset Built-in Presets" Micro:Message.Attach="[Event Click] = [Action PresetReset]" />
</MenuItem>
</Menu>
-
-
+
+
</ToolBar>
</StackPanel>
</GroupBox>
diff --git a/win/CS/HandBrakeWPF/Views/Controls/PictureSettingsView.xaml b/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml index 0cb59f301..4bc306ddf 100644 --- a/win/CS/HandBrakeWPF/Views/Controls/PictureSettingsView.xaml +++ b/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml @@ -1,4 +1,4 @@ -<UserControl x:Class="HandBrakeWPF.Views.Controls.PictureSettingsView"
+<UserControl x:Class="HandBrakeWPF.Views.PictureSettingsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:NumericUpDown="clr-namespace:EagleBoost.Wpf.Presentation.Controls.NumericUpDown;assembly=EagleBoost.Wpf.Presentation">
diff --git a/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml.cs b/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml.cs new file mode 100644 index 000000000..1d874d760 --- /dev/null +++ b/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml.cs @@ -0,0 +1,27 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="PictureSettingsView.xaml.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Interaction logic for PictureSettingsView.xaml
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Views
+{
+ using System.Windows.Controls;
+
+ /// <summary>
+ /// Interaction logic for PictureSettingsView.xaml
+ /// </summary>
+ public partial class PictureSettingsView : UserControl
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="PictureSettingsView"/> class.
+ /// </summary>
+ public PictureSettingsView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/win/CS/HandBrakeWPF/Views/Controls/SubtitlesView.xaml b/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml index 19c195e5d..4b2d9b61a 100644 --- a/win/CS/HandBrakeWPF/Views/Controls/SubtitlesView.xaml +++ b/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml @@ -1,4 +1,4 @@ -<UserControl x:Class="HandBrakeWPF.Views.Controls.SubtitlesView"
+<UserControl x:Class="HandBrakeWPF.Views.SubtitlesView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@@ -21,12 +21,12 @@ <ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
- <Button Content="Add" Name="AddTrack" Click="Add" Grid.Column="0" Width="75" Margin="0,0,10,0" />
- <Button Content="Remove" Name="RemoveTrack" Click="Remove" Grid.Column="1" Width="75" Margin="0,0,10,0" />
- <Button Content="Import SRT" Click="ImportSrt" Grid.Column="2" Width="75" />
+ <Button Content="Add" Name="AddTrack" Grid.Column="0" Width="75" Margin="0,0,10,0" cal:Message.Attach="[Event Click] = [Action Add]" />
+ <Button Content="Remove" Name="RemoveTrack" Grid.Column="1" Width="75" Margin="0,0,10,0" cal:Message.Attach="[Event Click] = [Action Remove]" />
+ <Button Content="Import SRT" Grid.Column="2" Width="75" cal:Message.Attach="[Event Click] = [Action Import]" />
</Grid>
- <ListBox Grid.Row="2" ItemsSource="{Binding SubtitleTracks, RelativeSource={RelativeSource AncestorType=UserControl}}"
+ <ListBox Grid.Row="2" ItemsSource="{Binding SubtitleTracks}"
SelectionMode="Extended" Background="LightGray" Margin="10,10,10,10">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
@@ -45,7 +45,7 @@ </Grid.ColumnDefinitions>
<!-- Marker -->
- <Image Source="../Images/Movies.png" Width="16" Height="16" Grid.Column="0" Margin="10,0,10,0" />
+ <Image Source="Images/Movies.png" Width="16" Height="16" Grid.Column="0" Margin="10,0,10,0" />
<!-- Settings -->
<Grid Grid.Column="1" HorizontalAlignment="Stretch">
@@ -90,7 +90,7 @@ </Grid>
<!-- Delete -->
- <Image Source="../Images/delete.png" Width="16" Height="16" Grid.Column="2" Margin="10,0,10,0">
+ <Image Source="Images/delete.png" Width="16" Height="16" Grid.Column="2" Margin="10,0,10,0">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseDown">
<cal:ActionMessage MethodName="RemoveJob">
diff --git a/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml.cs b/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml.cs new file mode 100644 index 000000000..ea3e67114 --- /dev/null +++ b/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml.cs @@ -0,0 +1,27 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="SubtitlesView.xaml.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Interaction logic for SubtitlesView.xaml
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Views
+{
+ using System.Windows.Controls;
+
+ /// <summary>
+ /// Interaction logic for SubtitlesView.xaml
+ /// </summary>
+ public partial class SubtitlesView : UserControl
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="SubtitlesView"/> class.
+ /// </summary>
+ public SubtitlesView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/win/CS/HandBrakeWPF/Views/VideoView.xaml b/win/CS/HandBrakeWPF/Views/VideoView.xaml new file mode 100644 index 000000000..d06255b71 --- /dev/null +++ b/win/CS/HandBrakeWPF/Views/VideoView.xaml @@ -0,0 +1,68 @@ +<UserControl x:Class="HandBrakeWPF.Views.VideoView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ mc:Ignorable="d" >
+ <Grid Margin="10,5,0,0">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="*" />
+ </Grid.RowDefinitions>
+
+
+ <Grid Grid.Row="1">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="*" />
+ </Grid.ColumnDefinitions>
+
+ <StackPanel Orientation="Vertical" Grid.Column="0" >
+
+ <TextBlock Text="Video" FontWeight="Bold" Margin="0,0,0,10"/>
+
+ <StackPanel Orientation="Horizontal" Margin="0,0,0,10" >
+ <TextBlock Text="Video Codec:" Width="100" />
+ <ComboBox Width="120"/>
+ </StackPanel>
+
+ <StackPanel Orientation="Horizontal">
+ <TextBlock Text="Franerate (FPS):" Width="100"/>
+ <StackPanel Orientation="Vertical">
+ <ComboBox Width="120" />
+ <RadioButton Content="Constant Framerate" />
+ <RadioButton Content="Variable Framerate" />
+ <RadioButton Content="Peak Framerate" />
+ </StackPanel>
+ </StackPanel>
+ </StackPanel>
+
+
+ <StackPanel Orientation="Vertical" Grid.Column="1" >
+ <TextBlock Text="Quality" FontWeight="Bold" Margin="0,0,0,10"/>
+
+ <StackPanel Orientation="Horizontal" Margin="0,0,0,10" >
+ <RadioButton Content="Constant Quality:" Margin="0,0,10,0"/>
+ <TextBlock Text="0" Width="25" />
+ <TextBlock Text="RF" FontWeight="Bold" />
+ </StackPanel>
+
+ <Slider Width="240" Margin="0,0,0,20" />
+
+ <StackPanel Orientation="Horizontal" Margin="0,0,0,10">
+ <RadioButton Content="Avg Bitrate (kbps):" Margin="0,0,10,0"/>
+ <TextBox Width="75" />
+ </StackPanel>
+
+ <StackPanel Orientation="Horizontal" Margin="30,0,0,0">
+ <CheckBox Content="2-Pass Encoding" Margin="0,0,10,0" />
+ <CheckBox Content="Turbo first pass" />
+ </StackPanel>
+
+ </StackPanel>
+
+
+ </Grid>
+
+ </Grid>
+</UserControl>
diff --git a/win/CS/HandBrakeWPF/Views/VideoView.xaml.cs b/win/CS/HandBrakeWPF/Views/VideoView.xaml.cs new file mode 100644 index 000000000..f59435f02 --- /dev/null +++ b/win/CS/HandBrakeWPF/Views/VideoView.xaml.cs @@ -0,0 +1,27 @@ +using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace HandBrakeWPF.Views
+{
+ /// <summary>
+ /// Interaction logic for VideoView.xaml
+ /// </summary>
+ public partial class VideoView : UserControl
+ {
+ public VideoView()
+ {
+ InitializeComponent();
+ }
+ }
+}
|