| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156 |
- <UserControl x:Class="PRSDesktop.TasksByStatusControl"
- 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:PRSDesktop"
- mc:Ignorable="d"
- x:Name="Control"
- d:DesignHeight="450" d:DesignWidth="800">
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="KanbanResources.xaml"/>
- </ResourceDictionary.MergedDictionaries>
- </ResourceDictionary>
- </UserControl.Resources>
- <UserControl.CommandBindings>
- <CommandBinding Command="{x:Static local:KanbanResources.EditTask}"
- Executed="EditTask_Executed"
- CanExecute="CommandBinding_CanExecute"/>
- <CommandBinding Command="{x:Static local:KanbanResources.OpenTaskMenu}"
- Executed="OpenTaskMenu_Executed"
- CanExecute="CommandBinding_CanExecute"/>
- <CommandBinding Command="{x:Static local:KanbanResources.SelectTask}"
- Executed="SelectTask_Executed"
- CanExecute="CommandBinding_CanExecute"/>
- </UserControl.CommandBindings>
- <Grid x:Name="LayoutRoot">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" x:Name="EmployeeListColumn" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <Border Grid.Row="0" Grid.Column="0" CornerRadius="5,5,0,0" BorderBrush="Gray" BorderThickness="0.75"
- Background="WhiteSmoke" Padding="5" Margin="0,0,4,2">
- <Label Content="Employee List" HorizontalContentAlignment="Center" />
- </Border>
- <ListView Grid.Column="0" Grid.Row="1" x:Name="EmployeeList" HorizontalAlignment="Stretch"
- SelectionChanged="Employees_SelectionChanged" Margin="0,0,4,0" Background="White" BorderBrush="Gray"
- BorderThickness="0.75">
- <ListView.ItemTemplate>
- <DataTemplate>
- <Grid HorizontalAlignment="Stretch" Margin="4,2,4,2">
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
- <Border Width="40" Height="40" CornerRadius="20" BorderBrush="Black" BorderThickness="1"
- VerticalAlignment="Center" HorizontalAlignment="Center">
- <Border.Background>
- <ImageBrush ImageSource="{Binding Path=Image}" Stretch="UniformToFill" />
- </Border.Background>
- </Border>
- <TextBlock x:Name="PCName" Height="Auto" TextWrapping="Wrap" Width="80" Margin="4,0,0,0"
- TextAlignment="Left" Text="{Binding Name}" VerticalAlignment="Center" />
- </StackPanel>
- </Grid>
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
- <Border Grid.Row="0" Grid.Column="1" CornerRadius="5,5,0,0" BorderBrush="Gray" BorderThickness="0.75"
- Background="WhiteSmoke" Padding="5" Margin="0,0,0,2">
- <DockPanel>
- <Button DockPanel.Dock="Left" x:Name="TaskTypesLabel" Content="Filter" Padding="4,0" Click="TaskTypesLabel_OnClick" />
- <ComboBox DockPanel.Dock="Left" x:Name="TaskTypes" Margin="5,0,0,0" Width="150" SelectedIndex="0"
- SelectionChanged="TaskTypes_SelectionChanged" VerticalContentAlignment="Center"
- SelectedValuePath="Key" DisplayMemberPath="Value" />
- <Button DockPanel.Dock="Left" x:Name="JobFilterBtn" Content="Filter Job" Padding="4,0" Margin="5,0,0,0" Click="JobFilterBtn_OnClick" />
- <local:TaskPanelFilterButton DockPanel.Dock="Left" x:Name="FilterButton"
- Margin="5,0,0,0"
- OnFilterRefresh="FilterButton_OnFilterRefresh"
- OnFiltersSelected="FilterButton_OnFiltersSelected"/>
- <Label DockPanel.Dock="Left" Content="Search" Margin="5,0,0,0" />
- <Button DockPanel.Dock="Right" x:Name="Export" Padding="10,0" Margin="5,0,0,0" Content="Export"
- Click="Export_Click" />
- <CheckBox DockPanel.Dock="Right" x:Name="IncludeCompleted" Margin="10,0,5,0"
- Content="Include Completed" VerticalAlignment="Center" HorizontalAlignment="Right"
- Checked="IncludeCompleted_Checked" Unchecked="IncludeCompleted_Checked" />
- <CheckBox DockPanel.Dock="Right" x:Name="IncludeObserved" Margin="10,0,5,0" Content="Include Observing"
- VerticalAlignment="Center" HorizontalAlignment="Right" Checked="IncludeObserved_Checked"
- Unchecked="IncludeObserved_Checked" />
- <CheckBox DockPanel.Dock="Right" x:Name="IncludeLocked" Margin="10,0,5,0" Content="Include Locked"
- VerticalAlignment="Center" HorizontalAlignment="Right" Checked="IncludeLocked_Checked"
- Unchecked="IncludeLocked_Checked" />
- <ComboBox DockPanel.Dock="Right" x:Name="ViewType" Margin="5,0,0,0" Width="100" SelectedIndex="0"
- SelectionChanged="ViewType_SelectionChanged" VerticalContentAlignment="Center">
- <ComboBoxItem Content="Full" />
- <ComboBoxItem Content="Compact" />
- </ComboBox>
- <Label DockPanel.Dock="Right" x:Name="ViewTypeLabel" Content="View" Margin="5,0,0,0" />
- <TextBox DockPanel.Dock="Left" x:Name="Search" Margin="5,0,0,0" HorizontalAlignment="Stretch"
- VerticalContentAlignment="Center" KeyUp="Search_KeyUp" />
- </DockPanel>
- </Border>
- <ItemsControl x:Name="ColumnsList" ItemsSource="{Binding ElementName=Control,Path=Columns}"
- Grid.Row="1" Grid.Column="1">
- <ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <UniformGrid Rows="1"/>
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Border BorderBrush="LightGray" BorderThickness="0.75,0,0,0">
- <Grid ContextMenuOpening="Column_ContextMenuOpening"
- Tag="{Binding}">
- <Grid.ContextMenu>
- <ContextMenu/>
- </Grid.ContextMenu>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="*"/>
- </Grid.RowDefinitions>
- <Border BorderBrush="LightGray" BorderThickness="0,0,0,1" Margin="0,0,0,5">
- <StackPanel Orientation="Vertical"
- Grid.Row="0">
- <TextBlock Text="{Binding Title,Mode=OneWay}" FontSize="16" FontWeight="DemiBold" HorizontalAlignment="Left"
- Margin="10,0,10,0" />
- <TextBlock FontSize="12" HorizontalAlignment="Left" Margin="10,0,5,0">
- <Run Text="{Binding NumTasks,Mode=OneWay}" />
- <Run Text="Tasks /" />
- <Run Text="{Binding NumHours,Mode=OneWay, StringFormat={}{0:F2}}"/>
- <Run Text="Hours" />
- </TextBlock>
- </StackPanel>
- </Border>
- <ItemsControl Grid.Row="1" Margin="5,0"
- AllowDrop="True"
- DragOver="ItemsControl_DragOver"
- Drop="ItemsControl_Drop"
- Tag="{Binding}"
- ItemsSource="{Binding Tasks,Mode=OneWay}">
- <ItemsControl.Style>
- <Style TargetType="{x:Type ItemsControl}" BasedOn="{StaticResource VirtualisedItemsControlStyle}">
- <Setter Property="ItemTemplate" Value="{StaticResource FullKanban}"/>
- <Style.Triggers>
- <DataTrigger Binding="{Binding Mode,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type local:TasksByStatusControl}}}"
- Value="{x:Static local:KanbanViewMode.Compact}">
- <Setter Property="ItemTemplate" Value="{StaticResource CompactKanban}"/>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </ItemsControl.Style>
- </ItemsControl>
- </Grid>
- </Border>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </Grid>
- </UserControl>
|