aktueller stand
This commit is contained in:
@@ -555,7 +555,7 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
parentWindow.Closing -= ParentWindow_Closing;
|
||||
}
|
||||
}
|
||||
private void ParentWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
|
||||
private void ParentWindow_Closing(object sender, CancelEventArgs e)
|
||||
{
|
||||
foreach (SelectionPill pill in NewOrExistingOrNoneTicketWrap.Children.OfType<SelectionPill>())
|
||||
{
|
||||
@@ -1097,11 +1097,9 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
if (!dataTable.Columns.TryGetValue("Name", out var nameColumn))
|
||||
yield break;
|
||||
|
||||
cF4SDHealthCardRawData.cHealthCardTableColumn parentIdColumn = null;
|
||||
cF4SDHealthCardRawData.cHealthCardTableColumn parentNameColumn = null;
|
||||
if (!dataTable.Columns.TryGetValue("parentValue", out parentIdColumn))
|
||||
if (!dataTable.Columns.TryGetValue("parentValue", out cF4SDHealthCardRawData.cHealthCardTableColumn parentIdColumn))
|
||||
dataTable.Columns.TryGetValue("Parent_Value", out parentIdColumn);
|
||||
if (!dataTable.Columns.TryGetValue("parent", out parentNameColumn))
|
||||
if (!dataTable.Columns.TryGetValue("parent", out cF4SDHealthCardRawData.cHealthCardTableColumn parentNameColumn))
|
||||
dataTable.Columns.TryGetValue("Parent", out parentNameColumn);
|
||||
|
||||
for (int index = 0; index < idColumn.Values.Count; index++)
|
||||
@@ -2198,7 +2196,6 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
break;
|
||||
|
||||
case ValidationPropertyNames.TicketStatusCombobox:
|
||||
validateComboboxNotEmpty(TicketStatusCombobox);
|
||||
if (!(TicketStatusCombobox.SelectedItem is ComboBoxItem a))
|
||||
break;
|
||||
|
||||
@@ -2534,30 +2531,6 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
ValidateProperty(ValidationPropertyNames.ErrorTypeValue);
|
||||
}
|
||||
|
||||
private static void validateComboboxNotEmpty(object sender)
|
||||
{
|
||||
//var comboBox = sender as ComboBox;
|
||||
//if (comboBox != null)
|
||||
//{
|
||||
// if (!(comboBox.SelectedItem is ComboBoxItem selectedItem))
|
||||
// return;
|
||||
|
||||
|
||||
|
||||
// // Überprüfe den Inhalt und setze die Hintergrundfarbe entsprechend
|
||||
// if (selectedItem.Tag == null)
|
||||
// {
|
||||
// // Setze die Hintergrundfarbe auf Rot, um einen Validierungsfehler anzuzeigen
|
||||
// comboBox.BorderBrush = SharedValidationBorderBrush;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// // Setze die ursprüngliche Hintergrundfarbe zurück, wenn die Validierung erfolgreich ist
|
||||
// comboBox.BorderBrush = (SolidColorBrush)new BrushConverter().ConvertFromString("#DEE2E6");
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
private void TicketSelectionBorder_Click()
|
||||
{
|
||||
var _h = Dispatcher.Invoke(async () =>
|
||||
@@ -2608,7 +2581,6 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
if (string.IsNullOrWhiteSpace(CaseNotesPreview.Text))
|
||||
CaseNotesPreview.Text = string.Empty;
|
||||
|
||||
SelectedTicket.Infos[TicketInfoKeys.Summary] = CaseNotesPreview.Text;
|
||||
ValidateProperty(ValidationPropertyNames.CaseNotesPreview);
|
||||
}
|
||||
catch (Exception E)
|
||||
@@ -2655,13 +2627,10 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
|
||||
private static void setTextboxErrorState(object sender, bool hasError)
|
||||
{
|
||||
var textBox = sender as TextBox;
|
||||
if (textBox == null)
|
||||
if (!(sender is TextBox textBox))
|
||||
return;
|
||||
|
||||
textBox.BorderBrush = hasError
|
||||
? SharedValidationBorderBrush
|
||||
: DefaultTextBoxBorderBrush;
|
||||
textBox.BorderBrush = hasError ? SharedValidationBorderBrush : DefaultTextBoxBorderBrush;
|
||||
}
|
||||
|
||||
private void UpdateCategoryValidationVisualState(bool hasError) =>
|
||||
@@ -2681,7 +2650,7 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
if (defaultBrush == null)
|
||||
{
|
||||
var borderBrush = border.BorderBrush;
|
||||
defaultBrush = borderBrush != null ? borderBrush.CloneCurrentValue() : null;
|
||||
defaultBrush = borderBrush?.CloneCurrentValue();
|
||||
}
|
||||
|
||||
if (!defaultThickness.HasValue)
|
||||
|
||||
Reference in New Issue
Block a user