123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- <?xml version="1.0" encoding="UTF-8"?>
- <local:BasePage
- xmlns="http://xamarin.com/schemas/2014/forms"
- xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
- xmlns:material="clr-namespace:XF.Material.Forms.UI;assembly=XF.Material"
- x:Class="comal.timesheets.AssignmentList"
- xmlns:local="clr-namespace:comal.timesheets"
- xmlns:schedule="clr-namespace:Syncfusion.SfSchedule.XForms;assembly=Syncfusion.SfSchedule.XForms"
- >
- <local:BasePage.Resources>
- <ResourceDictionary>
- <DataTemplate x:Key="DayViewAppointments">
- <Frame Grid.ColumnSpan="2" Grid.RowSpan="2" BorderColor="Gray" Margin="1" Padding="5,2,2,2" CornerRadius="5" HasShadow="False" Background="{Binding Color}">
- <Grid ColumnSpacing="0" RowSpacing="0">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="Auto"/>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="*"/>
- </Grid.RowDefinitions>
- <Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0" FontAttributes="Bold" FontSize="Micro" Text="{Binding Subject}"/>
- <Label Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Margin="0" FontSize="Micro" Text="{Binding Notes}" />
- <Image Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Grid.ColumnSpan="2" Margin="0" Source="tick" HeightRequest="20" WidthRequest="20" IsVisible="{Binding Completed}" HorizontalOptions="End" VerticalOptions="Start"/>
- </Grid>
- </Frame>
- </DataTemplate>
-
- <schedule:ScheduleAppointmentMapping x:Key="AppointmentMapping"
- IdMapping="Id"
- SubjectMapping="Subject"
- ColorMapping="Color"
- StartTimeMapping="StartTime"
- EndTimeMapping="EndTime"
- NotesMapping="Notes"
- TextColorMapping="TextColor"
- ResourceIdsMapping="ResourceIds"
- >
- </schedule:ScheduleAppointmentMapping>
-
-
-
- </ResourceDictionary>
-
- </local:BasePage.Resources>
-
- <local:BasePage.ActionButtons>
- <ImageButton x:Name="ShowHideSources" Clicked="ShowHideSources_OnClicked" Source="downarrowwhite"/>
- </local:BasePage.ActionButtons>
-
- <local:BasePage.PageContent>
-
- <Grid ColumnSpacing="2" RowSpacing="2" Margin="2">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" x:Name="ScheduleColumn"/>
- <ColumnDefinition Width="0" x:Name="JobColumn" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="40"/>
- <RowDefinition Height="*"/>
- </Grid.RowDefinitions>
-
- <DatePicker x:Name="DatePicker" Grid.Row="0" IsVisible="False" DateSelected="DatePicker_OnDateSelected" />
-
- <Grid Grid.Row="0" Grid.Column="0" ColumnSpacing="0">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition Width="*"/>
- </Grid.ColumnDefinitions>
- <local:ActionButton x:Name="SelectDate" Image="calendar" Grid.Row="0" Grid.Column="0" Clicked="SelectDate_OnClicked" Margin="0" />
- <local:ActionButton x:Name="ScheduleType" Grid.Row="0" Grid.Column="1" Clicked="SelectEmployees_OnClicked" Margin="0" />
- </Grid>
-
- <Frame x:Name="DayFrame" Grid.Row="1" Grid.Column="0" BorderColor="Silver" IsVisible="True" CornerRadius="5" HasShadow="False" Padding="0">
- <schedule:SfSchedule
- x:Name="DayView"
- ScheduleView="DayView"
- HeaderHeight="0"
- ViewHeaderHeight="0"
- TimeInterval="30"
- Background="White"
- EnableNavigation="False"
- VerticalOptions="Fill"
- ShowResourceView="False"
- ResourceViewMode="Absolute"
- TimeIntervalHeight="150"
- AllowAppointmentDrag="True"
- AppointmentMapping="{StaticResource AppointmentMapping}"
- AppointmentTemplate="{StaticResource DayViewAppointments}"
- CellTapped="Schedule_OnCellTapped"
- CellLongPressed="Schedule_OnCellLongPressed"
- Margin="0"
- >
-
- <schedule:SfSchedule.DayViewSettings>
- <schedule:DayViewSettings TimeRulerSize="50"/>
- </schedule:SfSchedule.DayViewSettings>
-
- </schedule:SfSchedule>
-
- </Frame>
-
- <Frame x:Name="TimelineFrame" Grid.Row="1" Grid.Column="0" BorderColor="Silver" IsVisible="False" CornerRadius="5" HasShadow="False" Padding="0">
- <schedule:SfSchedule
- x:Name="TimeLineView"
- ScheduleView="TimelineView"
- HeaderHeight="0"
- ViewHeaderHeight="0"
- TimeInterval="60"
- Background="White"
- ShowResourceView="False"
- EnableNavigation="False"
- ResourceViewHeight="50"
- ResourceViewMode="Absolute"
- TimeIntervalHeight="150"
- AllowAppointmentDrag="True"
- AppointmentMapping="{StaticResource AppointmentMapping}"
- AppointmentTemplate="{StaticResource DayViewAppointments}"
- CellTapped="Schedule_OnCellTapped"
- CellLongPressed="Schedule_OnCellLongPressed"
- Margin="0"
- >
-
- <schedule:SfSchedule.TimelineViewSettings>
- <schedule:TimelineViewSettings AppointmentHeight="200"/>
- </schedule:SfSchedule.TimelineViewSettings>
-
- <schedule:SfSchedule.ResourceItemTemplate>
- <DataTemplate>
- <Grid >
- <Grid.RowDefinitions>
- <RowDefinition Height="*"/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"/>
- </Grid.ColumnDefinitions>
- <Label Text="{Binding Name}" Margin="-100,-0,-100,0" FontSize="Micro" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" Rotation="-90"/>
- </Grid>
- </DataTemplate>
- </schedule:SfSchedule.ResourceItemTemplate>
-
- </schedule:SfSchedule>
- </Frame>
-
- <local:ActionButton
- x:Name="LookupType"
- Grid.Row="0"
- Grid.Column="1"
- Clicked="LookupsType_Tapped"
- Margin="0" />
-
- <Frame x:Name="LookupsFrame" Grid.Row="1" Grid.Column="1" BorderColor="Silver" CornerRadius="5" HasShadow="False" Padding="0">
- <ListView
- x:Name="Lookups"
- HasUnevenRows="True"
- ItemTapped="Lookups_OnItemTapped">
- <ListView.ItemTemplate>
- <DataTemplate>
- <ViewCell>
- <Grid VerticalOptions="FillAndExpand" BackgroundColor="{Binding Colour}" Margin="2,5,2,0">
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="Auto"/>
- </Grid.RowDefinitions>
- <Label Text="{Binding Code}" Grid.Row="0" VerticalOptions="FillAndExpand" HorizontalTextAlignment="Center" FontSize="Micro"/>
- <Label Text="{Binding Description}" Grid.Row="1" VerticalOptions="FillAndExpand" HorizontalTextAlignment="Center" FontSize="Micro"/>
- <BoxView Grid.Row="2" HeightRequest="1" Color="Silver" />
- </Grid>
- </ViewCell>
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
- </Frame>
-
- </Grid>
- </local:BasePage.PageContent>
- </local:BasePage>
|