|
| 1 | +<Window xmlns="https://github.com/avaloniaui" |
| 2 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 3 | + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 4 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 5 | + xmlns:local="using:SubtitleEdit.Plugins.WordCensor" |
| 6 | + x:Class="SubtitleEdit.Plugins.WordCensor.MainWindow" |
| 7 | + mc:Ignorable="d" |
| 8 | + Title="Word censor" |
| 9 | + Width="720" Height="600" |
| 10 | + MinWidth="500" MinHeight="380" |
| 11 | + WindowStartupLocation="CenterScreen"> |
| 12 | + <DockPanel Margin="20"> |
| 13 | + |
| 14 | + <Grid DockPanel.Dock="Bottom" |
| 15 | + ColumnDefinitions="*,Auto,Auto" |
| 16 | + Margin="0,14,0,0"> |
| 17 | + <TextBlock Grid.Column="0" |
| 18 | + x:Name="SummaryLabel" |
| 19 | + VerticalAlignment="Center" |
| 20 | + Opacity="0.75" /> |
| 21 | + <Button Grid.Column="1" |
| 22 | + Content="Cancel" |
| 23 | + Click="OnCancel" |
| 24 | + MinWidth="100" |
| 25 | + Margin="0,0,8,0" /> |
| 26 | + <Button Grid.Column="2" |
| 27 | + x:Name="ApplyButton" |
| 28 | + Content="Apply" |
| 29 | + Click="OnApply" |
| 30 | + MinWidth="100" |
| 31 | + Classes="accent" |
| 32 | + IsDefault="True" /> |
| 33 | + </Grid> |
| 34 | + |
| 35 | + <StackPanel Orientation="Horizontal" DockPanel.Dock="Top" Spacing="10" Margin="0,0,0,4"> |
| 36 | + <Button Content="Select all" Click="OnSelectAll" /> |
| 37 | + <Button Content="Select none" Click="OnSelectNone" /> |
| 38 | + <CheckBox x:Name="ColorRedCheck" |
| 39 | + Content="Highlight censored words in red" |
| 40 | + VerticalAlignment="Center" |
| 41 | + Margin="12,0,0,0" /> |
| 42 | + </StackPanel> |
| 43 | + |
| 44 | + <TextBlock DockPanel.Dock="Top" |
| 45 | + FontSize="18" |
| 46 | + FontWeight="SemiBold" |
| 47 | + Text="Word censor" /> |
| 48 | + |
| 49 | + <TextBlock DockPanel.Dock="Top" |
| 50 | + x:Name="SubtitleLabel" |
| 51 | + Margin="0,4,0,12" |
| 52 | + Opacity="0.7" |
| 53 | + TextWrapping="Wrap" /> |
| 54 | + |
| 55 | + <TextBlock DockPanel.Dock="Top" |
| 56 | + x:Name="NoChangesLabel" |
| 57 | + FontSize="14" |
| 58 | + Margin="0,30,0,0" |
| 59 | + HorizontalAlignment="Center" |
| 60 | + Opacity="0.65" |
| 61 | + Text="No offensive words found in the selected lines." |
| 62 | + IsVisible="False" /> |
| 63 | + |
| 64 | + <Border BorderBrush="#22808080" |
| 65 | + BorderThickness="1" |
| 66 | + CornerRadius="4" |
| 67 | + Padding="0"> |
| 68 | + <ListBox x:Name="ChangesList" |
| 69 | + Background="Transparent" |
| 70 | + SelectionMode="Single"> |
| 71 | + <ListBox.ItemTemplate> |
| 72 | + <DataTemplate x:DataType="local:ChangeProposal"> |
| 73 | + <Grid ColumnDefinitions="Auto,42,*" Margin="4,6"> |
| 74 | + <CheckBox Grid.Column="0" |
| 75 | + IsChecked="{Binding Include, Mode=TwoWay}" |
| 76 | + VerticalAlignment="Top" |
| 77 | + Margin="0,2,0,0" /> |
| 78 | + <TextBlock Grid.Column="1" |
| 79 | + Text="{Binding LineNumber}" |
| 80 | + Opacity="0.55" |
| 81 | + FontSize="12" |
| 82 | + Margin="6,2,8,0" |
| 83 | + VerticalAlignment="Top" /> |
| 84 | + <StackPanel Grid.Column="2" Orientation="Vertical" Spacing="2"> |
| 85 | + <TextBlock Text="{Binding OriginalText}" |
| 86 | + TextWrapping="Wrap" |
| 87 | + Opacity="0.55" |
| 88 | + FontSize="12" /> |
| 89 | + <TextBlock Text="{Binding CensoredText}" |
| 90 | + TextWrapping="Wrap" |
| 91 | + FontWeight="SemiBold" /> |
| 92 | + </StackPanel> |
| 93 | + </Grid> |
| 94 | + </DataTemplate> |
| 95 | + </ListBox.ItemTemplate> |
| 96 | + </ListBox> |
| 97 | + </Border> |
| 98 | + </DockPanel> |
| 99 | +</Window> |
0 commit comments