summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Views/SummaryView.xaml
blob: cb3ed220b9d7d441d637fac58718556931efc493 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<UserControl x:Class="HandBrakeWPF.Views.SummaryView"
             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:Properties="clr-namespace:HandBrakeWPF.Properties"
             xmlns:converters="clr-namespace:HandBrakeWPF.Converters"
             xmlns:cal="http://www.caliburnproject.org"
             mc:Ignorable="d" 
             d:DesignHeight="400" d:DesignWidth="600">

    <UserControl.Resources>
        <converters:EnumComboConverter x:Key="enumComboConverter" />
        <converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
    </UserControl.Resources>

    <Grid Margin="10,5,0,5">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <!-- Column 1 -->
        <Grid Grid.Column="0" MinWidth="325" MaxWidth="400" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="75" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="10" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="10" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="10" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>

            <Grid.Resources>
                <Style TargetType="TextBlock">
                    <Setter Property="Margin" Value="0,3,0,3" />
                </Style>
                <Style TargetType="CheckBox">
                    <Setter Property="Margin" Value="0,2,0,2" />
                </Style>
            </Grid.Resources>


            <TextBlock Text="Format:" FontWeight="Bold" Grid.Row="0" VerticalAlignment="Center" />
            <ComboBox Name="Container" Width="100" HorizontalAlignment="Left"  Grid.Row="0" Grid.Column="1"
                              ToolTip="{x:Static Properties:ResourcesTooltips.MainView_Mux}" VerticalAlignment="Center"
                              ItemsSource="{Binding OutputFormats, Converter={StaticResource enumComboConverter}}"
                              SelectedItem="{Binding SelectedOutputFormat, Converter={StaticResource enumComboConverter}}" />
            <CheckBox Name="WebOptimized" VerticalAlignment="Center" Grid.Row="1" Grid.Column="1"
                              Content="{x:Static Properties:ResourcesUI.MainView_WebOptimized}"
                              IsChecked="{Binding Path=OptimizeMP4}"
                              ToolTip="{x:Static Properties:ResourcesTooltips.MainView_Optimise}"
                              Visibility="{Binding IsMkv, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}" />
            <CheckBox Name="AlignAVStart" VerticalAlignment="Center" Grid.Row="2" Grid.Column="1"
                              Content="{x:Static Properties:ResourcesUI.MainView_AlignAVStart}"
                              ToolTip="{x:Static Properties:ResourcesTooltips.MainView_AlignAVStart}"
                              IsChecked="{Binding Path=AlignAVStart}"
                              Visibility="{Binding IsMkv, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}" />
            <CheckBox Name="iPod5G" VerticalAlignment="Center" Grid.Row="3" Grid.Column="1"
                              Content="{x:Static Properties:ResourcesUI.MainView_iPod5G}"
                              ToolTip="{x:Static Properties:ResourcesTooltips.MainView_IpodAtom}"
                              IsChecked="{Binding Path=IPod5GSupport}"
                              Visibility="{Binding IsMkv, Converter={StaticResource boolToVisConverter},  ConverterParameter=true}" />

            <TextBlock Text="Tracks:" FontWeight="Bold" Grid.Row="5" Grid.Column="0" VerticalAlignment="Center" />
            <TextBlock Text="{Binding VideoTrackInfo}" Grid.Row="5" Grid.Column="1" VerticalAlignment="Center" />
            <TextBlock Text="{Binding AudioTrackInfo}" Grid.Row="6" Grid.Column="1" TextWrapping="Wrap" />
            <TextBlock Text="{Binding SubtitleTrackInfo}" Grid.Row="7" Grid.Column="1" TextWrapping="Wrap" />
            <TextBlock Text="{Binding ChapterInfo}" Grid.Row="8" Grid.Column="1" />

            <TextBlock Text="Filters:" FontWeight="Bold" Grid.Row="10" Grid.Column="0" VerticalAlignment="Center" />
            <TextBlock Text="{Binding FiltersInfo}" Grid.Row="10" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Stretch" TextWrapping="Wrap" />



            <TextBlock Text="Size:" FontWeight="Bold" Grid.Row="12" Grid.Column="0" VerticalAlignment="Center" />
            <TextBlock Text="{Binding DimensionInfo}" HorizontalAlignment="Left" VerticalAlignment="Center"  Grid.Row="12" Grid.Column="1" />

            <TextBlock Text="Aspect:" FontSize="14" Grid.Row="13" Grid.Column="0" VerticalAlignment="Center" Visibility="Collapsed" />
            <TextBlock Text="{Binding AspectInfo}" HorizontalAlignment="Left" VerticalAlignment="Center"  Grid.Row="13" Grid.Column="1" Margin="5,0,0,0" Visibility="Collapsed" />
        </Grid>

        <!-- Column 2 -->
        <Grid Grid.Column="1" Margin="10,0,0,5">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>

            <Grid Grid.Row="0" Grid.ColumnSpan="2" HorizontalAlignment="Left" VerticalAlignment="Top" Background="Transparent">

                <Grid.RowDefinitions>
                    <RowDefinition Height="*" />
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="32"/>
                </Grid.RowDefinitions>

                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>

                <Image Source="{Binding PreviewImage}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0,5,10,0" x:Name="previewImage" Panel.ZIndex="0" Grid.ColumnSpan="2"
                       MaxWidth="{Binding MaxWidth}" MaxHeight="{Binding MaxHeight}" MouseWheel="PreviewImage_OnMouseWheel" />

                <Border Grid.Row="1" Grid.ColumnSpan="2" VerticalAlignment="Bottom" HorizontalAlignment="Center" Background="Transparent" Margin="0,5,0,5">
                    <TextBlock Text="{Binding PreviewInfo}" TextAlignment="Center" Visibility="{Binding IsPreviewInfoVisible, Converter={StaticResource boolToVisConverter}}" />
                </Border>

                <Grid Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="2" HorizontalAlignment="Center" Width="84" Visibility="{Binding IsPreviewControlsVisible, Converter={StaticResource boolToVisConverter}}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="42" />
                        <ColumnDefinition Width="42" />
                    </Grid.ColumnDefinitions>
                    
                    <Border BorderThickness="1,1,1,1" CornerRadius="4,0,0,4" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Column="0" cal:Message.Attach="[Event MouseDown] = [Action PreviousPreview]"
                            Visibility="{Binding IsPreviousPreviewControlVisible,Converter={StaticResource boolToVisConverter}}"
                            Background="Black" Opacity="0.5" Margin="0,0,0,0" >
                        <TextBlock Text="&lt;" FontSize="16" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" Padding="16,1" Margin="0,0,0,4" />
                    </Border>

                    <Border BorderThickness="1,1,1,1" CornerRadius="0,4,4,0" VerticalAlignment="Center" HorizontalAlignment="Right" Grid.Column="1" cal:Message.Attach="[Event MouseDown] = [Action NextPreview]"
                            Background="Black" Opacity="0.5" Margin="0,0,0,0" 
                            Visibility="{Binding IsNextPreviewControlVisible,Converter={StaticResource boolToVisConverter}}" >
                        <TextBlock Text="&gt;" FontSize="16" Foreground="White" Padding="16,1" VerticalAlignment="Center" TextAlignment="Center" HorizontalAlignment="Center"  Margin="0,0,0,4" />
                    </Border>

                </Grid>


            </Grid>
        </Grid>

    </Grid>
</UserControl>