123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308 |
- <UserControl x:Class="PRSDesktop.Calendar"
- 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"
- xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
- xmlns:dynamicGrid="clr-namespace:InABox.DynamicGrid;assembly=InABox.Wpf"
- mc:Ignorable="d"
- d:DesignHeight="600" d:DesignWidth="800" SizeChanged="Calendar_OnSizeChanged">
-
- <UserControl.Resources>
- <Style TargetType="syncfusion:TimeRulerCell">
- <Setter Property='VerticalContentAlignment' Value="Center" />
- </Style>
-
- <Style TargetType="syncfusion:AppointmentControl">
- <Setter Property="BorderBrush" Value="DimGray" />
- <Setter Property="SelectionBorderBrush" Value="Red"/>
- <Setter Property="BorderThickness" Value="0.75"/>
- <Setter Property="Margin" Value="0,0,-8,0"/>
- </Style>
-
- </UserControl.Resources>
-
- <dynamicGrid:DynamicSplitPanel
- x:Name="_splitPanel"
- Anchor="Detail"
- AnchorWidth="200"
- AllowableViews="Master,Combined"
- View="Combined"
- DetailCaption="Settings"
- OnChanged="_splitPanel_OnOnChanged">
-
- <dynamicGrid:DynamicSplitPanel.Master>
- <local:SfScheduler2
- x:Name="Bookings"
- HeaderDateFormat="dd MMMM yyyy"
- SizeChanged="Schedule_SizeChanged"
- AppointmentEditorOpening="Schedule_AppointmentEditorOpening"
- SchedulerContextMenuOpening="Bookings_OnSchedulerContextMenuOpening"
- AppointmentTapped="Bookings_OnAppointmentTapped"
- ViewType="Day"
- BorderThickness="1"
- BorderBrush="Silver"
- Background="Silver"
- ResourceGroupType="Date"
- FirstDayOfWeek="Monday"
- >
-
- <!-- <syncfusion:SfScheduler.HeaderTemplate> -->
- <!-- <DataTemplate> -->
- <!-- <Border BorderBrush="Transparent" Background="Transparent" Height="0" Width="200"/> -->
- <!-- </DataTemplate> -->
- <!-- </syncfusion:SfScheduler.HeaderTemplate> -->
-
- <syncfusion:SfScheduler.CellContextMenu>
- <ContextMenu />
- </syncfusion:SfScheduler.CellContextMenu>
-
- <syncfusion:SfScheduler.AppointmentContextMenu>
- <ContextMenu />
- </syncfusion:SfScheduler.AppointmentContextMenu>
-
- <syncfusion:SfScheduler.DaysViewSettings>
- <syncfusion:DaysViewSettings ViewHeaderDateFormat="dd MMM yy" ViewHeaderDayFormat="dddd"
- ViewHeaderHeight="45" TimeRulerFormat="hh:mm tt" TimeInterval="0:30"
- MinimumAllDayAppointmentsCount="0">
- <syncfusion:DaysViewSettings.ViewHeaderTemplate>
- <DataTemplate>
- <StackPanel Background="WhiteSmoke" Margin="-10,0,0,0" VerticalAlignment="Stretch"
- HorizontalAlignment="Stretch" Orientation="Vertical">
- <Label HorizontalContentAlignment="Center" Content="{Binding DayText}" FontSize="12"
- Foreground="Black" FontFamily="Arial" FontWeight="Bold"
- VerticalContentAlignment="Bottom" Margin="0,0,0,-5" />
- <Label HorizontalContentAlignment="Center" Content="{Binding DateText}" FontSize="10"
- VerticalContentAlignment="Top" />
- </StackPanel>
- </DataTemplate>
- </syncfusion:DaysViewSettings.ViewHeaderTemplate>
- <syncfusion:DaysViewSettings.AppointmentTemplate>
- <DataTemplate>
- <Border BorderThickness="0" Background="{Binding AppointmentBackground}" Padding="2" CornerRadius="2">
-
- <!-- <Border.ToolTip> -->
- <!-- <local:CalendarBlock DataContext="{Binding}" /> -->
- <!-- </Border.ToolTip> -->
-
- <local:CalendarBlock DataContext="{Binding}" />
-
- </Border>
- </DataTemplate>
- </syncfusion:DaysViewSettings.AppointmentTemplate>
- </syncfusion:DaysViewSettings>
- </syncfusion:SfScheduler.DaysViewSettings>
- </local:SfScheduler2>
- </dynamicGrid:DynamicSplitPanel.Master>
-
-
- <dynamicGrid:DynamicSplitPanel.Detail>
- <Grid>
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="*" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
-
- <DockPanel
- Grid.Row="0"
- Grid.Column="0"
- Grid.ColumnSpan="2">
-
- <Button
- x:Name="_settingsButton"
- DockPanel.Dock="Left"
- Click="_settingsButton_OnClick"
- Background="WhiteSmoke"
- BorderBrush="Gray"
- BorderThickness="0.75"
- Height="25"
- Width="25"
- Padding="2">
- <Polygon Points="0,0 8,5, 0,10" Stroke="Gray" Fill="Silver" />
- </Button>
-
- <ComboBox
- x:Name="CalendarViewSelector"
- DockPanel.Dock="Left"
- SelectionChanged="CalendarViewSelector_SelectionChanged"
- VerticalContentAlignment="Center"
- SelectedIndex="-1"
- Margin="5,0,0,0">
- <ComboBoxItem Content="Day" />
- <ComboBoxItem Content="Work Week" />
- <ComboBoxItem Content="Week" />
- </ComboBox>
-
- </DockPanel>
-
-
- <local:EmployeeSelector
- x:Name="EmployeeSelector"
- Grid.Row="1"
- Grid.Column="0"
- Grid.ColumnSpan="2"
- Margin="-5,5,0,0"
- SettingsChanged="EmployeeSelector_OnSettingsChanged"
- SelectionChanged="EmployeeSelector_OnSelectionChanged"/>
-
- <Label
- Grid.Row="2"
- Grid.Column="0"
- VerticalContentAlignment="Center"
- Margin="0,5,0,0"
- Content="Start" />
-
- <DockPanel
- Grid.Row="2"
- Grid.Column="1"
- Margin="5,5,0,0">
- <Button DockPanel.Dock="Left" Padding="2" BorderThickness="0.75,0.75,0,0.75" Background="White"
- BorderBrush="Gray" Click="StartTimeSelector_Down_Click">
- <Image Source="pack://application:,,,/Resources/leftarrow.png" Height="20" Width="20" />
- </Button>
- <Button DockPanel.Dock="Right" Padding="2" BorderThickness="0,0.75,0.75,0.75" Background="White"
- BorderBrush="Gray" Click="StartTimeSelector_Up_Click">
- <Image Source="pack://application:,,,/Resources/rightarrow.png" Height="20" Width="20" />
- </Button>
- <TextBox x:Name="StartTimeSelector" IsReadOnly="True" DockPanel.Dock="Left" BorderThickness="0,0.75,0,0.75"
- BorderBrush="Gray" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />
- </DockPanel>
- <Label
- Grid.Row="3"
- Grid.Column="0"
- VerticalContentAlignment="Center"
- Margin="0,5,0,0"
- Content="Finish"/>
-
- <DockPanel
- Grid.Row="3"
- Grid.Column="1"
- Margin="5,5,0,0">
- <Button DockPanel.Dock="Left" Padding="2" BorderThickness="0.75,0.75,0,0.75" Background="White"
- BorderBrush="Gray" Click="FinishTimeSelector_Down_Click">
- <Image Source="pack://application:,,,/Resources/leftarrow.png" Height="20" Width="20" />
- </Button>
- <Button DockPanel.Dock="Right" Padding="2" BorderThickness="0,0.75,0.75,0.75" Background="White"
- BorderBrush="Gray" Click="FinishTimeSelector_Up_Click">
- <Image Source="pack://application:,,,/Resources/rightarrow.png" Height="20" Width="20" />
- </Button>
- <TextBox x:Name="FinishTimeSelector" IsReadOnly="True" DockPanel.Dock="Left" BorderThickness="0,0.75,0,0.75"
- BorderBrush="Gray" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />
- </DockPanel>
-
- <Label
- Grid.Row="4"
- Grid.Column="0"
- VerticalContentAlignment="Center"
- Margin="0,5,0,0"
- Content="Assignments" />
-
- <ComboBox
- x:Name="AssignmentTypeSelector"
- Grid.Row="4"
- Grid.Column="1"
- SelectedIndex="0"
- Margin="5,5,0,0"
- SelectionChanged="AssignmentTypeSelector_OnSelectionChanged"
- VerticalContentAlignment="Center">
- <ComboBoxItem Content="Automatic" />
- <ComboBoxItem Content="Booked Time" />
- <ComboBoxItem Content="Actual Time" />
- </ComboBox>
-
- <Label
- Grid.Row="5"
- Grid.Column="0"
- VerticalContentAlignment="Center"
- Margin="0,5,0,0"
- Content="Background" />
-
- <ComboBox
- x:Name="BackgroundTypeSelector"
- Grid.Row="5"
- Grid.Column="1"
- SelectedIndex="0"
- Margin="5,5,0,0"
- SelectionChanged="BackgroundTypeSelector_OnSelectionChanged"
- VerticalContentAlignment="Center">
- <ComboBoxItem Content="Automatic" />
- <ComboBoxItem Content="Rosters" />
- <ComboBoxItem Content="Timesheets" />
- </ComboBox>
-
- <Label
- Grid.Row="6"
- Grid.Column="0"
- VerticalContentAlignment="Center"
- Margin="0,5,0,0"
- Content="Interval"/>
-
- <ComboBox
- x:Name="IntervalSelector"
- Grid.Row="6"
- Grid.Column="1"
- SelectedIndex="0"
- Margin="5,5,0,0"
- SelectionChanged="IntervalSelector_OnSelectionChanged"
- VerticalContentAlignment="Center">
- <ComboBoxItem Content="Five Minutes" />
- <ComboBoxItem Content="Six Minutes" />
- <ComboBoxItem Content="Ten Minutes" />
- <ComboBoxItem Content="Fifteen Minutes" />
- <ComboBoxItem Content="Twenty Minutes" />
- <ComboBoxItem Content="Thirty Minutes" />
- <ComboBoxItem Content="Sixty Minutes" />
- </ComboBox>
-
- <Label
- Grid.Row="7"
- Grid.Column="0"
- VerticalContentAlignment="Center"
- Margin="0,5,0,0"
- Content="Zoom"/>
-
- <DockPanel
- Grid.Row="7"
- Grid.Column="1"
- Margin="5,5,0,0">
- <Button DockPanel.Dock="Left" Padding="2" BorderThickness="0.75,0.75,0,0.75" Background="White"
- BorderBrush="Gray" Click="ZoomSelector_Down_Click">
- <Image Source="pack://application:,,,/Resources/leftarrow.png" Height="20" Width="20" />
- </Button>
- <Button DockPanel.Dock="Right" Padding="2" BorderThickness="0,0.75,0.75,0.75" Background="White"
- BorderBrush="Gray" Click="ZoomSelector_Up_Click">
- <Image Source="pack://application:,,,/Resources/rightarrow.png" Height="20" Width="20" />
- </Button>
- <TextBox x:Name="ZoomSelector" IsReadOnly="True" DockPanel.Dock="Left" BorderThickness="0,0.75,0,0.75"
- BorderBrush="Gray" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />
- </DockPanel>
-
- </Grid>
-
- </dynamicGrid:DynamicSplitPanel.Detail>
- </dynamicGrid:DynamicSplitPanel>
- </UserControl>
|