123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311 |
- <UserControl x:Class="PRSDesktop.AssignmentView2"
- 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:syncfusion="http://schemas.syncfusion.com/wpf"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800" Background="White">
-
- <UserControl.Resources>
- <Style TargetType="syncfusion:TimeRulerCell">
- <Setter Property='VerticalContentAlignment' Value="Center" />
- </Style>
- </UserControl.Resources>
- <Grid x:Name="grid">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="0" x:Name="SideBar" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="35" x:Name="DateRow" />
- <RowDefinition Height="*" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
-
- <Border
- x:Name="DateBorder"
- Grid.Row="0"
- Grid.Column="0"
- BorderBrush="Gray"
- BorderThickness="0.75,0.75,0.75,0.75"
- Background="WhiteSmoke"
- CornerRadius="0,0,0,0"
- Margin="0,0,0,2"
- Padding="2">
- <DockPanel>
- <Button
- x:Name="ShowSideBar"
- DockPanel.Dock="Right"
- Content="<"
- Width="20"
- Margin="0,2,2,2"
- Visibility="Visible"
- Click="OpenSideBar_Click"/>
-
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
- <Button
- x:Name="PrevMonth"
- BorderThickness="0"
- Background="Transparent"
- Click="PrevMonth_Click"
- Margin="2"/>
- <Button
- x:Name="PrevDay"
- BorderThickness="0"
- Background="Transparent"
- Click="PrevDay_Click"
- Margin="2"/>
- <TextBox
- x:Name="CurrentDate"
- Width="250"
- Text="ddd, dd MMMM yyyy"
- HorizontalContentAlignment="Center"
- Background="Transparent"
- VerticalContentAlignment="Center"
- MouseDoubleClick="CurrentDate_MouseDoubleClick"
- Margin="2" />
- <Button
- x:Name="NextDay"
- BorderThickness="0"
- Background="Transparent"
- Click="NextDay_Click"
- Margin="2"/>
- <Button
- x:Name="NextMonth"
- BorderThickness="0"
- Background="Transparent"
- Click="NextMonth_Click"
- Margin="2"/>
- </StackPanel>
- </DockPanel>
- </Border>
- <Border
- Grid.Row="0"
- Grid.Column="1"
- BorderBrush="Gray"
- BorderThickness="0,0.75,0.75,0.75"
- Background="WhiteSmoke"
- CornerRadius="0,0,0,0"
- Margin="0,0,0,2"
- Padding="2">
- <DockPanel>
- <Label
- DockPanel.Dock="Left"
- Content="Team:"
- VerticalContentAlignment="Center"
- />
- <Button
- x:Name="HideSideBar"
- DockPanel.Dock="Right"
- Content=">"
- Width="20"
- Margin="2,2,2,2"
- Click="CloseSideBar_Click"
- VerticalAlignment="Stretch"
- VerticalContentAlignment="Center"/>
- <ComboBox
- DockPanel.Dock="Left"
- x:Name="Teams"
- DisplayMemberPath="Value"
- SelectedValuePath="Key"
- SelectionChanged="Teams_SelectionChanged"
- VerticalAlignment="Stretch"
- VerticalContentAlignment="Center"
- Margin="0,2,0, 2" />
- </DockPanel>
- </Border>
- <Border Grid.Row="1" Grid.Column="0" Grid.RowSpan="2" BorderBrush="Gray"
- BorderThickness="1" Background="WhiteSmoke" Margin="0,0,0,0" Padding="0">
-
- <!-- PreviewMouseRightButtonUp="Bookings_MouseRightButtonUp" -->
- <syncfusion:SfScheduler
- Grid.Row="0"
- Name="Bookings"
- SizeChanged="Bookings_SizeChanged"
- AppointmentEditorOpening="Schedule_AppointmentEditorOpening"
- AppointmentTapped="Bookings_OnAppointmentTapped"
- SchedulerContextMenuOpening="Bookings_OnSchedulerContextMenuOpening"
- PreviewKeyDown="Bookings_PreviewKeyDown"
- AllowDrop="True"
- HeaderDateFormat="dd MMM yyyy"
- HeaderHeight="0"
- Background="LightYellow"
- ViewType="Day"
- ResourceGroupType="Resource"
- >
-
- <syncfusion:SfScheduler.CellContextMenu>
- <ContextMenu />
- </syncfusion:SfScheduler.CellContextMenu>
-
- <syncfusion:SfScheduler.AppointmentContextMenu>
- <ContextMenu />
- </syncfusion:SfScheduler.AppointmentContextMenu>
-
- <syncfusion:SfScheduler.DaysViewSettings>
- <syncfusion:DaysViewSettings ViewHeaderHeight="0" TimeRulerFormat="HH:mm">
-
- <syncfusion:DaysViewSettings.AppointmentTemplate>
- <DataTemplate>
- <Border
- BorderBrush="Gray"
- BorderThickness="0.75"
- CornerRadius="3"
- Background="{Binding AppointmentBackground}"
- Margin="0,0, 0,0">
-
- <Border.ToolTip>
- <Grid Margin="4,2,0,2">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <DockPanel Grid.Row="0" Grid.Column="0" Height="20">
- <TextBlock Text="{Binding Number}" DockPanel.Dock="Left"
- VerticalAlignment="Center" FontWeight="DemiBold"/>
- <TextBlock Text="{Binding JobNumber}" DockPanel.Dock="Left"
- VerticalAlignment="Center" FontWeight="DemiBold" />
- <Image Source="{Binding Locked}" DockPanel.Dock="Right"
- VerticalAlignment="Center" MaxWidth="20" MaxHeight="20" />
- <Image Source="{Binding Completed}" DockPanel.Dock="Right"
- VerticalAlignment="Center" MaxWidth="20" MaxHeight="20" />
- <Image Source="{Binding TimeSheet}" DockPanel.Dock="Right"
- VerticalAlignment="Center" MaxWidth="20" MaxHeight="20" />
- <Image Source="{Binding HasDelivery}" DockPanel.Dock="Right"
- VerticalAlignment="Center" MaxWidth="20" MaxHeight="20" />
- <TextBlock Text="{Binding Subject}" DockPanel.Dock="Left"
- VerticalAlignment="Center" FontWeight="DemiBold" />
- </DockPanel>
- <TextBlock Grid.Row="1" Grid.Column="0" HorizontalAlignment="Left"
- Text="{Binding Notes}" TextWrapping="Wrap" />
- </Grid>
- </Border.ToolTip>
-
- <Grid Margin="4,2,0,2">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <DockPanel Grid.Row="0" Grid.Column="0" Height="20">
- <TextBlock Text="{Binding Number}" Foreground="{Binding AppointmentForeground}"
- DockPanel.Dock="Left" VerticalAlignment="Center"
- FontWeight="DemiBold" />
- <TextBlock Text="{Binding JobNumber}" DockPanel.Dock="Left"
- Foreground="{Binding AppointmentForeground}"
- VerticalAlignment="Center" FontWeight="DemiBold" />
- <Image Source="{Binding Locked}" DockPanel.Dock="Right"
- VerticalAlignment="Center" MaxWidth="20" MaxHeight="20" />
- <Image Source="{Binding Completed}" DockPanel.Dock="Right"
- VerticalAlignment="Center" MaxWidth="20" MaxHeight="20" />
- <Image Source="{Binding TimeSheet}" DockPanel.Dock="Right"
- VerticalAlignment="Center" MaxWidth="20" MaxHeight="20" />
- <Image Source="{Binding HasDelivery}" DockPanel.Dock="Right"
- VerticalAlignment="Center" MaxWidth="20" MaxHeight="20" />
- <TextBlock Text="{Binding Subject}"
- Foreground="{Binding AppointmentForeground}" DockPanel.Dock="Left"
- VerticalAlignment="Center" FontWeight="DemiBold" />
- </DockPanel>
- <TextBlock
- Grid.Row="1"
- Grid.Column="0"
- HorizontalAlignment="Left"
- Text="{Binding Notes}"
- TextWrapping="Wrap"
- Foreground="{Binding AppointmentForeground}" />
- </Grid>
- </Border>
- </DataTemplate>
- </syncfusion:DaysViewSettings.AppointmentTemplate>
- </syncfusion:DaysViewSettings>
- </syncfusion:SfScheduler.DaysViewSettings>
- </syncfusion:SfScheduler>
-
- </Border>
-
- <syncfusion:CheckListBox
- Grid.Row="1"
- Grid.Column="2"
- Margin="2,0,0,0"
- x:Name="Employees"
- DisplayMemberPath="Value"
- SelectedValuePath="Key"
- IsCheckOnFirstClick="True"
- SelectionChanged="Employees_SelectionChanged"
- BorderBrush="Gray"
- BorderThickness="0.75"
- Background="LightYellow"
- />
- <Border
- Grid.Row="2"
- Grid.Column="2"
- BorderBrush="Gray"
- BorderThickness="0.75"
- Background="WhiteSmoke"
- Margin="2,2,0,0"
- Padding="3">
-
- <Grid Margin="2">
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
- <Label Content="Start Time" Grid.Row="0" Grid.Column="0" />
- <syncfusion:TimeSpanEdit
- Grid.Row="0"
- Grid.Column="1"
- x:Name="StartTime"
- ValueChanged="StartTime_OnValueChanged"
- TextAlignment="Center"
- MinValue="00:00"
- MaxValue="1:00:00:00"
- Format="hh:mm"
- Margin="2" />
- <Label x:Name="StartAMPM" Grid.Row="0" Grid.Column="2" Content="AM" />
- <Label Content="Finish Time" Grid.Row="3" />
- <syncfusion:TimeSpanEdit
- x:Name="EndTime"
- ValueChanged="EndTime_OnValueChanged"
- Grid.Row="3"
- Grid.Column="1"
- TextAlignment="Center"
- MinValue="00:00"
- MaxValue="1:00:00:00"
- Format="hh:mm"
- Margin="2" />
- <Label x:Name="EndAMPM" Content="PM" Grid.Row="3" Grid.Column="2" />
- </Grid>
- </Border>
- </Grid>
- </UserControl>
|