summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Views/LogView.xaml
blob: 163133f94345ec3e07683fa08a33bc4670557bcf (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
<Window x:Class="HandBrakeWPF.Views.LogView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:cal="http://www.caliburnproject.org"
        Title="{Binding Title}"
        Width="525"
        Height="600"
        MinWidth="525"
        MinHeight="600"
        WindowStartupLocation="CenterScreen"
        TextOptions.TextFormattingMode="Display">
    <Grid>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <ToolBar Grid.Row="0"
                     ToolBar.OverflowMode="Never" 
                     ToolBarTray.IsLocked="True"
                     Loaded="ToolBarLoaded"
                     >

                <Button cal:Message.Attach="[Event Click] = [Action CopyLog]" Margin="10,0,0,0">
                    <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="Images/copy.png" />
                        <TextBlock Margin="2,0,0,0" Text="Copy to clipboard" />
                    </StackPanel>
                </Button>
                <Button Margin="5,0,0,0" cal:Message.Attach="[Event Click] = [Action OpenLogDirectory]">
                    <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="Images/folder.png" />
                        <TextBlock Margin="2,0,0,0" Text="Open Log Directory" />
                    </StackPanel>
                </Button>

            </ToolBar>


            <TabControl Grid.Row="2" SelectedIndex="{Binding SelectedTab}" Margin="0,3,0,0">
                <TabItem>
                    <TabItem.Header>
                        <TextBlock Text="Encode Log" Padding="4">
                            <TextBlock.Style>
                                <Style TargetType="TextBlock">
                                    <Style.Triggers>
                                        <DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource AncestorType=TabItem}}" Value="True">
                                            <Setter Property="FontWeight" Value="Bold"/>
                                        </DataTrigger>
                                    </Style.Triggers>
                                </Style>
                            </TextBlock.Style>
                        </TextBlock>
                    </TabItem.Header>

                    <TextBox
                     AcceptsReturn="True"
                     IsReadOnly="True"
                     ScrollViewer.VerticalScrollBarVisibility="Visible"
                     Text="{Binding EncodeLog, Mode=OneWay,  UpdateSourceTrigger=PropertyChanged}"
                     TextWrapping="Wrap" />
                </TabItem>

                <TabItem>
                    <TabItem.Header>
                        <TextBlock Text="Scan Log" Padding="4">
                            <TextBlock.Style>
                                <Style TargetType="TextBlock">
                                    <Style.Triggers>
                                        <DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource AncestorType=TabItem}}" Value="True">
                                            <Setter Property="FontWeight" Value="Bold"/>
                                        </DataTrigger>
                                    </Style.Triggers>
                                </Style>
                            </TextBlock.Style>
                        </TextBlock>
                    </TabItem.Header>
                    <TextBox AcceptsReturn="True" IsReadOnly="True" ScrollViewer.VerticalScrollBarVisibility="Visible" 
                             Text="{Binding ScanLog, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
                             TextWrapping="Wrap" />
                </TabItem>

            </TabControl>
        </Grid>

    </Grid>
</Window>