summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml
blob: 7385f9102b6fcf0f265518f57808f3cc965b5868 (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
<UserControl x:Class="HandBrakeWPF.Controls.SourceSelection"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:cal="http://www.caliburnproject.org"
        xmlns:controls="clr-namespace:HandBrakeWPF.Controls"
        Background="{Binding Path=Background, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}">

    <Grid VerticalAlignment="Top" HorizontalAlignment="Center">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        
        
        <StackPanel Orientation="Horizontal" Grid.Row="0" Margin="5,8,0,0">
            <TextBlock Text="Source Selection" FontSize="14" FontWeight="Bold" /> 
        </StackPanel>

        <!-- Title Specific Scan -->
        <StackPanel Grid.Row="1" Orientation="Vertical" HorizontalAlignment="Left"  Margin="5,5,0,0">
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="Optionally choose a specific title: " />

                <controls:NumberBox Width="60" Height="24" Margin="10,0,0,0"
                                Minimum="0" Maximum="1000" Number="{Binding TitleSpecificScan, Mode=TwoWay}" />
            </StackPanel>

            <TextBlock Text="Then choose your source: " Margin="0,10,0,0" />
        </StackPanel>

        <!-- Source Type -->
        <StackPanel Grid.Row="2" Orientation="Vertical" HorizontalAlignment="Left" Margin="5,5,0,0">

            <!-- Ctrl + R -->
            <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" cal:Message.Attach="[Event Click] = [Action FolderScan]"
                    Margin="0,0,0,7" Padding="8" HorizontalAlignment="Left">
               
                <StackPanel Orientation="Horizontal" MinWidth="100">
                    <Image Source="../Views/Images/folder32.png" Width="32" />
                    <StackPanel Orientation="Vertical">
                        <TextBlock Text="Folder" VerticalAlignment="Center" Margin="5,0,0,0" />
                        <TextBlock Text="Open a VIDEO_TS folder or a batch of files" VerticalAlignment="Center" Margin="5,0,0,0" />
                    </StackPanel>                   
                </StackPanel>
            </Button>

            <!--Ctrl + F-->
            <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" cal:Message.Attach="[Event Click] = [Action FileScan]"
                    Margin="0,0,0,7" Padding="8" HorizontalAlignment="Left">
                <StackPanel Orientation="Horizontal" MinWidth="100">
                    <Image Source="../Views/Images/File32.png" Width="32" />
                    <StackPanel Orientation="Vertical">
                        <TextBlock Text="File" VerticalAlignment="Center" Margin="5,0,0,0" />
                        <TextBlock Text="Open a single file." VerticalAlignment="Center" Margin="5,0,0,0" />
                    </StackPanel>
                </StackPanel>
            </Button>
            
            <ListBox ItemsSource="{Binding Drives}" Background="Transparent"  BorderThickness="0">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" 
                                cal:Message.Attach="[Event Click] = [Action ProcessDrive($this.Tag)]"
                                Margin="0,0,0,10" Padding="8" HorizontalAlignment="Left" 
                                Tag="{Binding}">
                            <StackPanel Orientation="Horizontal" MinWidth="100">
                                <Image Source="../Views/Images/Disc.png" Width="32" />
                                <StackPanel Orientation="Vertical">
                                    <TextBlock Text="{Binding Text}" VerticalAlignment="Center" Margin="5,0,0,0" />
                                    <TextBlock Text="Open this DVD or Bluray Drive" VerticalAlignment="Center" Margin="5,0,0,0" />
                                </StackPanel>
                            </StackPanel>
                        </Button>
                    </DataTemplate>
                </ListBox.ItemTemplate>
                
            </ListBox>
        </StackPanel>

        <!-- Cancel Window -->
        <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,10,10,10">
            <Button cal:Message.Attach="[Event Click] = [Action CloseSourceSelection]" Content="Cancel" Padding="8,2" />
        </StackPanel>

    </Grid>
</UserControl>