aktueller Stand
This commit is contained in:
27
FasdDesktopUi/Basics/UserControls/Badge.xaml
Normal file
27
FasdDesktopUi/Basics/UserControls/Badge.xaml
Normal file
@@ -0,0 +1,27 @@
|
||||
<UserControl x:Class="FasdDesktopUi.Basics.UserControls.Badge"
|
||||
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"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="20"
|
||||
d:DesignWidth="40"
|
||||
x:Name="BadgeControl">
|
||||
|
||||
<Border Background="{DynamicResource Color.F4SD}"
|
||||
CornerRadius="5">
|
||||
|
||||
<StackPanel HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal"
|
||||
Margin="7.5 2.5">
|
||||
<TextBlock FontSize="12"
|
||||
FontWeight="Bold"
|
||||
Foreground="White"
|
||||
Text="{Binding ElementName=BadgeControl, Path=Text}" />
|
||||
</StackPanel>
|
||||
|
||||
</Border>
|
||||
</UserControl>
|
||||
27
FasdDesktopUi/Basics/UserControls/Badge.xaml.cs
Normal file
27
FasdDesktopUi/Basics/UserControls/Badge.xaml.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using F4SD_AdaptableIcon;
|
||||
using FasdDesktopUi.Basics.Helper;
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using static C4IT.Logging.cLogManager;
|
||||
|
||||
namespace FasdDesktopUi.Basics.UserControls
|
||||
{
|
||||
public partial class Badge : UserControl
|
||||
{
|
||||
public string Text
|
||||
{
|
||||
get { return (string)GetValue(TextProperty); }
|
||||
set { SetValue(TextProperty, value); }
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty TextProperty =
|
||||
DependencyProperty.Register(nameof(Text), typeof(string), typeof(Badge), new PropertyMetadata("Beta"));
|
||||
|
||||
|
||||
public Badge()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,12 +23,6 @@
|
||||
Visibility="{Binding ElementName=DataCanvasUc, Path=IsDetailedLayout, Converter={StaticResource BoolToVisibility}}"
|
||||
IsCloseButtonVisible="{Binding ElementName=DataCanvasUc, Path=DataCanvasData, Converter={StaticResource IsCloseButtonVisible}, ConverterParameter={x:Static converter:enumDataCanvasTypes.detailedData} }" />
|
||||
|
||||
<local:DetailedChart x:Name="DetailedChartUc"
|
||||
HorizontalAlignment="Stretch"
|
||||
Width="385"
|
||||
Visibility="{Binding ElementName=DataCanvasUc, Path=IsDetailedLayout, Converter={StaticResource BoolToVisibility}}"
|
||||
IsCloseButtonVisible="{Binding ElementName=DataCanvasUc, Path=DataCanvasData, Converter={StaticResource IsCloseButtonVisible}, ConverterParameter={x:Static converter:enumDataCanvasTypes.detailedData} }" />
|
||||
|
||||
<local:DynamicChart x:Name="DynamicChartUc"
|
||||
HorizontalAlignment="Stretch"
|
||||
Width="385"
|
||||
|
||||
@@ -72,20 +72,16 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
{
|
||||
_me.DetailedDataUc.DetailedInformationData = _me.DataCanvasData.DetailedData;
|
||||
_me.DetailedDataUc.CloseButtonClickedAction = _me.CloseDataCanvas;
|
||||
_me.DetailedChartUc.ChartData = null;
|
||||
_me.DynamicChartUc.ChartData = null;
|
||||
}
|
||||
else if (_me.DataCanvasData.ChartData is null)
|
||||
{
|
||||
_me.DetailedChartUc.ChartData = _me.DataCanvasData.DetailedChartData;
|
||||
_me.DynamicChartUc.ChartData = null;
|
||||
_me.DetailedDataUc.DetailedInformationData = null;
|
||||
_me.DetailedChartUc.CloseButtonClickedAction = _me.CloseDataCanvas;
|
||||
}
|
||||
else
|
||||
{
|
||||
_me.DynamicChartUc.ChartData = _me.DataCanvasData.ChartData;
|
||||
_me.DetailedChartUc.ChartData = null;
|
||||
_me.DetailedDataUc.DetailedInformationData = null;
|
||||
_me.DynamicChartUc.CloseButtonClickedAction = _me.CloseDataCanvas;
|
||||
}
|
||||
@@ -169,7 +165,6 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
public DataCanvas()
|
||||
{
|
||||
InitializeComponent();
|
||||
DetailedChartUc.Visibility = Visibility.Visible;
|
||||
}
|
||||
|
||||
public DataCanvas(bool drawInScrollViewer)
|
||||
@@ -186,6 +181,11 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
}
|
||||
|
||||
private async void HealthCardDataHelper_DataRefreshed(object sender, EventArgs e)
|
||||
{
|
||||
await UpdateDataAsync();
|
||||
}
|
||||
|
||||
internal async Task UpdateDataAsync()
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -215,7 +215,7 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
tempDataCanvasData.DetailedData = detailedData;
|
||||
else if (chartData is null)
|
||||
tempDataCanvasData.DetailedChartData = detailedChartData;
|
||||
else
|
||||
else
|
||||
tempDataCanvasData.ChartData = chartData;
|
||||
|
||||
DataCanvasData = tempDataCanvasData;
|
||||
|
||||
@@ -555,21 +555,34 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void SetValuesLineGraph()
|
||||
{
|
||||
try
|
||||
{
|
||||
double oneDayMs = TimeSpan.FromDays(1).TotalMilliseconds;
|
||||
double chartStartMs = 0;
|
||||
double chartEndMs = oneDayMs;
|
||||
|
||||
foreach (var data in GraphicDataProperty)
|
||||
{
|
||||
DateTime dataTime = data.Time;
|
||||
double dataValue = data.Value;
|
||||
int dataDuration = data.Duration;
|
||||
|
||||
double time = dataTime.TimeOfDay.TotalMilliseconds;
|
||||
double startMs = dataTime.TimeOfDay.TotalMilliseconds;
|
||||
double endMs = startMs + dataDuration;
|
||||
|
||||
double xLeft = xCoordinate.GetCoordinate(time);
|
||||
double xRight = xCoordinate.GetCoordinate(time + dataDuration);
|
||||
if (startMs >= chartEndMs || endMs <= chartStartMs)
|
||||
continue;
|
||||
|
||||
if (startMs < chartStartMs)
|
||||
startMs = chartStartMs;
|
||||
|
||||
if (endMs > chartEndMs)
|
||||
endMs = chartEndMs;
|
||||
|
||||
double xLeft = xCoordinate.GetCoordinate(startMs);
|
||||
double xRight = xCoordinate.GetCoordinate(endMs);
|
||||
|
||||
double y = 0;
|
||||
|
||||
@@ -585,19 +598,19 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
{
|
||||
y = yCoordinate.GetCoordinate(dataValue);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Border border = new Border()
|
||||
{
|
||||
Height = 6.0,
|
||||
Width = xRight - xLeft,
|
||||
Width = xRight - xLeft,
|
||||
CornerRadius = new CornerRadius(4.0),
|
||||
ToolTip = dataTime.ToShortTimeString() + " - " + dataTime.AddMilliseconds(dataDuration).ToShortTimeString() + " | " + dataValue,
|
||||
};
|
||||
if (border.Width < 6)
|
||||
{
|
||||
border.Width = 6;
|
||||
}
|
||||
border.Width = 6;
|
||||
}
|
||||
if (ChartData.IsThresholdActive == false)
|
||||
{
|
||||
border.Background = new SolidColorBrush(Color.FromRgb(0, 157, 221));
|
||||
@@ -652,16 +665,30 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
{
|
||||
try
|
||||
{
|
||||
double oneDayMs = TimeSpan.FromDays(1).TotalMilliseconds;
|
||||
double chartStartMs = 0;
|
||||
double chartEndMs = oneDayMs;
|
||||
|
||||
foreach (var data in GraphicDataProperty)
|
||||
{
|
||||
DateTime dataTime = data.Time;
|
||||
double dataValue = data.Value;
|
||||
int dataDuration = data.Duration;
|
||||
|
||||
double time = dataTime.TimeOfDay.TotalMilliseconds;
|
||||
double startMs = dataTime.TimeOfDay.TotalMilliseconds;
|
||||
double endMs = startMs + dataDuration;
|
||||
|
||||
double xLeft = xCoordinate.GetCoordinate(time);
|
||||
double xRight = xCoordinate.GetCoordinate(time + dataDuration);
|
||||
if (startMs >= chartEndMs || endMs <= chartStartMs)
|
||||
continue;
|
||||
|
||||
if (startMs < chartStartMs)
|
||||
startMs = chartStartMs;
|
||||
|
||||
if (endMs > chartEndMs)
|
||||
endMs = chartEndMs;
|
||||
|
||||
double xLeft = xCoordinate.GetCoordinate(startMs);
|
||||
double xRight = xCoordinate.GetCoordinate(endMs);
|
||||
|
||||
double y = 0;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using C4IT.F4SD.DisplayFormatting;
|
||||
using C4IT.F4SD.SupportCaseProtocoll.Models;
|
||||
using C4IT.FASD.Base;
|
||||
using C4IT.MultiLanguage;
|
||||
using F4SD_AdaptableIcon.Enums;
|
||||
@@ -38,6 +39,7 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
public cQuickActionOutput(cF4sdQuickActionRevision.cOutput scriptOutput)
|
||||
{
|
||||
_rawValueFormatter.SetDefaultCulture(new System.Globalization.CultureInfo(cFasdCockpitConfig.Instance.SelectedLanguage));
|
||||
_rawValueFormatter.SetDefaultTimeZone(TimeZoneInfo.Local);
|
||||
ErrorCode = scriptOutput.ErrorCode;
|
||||
ErrorDescription = scriptOutput.ErrorDescription;
|
||||
ResultCode = scriptOutput.ResultCode.GetValueOrDefault();
|
||||
@@ -246,7 +248,7 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
return veiledText;
|
||||
|
||||
if (outputFormatting.DisplayType != null)
|
||||
output = _rawValueFormatter.GetDisplayValue(Value, cUtility.GetRawValueType(outputFormatting.DisplayType.Value));
|
||||
output = _rawValueFormatter.GetDisplayValue(Value, outputFormatting.DisplayType.Value);
|
||||
|
||||
if (outputFormatting.Translation != null)
|
||||
{
|
||||
@@ -372,7 +374,7 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
return veiledText;
|
||||
|
||||
if (outputFormatting.DisplayType != null)
|
||||
output = _rawValueFormatter.GetDisplayValue(selectedItem.Value, cUtility.GetRawValueType(outputFormatting.DisplayType.Value));
|
||||
output = _rawValueFormatter.GetDisplayValue(selectedItem.Value, outputFormatting.DisplayType.Value);
|
||||
|
||||
if (outputFormatting.Translation != null)
|
||||
{
|
||||
@@ -464,7 +466,7 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
return veiledText;
|
||||
|
||||
if (outputFormatting.DisplayType != null)
|
||||
output = _rawValueFormatter.GetDisplayValue(Values[row][column].Value, cUtility.GetRawValueType(outputFormatting.DisplayType.Value));
|
||||
output = _rawValueFormatter.GetDisplayValue(Values[row][column].Value, outputFormatting.DisplayType.Value);
|
||||
|
||||
if (outputFormatting.Translation != null)
|
||||
{
|
||||
@@ -803,6 +805,7 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
return;
|
||||
|
||||
_rawValueFormatter.SetDefaultCulture(new System.Globalization.CultureInfo(cFasdCockpitConfig.Instance.SelectedLanguage));
|
||||
_rawValueFormatter.SetDefaultTimeZone(TimeZoneInfo.Local);
|
||||
|
||||
for (int i = 0; i < measureValues.Count; i++)
|
||||
{
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
<UserControl x:Class="FasdDesktopUi.Basics.UserControls.QuickTip.QuickTipStatusMonitor"
|
||||
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:uc="clr-namespace:FasdDesktopUi.Basics.UserControls"
|
||||
xmlns:local="clr-namespace:FasdDesktopUi.Basics.UserControls.QuickTip"
|
||||
xmlns:ico="clr-namespace:FasdDesktopUi.Basics.UserControls.AdaptableIcon;assembly=F4SD-AdaptableIcon"
|
||||
xmlns:icod="clr-namespace:F4SD_AdaptableIcon;assembly=F4SD-AdaptableIcon"
|
||||
xmlns:gif="http://wpfanimatedgif.codeplex.com"
|
||||
xmlns:converter="clr-namespace:FasdDesktopUi.Basics.Converter"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="400"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="400"
|
||||
MinWidth="400"
|
||||
MinHeight="200"
|
||||
IsVisibleChanged="QuickTipStatusMonitorUc_IsVisibleChanged"
|
||||
@@ -16,116 +19,122 @@
|
||||
|
||||
<UserControl.Resources>
|
||||
<converter:LanguageDefinitionsConverter x:Key="LanguageConverter" />
|
||||
<Style x:Key="BorderButtonWithText" TargetType="Border">
|
||||
<Setter Property="CornerRadius" Value="5"/>
|
||||
<Setter Property="Background" Value="{DynamicResource Color.AppBackground}"/>
|
||||
<Setter Property="Height" Value="35"/>
|
||||
<EventSetter Event="MouseEnter" Handler="ButtonBorder_MouseEnter"/>
|
||||
<EventSetter Event="MouseLeave" Handler="ButtonBorder_MouseLeave"/>
|
||||
<Style x:Key="BorderButtonWithText"
|
||||
TargetType="Border">
|
||||
<Setter Property="CornerRadius"
|
||||
Value="5" />
|
||||
<Setter Property="Background"
|
||||
Value="{DynamicResource Color.AppBackground}" />
|
||||
<Setter Property="Height"
|
||||
Value="35" />
|
||||
<EventSetter Event="MouseEnter"
|
||||
Handler="ButtonBorder_MouseEnter" />
|
||||
<EventSetter Event="MouseLeave"
|
||||
Handler="ButtonBorder_MouseLeave" />
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="{DynamicResource BackgroundColor.Menu.MainCategory}"/>
|
||||
<Trigger Property="IsMouseOver"
|
||||
Value="True">
|
||||
<Setter Property="Background"
|
||||
Value="{DynamicResource BackgroundColor.Menu.MainCategory}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
</UserControl.Resources>
|
||||
|
||||
<Border CornerRadius="10"
|
||||
Padding="10"
|
||||
Margin="0 0 0 10"
|
||||
Background="{DynamicResource BackgroundColor.DetailsPage.DataHistory.ValueColumn}"
|
||||
VerticalAlignment="Top">
|
||||
<Grid>
|
||||
<uc:Badge Panel.ZIndex="999"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Margin="10" />
|
||||
|
||||
<DockPanel>
|
||||
<DockPanel LastChildFill="False" DockPanel.Dock="Top">
|
||||
<Border CornerRadius="10"
|
||||
Padding="10"
|
||||
Margin="0 0 0 10"
|
||||
Background="{DynamicResource BackgroundColor.DetailsPage.DataHistory.ValueColumn}"
|
||||
VerticalAlignment="Top">
|
||||
|
||||
<ico:AdaptableIcon
|
||||
x:Name="HeadingIcon"
|
||||
DockPanel.Dock="Left"
|
||||
Style="{DynamicResource Menu.MenuBar.PinnedIcon.Base}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="7.5 0 0 0"
|
||||
BorderPadding="0"
|
||||
IconHeight="15"
|
||||
IconWidth="15"
|
||||
SelectedInternIcon="{Binding QuickTipIcon.Intern, ElementName=QuickTipStatusMonitorUc}"
|
||||
SelectedMaterialIcon="{Binding QuickTipIcon.Material, ElementName=QuickTipStatusMonitorUc}"/>
|
||||
<DockPanel>
|
||||
<DockPanel LastChildFill="False"
|
||||
DockPanel.Dock="Top">
|
||||
|
||||
<TextBlock
|
||||
x:Name="HeadingText"
|
||||
Text="{Binding QuickTipName, ElementName=QuickTipStatusMonitorUc}"
|
||||
DockPanel.Dock="Left"
|
||||
Style="{DynamicResource DetailsPage.DataHistory.TitleColumn.OverviewTitle}"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="10" />
|
||||
<ico:AdaptableIcon x:Name="HeadingIcon"
|
||||
DockPanel.Dock="Left"
|
||||
Style="{DynamicResource Menu.MenuBar.PinnedIcon.Base}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="7.5 0 0 0"
|
||||
BorderPadding="0"
|
||||
IconHeight="15"
|
||||
IconWidth="15"
|
||||
SelectedInternIcon="{Binding QuickTipIcon.Intern, ElementName=QuickTipStatusMonitorUc}"
|
||||
SelectedMaterialIcon="{Binding QuickTipIcon.Material, ElementName=QuickTipStatusMonitorUc}" />
|
||||
|
||||
<TextBlock x:Name="HeadingText"
|
||||
Text="{Binding QuickTipName, ElementName=QuickTipStatusMonitorUc}"
|
||||
DockPanel.Dock="Left"
|
||||
Style="{DynamicResource DetailsPage.DataHistory.TitleColumn.OverviewTitle}"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="10" />
|
||||
|
||||
</DockPanel>
|
||||
|
||||
<Grid Margin="0,5,0,0"
|
||||
DockPanel.Dock="Bottom">
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="1.5*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="1.5*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Border x:Name="CompleteButton"
|
||||
Grid.Column="1"
|
||||
Style="{DynamicResource BorderButtonWithText}"
|
||||
MouseLeftButtonUp="CompleteButton_Click"
|
||||
TouchDown="CompleteButton_Click">
|
||||
|
||||
<TextBlock Text="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=QuickTips.Complete}"
|
||||
Style="{DynamicResource DetailsPage.DataHistory.TitleColumn.OverviewTitle}"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center" />
|
||||
|
||||
</Border>
|
||||
|
||||
<Border x:Name="CancelButton"
|
||||
Grid.Column="3"
|
||||
Style="{DynamicResource BorderButtonWithText}"
|
||||
MouseLeftButtonUp="CancelButton_Click"
|
||||
TouchDown="CancelButton_Click">
|
||||
|
||||
<TextBlock Text="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=QuickTips.Cancel}"
|
||||
Style="{DynamicResource DetailsPage.DataHistory.TitleColumn.OverviewTitle}"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center" />
|
||||
|
||||
</Border>
|
||||
|
||||
</Grid>
|
||||
|
||||
<TextBlock x:Name="StepCountTextBlock"
|
||||
TextAlignment="Center"
|
||||
Text="0 von 0 Schritten abgeschlossen"
|
||||
Foreground="{DynamicResource FontColor.DetailsPage.DataHistory.Value}"
|
||||
DockPanel.Dock="Bottom" />
|
||||
|
||||
<ScrollViewer x:Name="QuickTipElementViewer"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
DockPanel.Dock="Top">
|
||||
<StackPanel x:Name="QuickTipElementPanel">
|
||||
|
||||
</StackPanel>
|
||||
|
||||
</ScrollViewer>
|
||||
|
||||
</DockPanel>
|
||||
|
||||
|
||||
|
||||
<Grid Margin="0,5,0,0" DockPanel.Dock="Bottom">
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Border
|
||||
x:Name="CompleteButton"
|
||||
Grid.Column="1"
|
||||
Style="{DynamicResource BorderButtonWithText}"
|
||||
MouseLeftButtonUp="CompleteButton_Click"
|
||||
TouchDown="CompleteButton_Click">
|
||||
|
||||
<TextBlock
|
||||
Text="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=QuickTips.Complete}"
|
||||
Style="{DynamicResource DetailsPage.DataHistory.TitleColumn.OverviewTitle}"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"/>
|
||||
|
||||
</Border>
|
||||
|
||||
<Border
|
||||
x:Name="CancelButton"
|
||||
Grid.Column="3"
|
||||
Style="{DynamicResource BorderButtonWithText}"
|
||||
MouseLeftButtonUp="CancelButton_Click"
|
||||
TouchDown="CancelButton_Click">
|
||||
|
||||
<TextBlock
|
||||
Text="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=QuickTips.Cancel}"
|
||||
Style="{DynamicResource DetailsPage.DataHistory.TitleColumn.OverviewTitle}"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"/>
|
||||
|
||||
</Border>
|
||||
|
||||
</Grid>
|
||||
|
||||
<TextBlock
|
||||
x:Name="StepCountTextBlock"
|
||||
TextAlignment="Center"
|
||||
Text="0 von 0 Schritten abgeschlossen"
|
||||
Foreground="{DynamicResource FontColor.DetailsPage.DataHistory.Value}"
|
||||
DockPanel.Dock="Bottom"/>
|
||||
|
||||
<ScrollViewer
|
||||
x:Name="QuickTipElementViewer"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
DockPanel.Dock="Top">
|
||||
<StackPanel
|
||||
x:Name="QuickTipElementPanel">
|
||||
|
||||
</StackPanel>
|
||||
|
||||
</ScrollViewer>
|
||||
|
||||
</DockPanel>
|
||||
|
||||
</Border>
|
||||
</Border>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using C4IT.FASD.Base;
|
||||
using C4IT.F4SD.SupportCaseProtocoll.Models;
|
||||
using C4IT.FASD.Base;
|
||||
using C4IT.MultiLanguage;
|
||||
using F4SD_AdaptableIcon;
|
||||
using F4SD_AdaptableIcon.Enums;
|
||||
@@ -254,7 +255,9 @@ namespace FasdDesktopUi.Basics.UserControls.QuickTip
|
||||
return;
|
||||
|
||||
bool wasSuccessfull = step.SuccessState == enumQuickActionSuccess.finished || step.SuccessState == enumQuickActionSuccess.successfull;
|
||||
F4SDProtocoll.Instance.Add(new QuickTipStepProtocollEntry(step.StepData.QuickTipElementDefinition, wasSuccessfull));
|
||||
ProtocollEntryBase protocollEntry = QuickTipStepProtocollEntryOutput.GetQuickTipStepProtocollEntry(step.StepData.QuickTipElementDefinition, wasSuccessfull);
|
||||
|
||||
F4SDProtocoll.Instance.Add(protocollEntry);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -173,7 +173,7 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
}
|
||||
SearchTextBox.Text = search;
|
||||
|
||||
await ChangedSearchValue.Invoke(_result);
|
||||
await ChangedSearchValue?.Invoke(_result);
|
||||
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1911,7 +1911,7 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
ResponsibleRole = selectedRole,
|
||||
ResponsiblePerson = selectedPerson,
|
||||
Comment = comment,
|
||||
QuickActionHistory = TransferQuickActionHistoryCheck.IsChecked ?? false ? F4SDProtocoll.Instance.GetOfType<QuickActionProtocollEntry>().Select(e => e.GetResult()).ToList() : null,
|
||||
SupportCaseProtocollEntries = TransferQuickActionHistoryCheck.IsChecked ?? false ? F4SDProtocoll.Instance.GetAll().ToList() : null,
|
||||
workTimes = workingTimes,
|
||||
StatusIdValue = statusIdValue,
|
||||
CaseId = DataProvider.CaseId
|
||||
|
||||
@@ -10,6 +10,7 @@ using System.Windows.Threading;
|
||||
|
||||
using C4IT.FASD.Cockpit.Communication;
|
||||
using FasdDesktopUi.Basics.Models;
|
||||
using FasdDesktopUi.Basics.Services;
|
||||
using FasdDesktopUi.Basics.Services.Models;
|
||||
using FasdDesktopUi.Pages.SearchPage;
|
||||
namespace FasdDesktopUi.Basics.UserControls
|
||||
@@ -217,36 +218,33 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
|
||||
private async Task RefreshCountsAsync(bool useRoleTickets)
|
||||
{
|
||||
var communication = cFasdCockpitCommunicationBase.Instance;
|
||||
Dictionary<string, int> counts = null;
|
||||
var service = TicketOverviewUpdateService.Instance;
|
||||
|
||||
var counts = CategorySetters.ToDictionary(item => item.Key, _ => 0);
|
||||
|
||||
if (communication != null)
|
||||
if (service != null)
|
||||
{
|
||||
var tasks = CategorySetters.ToDictionary(
|
||||
item => item.Key,
|
||||
item => communication.GetTicketOverviewRelations(item.Key, useRoleTickets, 0));
|
||||
|
||||
foreach (var kvp in tasks)
|
||||
try
|
||||
{
|
||||
try
|
||||
{
|
||||
var relations = await kvp.Value.ConfigureAwait(false);
|
||||
counts[kvp.Key] = relations?.Count ?? 0;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"[TicketOverview] Failed to load count for '{kvp.Key}': {ex}");
|
||||
counts[kvp.Key] = 0;
|
||||
}
|
||||
var scope = useRoleTickets ? TileScope.Role : TileScope.Personal;
|
||||
await service.FetchAsync(scope).ConfigureAwait(false);
|
||||
counts = service.GetCountsForScope(useRoleTickets);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"[TicketOverview] Service refresh failed: {ex}");
|
||||
counts = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (counts == null || counts.Count == 0)
|
||||
counts = await LoadCountsFallbackAsync(useRoleTickets).ConfigureAwait(false);
|
||||
|
||||
await Dispatcher.InvokeAsync(() =>
|
||||
{
|
||||
foreach (var (key, setter) in CategorySetters)
|
||||
{
|
||||
setter(_viewModel, counts[key]);
|
||||
counts.TryGetValue(key, out var value);
|
||||
setter(_viewModel, value);
|
||||
}
|
||||
|
||||
_viewModel.ResetSelection();
|
||||
@@ -255,6 +253,34 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
}, DispatcherPriority.Background);
|
||||
}
|
||||
|
||||
private async Task<Dictionary<string, int>> LoadCountsFallbackAsync(bool useRoleTickets)
|
||||
{
|
||||
var counts = CategorySetters.ToDictionary(item => item.Key, _ => 0);
|
||||
var communication = cFasdCockpitCommunicationBase.Instance;
|
||||
if (communication == null)
|
||||
return counts;
|
||||
|
||||
var tasks = CategorySetters.ToDictionary(
|
||||
item => item.Key,
|
||||
item => communication.GetTicketOverviewRelations(item.Key, useRoleTickets, 0));
|
||||
|
||||
foreach (var kvp in tasks)
|
||||
{
|
||||
try
|
||||
{
|
||||
var relations = await kvp.Value.ConfigureAwait(false);
|
||||
counts[kvp.Key] = relations?.Count ?? 0;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"[TicketOverview] Fallback load failed for '{kvp.Key}': {ex}");
|
||||
counts[kvp.Key] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return counts;
|
||||
}
|
||||
|
||||
public void UpdateCounts(IDictionary<string, int> counts, bool useRoleTickets)
|
||||
{
|
||||
if (counts == null)
|
||||
@@ -272,6 +298,16 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
}, DispatcherPriority.Background);
|
||||
}
|
||||
|
||||
public void ClearHighlightsForScope(TileScope scope)
|
||||
{
|
||||
var highlightStates = scope == TileScope.Role ? _roleHighlightStates : _personalHighlightStates;
|
||||
if (highlightStates.Count == 0)
|
||||
return;
|
||||
|
||||
highlightStates.Clear();
|
||||
UpdateHighlightState(scope == TileScope.Role);
|
||||
}
|
||||
|
||||
public void SetHighlights(IEnumerable<TileCountChange> changes, bool useRoleTickets)
|
||||
{
|
||||
if (changes != null)
|
||||
|
||||
Reference in New Issue
Block a user