376 lines
19 KiB
XML
376 lines
19 KiB
XML
<dx:DXWindow
|
|
x:Class="BeWo.Scheduling.View.OpenAppointmentsView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:converter="clr-namespace:BeWo.Scheduling.Converter"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:drawing="http://schemas.devexpress.com/winfx/2008/xaml/scheduler/internal"
|
|
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
|
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
Width="650"
|
|
Height="400"
|
|
MinWidth="500"
|
|
MinHeight="300"
|
|
dx:ThemeManager.ThemeName="Office2010Black"
|
|
Closing="OpenAppointmentsView_OnClosing"
|
|
ShowIcon="False"
|
|
WindowStartupLocation="CenterScreen"
|
|
mc:Ignorable="d">
|
|
<dx:DXWindow.Resources>
|
|
<drawing:TimeSpanToDateTimeConverter x:Key="TimeSpanToDateTimeConverter" />
|
|
<converter:RecurringAppointmentDurationConverter x:Key="RecurringAppointmentDurationConverter" />
|
|
<converter:RequestVisibilityConverter x:Key="RequestVisibilityConverter" />
|
|
<converter:ParticipationRequestListViewConverter x:Key="ParticipationRequestListViewConverter" />
|
|
<LinearGradientBrush x:Key="NavigationContentBrush" StartPoint="0.5,0" EndPoint="0.5,1">
|
|
<GradientStop Offset="0" Color="#FF04B4D0" />
|
|
<GradientStop Offset="1" Color="#FF038195" />
|
|
</LinearGradientBrush>
|
|
</dx:DXWindow.Resources>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Grid Row="0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<ListView
|
|
x:Name="OpenAppointmentsList"
|
|
Grid.Column="0"
|
|
MinWidth="120"
|
|
MaxWidth="300"
|
|
Margin="3"
|
|
Background="{StaticResource NavigationContentBrush}"
|
|
ItemsSource="{Binding OpenAppointments, UpdateSourceTrigger=PropertyChanged}"
|
|
SelectedIndex="0"
|
|
SelectedItem="{Binding SelectedAppointment, UpdateSourceTrigger=PropertyChanged}"
|
|
SelectionMode="Single">
|
|
<ListView.ItemContainerStyle>
|
|
<Style TargetType="{x:Type ListViewItem}">
|
|
<Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorLevel=1, AncestorType={x:Type ItemsControl}, Mode=FindAncestor}}" />
|
|
<Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorLevel=1, AncestorType={x:Type ItemsControl}, Mode=FindAncestor}}" />
|
|
<Setter Property="Margin" Value="0,2,1,0" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate>
|
|
<Grid>
|
|
<Border
|
|
MinHeight="20"
|
|
Background="Transparent"
|
|
CornerRadius="5" />
|
|
<Border
|
|
x:Name="ItemBorder"
|
|
MinHeight="20"
|
|
Background="#FF000000"
|
|
CornerRadius="5">
|
|
<Border.OpacityMask>
|
|
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
|
|
<GradientStop Offset="0" Color="#19000000" />
|
|
<GradientStop Offset="1" Color="#26000000" />
|
|
</LinearGradientBrush>
|
|
</Border.OpacityMask>
|
|
</Border>
|
|
<Border
|
|
x:Name="ItemContent"
|
|
MinHeight="20"
|
|
CornerRadius="5">
|
|
<Grid
|
|
Margin="5,3,5,3"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch"
|
|
OpacityMask="{x:Null}"
|
|
SnapsToDevicePixels="True">
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
FontFamily="Microsoft Sans Serif"
|
|
FontSize="12"
|
|
Foreground="#FFD2D2D2"
|
|
Text="{Binding Converter={StaticResource ParticipationRequestListViewConverter}, ConverterParameter=LabelId}" />
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="ItemBorder" Property="OpacityMask">
|
|
<Setter.Value>
|
|
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
|
|
<GradientStop Offset="0" Color="#33000000" />
|
|
<GradientStop Offset="1" Color="#66000000" />
|
|
</LinearGradientBrush>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Trigger>
|
|
<Trigger Property="ListBoxItem.IsSelected" Value="True">
|
|
<Setter TargetName="ItemBorder" Property="OpacityMask">
|
|
<Setter.Value>
|
|
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
|
|
<GradientStop Offset="0" Color="#99000000" />
|
|
<GradientStop Offset="1" Color="#CC000000" />
|
|
</LinearGradientBrush>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Trigger>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="ListBoxItem.IsSelected" Value="True" />
|
|
<Condition Property="Selector.IsSelectionActive" Value="False" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="ItemBorder" Property="OpacityMask">
|
|
<Setter.Value>
|
|
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
|
|
<GradientStop Offset="0" Color="#99000000" />
|
|
<GradientStop Offset="1" Color="#B2000000" />
|
|
</LinearGradientBrush>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</MultiTrigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</ListView.ItemContainerStyle>
|
|
</ListView>
|
|
<Grid Grid.Row="0" Grid.Column="1">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<TextBlock
|
|
Grid.ColumnSpan="4"
|
|
HorizontalAlignment="Center"
|
|
Foreground="#9a0000"
|
|
Visibility="{Binding Path=SelectedAppointment, Converter={StaticResource RequestVisibilityConverter}, ConverterParameter=TerminVerstrichen}">
|
|
Dieser Termin liegt in der Vergangenheit
|
|
</TextBlock>
|
|
<Label
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
Margin="3"
|
|
Content="Betreff" />
|
|
<TextBox
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
Grid.ColumnSpan="3"
|
|
Height="23"
|
|
Margin="3"
|
|
IsReadOnly="True"
|
|
Text="{Binding Path=SelectedAppointment.Subject, Mode=OneWay}" />
|
|
|
|
<Label
|
|
Grid.Row="2"
|
|
Grid.Column="0"
|
|
Margin="3"
|
|
Content="Ort" />
|
|
<TextBox
|
|
Grid.Row="2"
|
|
Grid.Column="1"
|
|
Grid.ColumnSpan="3"
|
|
Height="23"
|
|
Margin="3"
|
|
IsReadOnly="True"
|
|
Text="{Binding Path=SelectedAppointment.Location, Mode=OneWay}" />
|
|
|
|
<Label
|
|
Grid.Row="3"
|
|
Grid.Column="0"
|
|
Margin="3"
|
|
Content="Organisator" />
|
|
<TextBox
|
|
Grid.Row="3"
|
|
Grid.Column="1"
|
|
Grid.ColumnSpan="3"
|
|
Height="23"
|
|
Margin="3"
|
|
IsReadOnly="True"
|
|
Text="{Binding Path=SelectedAppointment.Originator.FirstNameLastName, Mode=OneWay}" />
|
|
|
|
<Label
|
|
Grid.Row="4"
|
|
Grid.Column="0"
|
|
Margin="3"
|
|
VerticalAlignment="Center"
|
|
Content="Start" />
|
|
<dxe:DateEdit
|
|
Grid.Row="4"
|
|
Grid.Column="1"
|
|
Height="23"
|
|
MinWidth="80"
|
|
Margin="3"
|
|
Background="White"
|
|
EditValue="{Binding SelectedAppointment.Start, Mode=OneWay}"
|
|
IsEnabled="True"
|
|
IsReadOnly="True"
|
|
MaskType="DateTimeAdvancingCaret"
|
|
PopupOpening="PopupBaseEdit_OnPopupOpening" />
|
|
<dxe:TextEdit
|
|
Grid.Row="4"
|
|
Grid.Column="2"
|
|
Height="23"
|
|
Margin="3"
|
|
EditValue="{Binding SelectedAppointment.StartTime, Converter={StaticResource TimeSpanToDateTimeConverter}, Mode=OneWay}"
|
|
IsEnabled="True"
|
|
IsReadOnly="True"
|
|
Mask="t"
|
|
MaskType="DateTime"
|
|
MaskUseAsDisplayFormat="True" />
|
|
<dxe:CheckEdit
|
|
Grid.Row="4"
|
|
Grid.Column="3"
|
|
Margin="3"
|
|
HorizontalAlignment="Right"
|
|
Content="Ganztägig"
|
|
EditValue="{Binding SelectedAppointment.AllDay, Mode=OneWay}"
|
|
IsEnabled="False"
|
|
IsReadOnly="True" />
|
|
|
|
<Label
|
|
Grid.Row="5"
|
|
Grid.Column="0"
|
|
Margin="3"
|
|
VerticalAlignment="Center"
|
|
Content="Ende" />
|
|
<dxe:DateEdit
|
|
Grid.Row="5"
|
|
Grid.Column="1"
|
|
Height="23"
|
|
MinWidth="80"
|
|
Margin="3"
|
|
Background="White"
|
|
EditValue="{Binding SelectedAppointment.End, Mode=OneWay}"
|
|
IsEnabled="True"
|
|
IsReadOnly="True"
|
|
MaskType="DateTimeAdvancingCaret"
|
|
PopupOpening="PopupBaseEdit_OnPopupOpening" />
|
|
<dxe:TextEdit
|
|
Grid.Row="5"
|
|
Grid.Column="2"
|
|
Height="23"
|
|
Margin="3"
|
|
EditValue="{Binding SelectedAppointment.EndTime, Converter={StaticResource TimeSpanToDateTimeConverter}, Mode=OneWay}"
|
|
IsEnabled="True"
|
|
IsReadOnly="True"
|
|
Mask="t"
|
|
MaskType="DateTime"
|
|
MaskUseAsDisplayFormat="True" />
|
|
|
|
<Label
|
|
Grid.Row="6"
|
|
Grid.Column="0"
|
|
Margin="3"
|
|
VerticalAlignment="Center"
|
|
Content="Serientermin"
|
|
Visibility="{Binding Path=SelectedAppointment, Converter={StaticResource RequestVisibilityConverter}, ConverterParameter=SerienterminLabel}" />
|
|
<TextBlock
|
|
Grid.Row="6"
|
|
Grid.Column="1"
|
|
Grid.ColumnSpan="3"
|
|
Margin="3"
|
|
Padding="0"
|
|
VerticalAlignment="Center"
|
|
Foreground="Black"
|
|
Text="{Binding Path=SelectedAppointment, Converter={StaticResource RecurringAppointmentDurationConverter}}"
|
|
TextWrapping="WrapWithOverflow"
|
|
Visibility="{Binding Path=SelectedAppointment, Converter={StaticResource RequestVisibilityConverter}, ConverterParameter=SerienterminLabel}" />
|
|
|
|
<Label
|
|
Grid.Row="7"
|
|
Grid.Column="0"
|
|
Margin="3"
|
|
Content="Notiz" />
|
|
<TextBox
|
|
Grid.Row="7"
|
|
Grid.Column="1"
|
|
Grid.ColumnSpan="3"
|
|
Margin="3"
|
|
VerticalAlignment="Stretch"
|
|
AcceptsReturn="True"
|
|
HorizontalScrollBarVisibility="Disabled"
|
|
IsReadOnly="True"
|
|
Text="{Binding Path=SelectedAppointment.Description, Mode=OneWay}"
|
|
TextWrapping="Wrap"
|
|
VerticalScrollBarVisibility="Auto" />
|
|
|
|
<Grid
|
|
Grid.Row="8"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="4">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Button
|
|
x:Name="AlleBestaetigen"
|
|
Grid.Column="0"
|
|
Width="100"
|
|
Margin="3"
|
|
Click="ConfirmAllButton_OnClick"
|
|
Content="Alle bestätigen" />
|
|
<StackPanel
|
|
x:Name="ZusagenStack"
|
|
Grid.Column="1"
|
|
HorizontalAlignment="Right"
|
|
Orientation="Horizontal"
|
|
Visibility="{Binding Path=SelectedAppointment, Converter={StaticResource RequestVisibilityConverter}, ConverterParameter=ZusagenStack}">
|
|
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
|
|
<Button
|
|
Margin="3"
|
|
Click="ConfirmButton_OnClick"
|
|
Content="Zusagen"
|
|
IsEnabled="{Binding SelectedAppointment, Converter={StaticResource ObjectBoolConverter}}" />
|
|
<Button
|
|
Margin="3"
|
|
Click="ConfirmWithReservationButton_OnClick"
|
|
Content="Mit Vorbehalt"
|
|
IsEnabled="{Binding SelectedAppointment, Converter={StaticResource ObjectBoolConverter}}" />
|
|
<Button
|
|
Margin="3"
|
|
Click="RejectButton_OnClick"
|
|
Content="Absagen"
|
|
IsEnabled="{Binding SelectedAppointment, Converter={StaticResource ObjectBoolConverter}}" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Grid>
|
|
<Button
|
|
x:Name="OkButton"
|
|
Grid.Row="8"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="4"
|
|
Width="100"
|
|
Margin="3"
|
|
HorizontalAlignment="Right"
|
|
Click="OkButton_OnClick"
|
|
Content="OK"
|
|
Visibility="{Binding Path=SelectedAppointment, Converter={StaticResource RequestVisibilityConverter}, ConverterParameter=OKBtn}" />
|
|
</Grid>
|
|
</Grid>
|
|
<Button
|
|
x:Name="CloseBtn"
|
|
Grid.Row="1"
|
|
Width="100"
|
|
Margin="3"
|
|
HorizontalAlignment="Right"
|
|
Click="CloseButton_OnClick"
|
|
Content="Schließen" />
|
|
</Grid>
|
|
</dx:DXWindow>
|