338 lines
18 KiB
XML
338 lines
18 KiB
XML
<UserControl
|
|
x:Class="PlixP.Views.Dialogs.MovieDialog"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
xmlns:prism="http://prismlibrary.com/"
|
|
xmlns:renders="clr-namespace:PlixP.Renders"
|
|
xmlns:system="clr-namespace:System;assembly=System.Runtime"
|
|
Width="950"
|
|
prism:ViewModelLocator.AutoWireViewModel="True"
|
|
Background="Transparent"
|
|
TextElement.FontSize="13"
|
|
TextElement.FontWeight="Regular"
|
|
TextOptions.TextFormattingMode="Ideal"
|
|
TextOptions.TextRenderingMode="Auto">
|
|
|
|
<materialDesign:Card
|
|
materialDesign:ShadowAssist.ShadowDepth="Depth5"
|
|
Background="{StaticResource SecondaryRegionBrush}"
|
|
UniformCornerRadius="10">
|
|
|
|
<Grid>
|
|
<materialDesign:Card Padding="10" UniformCornerRadius="10">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Grid>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<materialDesign:Card
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
UniformCornerRadius="10">
|
|
|
|
<renders:ImageCacher
|
|
Height="380"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Top"
|
|
ImageSource="{Binding Path=Movie.Poster}" />
|
|
</materialDesign:Card>
|
|
|
|
</Grid>
|
|
<Grid Grid.Column="1">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<StackPanel
|
|
Grid.Row="0"
|
|
Margin="0,8,0,8"
|
|
VerticalAlignment="Center">
|
|
<TextBox
|
|
Name="titleTextBox"
|
|
Margin="8,0,0,5"
|
|
VerticalAlignment="Bottom"
|
|
FontSize="20"
|
|
FontWeight="Thin"
|
|
IsReadOnly="True"
|
|
Resources="{StaticResource Material}"
|
|
Text="{Binding Path=Movie.Title, Mode=OneWay}" />
|
|
|
|
<StackPanel
|
|
Margin="8"
|
|
VerticalAlignment="Top"
|
|
Orientation="Horizontal">
|
|
<hc:Shield
|
|
Status="{Binding Path=Movie.imdbRating}"
|
|
Subject="IMDB"
|
|
Color="#f39c12" />
|
|
<hc:Shield
|
|
Margin="8,0,0,0"
|
|
Status="{Binding Path=Movie.Metascore}"
|
|
Subject="Meta Score"
|
|
Color="#e67e22" />
|
|
<hc:Shield
|
|
Margin="8,0"
|
|
Status="{Binding Path=Movie.Released}"
|
|
Subject="Realease"
|
|
Color="#27ae60" />
|
|
<hc:Shield
|
|
Margin="0,0"
|
|
Status="{Binding Path=Movie.Quality}"
|
|
Subject="Quality"
|
|
Color="#2980b9" />
|
|
<hc:Shield
|
|
Margin="8,0"
|
|
Status="{Binding Path=Movie.BoxOffice}"
|
|
Subject="BoxOffice"
|
|
Color="#8e44ad" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
|
<Grid Grid.Row="1">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid Grid.Column="1" Margin="8,0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<ItemsControl
|
|
x:Name="categoryItems"
|
|
Margin="0,10"
|
|
ItemsSource="{Binding Path=Movie.Category}">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<WrapPanel />
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<hc:Tag
|
|
Content="{Binding Path=Category.Name}"
|
|
Foreground="#444"
|
|
IsSelected="True"
|
|
ShowCloseButton="True" />
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
|
|
<materialDesign:PopupBox
|
|
Name="AddCategoryPopUp"
|
|
Grid.Column="1"
|
|
Margin="-45,0,0,-5"
|
|
IsEnabled="{Binding IsChecked, ElementName=PopupEnabled}"
|
|
StaysOpen="True"
|
|
Visibility="Hidden">
|
|
<materialDesign:Card Background="{StaticResource ThirdlyRegionBrush}" UniformCornerRadius="8">
|
|
|
|
<Grid Width="300" Margin="8,8,8,8">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<ComboBox
|
|
Name="categoryCombo"
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
Margin="8,8,8,8"
|
|
materialDesign:HintAssist.Hint="Categoreis"
|
|
materialDesign:HintAssist.IsFloating="True"
|
|
DisplayMemberPath="Name"
|
|
ItemsSource="{Binding Categories}"
|
|
MaxDropDownHeight="200" />
|
|
<StackPanel
|
|
Grid.Row="2"
|
|
HorizontalAlignment="Left"
|
|
Orientation="Horizontal">
|
|
<Button Click="AddCategoryButton_OnClick" Content="Add" />
|
|
<Button Command="{x:Static materialDesign:PopupBox.ClosePopupCommand}" Content="_Cancel" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</materialDesign:Card>
|
|
</materialDesign:PopupBox>
|
|
<Button
|
|
Name="addCategoryButton"
|
|
Grid.Column="1"
|
|
Width="40"
|
|
Height="40"
|
|
Background="#40000000"
|
|
Click="AddCategoryButtonBase_OnClick"
|
|
Content="+"
|
|
Resources="{StaticResource Material}"
|
|
Style="{StaticResource MaterialDesignIconButton}" />
|
|
</Grid>
|
|
|
|
<StackPanel
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<CheckBox
|
|
x:Name="dubbedToggle"
|
|
Margin="8,0"
|
|
HorizontalAlignment="Left"
|
|
Content="DUBBED"
|
|
IsChecked="{Binding Path=Movie.IsDubbed, Mode=OneWay}" />
|
|
<CheckBox
|
|
x:Name="seenToggle"
|
|
Margin="0,2"
|
|
HorizontalAlignment="Left"
|
|
Content="IsSeen"
|
|
IsChecked="{Binding Path=Movie.IsSeen, Mode=OneWay}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
<ItemsControl Grid.Row="2" ItemsSource="{Binding Properties}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<StackPanel Margin="0,5" Orientation="Horizontal">
|
|
<TextBlock
|
|
Padding="5"
|
|
HorizontalAlignment="Center"
|
|
FontSize="12"
|
|
FontWeight="Medium"
|
|
Text="{Binding Name}"
|
|
TextTrimming="CharacterEllipsis"
|
|
TextWrapping="Wrap" />
|
|
<TextBlock
|
|
Padding="0,5"
|
|
HorizontalAlignment="Center"
|
|
FontSize="11"
|
|
FontWeight="Medium"
|
|
Text="{Binding Value}"
|
|
TextTrimming="CharacterEllipsis"
|
|
TextWrapping="Wrap" />
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
|
|
</Grid>
|
|
|
|
|
|
<Grid
|
|
Grid.Column="2"
|
|
Margin="5,5,0,5"
|
|
HorizontalAlignment="Center">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<Button
|
|
Width="40"
|
|
Height="40"
|
|
Margin="0,0,10,0"
|
|
Padding="0,0,0,0"
|
|
VerticalAlignment="Bottom"
|
|
Click="Edit_OnClick"
|
|
Resources="{StaticResource Material}"
|
|
Style="{StaticResource MaterialDesignFloatingActionMiniButton}">
|
|
<materialDesign:PackIcon Width="20" Kind="Pencil" />
|
|
</Button>
|
|
<Button
|
|
Margin="0,5,0,0"
|
|
Padding="0,0,0,0"
|
|
Background="#FF5252"
|
|
BorderThickness="0"
|
|
Command="hc:ControlCommands.Close"
|
|
Foreground="White"
|
|
Resources="{StaticResource Material}"
|
|
Style="{StaticResource MaterialDesignFloatingActionMiniAccentButton}">
|
|
<materialDesign:PackIcon
|
|
Width="24"
|
|
Height="24"
|
|
Kind="Close" />
|
|
</Button>
|
|
</StackPanel>
|
|
|
|
<StackPanel
|
|
Grid.Row="1"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center">
|
|
<Button
|
|
Padding="0,0,0,0"
|
|
Command="{Binding OpenFolderCommand}"
|
|
Resources="{StaticResource Material}"
|
|
Style="{StaticResource MaterialDesignIconButton}">
|
|
<materialDesign:PackIcon Kind="AttachFile" />
|
|
</Button>
|
|
<Button
|
|
Width="60"
|
|
Height="60"
|
|
Padding="0,0,0,0"
|
|
Background="#40eeeeee"
|
|
Command="{Binding PlayFileCommand}"
|
|
Resources="{StaticResource Material}"
|
|
Style="{StaticResource MaterialDesignIconButton}">
|
|
<materialDesign:PackIcon
|
|
Width="35"
|
|
Height="35"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Foreground="DeepSkyBlue"
|
|
Kind="Play" />
|
|
|
|
</Button>
|
|
<Button
|
|
Padding="10,5,0,0"
|
|
Command="{Binding DeleteCommand}"
|
|
Foreground="#FF5252"
|
|
Resources="{StaticResource Material}"
|
|
Style="{StaticResource MaterialDesignIconButton}">
|
|
<materialDesign:PackIcon Kind="Delete" />
|
|
</Button>
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
<Grid Grid.Row="1" Margin="8">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock
|
|
Padding="5"
|
|
HorizontalAlignment="Center"
|
|
FontSize="12"
|
|
FontWeight="Medium"
|
|
Text="Plot : "
|
|
TextTrimming="CharacterEllipsis"
|
|
TextWrapping="Wrap" />
|
|
<TextBlock
|
|
Grid.Column="1"
|
|
Padding="0,5"
|
|
HorizontalAlignment="Center"
|
|
FontSize="11"
|
|
FontWeight="Medium"
|
|
Text="{Binding Path=Movie.Plot}"
|
|
TextTrimming="CharacterEllipsis"
|
|
TextWrapping="Wrap" />
|
|
</Grid>
|
|
</Grid>
|
|
</materialDesign:Card>
|
|
</Grid>
|
|
</materialDesign:Card>
|
|
</UserControl>
|