|
7 | 7 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
8 | 8 | xmlns:ui="clr-namespace:SmartImage.UI" |
9 | 9 | xmlns:converters="clr-namespace:SmartImage.UI" |
| 10 | + xmlns:controls="clr-namespace:SmartImage.UI.Controls" |
10 | 11 | DataContext="{Binding RelativeSource={RelativeSource Self}}" |
11 | 12 | mc:Ignorable="d" Height="600" Width="1300" MinWidth="1300" MinHeight="300" Loaded="Wnd_Main_Loaded" |
12 | 13 | Closed="Wnd_Main_Closed" |
13 | 14 | Closing="Wnd_Main_Closing" Title="SmartImage" Unloaded="Wnd_Main_Unloaded" Background="#FF191919" |
14 | 15 | KeyDown="Wnd_Main_KeyDown"> |
15 | 16 | <Window.Resources> |
| 17 | + <!-- <ui:SharedViewModel x:Key="SharedViewModel" /> --> |
| 18 | + <!-- <ui:SharedImageControl x:Key="SharedImage" /> --> |
| 19 | + |
16 | 20 | <converters:BooleanToBrushConverter x:Key="BooleanToBrushConverter"> |
17 | 21 | <converters:BooleanToBrushConverter.TrueBrush> |
18 | | - <SolidColorBrush Color="Green"/> |
| 22 | + <SolidColorBrush Color="Green" /> |
19 | 23 | </converters:BooleanToBrushConverter.TrueBrush> |
20 | 24 | <converters:BooleanToBrushConverter.FalseBrush> |
21 | | - <SolidColorBrush Color="Red"/> |
| 25 | + <SolidColorBrush Color="Red" /> |
22 | 26 | </converters:BooleanToBrushConverter.FalseBrush> |
23 | 27 | </converters:BooleanToBrushConverter> |
24 | 28 | <Style x:Key="CustomContextMenuStyle" TargetType="{x:Type ContextMenu}"> |
|
57 | 61 | <MenuItem Header="Retry" Click="RetryItem_Click" /> |
58 | 62 | <MenuItem Header="Enqueue" Click="EnqueueItem_Click" IsEnabled="{Binding CanDownload}" /> |
59 | 63 | </ContextMenu> |
| 64 | + |
60 | 65 | <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" /> |
| 66 | + <controls:InvertableBooleanToVisibilityConverter x:Key="BooleanVisConverter"/> |
| 67 | + |
61 | 68 | <Style x:Key="BoldGridViewCellStyle" TargetType="{x:Type TextBlock}"> |
62 | 69 | <Setter Property="FontWeight" Value="Bold" /> |
63 | 70 | <Setter Property="HorizontalAlignment" Value="Center" /> |
|
294 | 301 | SelectedItem="{Binding CurrentQueueItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, IsAsync=True}" |
295 | 302 | IsSynchronizedWithCurrentItem="True" |
296 | 303 | KeyDown="Lb_Queue_KeyDown" Margin="0,2,174,0" HorizontalAlignment="Right" |
297 | | - VerticalAlignment="Top" Width="320" Height="150" Grid.Column="1" Grid.RowSpan="2"/> |
| 304 | + VerticalAlignment="Top" Width="320" Height="150" Grid.Column="1" Grid.RowSpan="2" /> |
| 305 | + |
298 | 306 | <Border x:Name="Br_Preview" Height="150" Margin="0,3,11,0" Width="150" |
299 | 307 | Background="{DynamicResource Black2}" |
300 | 308 | VerticalAlignment="Top" HorizontalAlignment="Right" Grid.RowSpan="2" Panel.ZIndex="1" |
301 | | - Grid.Column="1"> |
| 309 | + Grid.Column="1" |
| 310 | + Visibility="{Binding ShowMedia, Converter={StaticResource BooleanVisConverter}, ConverterParameter=Inverted}"> |
302 | 311 |
|
303 | 312 | <Image x:Name="Img_Preview" MouseLeftButtonDown="Img_Preview_MouseLeftButtonDown" |
304 | | - Width="150" HorizontalAlignment="Right" VerticalAlignment="Top" Panel.ZIndex="0"> |
| 313 | + Width="150" HorizontalAlignment="Right" VerticalAlignment="Top" Panel.ZIndex="0" |
| 314 | + Visibility="{Binding ShowMedia, Converter={StaticResource BooleanVisConverter}, ConverterParameter=Inverted}"> |
305 | 315 |
|
306 | 316 | <Image.RenderTransformOrigin> |
307 | 317 | <Point X="1" Y="0"></Point> |
|
346 | 356 | <Border x:Name="Br_Preview2" Height="150" Margin="0,2,11,0" Width="150" |
347 | 357 | Background="{DynamicResource Black2}" |
348 | 358 | VerticalAlignment="Top" HorizontalAlignment="Right" Grid.RowSpan="2" Panel.ZIndex="1" |
349 | | - Grid.Column="1" Visibility="Hidden"> |
| 359 | + Grid.Column="1" Visibility="{Binding ShowMedia, Converter={StaticResource BooleanVisConverter}, ConverterParameter=Normal}"> |
350 | 360 | <MediaElement x:Name="Me_Preview" HorizontalAlignment="Right" VerticalAlignment="Top" |
351 | | - Width="150" MouseDown="Me_Preview_MouseDown"> |
| 361 | + Width="150" MouseDown="Me_Preview_MouseDown" Visibility="{Binding ShowMedia, Converter={StaticResource BooleanVisConverter}, ConverterParameter=Normal}"> |
352 | 362 | <MediaElement.RenderTransformOrigin> |
353 | 363 | <Point X="1" Y="0"></Point> |
354 | 364 | </MediaElement.RenderTransformOrigin> |
|
398 | 408 | MouseDoubleClick="Tb_Upload_MouseDoubleClick" Foreground="White" Background="Black" /> |
399 | 409 |
|
400 | 410 | <Button x:Name="Btn_Clear" Content="Clear" HorizontalAlignment="Left" Margin="501,0,0,0" |
401 | | - VerticalAlignment="Center" Height="20" Click="Btn_Clear_Click"/> |
| 411 | + VerticalAlignment="Center" Height="20" Click="Btn_Clear_Click" /> |
402 | 412 |
|
403 | 413 | <Button x:Name="Btn_Restart" Content="Restart" HorizontalAlignment="Left" Margin="537,0,0,0" |
404 | 414 | VerticalAlignment="Center" Click="Btn_Restart_Click" |
|
632 | 642 | <Label x:Name="Lbl_UploadEngines" Content="Upload Engine" HorizontalAlignment="Left" |
633 | 643 | Margin="600,3,0,0" VerticalAlignment="Top" Foreground="White" FontWeight="Bold" /> |
634 | 644 | <TextBox x:Name="Tb_HyEndpoint" HorizontalAlignment="Left" Margin="527,297,0,0" TextWrapping="Wrap" |
635 | | - VerticalAlignment="Top" Width="120" |
636 | | - Text="{Binding Config.HydrusEndpoint, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" /> |
| 645 | + VerticalAlignment="Top" Width="120" |
| 646 | + Text="{Binding Config.HydrusEndpoint, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" /> |
637 | 647 | <TextBox x:Name="Tb_HyKey" HorizontalAlignment="Left" Margin="527,326,0,0" TextWrapping="Wrap" |
638 | | - VerticalAlignment="Top" Width="120" |
639 | | - Text="{Binding Config.HydrusKey, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" /> |
640 | | - <Label x:Name="Lb_HyEndpoint" Content="Hydrus Endpoint" HorizontalAlignment="Left" Margin="424,293,0,0" |
641 | | - VerticalAlignment="Top" Foreground="White" /> |
| 648 | + VerticalAlignment="Top" Width="120" |
| 649 | + Text="{Binding Config.HydrusKey, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" /> |
| 650 | + <Label x:Name="Lb_HyEndpoint" Content="Hydrus Endpoint" HorizontalAlignment="Left" |
| 651 | + Margin="424,293,0,0" |
| 652 | + VerticalAlignment="Top" Foreground="White" /> |
642 | 653 | <Label x:Name="Lb_HyKey" Content="Hydrus Key" HorizontalAlignment="Left" Margin="424,322,0,0" |
643 | | - VerticalAlignment="Top" Foreground="White" /> |
| 654 | + VerticalAlignment="Top" Foreground="White" /> |
644 | 655 |
|
645 | 656 | </Grid> |
646 | 657 | </TabItem> |
|
0 commit comments