This commit is contained in:
Meik
2025-11-11 11:03:42 +01:00
commit dc3e8a2e4c
582 changed files with 191465 additions and 0 deletions

View File

@@ -0,0 +1,440 @@
<UserControl x:Class="FasdDesktopUi.Basics.UserControls.CloseCaseDialogWithTicket"
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:FasdDesktopUi.Basics.UserControls"
xmlns:ico="clr-namespace:FasdDesktopUi.Basics.UserControls.AdaptableIcon;assembly=F4SD-AdaptableIcon"
xmlns:vc="clr-namespace:FasdDesktopUi.Basics.Converter"
mc:Ignorable="d"
x:Name="CloseCaseDialogUc"
IsVisibleChanged="CloseCaseDialogUc_IsVisibleChanged"
d:DesignWidth="350"
d:Background="LightBlue"
DataContext="{Binding RelativeSource={RelativeSource Self}}">
<UserControl.Resources>
<vc:LanguageDefinitionsConverter x:Key="LanguageConverter" />
<BooleanToVisibilityConverter x:Key="BooleanToVisibility" />
<Style x:Key="SwapIconStyleBase"
x:Name="SwapIconStyleBase"
TargetType="ico:AdaptableIcon"
BasedOn="{StaticResource Menu.MenuBar.PinnedIcon.Base}">
<Setter Property="Visibility"
Value="Hidden" />
<Setter Property="Opacity"
Value="0.7" />
<Setter Property="Cursor"
Value="{x:Null}" />
<Setter Property="SelectedInternIcon"
Value="misc_chevron_down" />
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorLevel=1, AncestorType=Border}, Path=IsMouseOver}"
Value="True">
<Setter Property="Visibility"
Value="Visible" />
</DataTrigger>
</Style.Triggers>
</Style>
<Style x:Key="SwapIconStyle"
TargetType="ico:AdaptableIcon"
BasedOn="{StaticResource SwapIconStyleBase}">
<Setter Property="Opacity"
Value="1" />
<Setter Property="Cursor"
Value="Hand" />
<Setter Property="IconBackgroundColor"
Value="{DynamicResource BackgroundColor.DetailsPage.DataHistory.ValueColumn}" />
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorLevel=1, AncestorType=Border}, Path=IsMouseOver}"
Value="True">
<Setter Property="IconBackgroundColor"
Value="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
<Setter Property="PrimaryIconColor"
Value="{DynamicResource Color.Menu.Icon.Hover}" />
</DataTrigger>
</Style.Triggers>
</Style>
<ControlTemplate x:Key="ValidationErrorTemplate">
<Border BorderBrush="Red"
BorderThickness="1"
CornerRadius="7.5">
<TextBlock Text="{Binding ErrorContent}"
Foreground="White"
Padding="2" />
</Border>
</ControlTemplate>
</UserControl.Resources>
<ScrollViewer Height="570"
Padding="0 0 5 0"
VerticalScrollBarVisibility="Auto">
<StackPanel>
<Border x:Name="NewOrExistingOrNoneTicketSelectionBorder">
<WrapPanel x:Name="NewOrExistingOrNoneTicketWrap"
Margin="7.5 12.5 0 0"
Grid.Column="0"
Grid.ColumnSpan="2"
Grid.Row="3"
Width="{Binding ElementName=NewOrExistingOrNoneTicketSelectionBorder, Path=ActualWidth}">
</WrapPanel>
</Border>
<Border x:Name="TicketSelectionCategory"
CornerRadius="7.5"
Padding="10"
Background="{DynamicResource BackgroundColor.DetailsPage.DataHistory.TitleColumn}">
<StackPanel>
<StackPanel x:Name="TicketSelectionStack">
<Border x:Name="TicketSelectionBorder"
Margin="0 5 0 0"
MouseLeftButtonUp="TicketSelectionBorder_MouseLeftButtonUp"
TouchDown="TicketSelectionBorder_TouchDown">
<Border.Resources>
<Style TargetType="Border"
BasedOn="{StaticResource DetailsPage.TitleSection.Border.NotSelected}">
<Setter Property="Opacity"
Value="1.0" />
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}"
Value="True">
<Setter Property="Background"
Value="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
</DataTrigger>
<Trigger Property="IsEnabled"
Value="False">
<Setter Property="Opacity"
Value="0.5" />
</Trigger>
</Style.Triggers>
</Style>
</Border.Resources>
<DockPanel>
<ico:AdaptableIcon x:Name="TicketIcon"
DockPanel.Dock="Left"
IconHeight="28"
IconWidth="28"
BorderPadding="0"
PrimaryIconColor="{DynamicResource Color.Menu.Icon}"
SelectedMaterialIcon="ic_mail"
Margin="10 0 7.5 0" />
<ico:AdaptableIcon x:Name="TicketSwapIcon"
Style="{DynamicResource SwapIconStyle}"
DockPanel.Dock="Right"
Visibility="Visible"
Height="28"
BorderBrush="{DynamicResource Color.SoftContrast}"
BorderThickness="2 0 0 0"
BorderPadding="7.5 2.5 2.5 2.5"
Margin="5 0" />
<TextBlock x:Name="TicketTextBlock"
Style="{DynamicResource DetailsPage.TitleSection.Header}" />
</DockPanel>
</Border>
<Popup x:Name="TicketSelectionPopUp"
VerticalOffset="5"
IsOpen="False"
Closed="TicketSelectionPopUp_Closed"
StaysOpen="False"
AllowsTransparency="True"
Width="{Binding ElementName=TicketSelectionBorder, Path=ActualWidth}">
<Border Background="{DynamicResource BackgroundColor.DetailsPage.Widget.Title}"
CornerRadius="7.5"
Width="{Binding ElementName=TicketSelectionBorder, Path=ActualWidth}">
<StackPanel x:Name="TicketSelectionContainer" />
</Border>
</Popup>
</StackPanel>
<StackPanel x:Name="MainStack">
<StackPanel x:Name="CategoryLabelPanel">
<TextBlock Text="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Dialog.CloseCase.Category}"
FontWeight="Bold"
Margin="0 10 0 0"
Foreground="{DynamicResource FontColor.Menu.Categories}" />
</StackPanel>
<local:ComboBoxPageable x:Name="CategorySelectionControl"
Margin="0 5 0 0"
SelectedItem="{Binding SelectedCategory, ElementName=CloseCaseDialogUc, Mode=TwoWay}"
ComboBoxBackground="{DynamicResource BackgroundColor.DetailsPage.DataHistory.ValueColumn}"
BorderBrush="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}"
PreviewKeyDown="Combobox_PreviewKeyDown"
/>
<StackPanel>
<TextBlock Text="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Dialog.CloseCase.Template}"
FontWeight="Bold"
Margin="0 10 0 0"
Foreground="{DynamicResource FontColor.Menu.Categories}" />
<ComboBox x:Name="QuickTicketSelection"
Margin="0 5 0 0"
Background="{DynamicResource BackgroundColor.DetailsPage.DataHistory.ValueColumn}"
BorderBrush="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}"
SelectedIndex="0"
PreviewKeyDown="Combobox_PreviewKeyDown"
DropDownOpened="DropDownOpened"
DropDownClosed="DropDownClosed">
</ComboBox>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock x:Name="SetOrUpdateComputerInTicketLabel"
Text="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Dialog.CloseCase.SetAffectedAssetLabel}"
FontWeight="Bold"
Margin="0 10 0 0"
Foreground="{DynamicResource FontColor.Menu.Categories}" />
<CheckBox x:Name="SetOrUpdateComputerInTicketCheckbox"
Style="{DynamicResource ToggleSwitch}"
Margin="10 0 0 -10"
HorizontalAlignment="Left"
IsChecked="{Binding SetOrUpdateComputerInTicket, ElementName=CloseCaseDialogUc}"
VerticalAlignment="Center"
Cursor="Hand" />
<ico:AdaptableIcon x:Name="WarningAssetHasBeenChanged"
Visibility="{Binding ShowAssetHasBeenChangedWarning, ElementName=CloseCaseDialogUc, Converter={StaticResource BooleanToVisibility}}"
ToolTip="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Dialog.CloseCase.WarningNewAffectedAsset}"
IconBackgroundColor="Transparent"
Margin="0 0 0 -7"
PrimaryIconColor="#FFFF8800"
SelectedInternIcon="status_bad"
VerticalAlignment="Bottom" />
</StackPanel>
<ComboBox x:Name="ComputerSelection"
Margin="0 5 0 0"
Background="{DynamicResource BackgroundColor.DetailsPage.DataHistory.ValueColumn}"
BorderBrush="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}"
SelectedIndex="0"
SelectionChanged="ComputerSelection_SelectionChanged"
SelectedItem="{Binding SelectedComputer, ElementName=CloseCaseDialogUc, Mode=TwoWay}"
ItemsSource="{Binding ComputerRelations, ElementName=CloseCaseDialogUc}"
DisplayMemberPath="Name"
IsEnabled="{Binding SetOrUpdateComputerInTicket, ElementName=CloseCaseDialogUc}"
PreviewKeyDown="Combobox_PreviewKeyDown"
DropDownOpened="DropDownOpened"
DropDownClosed="DropDownClosed">
</ComboBox>
<StackPanel Orientation="Horizontal">
<TextBlock x:Name="SetOrUpdateServiceInTicketLabel"
Text="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Dialog.CloseCase.SetAffectedServiceLabel}"
FontWeight="Bold"
Margin="0 10 0 0"
Foreground="{DynamicResource FontColor.Menu.Categories}" />
<CheckBox x:Name="SetOrUpdateServiceInTicketCheckbox"
Style="{DynamicResource ToggleSwitch}"
Margin="10 0 0 -10"
HorizontalAlignment="Left"
IsChecked="{Binding SetOrUpdateServiceInTicket, ElementName=CloseCaseDialogUc}"
VerticalAlignment="Center"
Cursor="Hand" />
<ico:AdaptableIcon x:Name="WarningServiceHasBeenChanged"
Visibility="{Binding ShowServiceHasBeenChangedWarning, ElementName=CloseCaseDialogUc, Converter={StaticResource BooleanToVisibility}}"
ToolTip="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Dialog.CloseCase.WarningNewAffectedService}"
IconBackgroundColor="Transparent"
Margin="0 0 0 -7"
PrimaryIconColor="#FFFF8800"
SelectedInternIcon="status_bad"
VerticalAlignment="Bottom" />
</StackPanel>
<local:ComboBoxPageable x:Name="ServiceSelectionControl"
Margin="0 5 0 0"
ResetFilterLabel="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Dialog.CloseCase.ResetFilter.Services}"
SelectedItem="{Binding SelectedService, ElementName=CloseCaseDialogUc, Mode=TwoWay}"
IsEnabled="{Binding SetOrUpdateServiceInTicket, ElementName=CloseCaseDialogUc}"
ComboBoxBackground="{DynamicResource BackgroundColor.DetailsPage.DataHistory.ValueColumn}"
BorderBrush="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}"
PreviewKeyDown="Combobox_PreviewKeyDown" />
</StackPanel>
<StackPanel>
<TextBlock Text="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Dialog.CloseCase.Summary}"
FontWeight="Bold"
Margin="0 10 0 0"
Foreground="{DynamicResource FontColor.Menu.Categories}" />
<TextBox x:Name="TicketSummaryTextBox"
Margin="0 5 0 10"
Style="{DynamicResource Customizable.Editable.TextBox.EditOnly}"
Padding="7.5 5"
Background="{DynamicResource BackgroundColor.DetailsPage.DataHistory.ValueColumn}"
TextChanged="TicketSummaryTextBox_TextChanged" />
</StackPanel>
</StackPanel>
</Border>
<Border x:Name="StatusSelectionBorder"
CornerRadius="7.5"
Margin="0 10 0 0"
Padding="10"
Background="{DynamicResource BackgroundColor.DetailsPage.DataHistory.TitleColumn}">
<StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Dialog.CloseCase.Status}"
FontWeight="Bold"
Foreground="{DynamicResource FontColor.Menu.Categories}" />
<ico:AdaptableIcon x:Name="WarningTicketAction"
Visibility="{Binding ShowAssetWarningTicketAction, ElementName=CloseCaseDialogUc, Converter={StaticResource BooleanToVisibility}}"
ToolTip=""
IconBackgroundColor="Transparent"
Margin="0,-7,0,-7"
PrimaryIconColor="#FFFF8800"
SelectedInternIcon="status_bad"
VerticalAlignment="Bottom" />
</StackPanel>
<ComboBox x:Name="TicketStatusCombobox"
Margin="0 5 0 0"
Background="{DynamicResource BackgroundColor.DetailsPage.DataHistory.ValueColumn}"
BorderBrush="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}"
DropDownOpened="DropDownOpened"
DropDownClosed="DropDownClosed"
PreviewKeyDown="Combobox_PreviewKeyDown"
SelectionChanged="TicketStatusCombobox_SelectionChanged"
SelectedIndex="0">
<ComboBoxItem Content="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Dialog.CloseCase.Status.Select}" />
<ComboBoxItem Content="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Dialog.CloseCase.Status.Close}"
Visibility="{Binding EnableCloseTicketAction, ElementName=CloseCaseDialogUc, Converter={StaticResource BooleanToVisibility}}"
Tag="Close" />
<ComboBoxItem Content="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Dialog.CloseCase.Status.Save}"
Visibility="{Binding EnableSaveTicketAction, ElementName=CloseCaseDialogUc, Converter={StaticResource BooleanToVisibility}}"
Tag="Save" />
<ComboBoxItem Content="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Dialog.CloseCase.Status.OnHold}"
Visibility="{Binding EnableHoldTicketAction, ElementName=CloseCaseDialogUc, Converter={StaticResource BooleanToVisibility}}"
Tag="OnHold" />
<ComboBoxItem Content="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Dialog.CloseCase.Status.Forward}"
Visibility="{Binding EnableForwardTicketAction, ElementName=CloseCaseDialogUc, Converter={StaticResource BooleanToVisibility}}"
Tag="Forward" />
</ComboBox>
</StackPanel>
</Border>
<Border x:Name="DynamicStatusAdditionBorder"
Visibility="Collapsed"
Background="{DynamicResource BackgroundColor.DetailsPage.DataHistory.TitleColumn}"
CornerRadius="7.5"
Padding="10"
Margin="0 10 0 0" />
<Border x:Name="SelectionBorder"
Background="{DynamicResource BackgroundColor.DetailsPage.DataHistory.TitleColumn}"
CornerRadius="7.5"
Padding="10"
Margin="0 10 0 0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Dialog.CloseCase.Transfer.QuickActionHistory}"
FontWeight="Bold"
Foreground="{DynamicResource FontColor.Menu.Categories}" />
<CheckBox x:Name="TransferQuickActionHistoryCheck"
Style="{DynamicResource ToggleSwitch}"
Margin="15 0 0 0"
HorizontalAlignment="Left"
IsChecked="True"
Grid.Column="1" />
<TextBlock Text="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Dialog.CloseCase.Transfer.Notes}"
Foreground="{DynamicResource FontColor.Menu.Categories}"
FontWeight="Bold"
VerticalAlignment="Center"
Margin="0 5 0 0"
Grid.Row="1" />
<!--<ico:AdaptableIcon x:Name="EditCaseNotesButton"
SelectedMaterialIcon="ic_edit"
Style="{DynamicResource SettingsPage.Close.Icon}"
BorderPadding="7.5 10 7.5 5"
VerticalAlignment="Center"
MouseLeftButtonUp="EditCaseNotesButton_MouseLeftButtonUp"
TouchDown="EditCaseNotesButton_TouchDown" />-->
<CheckBox x:Name="TransferCaseNotesCheck"
Style="{DynamicResource ToggleSwitch}"
Margin="15 5 0 0"
HorizontalAlignment="Left"
IsChecked="True"
Grid.Column="1"
Grid.Row="1"
Checked="TransferCaseNotesCheck_Checked"
Unchecked="TransferCaseNotesCheck_Unchecked" />
<Border x:Name="CaseNotesPreviewBorder"
Margin="0 10 0 0"
Padding="15 5 5 0"
CornerRadius="7.5"
Grid.Column="0"
Grid.ColumnSpan="2"
Grid.Row="2"
BorderThickness="0.9"
Background="{DynamicResource BackgroundColor.DetailsPage.DataHistory.ValueColumn}"
MaxHeight="45">
<TextBlock x:Name="CaseNotesPreview"
MaxWidth="420"
MaxHeight="20"
Margin="-35 -5 -25 5"
Padding="5 3 0 0"
Foreground="{DynamicResource FontColor.Menu.Categories}"
FontSize="13"
Cursor="Pen"
MouseLeftButtonUp="EditCaseNotesButton_MouseLeftButtonUp"
TouchDown="EditCaseNotesButton_TouchDown"/>
</Border>
<TextBlock Text="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Dialog.CloseCase.Transfer.CopyTemplates}"
Foreground="{DynamicResource FontColor.Menu.Categories}"
FontWeight="Bold"
Margin="0 10 0 0"
Grid.Row="3" />
<Border Margin="0 10 0 0"
Padding="2.5 0 2.5 2.5"
CornerRadius="7.5"
Grid.Column="0"
Grid.ColumnSpan="2"
Grid.Row="4"
Background="{DynamicResource BackgroundColor.DetailsPage.DataHistory.ValueColumn}">
<Border x:Name="CopyTemplateSelectionBorder">
<WrapPanel x:Name="CopyTemplateWrap"
Margin="7.5 12.5 0 0"
Grid.Column="0"
Grid.ColumnSpan="2"
Grid.Row="3"
Width="{Binding ElementName=CopyTemplateSelectionBorder, Path=ActualWidth}" />
</Border>
</Border>
</Grid>
</Border>
<TextBlock x:Name="CopyDisclaimerTextBox"
Visibility="Collapsed"
Margin="5 15 5 10"
FontSize="16"
TextWrapping="Wrap"
Text="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Dialog.CloseCase.CopyDisclaimer}"
Foreground="{DynamicResource FontColor.Menu.Categories}" />
</StackPanel>
</ScrollViewer>
</UserControl>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,45 @@
<UserControl x:Class="FasdDesktopUi.Basics.UserControls.CloseTicketDialog"
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:FasdDesktopUi.Basics.UserControls"
xmlns:vc="clr-namespace:FasdDesktopUi.Basics.Converter"
mc:Ignorable="d"
d:DesignHeight="450"
d:DesignWidth="800"
d:Background="White"
x:Name="CloseTicketDialogUc"
>
<UserControl.Resources>
<vc:LanguageDefinitionsConverter x:Key="LanguageConverter" />
</UserControl.Resources>
<StackPanel>
<TextBlock Text="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Dialog.CloseCase.CloseTicket.ErrorType}"
FontWeight="Bold"
Foreground="{DynamicResource FontColor.Menu.Categories}" />
<ComboBox x:Name="ErrorTypeComboBox"
Background="{DynamicResource BackgroundColor.DetailsPage.DataHistory.ValueColumn}"
BorderBrush="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}"
SelectedItem="{Binding ElementName=CloseTicketDialogUc, Path=SelectedErrorType, Mode=TwoWay}"
Margin="0 5 0 0"
DropDownOpened="DropDownOpened"
DropDownClosed="DropDownClosed"
PreviewKeyDown="ErrorTypeComboBox_PreviewKeyDown"
/>
<TextBlock Text="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Dialog.CloseCase.CloseTicket.Solution}"
FontWeight="Bold"
Foreground="{DynamicResource FontColor.Menu.Categories}"
Margin="0 7.5 0 0"/>
<TextBox
x:Name="SolutionTextbox"
Text="{Binding ElementName=CloseTicketDialogUc, Path=Solution, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Margin="0 5 0 0"
Style="{DynamicResource Customizable.Editable.TextBox.EditOnly}"
MinLines="3"
TextWrapping="Wrap"
Background="{DynamicResource BackgroundColor.DetailsPage.DataHistory.ValueColumn}" />
</StackPanel>
</UserControl>

View File

@@ -0,0 +1,180 @@
using FasdDesktopUi.Basics.Helper;
using FasdDesktopUi.Basics.Models;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using static C4IT.Logging.cLogManager;
namespace FasdDesktopUi.Basics.UserControls
{
public partial class CloseTicketDialog : UserControl
{
#region Properties
public event EventHandler ErrorTypeValueChanged;
public event EventHandler SolutionValueChanged;
private cSupportCaseDataProvider dataProvider;
public cSupportCaseDataProvider DataProvider
{
get => dataProvider; set
{
dataProvider = value;
UpdateErrorTypeComboBox();
}
}
#region Solution
public string Solution
{
get { return (string)GetValue(SolutionProperty); }
set {
SetValue(SolutionProperty, value);
}
}
public static readonly DependencyProperty SolutionProperty =
DependencyProperty.Register("Solution", typeof(string), typeof(CloseTicketDialog), new PropertyMetadata(string.Empty, OnSolutionPropertyChanged));
private static void OnSolutionPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var control = (CloseTicketDialog)d;
control.SolutionValueChanged?.Invoke(control, EventArgs.Empty);
}
#endregion
public ComboBoxItem SelectedErrorType
{
get { return (ComboBoxItem)GetValue(SelectedErrorTypeProperty); }
set { SetValue(SelectedErrorTypeProperty, value); }
}
// Using a DependencyProperty as the backing store for SelectedErrorType. This enables animation, styling, binding, etc...
public static readonly DependencyProperty SelectedErrorTypeProperty =
DependencyProperty.Register("SelectedErrorType", typeof(ComboBoxItem), typeof(CloseTicketDialog), new PropertyMetadata(null, OnSelectedErrorTypeChanged));
private static void OnSelectedErrorTypeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var control = (CloseTicketDialog)d;
control.ErrorTypeValueChanged?.Invoke(control, EventArgs.Empty);
}
#endregion
public CloseTicketDialog()
{
InitializeComponent();
}
protected override void OnInitialized(EventArgs e)
{
base.OnInitialized(e);
}
private void UpdateErrorTypeComboBox()
{
try
{
if (DataProvider == null) return;
var activityErrorTable = DataProvider.HealthCardDataHelper.HealthCardRawData.GetTableByName("M42Wpm-Pickup-ActivityErrorType", false);
if (activityErrorTable == null) return;
if (!activityErrorTable.Columns.TryGetValue("name", out var namesColumn) ||
!activityErrorTable.Columns.TryGetValue("position", out var positionsColumn) ||
!activityErrorTable.Columns.TryGetValue("hidden", out var hiddensColumn) ||
!activityErrorTable.Columns.TryGetValue("id", out var idsColumn)) return;
var errorTypeListe = new List<Dictionary<string, object>>();
for (int i = 0; i < idsColumn.Values.Count; i++)
{
if (int.TryParse(positionsColumn.Values[i].ToString(), out int positionValue))
{
var eintrag = new Dictionary<string, object>
{
{ "ID", idsColumn.Values[i] },
{ "DisplayName", namesColumn.Values[i] },
{ "Hidden", Convert.ToBoolean(hiddensColumn.Values[i])},
{ "Position", positionValue }
};
errorTypeListe.Add(eintrag);
}
}
// Filtere die Liste, um nur nicht versteckte Elemente zu behalten
errorTypeListe = errorTypeListe.Where(eintrag => !(bool)eintrag["Hidden"]).OrderBy(eintrag => (int)eintrag["Position"]).ToList();
var editComboBox = ErrorTypeComboBox;
editComboBox.Items.Clear();
foreach (var listValue in errorTypeListe)
{
editComboBox.Items.Add(new ComboBoxItem { Content = listValue["DisplayName"], Tag = listValue["ID"] });
}
}
catch (Exception e)
{
LogException(e);
}
}
private void DropDownOpened(object sender, EventArgs e)
{
try
{
if (!(sender is FrameworkElement senderElement))
return;
var parentBorder = cUiElementHelper.GetFirstParentOfType<Border>(senderElement);
cFocusInvoker.InvokeGotFocus(parentBorder, e);
}
catch (Exception E)
{
LogException(E);
}
}
private void DropDownClosed(object sender, EventArgs e)
{
try
{
if (!(sender is FrameworkElement senderElement))
return;
ErrorTypeValueChanged?.Invoke(this, EventArgs.Empty);
var parentBorder = cUiElementHelper.GetFirstParentOfType<Border>(senderElement);
cFocusInvoker.InvokeLostFocus(parentBorder, e);
}
catch (Exception E)
{
LogException(E);
}
}
private void ErrorTypeComboBox_PreviewKeyDown(object sender, KeyEventArgs e)
{
if(e.Key == Key.Escape) {
DropDownClosed(sender, e);
}
}
}
}

View File

@@ -0,0 +1,50 @@
<UserControl x:Class="FasdDesktopUi.Basics.UserControls.ForwardTicketDialog"
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:FasdDesktopUi.Basics.UserControls"
xmlns:vc="clr-namespace:FasdDesktopUi.Basics.Converter"
mc:Ignorable="d"
d:DesignHeight="450"
d:DesignWidth="800"
d:Background="White"
x:Name="ForwardTicketDialogUc">
<UserControl.Resources>
<vc:LanguageDefinitionsConverter x:Key="LanguageConverter" />
</UserControl.Resources>
<StackPanel x:Name="MainStack">
<TextBlock Text="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Dialog.CloseCase.ForwardTicket.ResponsibleRole}"
FontWeight="Bold"
Foreground="{DynamicResource FontColor.Menu.Categories}" />
<local:ComboBoxPageable x:Name="RoleSelectionControl"
SelectedItem="{Binding ElementName=ForwardTicketDialogUc, Path=SelectedRole, Mode=TwoWay}"
Margin="0 5 0 10"
ComboBoxBackground="{DynamicResource BackgroundColor.DetailsPage.DataHistory.ValueColumn}"
BorderBrush="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
<TextBlock Text="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Dialog.CloseCase.ForwardTicket.ResponsiblePerson}"
FontWeight="Bold"
Foreground="{DynamicResource FontColor.Menu.Categories}" />
<local:ComboBoxPageable x:Name="PersonSelectionControl"
Margin="0 5 0 10"
SelectedItem="{Binding ElementName=ForwardTicketDialogUc, Path=SelectedPerson, Mode=TwoWay}"
ComboBoxBackground="{DynamicResource BackgroundColor.DetailsPage.DataHistory.ValueColumn}"
BorderBrush="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
<TextBlock Text="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Dialog.CloseCase.ForwardTicket.Comment}"
FontWeight="Bold"
Foreground="{DynamicResource FontColor.Menu.Categories}" />
<TextBox x:Name="CommentTextbox"
Text="{Binding ElementName=ForwardTicketDialogUc, Path=Comment, Mode=TwoWay}"
Margin="0 5 0 0"
Style="{DynamicResource Customizable.Editable.TextBox.EditOnly}"
MinLines="3"
TextWrapping="Wrap"
Background="{DynamicResource BackgroundColor.DetailsPage.DataHistory.ValueColumn}" />
</StackPanel>
</UserControl>

View File

@@ -0,0 +1,196 @@
using C4IT.FASD.Base;
using C4IT.FASD.Cockpit.Communication;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using static C4IT.Logging.cLogManager;
namespace FasdDesktopUi.Basics.UserControls
{
public partial class ForwardTicketDialog : UserControl
{
private readonly cSupportCaseDataProvider _dataProvider;
string lastPersonSearch = string.Empty;
string lastRoleSearch = string.Empty;
public event EventHandler SelectedRoleChanged;
public event EventHandler SelectedPersonChanged;
public event EventHandler CommentChanged;
public string Comment
{
get { return (string)GetValue(CommentProperty); }
set { SetValue(CommentProperty, value); }
}
// Using a DependencyProperty as the backing store for Comment. This enables animation, styling, binding, etc...
public static readonly DependencyProperty CommentProperty =
DependencyProperty.Register("Comment", typeof(string), typeof(ForwardTicketDialog), new PropertyMetadata(string.Empty, OnCommentChanged));
private static void OnCommentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var control = (ForwardTicketDialog)d;
control.CommentChanged?.Invoke(control, EventArgs.Empty);
}
public KeyValuePair<string, object> SelectedRole
{
get { return (KeyValuePair<string, object>)GetValue(SelectedRoleProperty); }
set { SetValue(SelectedRoleProperty, value); }
}
// Using a DependencyProperty as the backing store for SelectedRole. This enables animation, styling, binding, etc...
public static readonly DependencyProperty SelectedRoleProperty =
DependencyProperty.Register("SelectedRole", typeof(KeyValuePair<string, object>), typeof(ForwardTicketDialog), new PropertyMetadata(default(KeyValuePair<string, object>), OnSelectedRoleChanged));
private static void OnSelectedRoleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var control = (ForwardTicketDialog)d;
control.SelectedRoleChanged?.Invoke(control, EventArgs.Empty);
}
public KeyValuePair<string, object> SelectedPerson
{
get { return (KeyValuePair<string, object>)GetValue(SelectedPersonProperty); }
set { SetValue(SelectedPersonProperty, value); }
}
// Using a DependencyProperty as the backing store for SelectedPerson. This enables animation, styling, binding, etc...
public static readonly DependencyProperty SelectedPersonProperty =
DependencyProperty.Register("SelectedPerson", typeof(KeyValuePair<string, object>), typeof(ForwardTicketDialog), new PropertyMetadata(default(KeyValuePair<string, object>), OnSelectedPersonChanged));
private static void OnSelectedPersonChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var control = (ForwardTicketDialog)d;
control.SelectedPersonChanged?.Invoke(control, EventArgs.Empty);
}
public ForwardTicketDialog(cSupportCaseDataProvider dataProvider)
{
InitializeComponent();
_dataProvider = dataProvider;
}
protected override void OnInitialized(EventArgs e)
{
base.OnInitialized(e);
PersonSelectionControl.SearchDataChanged = HandlePersonSearchDataChanged;
PersonSelectionControl.ParentElement = MainStack;
PersonSelectionControl.ParentIndex = MainStack.Children.IndexOf(PersonSelectionControl);
RoleSelectionControl.SearchDataChanged = HandleRoleSearchDataChanged;
RoleSelectionControl.ParentElement = MainStack;
RoleSelectionControl.ParentIndex = MainStack.Children.IndexOf(RoleSelectionControl);
}
private async void HandlePersonSearchDataChanged(object sender, cF4sdHealthSelectionDataRequest e) => await UpdatePersonSelectionControlAsync(e);
private async Task UpdatePersonSelectionControlAsync(cF4sdHealthSelectionDataRequest requestData)
{
try
{
requestData.Identities = _dataProvider?.Identities;
requestData.Table = "M42Wpm-Ticket-Persons";
if (string.IsNullOrEmpty(lastPersonSearch) || !lastPersonSearch.Equals(requestData.Search, StringComparison.CurrentCultureIgnoreCase))
{
var peopleCount = await cFasdCockpitCommunicationBase.Instance.GetPagedDataCount(requestData);
PersonSelectionControl.TotalItemCount = peopleCount;
}
lastPersonSearch = requestData.Search;
var peopleData = await cFasdCockpitCommunicationBase.Instance.GetPagedData(requestData);
PersonSelectionControl.ItemData = GetPeopleSelectionData(peopleData);
}
catch (Exception E)
{
LogException(E);
}
}
private ObservableCollection<KeyValuePair<string, object>> GetPeopleSelectionData(cF4SDHealthCardRawData.cHealthCardTable dataTable)
{
try
{
if (dataTable is null || dataTable.Name != "M42Wpm-Ticket-Persons")
return null;
if (!dataTable.Columns.TryGetValue("id", out var idColumn))
return null;
dataTable.Columns.TryGetValue("LastName", out var lastNameColumn);
dataTable.Columns.TryGetValue("FirstName", out var firstNameColumn);
dataTable.Columns.TryGetValue("Position", out var positionColumn);
var zippedNames = lastNameColumn.Values.Zip(firstNameColumn.Values, (lastName, firstName) => $"{lastName}, {firstName}");
var zippedKeyValuePairs = idColumn.Values.Zip(zippedNames, (id, display) => new KeyValuePair<string, object>(display, id));
return new ObservableCollection<KeyValuePair<string, object>>(zippedKeyValuePairs);
}
catch (Exception E)
{
LogException(E);
}
return null;
}
private async void HandleRoleSearchDataChanged(object sender, cF4sdHealthSelectionDataRequest e) => await UpdateRoleSelectionControlAsync(e);
private async Task UpdateRoleSelectionControlAsync(cF4sdHealthSelectionDataRequest requestData)
{
try
{
requestData.Identities = _dataProvider?.Identities;
requestData.Table = "M42Wpm-Ticket-Roles";
if (string.IsNullOrEmpty(lastRoleSearch) || !lastRoleSearch.Equals(requestData.Search, StringComparison.CurrentCultureIgnoreCase))
{
var roleCount = await cFasdCockpitCommunicationBase.Instance.GetPagedDataCount(requestData);
RoleSelectionControl.TotalItemCount = roleCount;
}
lastRoleSearch = requestData.Search;
var roleData = await cFasdCockpitCommunicationBase.Instance.GetPagedData(requestData);
RoleSelectionControl.ItemData = GetRoleSelectionData(roleData);
}
catch (Exception E)
{
LogException(E);
}
}
private ObservableCollection<KeyValuePair<string, object>> GetRoleSelectionData(cF4SDHealthCardRawData.cHealthCardTable dataTable)
{
try
{
if (dataTable is null || dataTable.Name != "M42Wpm-Ticket-Roles")
return null;
if (!dataTable.Columns.TryGetValue("id", out var idColumn))
return null;
dataTable.Columns.TryGetValue("Name", out var nameColumn);
var zippedKeyValuePairs = idColumn.Values.Zip(nameColumn.Values, (id, display) => new KeyValuePair<string, object>(display.ToString(), id));
return new ObservableCollection<KeyValuePair<string, object>>(zippedKeyValuePairs);
}
catch (Exception E)
{
LogException(E);
}
return null;
}
}
}

View File

@@ -0,0 +1,454 @@
<UserControl x:Class="FasdDesktopUi.Basics.UserControls.HoldTicketDialog"
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:FasdDesktopUi.Basics.UserControls"
xmlns:vc="clr-namespace:FasdDesktopUi.Basics.Converter"
mc:Ignorable="d"
d:DesignHeight="450"
d:DesignWidth="800"
d:Background="White"
x:Name="HoldTicketDialogUc">
<UserControl.Resources>
<DataTemplate x:Key="TwoDigitHourTemplate">
<TextBlock Text="{Binding Path=., StringFormat={}{0:00}}" />
</DataTemplate>
<vc:LanguageDefinitionsConverter x:Key="LanguageConverter"/>
<Style x:Key="DatePickerStyle1" TargetType="{x:Type DatePicker}">
<Style.Resources>
<Style TargetType="Border">
<Setter Property="CornerRadius"
Value="7.5" />
<Setter Property="BorderBrush"
Value="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
</Style>
</Style.Resources>
<Setter Property="Foreground" Value="{DynamicResource FontColor.Menu.Categories}"/>
<Setter Property="IsTodayHighlighted" Value="True"/>
<Setter Property="SelectedDateFormat" Value="Short"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DatePicker}">
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="Disabled">
<Storyboard>
<DoubleAnimation Duration="0" Storyboard.TargetName="PART_DisabledVisual" To="1" Storyboard.TargetProperty="Opacity"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Grid x:Name="PART_Root" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
<Grid.Resources>
<ControlTemplate x:Key="DropDownButtonTemplate" TargetType="{x:Type Button}">
<Grid>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualStateGroup.Transitions>
<VisualTransition GeneratedDuration="0"/>
<VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver"/>
<VisualTransition GeneratedDuration="0:0:0.1" To="Pressed"/>
</VisualStateGroup.Transitions>
<VisualState x:Name="Normal"/>
<VisualState x:Name="MouseOver">
<Storyboard>
<ColorAnimation Duration="0" Storyboard.TargetName="Background" To="#FF448DCA" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"/>
<ColorAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
<SplineColorKeyFrame KeyTime="0" Value="#7FFFFFFF"/>
</ColorAnimationUsingKeyFrames>
<ColorAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
<SplineColorKeyFrame KeyTime="0" Value="#CCFFFFFF"/>
</ColorAnimationUsingKeyFrames>
<ColorAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
<SplineColorKeyFrame KeyTime="0" Value="#F2FFFFFF"/>
</ColorAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Pressed">
<Storyboard>
<ColorAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
<SplineColorKeyFrame KeyTime="0" Value="#FF448DCA"/>
</ColorAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
<SplineDoubleKeyFrame KeyTime="0" Value="1"/>
</DoubleAnimationUsingKeyFrames>
<ColorAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
<SplineColorKeyFrame KeyTime="0" Value="#EAFFFFFF"/>
</ColorAnimationUsingKeyFrames>
<ColorAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
<SplineColorKeyFrame KeyTime="0" Value="#C6FFFFFF"/>
</ColorAnimationUsingKeyFrames>
<ColorAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
<SplineColorKeyFrame KeyTime="0" Value="#6BFFFFFF"/>
</ColorAnimationUsingKeyFrames>
<ColorAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
<SplineColorKeyFrame KeyTime="0" Value="#F4FFFFFF"/>
</ColorAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Disabled"/>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Grid FlowDirection="LeftToRight" HorizontalAlignment="Center" Height="15" Margin="0" VerticalAlignment="Center" Width="19">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="20*"/>
<ColumnDefinition Width="20*"/>
<ColumnDefinition Width="20*"/>
<ColumnDefinition Width="20*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="20*"/>
<RowDefinition Height="16*"/>
<RowDefinition Height="16*"/>
<RowDefinition Height="16*"/>
</Grid.RowDefinitions>
<Border x:Name="Highlight" BorderBrush="#FF45D6FA" BorderThickness="1" CornerRadius="0,0,1,1" Grid.ColumnSpan="4" Margin="-1" Opacity="0" Grid.RowSpan="4" Grid.Row="0"/>
<Border x:Name="Background" Background="#FF1F3B53" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius=".5" Grid.ColumnSpan="4" Margin="0,-1,0,0" Opacity="1" Grid.RowSpan="3" Grid.Row="1"/>
<Border x:Name="BackgroundGradient" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius=".5" Grid.ColumnSpan="4" Margin="0,-1,0,0" Opacity="1" Grid.RowSpan="3" Grid.Row="1">
</Border>
<Rectangle Grid.ColumnSpan="4" Grid.RowSpan="1" StrokeThickness="1">
<Rectangle.Fill>
<LinearGradientBrush EndPoint="0.3,-1.1" StartPoint="0.46,1.6">
<GradientStop Color="#FF4084BD"/>
<GradientStop Color="#FFAFCFEA" Offset="1"/>
</LinearGradientBrush>
</Rectangle.Fill>
<Rectangle.Stroke>
<LinearGradientBrush EndPoint="0.48,-1" StartPoint="0.48,1.25">
<GradientStop Color="#FF494949"/>
<GradientStop Color="#FF9F9F9F" Offset="1"/>
</LinearGradientBrush>
</Rectangle.Stroke>
</Rectangle>
<Path Grid.Column="0" Grid.ColumnSpan="4" Data="M11.426758,8.4305077 L11.749023,8.4305077 L11.749023,16.331387 L10.674805,16.331387 L10.674805,10.299648 L9.0742188,11.298672 L9.0742188,10.294277 C9.4788408,10.090176 9.9094238,9.8090878 10.365967,9.4510155 C10.82251,9.0929432 11.176106,8.7527733 11.426758,8.4305077 z M14.65086,8.4305077 L18.566387,8.4305077 L18.566387,9.3435936 L15.671368,9.3435936 L15.671368,11.255703 C15.936341,11.058764 16.27293,10.960293 16.681133,10.960293 C17.411602,10.960293 17.969301,11.178717 18.354229,11.615566 C18.739157,12.052416 18.931622,12.673672 18.931622,13.479336 C18.931622,15.452317 18.052553,16.438808 16.294415,16.438808 C15.560365,16.438808 14.951641,16.234707 14.468243,15.826504 L14.881817,14.929531 C15.368796,15.326992 15.837872,15.525723 16.289043,15.525723 C17.298809,15.525723 17.803692,14.895514 17.803692,13.635098 C17.803692,12.460618 17.305971,11.873379 16.310528,11.873379 C15.83071,11.873379 15.399232,12.079271 15.016094,12.491055 L14.65086,12.238613 z" Fill="#FF2F2F2F" HorizontalAlignment="Center" Margin="4,3,4,3" RenderTransformOrigin="0.5,0.5" Grid.RowSpan="3" Grid.Row="1" Stretch="Fill" VerticalAlignment="Center"/>
<Ellipse Grid.ColumnSpan="4" Fill="#FFFFFFFF" HorizontalAlignment="Center" Height="3" StrokeThickness="0" VerticalAlignment="Center" Width="3"/>
</Grid>
</Grid>
</ControlTemplate>
</Grid.Resources>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<ToggleButton x:Name="PART_Button"
Grid.Column="1"
Grid.Row="0"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="0"
Grid.ColumnSpan="2"
IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
Style="{StaticResource ComboBoxToggleButton}">
</ToggleButton>
<Border
VerticalAlignment="Center"
HorizontalAlignment="Center"
CornerRadius="5">
<DatePickerTextBox
x:Name="PART_TextBox"
Height="18"
Width="80"
TextWrapping="Wrap"
Text="DatePickerTextBox"
Background="Transparent"
HorizontalContentAlignment="Center"
VerticalContentAlignment="Center"
Style="{DynamicResource DatePickerTextBoxStyle1}"/>
</Border>
<Grid x:Name="PART_DisabledVisual" Grid.Column="0" Grid.ColumnSpan="2" IsHitTestVisible="False" Opacity="0" Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Popup x:Name="PART_Popup" AllowsTransparency="True" Placement="Bottom" PlacementTarget="{Binding ElementName=PART_TextBox}" StaysOpen="False"/>
</Grid>
</Grid>
</Border>
<ControlTemplate.Triggers>
<DataTrigger Binding="{Binding Source={x:Static SystemParameters.HighContrast}}" Value="false">
<Setter Property="Foreground" TargetName="PART_TextBox" Value="{Binding Foreground, RelativeSource={RelativeSource Mode=TemplatedParent}}"/>
</DataTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="DatePickerTextBoxStyle1" TargetType="{x:Type DatePickerTextBox}">
<Setter Property="Foreground" Value="{DynamicResource FontColor.Menu.Categories}"/>
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
<Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DatePickerTextBox}">
<Grid>
<Grid.Resources>
<SolidColorBrush x:Key="WatermarkBrush" Color="#FFAAAAAA"/>
</Grid.Resources>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualStateGroup.Transitions>
<VisualTransition GeneratedDuration="0"/>
<VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver"/>
</VisualStateGroup.Transitions>
<VisualState x:Name="Normal"/>
<VisualState x:Name="MouseOver">
<Storyboard>
<ColorAnimation Duration="0" To="#FF99C1E2" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="ContentElement"/>
<ColorAnimation Duration="0" To="#FF99C1E2" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="watermark_decorator"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="WatermarkStates">
<VisualStateGroup.Transitions>
<VisualTransition GeneratedDuration="0"/>
</VisualStateGroup.Transitions>
<VisualState x:Name="Unwatermarked"/>
<VisualState x:Name="Watermarked">
<Storyboard>
<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ContentElement"/>
<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_Watermark"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="FocusStates">
<VisualStateGroup.Transitions>
<VisualTransition GeneratedDuration="0"/>
</VisualStateGroup.Transitions>
<VisualState x:Name="Unfocused"/>
<VisualState x:Name="Focused">
<Storyboard>
<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisual"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="1" Opacity="1" Padding="{TemplateBinding Padding}">
<Grid x:Name="WatermarkContent" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
<Border x:Name="ContentElement" BorderBrush="#FFFFFFFF" BorderThickness="1" Visibility="Hidden"/>
<Border x:Name="watermark_decorator" BorderBrush="#FFFFFFFF" BorderThickness="1" Visibility="Hidden">
<ContentControl x:Name="PART_Watermark" Focusable="False" IsHitTestVisible="False" Opacity="0" Padding="0"/>
</Border>
<ScrollViewer x:Name="PART_ContentHost" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="0" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
<Border x:Name="FocusVisual" BorderBrush="#FF45D6FA" CornerRadius="1" IsHitTestVisible="False" Opacity="0"/>
</Grid>
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="CalenderToggleButton"
TargetType="{x:Type ToggleButton}">
<Setter Property="OverridesDefaultStyle"
Value="true" />
<Setter Property="IsTabStop"
Value="false" />
<Setter Property="Focusable"
Value="false" />
<Setter Property="ClickMode"
Value="Press" />
<Setter Property="Border.CornerRadius"
Value="7.5" />
<Setter Property="Border.BorderThickness"
Value="0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border x:Name="templateRoot"
Background="{TemplateBinding Background}"
BorderBrush="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding Border.CornerRadius}"
SnapsToDevicePixels="true"
Height="28">
<Border x:Name="splitBorder"
BorderBrush="Transparent"
BorderThickness="1"
HorizontalAlignment="Right"
Margin="5"
SnapsToDevicePixels="true"
Width="15">
<Viewbox HorizontalAlignment="Center"
VerticalAlignment="Center">
<Path x:Name="arrow"
Data="F1 M 2.89067,4.99467C 2.89067,4.22933 3.724,3.74533 4.39067,4.13067L 10.8227,7.844L 17.26,4.13067C 18.412,3.48 19.4013,5.19333 18.26,5.86533L 11.3227,9.86533C 11.016,10.0413 10.636,10.0413 10.3227,9.86533L 3.39067,5.86533C 3.07867,5.688 2.89067,5.35467 2.89067,4.99467 Z"
Fill="{DynamicResource Color.Menu.Icon}" />
</Viewbox>
</Border>
</Border>
<ControlTemplate.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type TextBox}}}"
Value="true" />
<Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
Value="false" />
<Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}"
Value="false" />
<Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}"
Value="true" />
</MultiDataTrigger.Conditions>
</MultiDataTrigger>
<Trigger Property="IsMouseOver"
Value="true">
<Setter Property="Fill"
TargetName="arrow"
Value="{DynamicResource Color.Menu.Icon.Hover}" />
</Trigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
Value="true" />
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type TextBox}}}"
Value="false" />
</MultiDataTrigger.Conditions>
<Setter Property="Background"
TargetName="templateRoot"
Value="{Binding BorderBrush, RelativeSource={RelativeSource AncestorLevel=1, AncestorType=TextBox}}" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
Value="true" />
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type TextBox}}}"
Value="true" />
</MultiDataTrigger.Conditions>
<Setter Property="Background"
TargetName="templateRoot"
Value="{Binding BorderBrush, RelativeSource={RelativeSource AncestorLevel=1, AncestorType=TextBox}}" />
</MultiDataTrigger>
<Trigger Property="IsPressed"
Value="true">
<Setter Property="Fill"
TargetName="arrow"
Value="{DynamicResource Color.Menu.Icon.Hover}" />
</Trigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}"
Value="true" />
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type TextBox}}}"
Value="false" />
</MultiDataTrigger.Conditions>
<Setter Property="Background"
TargetName="templateRoot"
Value="{Binding BorderBrush, RelativeSource={RelativeSource AncestorLevel=1, AncestorType=TextBox}}" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}"
Value="true" />
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type TextBox}}}"
Value="true" />
</MultiDataTrigger.Conditions>
<Setter Property="Background"
TargetName="templateRoot"
Value="{Binding BorderBrush, RelativeSource={RelativeSource AncestorLevel=1, AncestorType=TextBox}}" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}"
Value="false" />
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type TextBox}}}"
Value="false" />
</MultiDataTrigger.Conditions>
<Setter Property="Background"
TargetName="templateRoot"
Value="{DynamicResource BackgroundColor.Menu.SubCategory}" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}"
Value="false" />
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type TextBox}}}"
Value="true" />
</MultiDataTrigger.Conditions>
</MultiDataTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</UserControl.Resources>
<StackPanel>
<TextBlock Text="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Dialog.CloseCase.HoldTicket.Reason}"
FontWeight="Bold"
Foreground="{DynamicResource FontColor.Menu.Categories}"/>
<ComboBox x:Name="ReasonSelection"
Margin="0 5 0 10"
Background="{DynamicResource BackgroundColor.DetailsPage.DataHistory.ValueColumn}"
BorderBrush="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}"
DropDownClosed="DropDownClosed"
DropDownOpened="DropDownOpened"
SelectedIndex="0">
</ComboBox>
<TextBlock Text="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Dialog.CloseCase.HoldTicket.NoEscalation}"
FontWeight="Bold"
Foreground="{DynamicResource FontColor.Menu.Categories}"/>
<CheckBox x:Name="DoNotEscalate"
Style="{DynamicResource ToggleSwitch}"
HorizontalAlignment="Left"
Margin="0 5 0 10"/>
<TextBlock Text="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Dialog.CloseCase.HoldTicket.ReminderDate}"
FontWeight="Bold"
Foreground="{DynamicResource FontColor.Menu.Categories}"/>
<StackPanel Orientation="Horizontal">
<DatePicker x:Name="SelectedReminderDateDatePicker"
Style="{DynamicResource DatePickerStyle1}"
CalendarStyle="{DynamicResource DatePickerCalendarStyle1}"
Height="28"
Margin="0 5 10 10"
Padding="0"
Background="{DynamicResource BackgroundColor.DetailsPage.DataHistory.ValueColumn}"
BorderBrush="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}"
SelectedDate="{Binding SelectedDate}"
/>
<ComboBox x:Name="Hour"
Margin="0 5 0 10"
Background="{DynamicResource BackgroundColor.DetailsPage.DataHistory.ValueColumn}"
BorderBrush="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}"
ItemsSource="{Binding HoursRange}"
SelectedItem="{Binding SelectedHour}"
ItemTemplate="{StaticResource TwoDigitHourTemplate}"
DropDownOpened="DropDownOpened"
DropDownClosed="DropDownClosed"
/>
<TextBlock Text=":" Margin="0 5 0 10"
FontWeight="Bold"
Padding="7"
VerticalAlignment="Center"
/>
<ComboBox x:Name="Minute"
Margin="0 5 0 10"
Background="{DynamicResource BackgroundColor.DetailsPage.DataHistory.ValueColumn}"
BorderBrush="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}"
ItemsSource="{Binding MinutesRange}"
SelectedItem="{Binding SelectedMinute}"
ItemTemplate="{StaticResource TwoDigitHourTemplate}"
DropDownOpened="DropDownOpened"
DropDownClosed="DropDownClosed"
/>
</StackPanel>
<TextBlock Text="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Dialog.CloseCase.HoldTicket.Comment}"
FontWeight="Bold"
Foreground="{DynamicResource FontColor.Menu.Categories}"/>
<TextBox x:Name="CommentTextBox"
Margin="0 5 0 0"
Style="{DynamicResource Customizable.Editable.TextBox.EditOnly}"
Text="{Binding ElementName=HoldTicketDialogUc, Path=Comment, Mode=TwoWay}"
MinLines="3"
TextWrapping="Wrap"
Background="{DynamicResource BackgroundColor.DetailsPage.DataHistory.ValueColumn}"/>
</StackPanel>
</UserControl>

View File

@@ -0,0 +1,278 @@
using C4IT.FASD.Base;
using C4IT.FASD.Cockpit.Communication;
using FasdDesktopUi.Basics.Helper;
using FasdDesktopUi.Basics.Models;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using static C4IT.Logging.cLogManager;
namespace FasdDesktopUi.Basics.UserControls
{
/// <summary>
/// Interaction logic for HoldTicketDialog.xaml
/// </summary>
public partial class HoldTicketDialog : UserControl, INotifyPropertyChanged
{
#region DataProvider
public cSupportCaseDataProvider DataProvider
{
get { return (cSupportCaseDataProvider)GetValue(DataProviderProperty); }
set
{
SetValue(DataProviderProperty, value);
}
}
public static readonly DependencyProperty DataProviderProperty =
DependencyProperty.Register("DataProvider", typeof(cSupportCaseDataProvider), typeof(HoldTicketDialog), new PropertyMetadata(null, DataProviderChanged));
private static void DataProviderChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
if (!(d is HoldTicketDialog me))
return;
//me.UpdateReasonsComboBoxAsync();
}
#endregion
public event EventHandler CommentChanged;
public string Comment
{
get { return (string)GetValue(CommentProperty); }
set { SetValue(CommentProperty, value); }
}
// Using a DependencyProperty as the backing store for Comment. This enables animation, styling, binding, etc...
public static readonly DependencyProperty CommentProperty =
DependencyProperty.Register("Comment", typeof(string), typeof(HoldTicketDialog), new PropertyMetadata(string.Empty, OnCommentChanged));
private static void OnCommentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var control = (HoldTicketDialog)d;
control.CommentChanged?.Invoke(control, EventArgs.Empty);
}
public event EventHandler SelectedReminderDateChanged;
public DateTime SelectedReminderDate
{
get { return (DateTime)GetValue(SelectedReminderDateProperty); }
set { SetValue(SelectedReminderDateProperty, value); }
}
// Using a DependencyProperty as the backing store for SelectedReminderDate. This enables animation, styling, binding, etc...
public static readonly DependencyProperty SelectedReminderDateProperty =
DependencyProperty.Register("SelectedReminderDate", typeof(DateTime), typeof(HoldTicketDialog), new PropertyMetadata(DateTime.MinValue, OnSelectedReminderDateChanged));
private static void OnSelectedReminderDateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var control = (HoldTicketDialog)d;
control.SelectedReminderDateChanged?.Invoke(control, EventArgs.Empty);
}
private int _selectedHour;
public int SelectedHour
{
get { return _selectedHour; }
set
{
if (_selectedHour != value)
{
_selectedHour = value;
OnPropertyChanged(nameof(SelectedHour));
setReminderDate();
}
}
}
private int _selectedMinute;
public int SelectedMinute
{
get { return _selectedMinute; }
set
{
if (_selectedMinute != value)
{
_selectedMinute = value;
OnPropertyChanged(nameof(SelectedMinute));
setReminderDate();
}
}
}
private DateTime _selectedDate;
public DateTime SelectedDate
{
get { return _selectedDate; }
set
{
if (_selectedDate != value)
{
_selectedDate = value;
OnPropertyChanged(nameof(SelectedDate));
setReminderDate();
}
}
}
public ObservableCollection<int> HoursRange { get; set; }
public ObservableCollection<int> MinutesRange { get; set; }
public HoldTicketDialog(cSupportCaseDataProvider cDataProviderBase)
{
DataProvider = cDataProviderBase;
InitializeComponent();
HoursRange = new ObservableCollection<int>(Enumerable.Range(0, 24).ToList());
MinutesRange = new ObservableCollection<int>(Enumerable.Range(0, 60).ToList());
this.DataContext = this;
SelectedReminderDateDatePicker.DisplayDateStart = DateTime.Now;
SelectedDate = DateTime.Now.AddDays(1).Date;
SelectedHour = DateTime.Now.Hour;
SelectedMinute = DateTime.Now.Minute;
}
protected override void OnInitialized(EventArgs e)
{
base.OnInitialized(e);
UpdateReasonsComboBox();
}
private void setReminderDate()
{
SelectedReminderDate = new DateTime(
SelectedDate.Year,
SelectedDate.Month,
SelectedDate.Day,
SelectedHour,
SelectedMinute,
0);
}
private void UpdateReasonsComboBox()
{
try
{
if (DataProvider == null) return;
var resTable = DataProvider.HealthCardDataHelper.HealthCardRawData.GetTableByName("M42Wpm-Pickup-ObjectStateReason", false);
if (resTable == null) return;
if (!resTable.Columns.TryGetValue("name", out var namesColumn) ||
!resTable.Columns.TryGetValue("position", out var positionsColumn) ||
!resTable.Columns.TryGetValue("hidden", out var hiddensColumn) ||
!resTable.Columns.TryGetValue("state", out var statesColumn) ||
!resTable.Columns.TryGetValue("stategroup", out var stateGroupsColumn) ||
!resTable.Columns.TryGetValue("id", out var idsColumn)) return;
var resList = new List<Dictionary<string, object>>();
for (int i = 0; i < idsColumn.Values.Count; i++)
{
if (statesColumn.Values[i] == null || stateGroupsColumn.Values[i] == null) continue;
int? positionValue = null; // Nullabel int für den Fall, dass die Position null ist
int stateValue, stateGroupValue;
// Überprüft, ob positionsColumn.Values[i] null ist
if (positionsColumn.Values[i] != null && int.TryParse(positionsColumn.Values[i].ToString(), out int posVal))
{
positionValue = posVal;
}
if (int.TryParse(statesColumn.Values[i].ToString(), out stateValue) && int.TryParse(stateGroupsColumn.Values[i].ToString(), out stateGroupValue))
{
var eintrag = new Dictionary<string, object>
{
{ "ID", idsColumn.Values[i] },
{ "DisplayName", namesColumn.Values[i] },
{ "Hidden", Convert.ToBoolean(hiddensColumn.Values[i])},
{ "State", stateValue },
{ "StateGroup", stateGroupValue },
{ "Position", positionValue ?? Int32.MaxValue } // Verwende Int32.MaxValue für null Positionen
};
resList.Add(eintrag);
}
}
// Filtern und Sortieren, wobei Einträge ohne Position zuletzt erscheinen
resList = resList.Where(eintrag => !(bool)eintrag["Hidden"] && (int)eintrag["State"] == 203 && (int)eintrag["StateGroup"] == 7)
.OrderBy(eintrag => eintrag["Position"] != null)
.ThenBy(eintrag => (int)eintrag["Position"])
.ToList();
var targetComboBox = ReasonSelection;
targetComboBox.Items.Clear();
foreach (var listValue in resList)
{
targetComboBox.Items.Add(new ComboBoxItem { Content = listValue["DisplayName"], Tag = listValue["ID"] });
}
}
catch (Exception e)
{
LogException(e);
}
}
private void DropDownOpened(object sender, EventArgs e)
{
try
{
if (!(sender is FrameworkElement senderElement))
return;
var parentBorder = cUiElementHelper.GetFirstParentOfType<Border>(senderElement);
cFocusInvoker.InvokeGotFocus(parentBorder, e);
}
catch (Exception E)
{
LogException(E);
}
}
private void DropDownClosed(object sender, EventArgs e)
{
try
{
if (!(sender is FrameworkElement senderElement))
return;
var parentBorder = cUiElementHelper.GetFirstParentOfType<Border>(senderElement);
cFocusInvoker.InvokeLostFocus(parentBorder, e);
}
catch (Exception E)
{
LogException(E);
}
}
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged(string propertyName)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
}