<Page x:Class="esoft.Pages.AddExecutorPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:local="clr-namespace:esoft.Pages"
      xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
      mc:Ignorable="d" 
      Title="Исполнитель" Height="1080" Width="1920">

    <Grid>
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Width="1920" Height="1080" Background="White">
            <StackPanel VerticalAlignment="Center" Width="1920" Height="1080" Background="#e8e8e8">
                <StackPanel Width="700" HorizontalAlignment="Left">
                    <Separator Height="50" Background="{x:Null}" />
                    <StackPanel Orientation="Horizontal" Width="700" HorizontalAlignment="Left">
                        <Separator Width="20" Background="{x:Null}"/>
                        <StackPanel Orientation="Horizontal" Width="680">
                            <TextBlock Style="{StaticResource BlockCommon}" Text="Фамилия:" FontSize="35"></TextBlock>
                            <Separator Width="16" Background="{x:Null}" />
                            <TextBox x:Name="TBoxSurname" Width="500" Height="35" FontSize="23"></TextBox>
                        </StackPanel>
                    </StackPanel>

                    <Separator Height="10" Background="{x:Null}"/>

                    <StackPanel Orientation="Horizontal" Width="700" HorizontalAlignment="Left">
                        <Separator Width="20" Background="{x:Null}"/>
                        <StackPanel Orientation="Horizontal" Width="680">
                            <TextBlock Style="{StaticResource BlockCommon}" Text="Имя:" FontSize="35"></TextBlock>
                            <Separator Width="92" Background="{x:Null}" />
                            <TextBox x:Name="TBoxName" Width="500" Height="35" FontSize="23"></TextBox>
                        </StackPanel>
                    </StackPanel>

                    <Separator Height="10" Background="{x:Null}"/>

                    <StackPanel Orientation="Horizontal" Width="700" HorizontalAlignment="Left">
                        <Separator Width="20" Background="{x:Null}"/>
                        <StackPanel Orientation="Horizontal" Width="680">
                            <TextBlock Style="{StaticResource BlockCommon}" Text="Отчество:" FontSize="35"></TextBlock>
                            <Separator Width="12" Background="{x:Null}" />
                            <TextBox x:Name="TBoxLastName" Width="500" Height="35" FontSize="23"></TextBox>
                        </StackPanel>
                    </StackPanel>

                    <Separator Height="10" Background="{x:Null}"/>

                    <StackPanel Orientation="Horizontal" Width="700" HorizontalAlignment="Left">
                        <Separator Width="20" Background="{x:Null}"/>
                        <StackPanel Orientation="Horizontal" Width="680">
                            <TextBlock Style="{StaticResource BlockCommon}" Text="Логин:" FontSize="35"></TextBlock>
                            <Separator Width="63" Background="{x:Null}" />
                            <TextBox x:Name="TBoxLogin" Width="500" Height="35" FontSize="23"></TextBox>
                        </StackPanel>
                    </StackPanel>

                    <Separator Height="10" Background="{x:Null}"/>

                    <StackPanel Orientation="Horizontal" Width="700" HorizontalAlignment="Left">
                        <Separator Width="20" Background="{x:Null}"/>
                        <StackPanel Orientation="Horizontal" Width="680">
                            <TextBlock Style="{StaticResource BlockCommon}" Text="Пароль:" FontSize="35"></TextBlock>
                            <Separator Width="41" Background="{x:Null}" />
                            <TextBox x:Name="TBoxPassword" Width="500" Height="35" FontSize="23"></TextBox>
                        </StackPanel>
                    </StackPanel>

                    <Separator Height="10" Background="{x:Null}" />

                    <StackPanel Orientation="Horizontal" Width="700" HorizontalAlignment="Left">
                        <Separator Width="20" Background="{x:Null}"/>
                        <StackPanel Orientation="Horizontal" Width="680">
                            <TextBlock Style="{StaticResource BlockCommon}" Text="Грэйд:" FontSize="35"></TextBlock>
                            <Separator Width="68" Background="{x:Null}" />
                            <ComboBox Name="cbGrade" Width="500" Height="35" DisplayMemberPath="Name" FontSize="23"/>
                        </StackPanel>
                    </StackPanel>

                    <Button Grid.Row="3" Name="BtnSaveExecutor" Content="Сохранить" FontSize="35" Width="680" Height="NaN" BorderThickness="0" Style="{StaticResource  StandartButtons}" Margin="16,10,0,15" Click="BtnSaveExecutor_Click">
                        <Button.Resources>
                            <Style TargetType="Border">
                                <Setter Property="CornerRadius" Value="10"/>
                            </Style>
                        </Button.Resources>
                    </Button>
                </StackPanel>

                

                <!--<TextBlock Text="Фильтрация задач по статусу" FontSize="26" Margin="-300, 10, 0, 0" FontWeight="Bold" Width="383"/>-->

                <StackPanel Margin="700,-764,0,0" Grid.Row="1" Width="1194" Height="70" Background="#FFDADADA"/>

                <StackPanel Margin="700,-320,0,0" Grid.Row="1" Width="1194" Height="923" Background="#FFDADADA">
                    <TextBlock Text="Название задачи" FontSize="26" Margin="-870, 10, 0, 0" FontWeight="Bold" Width="256"/>
                    <TextBlock Text="Дата создания задачи" FontSize="26" Margin="-50, -40, 0, 0" FontWeight="Bold" Width="325"/>
                    <TextBlock Text="Менеджер" HorizontalAlignment="Center" FontSize="26" Margin="480, -40, 0, 0" VerticalAlignment ="Center" FontWeight="Bold"></TextBlock>
                    <TextBlock Text="Статус" HorizontalAlignment="Right" FontSize="26" Margin="0, -40, 135, 0" VerticalAlignment ="Center" FontWeight="Bold"></TextBlock>
                </StackPanel>

                <ListView Grid.Row="1" Name="LViewTask" Height="790" Width="1194" HorizontalAlignment="Center" Background="{x:Null}" BorderBrush="{x:Null}" Margin="700,-950,0,0" ScrollViewer.VerticalScrollBarVisibility="Hidden" MouseDoubleClick="LViewTask_MouseDoubleClick">
                    <ListView.ItemContainerStyle>
                        <Style TargetType="ListViewItem">
                            <Setter Property="Margin" Value="0,0,0,10"/>
                            <Setter Property="Width" Value="1170"/>
                            <Style.Resources>
                                <Style TargetType="Border">
                                    <Setter Property="CornerRadius" Value="30"/>
                                </Style>
                            </Style.Resources>
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding Status}" Value="запланирована">
                                    <Setter Property="Background" Value="#73bbff"/>
                                </DataTrigger>
                                <DataTrigger Binding="{Binding Status}" Value="исполняется">
                                    <Setter Property="Background" Value="#ffef5e"/>
                                </DataTrigger>
                                <DataTrigger Binding="{Binding Status}" Value="выполнена">
                                    <Setter Property="Background" Value="#76cc6e"/>
                                </DataTrigger>
                                <DataTrigger Binding="{Binding Status}" Value="отменена">
                                    <Setter Property="Background" Value="#cc6e6e"/>
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </ListView.ItemContainerStyle>

                    <ListView.ItemTemplate>
                        <DataTemplate>
                            <Grid HorizontalAlignment="Center" Width="1900" Height="109">
                                <TextBlock Text="{Binding Title}" FontSize="24" Margin="390, 0, 0, 0" VerticalAlignment="Center" HorizontalAlignment="Left" Width="350" TextWrapping="Wrap"></TextBlock>
                                <TextBlock Text="{Binding CreateDateTime, StringFormat='{}{0:dd MMMM yyyy г.}', ConverterCulture='ru-RU'}" Margin="760, 32, 0, 0"  FontSize="24"></TextBlock>
                                <TextBlock Text="{Binding FioManager}" Margin="1125, 0, 0, 0" VerticalAlignment="Center" FontSize="24"></TextBlock>
                                <TextBlock Text="{Binding Status}" Margin="1330, 0, 0, 0" VerticalAlignment="Center" FontSize="24"></TextBlock>
                            </Grid>
                        </DataTemplate>
                    </ListView.ItemTemplate>
                </ListView>

                <StackPanel Width="970" Height="47" HorizontalAlignment="Left" Margin="830, -1960, 0, 0" Orientation="Horizontal">
                    <Separator Height="10" Background="{x:Null}" />
                    <CheckBox x:Name="ckbPlan" Content="запланирована" Margin="20, 0, 0, 0" Checked="FilterExecuter" Click="FilterExecuter">
                        <CheckBox.LayoutTransform>
                            <ScaleTransform ScaleX="2.5" ScaleY="2.5" />
                        </CheckBox.LayoutTransform>
                    </CheckBox>
                    <Separator Height="10" Background="{x:Null}" />
                    <CheckBox x:Name="ckbExecuted" Content="исполняется" Margin="20, 0, 0, 0" Checked="FilterExecuter" Click="FilterExecuter">
                        <CheckBox.LayoutTransform>
                            <ScaleTransform ScaleX="2.5" ScaleY="2.5" />
                        </CheckBox.LayoutTransform>
                    </CheckBox>
                    <Separator Height="10" Background="{x:Null}" />
                    <CheckBox x:Name="ckbDone" Content="выполнена" Margin="20, 0, 0, 0" Checked="FilterExecuter" Click="FilterExecuter">
                        <CheckBox.LayoutTransform>
                            <ScaleTransform ScaleX="2.5" ScaleY="2.5" />
                        </CheckBox.LayoutTransform>
                    </CheckBox>
                    <Separator Height="10" Background="{x:Null}" />
                    <CheckBox x:Name="ckbСancelled" Content="отменена" Margin="20, 0, 0, 0" Checked="FilterExecuter" Click="FilterExecuter">
                        <CheckBox.LayoutTransform>
                            <ScaleTransform ScaleX="2.5" ScaleY="2.5" />
                        </CheckBox.LayoutTransform>
                    </CheckBox>
                </StackPanel>
                
            </StackPanel>
        </StackPanel>
    </Grid>
</Page>
