Compare commits
2 Commits
27425f5dde
...
567584faf0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
567584faf0 | ||
|
|
5856ff4df8 |
BIN
2025-11-13 17_31_36-.png
Normal file
BIN
2025-11-13 17_31_36-.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
BIN
2025-11-13 17_31_55-.png
Normal file
BIN
2025-11-13 17_31_55-.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>F4SD.Cockpit.Client.Test</RootNamespace>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<!--
|
||||
To enable the Microsoft Testing Platform 'dotnet test' experience, add property:
|
||||
<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>
|
||||
@@ -27,9 +27,9 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
|
||||
<PackageReference Include="NSubstitute" Version="5.3.0" />
|
||||
<PackageReference Include="xunit.v3" Version="3.1.0" />
|
||||
<PackageReference Include="xunit.v3" Version="3.2.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -230,6 +230,9 @@ namespace FasdDesktopUi.Basics.Models
|
||||
Dispatcher.CurrentDispatcher.Invoke(() => splashScreen?.SetStatusText(cMultiLanguageSupport.GetItem("StartUp.SplashScreen.AuthenticateUser")));
|
||||
ApiConnectionStatus = enumOnlineStatus.unauthorized;
|
||||
const string cockpitUserRole = "Cockpit.User";
|
||||
#if isNewFeature
|
||||
const string cockpitTicketAgentRole = "Cockpit.TicketAgent";
|
||||
#endif
|
||||
userInfo = await cFasdCockpitCommunicationBase.Instance.WinLogon();
|
||||
lock (cFasdCockpitCommunicationBase.CockpitUserInfoLock)
|
||||
{
|
||||
@@ -244,6 +247,10 @@ namespace FasdDesktopUi.Basics.Models
|
||||
{
|
||||
await Task.Run(async () => await cFasdCockpitConfig.Instance.InstantiateAnalyticsAsync(cFasdCockpitConfig.SessionId));
|
||||
ApiConnectionStatus = enumOnlineStatus.online;
|
||||
#if isNewFeature
|
||||
if (userInfo.Roles.Contains(cockpitTicketAgentRole))
|
||||
cCockpitConfiguration.Instance.ticketSupport.EditTicket = true;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,9 @@ namespace FasdDesktopUi.Basics.Models
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enumHighlightColor? HighlightColor { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public enumHistoryTitleType? PresentationStyle { get; set; } = enumHistoryTitleType.none;
|
||||
|
||||
[JsonIgnore]
|
||||
public cUiActionBase UiAction { get; set; }
|
||||
|
||||
|
||||
@@ -35,8 +35,7 @@ namespace FasdDesktopUi.Basics.Services.ProtocollService
|
||||
quickActionCopyData.Name = quickActionDefinition.Names.GetValue();
|
||||
quickActionCopyData.ExecutionTime = DateTime.UtcNow;
|
||||
|
||||
if (dataProvider.HealthCardDataHelper.HeadingData.TryGetValue(enumFasdInformationClass.Computer, out var computerHeadingData))
|
||||
quickActionCopyData.AffectedDeviceName = computerHeadingData.HeadingText;
|
||||
quickActionCopyData.AffectedDeviceName = dataProvider.HealthCardDataHelper.GetInformationObjectHeadingName(enumFasdInformationClass.Computer);
|
||||
|
||||
quickActionCopyData.WasRunningOnAffectedDevice = wasRunningOnAffectedDevice;
|
||||
quickActionCopyData.QuickActionOutput = quickActionOutput;
|
||||
|
||||
@@ -432,7 +432,7 @@ namespace FasdDesktopUi.Basics
|
||||
{
|
||||
try
|
||||
{
|
||||
var couldGetHealthCard = HealthCardDataHelper.TryGetHealthcard(requiredInformationClasses);
|
||||
var couldGetHealthCard = HealthCardDataHelper.TrySetSelectedHealthcard(requiredInformationClasses);
|
||||
|
||||
if (!couldGetHealthCard)
|
||||
{
|
||||
@@ -452,7 +452,7 @@ namespace FasdDesktopUi.Basics
|
||||
}
|
||||
}
|
||||
|
||||
var isOk = await HealthCardDataHelper.GetHealthCardRawDataAsync(new cF4sdHealthCardRawDataRequest()
|
||||
var isOk = await HealthCardDataHelper.LoadingHelper.GetHealthCardRawDataAsync(new cF4sdHealthCardRawDataRequest()
|
||||
{
|
||||
Identities = Identities,
|
||||
Tables = requiredTables.ToList(),
|
||||
@@ -460,7 +460,7 @@ namespace FasdDesktopUi.Basics
|
||||
});
|
||||
|
||||
if (isNewCase)
|
||||
HealthCardDataHelper.LastDataRequest = DateTime.Now;
|
||||
HealthCardDataHelper.LoadingHelper.LastDataRequest = DateTime.Now;
|
||||
|
||||
if (isOk == false)
|
||||
{
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace FasdDesktopUi.Basics.UiActions
|
||||
return null;
|
||||
|
||||
if (cF4SDCustomDialogConfig.Instance.CustomDialogContainers.TryGetValue(name, out var containerConfig))
|
||||
output = dataProvider.HealthCardDataHelper.GetContainerDataFromConfig(containerConfig);
|
||||
output = dataProvider.HealthCardDataHelper.CustomizableSectionHelper.GetContainerDataFromConfig(containerConfig);
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace FasdDesktopUi.Basics.UiActions
|
||||
return false;
|
||||
|
||||
DataProvider = dataProvider;
|
||||
DataProvider.HealthCardDataHelper.DataRefreshed += (s, e) => CachedDetails.Clear();
|
||||
DataProvider.HealthCardDataHelper.LoadingHelper.DataRefreshed += (s, e) => CachedDetails.Clear();
|
||||
|
||||
Mouse.OverrideCursor = Cursors.Wait;
|
||||
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
DropDownClosed="ComboBoxControl_DropDownClosed"
|
||||
Background="{Binding ElementName=ComboBoxPagableUc, Path=ComboBoxBackground}"
|
||||
BorderBrush="{Binding ElementName=ComboBoxPagableUc, Path=BorderBrush}"
|
||||
BorderThickness="0"
|
||||
BorderThickness="{Binding ElementName=ComboBoxPagableUc, Path=BorderThickness}"
|
||||
ItemsSource="{Binding ElementName=ComboBoxPagableUc, Path=ItemData}"
|
||||
SelectedItem="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:ComboBoxPageable}}, Path=SelectedItem, Mode=TwoWay}"
|
||||
DisplayMemberPath="Key"
|
||||
|
||||
@@ -33,8 +33,8 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
if (DataCanvasData.GetDetailedDataAsync != null)
|
||||
{
|
||||
if (dataProvider != null)
|
||||
dataProvider.HealthCardDataHelper.DataRefreshed -= HealthCardDataHelper_DataRefreshed;
|
||||
value.HealthCardDataHelper.DataRefreshed += HealthCardDataHelper_DataRefreshed;
|
||||
dataProvider.HealthCardDataHelper.LoadingHelper.DataRefreshed -= HealthCardDataHelper_DataRefreshed;
|
||||
value.HealthCardDataHelper.LoadingHelper.DataRefreshed += HealthCardDataHelper_DataRefreshed;
|
||||
}
|
||||
|
||||
dataProvider = value;
|
||||
@@ -57,10 +57,10 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
if (_me.dataProvider != null)
|
||||
{
|
||||
if (oldData.GetDetailedDataAsync != null)
|
||||
_me.dataProvider.HealthCardDataHelper.DataRefreshed -= _me.HealthCardDataHelper_DataRefreshed;
|
||||
_me.dataProvider.HealthCardDataHelper.LoadingHelper.DataRefreshed -= _me.HealthCardDataHelper_DataRefreshed;
|
||||
|
||||
if (newData.GetDetailedDataAsync != null)
|
||||
_me.dataProvider.HealthCardDataHelper.DataRefreshed += _me.HealthCardDataHelper_DataRefreshed;
|
||||
_me.dataProvider.HealthCardDataHelper.LoadingHelper.DataRefreshed += _me.HealthCardDataHelper_DataRefreshed;
|
||||
}
|
||||
|
||||
_me.QuickActionStatusUc.CancelQuickAction();
|
||||
|
||||
@@ -181,7 +181,8 @@
|
||||
<Grid>
|
||||
<ComboBox x:Name="ComboBoxControl"
|
||||
Background="{Binding ElementName=HierarchySelector, Path=ComboBoxBackground}"
|
||||
BorderBrush="{Binding ElementName=HierarchySelector, Path=BorderBrush}"
|
||||
BorderBrush="Transparent"
|
||||
BorderThickness="0"
|
||||
Foreground="{DynamicResource FontColor.Menu.Categories}"
|
||||
ItemsSource="{Binding VisibleItems, ElementName=HierarchySelector}"
|
||||
DisplayMemberPath="FullPath"
|
||||
|
||||
@@ -5,7 +5,6 @@ using FasdDesktopUi.Basics.CustomEvents;
|
||||
using FasdDesktopUi.Basics.Models;
|
||||
using FasdDesktopUi.Basics.UserControls.AdaptableIcon;
|
||||
using FasdDesktopUi.Pages.AdvancedSearchPage;
|
||||
using Microsoft.Internal.VisualStudio.PlatformUI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
@@ -79,22 +79,6 @@
|
||||
Value="{DynamicResource FontColor.Menu.Categories}" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="MandatoryFieldBorderStyle"
|
||||
TargetType="Border">
|
||||
<Setter Property="Margin"
|
||||
Value="0 5 0 0" />
|
||||
<Setter Property="BorderThickness"
|
||||
Value="1" />
|
||||
<Setter Property="Padding"
|
||||
Value="1" />
|
||||
<Setter Property="CornerRadius"
|
||||
Value="7.5" />
|
||||
<Setter Property="Background"
|
||||
Value="{DynamicResource BackgroundColor.DetailsPage.DataHistory.ValueColumn}" />
|
||||
<Setter Property="BorderBrush"
|
||||
Value="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="MandatoryEditableTextBoxStyle"
|
||||
TargetType="TextBox"
|
||||
BasedOn="{StaticResource Customizable.Editable.TextBox.EditOnly}">
|
||||
@@ -197,6 +181,7 @@
|
||||
SelectedItem="{Binding SelectedCategory, ElementName=CloseCaseDialogUc, Mode=TwoWay}"
|
||||
ComboBoxBackground="{DynamicResource BackgroundColor.DetailsPage.DataHistory.ValueColumn}"
|
||||
BorderBrush="Transparent"
|
||||
BorderThickness="0"
|
||||
SearchPlaceholderText="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Searchbar.Placeholder}"
|
||||
DropDownOpened="DropDownOpened"
|
||||
DropDownClosed="DropDownClosed"
|
||||
|
||||
@@ -21,12 +21,7 @@
|
||||
FontWeight="Bold"
|
||||
Foreground="{DynamicResource FontColor.Menu.Categories}" />
|
||||
<Border x:Name="ErrorTypeValidationBorder"
|
||||
Margin="0 5 0 0"
|
||||
BorderThickness="1"
|
||||
Padding="1"
|
||||
CornerRadius="7.5"
|
||||
Background="{DynamicResource BackgroundColor.DetailsPage.DataHistory.ValueColumn}"
|
||||
BorderBrush="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}">
|
||||
Style="{StaticResource MandatoryFieldBorderStyle}">
|
||||
<ComboBox x:Name="ErrorTypeComboBox"
|
||||
Background="{DynamicResource BackgroundColor.DetailsPage.DataHistory.ValueColumn}"
|
||||
BorderBrush="Transparent"
|
||||
|
||||
@@ -21,15 +21,12 @@
|
||||
|
||||
<Border x:Name="RoleValidationBorder"
|
||||
Margin="0 5 0 10"
|
||||
BorderThickness="1"
|
||||
Padding="1"
|
||||
CornerRadius="7.5"
|
||||
Background="{DynamicResource BackgroundColor.DetailsPage.DataHistory.ValueColumn}"
|
||||
BorderBrush="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}">
|
||||
Style="{StaticResource MandatoryFieldBorderStyle}">
|
||||
<local:ComboBoxPageable x:Name="RoleSelectionControl"
|
||||
SelectedItem="{Binding ElementName=ForwardTicketDialogUc, Path=SelectedRole, Mode=TwoWay}"
|
||||
ComboBoxBackground="{DynamicResource BackgroundColor.DetailsPage.DataHistory.ValueColumn}"
|
||||
BorderBrush="Transparent" />
|
||||
BorderBrush="Transparent"
|
||||
BorderThickness="0" />
|
||||
</Border>
|
||||
|
||||
<TextBlock Text="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Dialog.CloseCase.ForwardTicket.ResponsiblePerson}"
|
||||
@@ -38,15 +35,12 @@
|
||||
|
||||
<Border x:Name="PersonValidationBorder"
|
||||
Margin="0 5 0 10"
|
||||
BorderThickness="1"
|
||||
Padding="1"
|
||||
CornerRadius="7.5"
|
||||
Background="{DynamicResource BackgroundColor.DetailsPage.DataHistory.ValueColumn}"
|
||||
BorderBrush="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}">
|
||||
Style="{StaticResource MandatoryFieldBorderStyle}">
|
||||
<local:ComboBoxPageable x:Name="PersonSelectionControl"
|
||||
SelectedItem="{Binding ElementName=ForwardTicketDialogUc, Path=SelectedPerson, Mode=TwoWay}"
|
||||
ComboBoxBackground="{DynamicResource BackgroundColor.DetailsPage.DataHistory.ValueColumn}"
|
||||
BorderBrush="Transparent" />
|
||||
BorderBrush="Transparent"
|
||||
BorderThickness="0" />
|
||||
</Border>
|
||||
|
||||
<TextBlock Text="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Dialog.CloseCase.ForwardTicket.Comment}"
|
||||
|
||||
@@ -386,221 +386,6 @@ namespace FasdDesktopUi.Basics
|
||||
return false;
|
||||
}
|
||||
|
||||
#region Ascii
|
||||
|
||||
public static string GetQuickActionAsciiString(cQuickActionCopyData copyData, cFasdQuickAction quickActionDefinition)
|
||||
{
|
||||
string output = string.Empty;
|
||||
|
||||
try
|
||||
{
|
||||
output += GetQuickActionAsciiDescriptionString(copyData.Name, copyData.AffectedDeviceName, copyData.WasRunningOnAffectedDevice, copyData.ExecutionTime, copyData.QuickActionOutput?.ResultCode);
|
||||
output += GetQuickActionAsciiErrorString(copyData.QuickActionOutput?.ErrorDescription);
|
||||
output += GetQuickActionAsciiOutputString(copyData.QuickActionOutput, quickActionDefinition);
|
||||
output += GetQuickActionAsciiValueComparisonString(copyData.MeasureValues);
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
private static string GetQuickActionAsciiDescriptionString(string quickActionName, string deviceName, bool wasRunningOnAffectedDevice, DateTime executionTime, enumQuickActionSuccess? quickActionStatus)
|
||||
{
|
||||
string output = string.Empty;
|
||||
try
|
||||
{
|
||||
var quickActionStatusString = string.Empty;
|
||||
|
||||
switch (quickActionStatus)
|
||||
{
|
||||
case null:
|
||||
case enumQuickActionSuccess.successfull:
|
||||
quickActionStatusString = cMultiLanguageSupport.GetItem("QuickAction.Copy.RevisionStatus.Successfull");
|
||||
break;
|
||||
case enumQuickActionSuccess.error:
|
||||
quickActionStatusString = cMultiLanguageSupport.GetItem("QuickAction.Copy.RevisionStatus.Error");
|
||||
break;
|
||||
}
|
||||
|
||||
var rawDescription = wasRunningOnAffectedDevice ? cMultiLanguageSupport.GetItem("QuickAction.Remote.Copy.Description") : cMultiLanguageSupport.GetItem("QuickAction.Local.Copy.Description");
|
||||
output = string.Format(rawDescription, quickActionName, deviceName, executionTime.ToString("g", new CultureInfo(cFasdCockpitConfig.Instance.SelectedLanguage)), quickActionStatusString);
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
private static string GetQuickActionAsciiErrorString(string errorMessage)
|
||||
{
|
||||
string output = string.Empty;
|
||||
try
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(errorMessage))
|
||||
output = "\n\n" + errorMessage;
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
private static string GetQuickActionAsciiOutputString(QuickActionStatusMonitor.cQuickActionOutput quickActionOutput, cFasdQuickAction quickActionDefinition)
|
||||
{
|
||||
string output = string.Empty;
|
||||
|
||||
try
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(quickActionOutput?.ErrorDescription))
|
||||
return output;
|
||||
|
||||
|
||||
switch (quickActionOutput)
|
||||
{
|
||||
case QuickActionStatusMonitor.cQuickActionOutputSingle singleOutput:
|
||||
{
|
||||
if (singleOutput.Value is null)
|
||||
return output;
|
||||
|
||||
output += "\n\n";
|
||||
output += cMultiLanguageSupport.GetItem("QuickAction.Copy.Output") + " ";
|
||||
output += singleOutput.GetDisplayValue(quickActionDefinition.ColumnOutputFormattings);
|
||||
|
||||
break;
|
||||
}
|
||||
case QuickActionStatusMonitor.cQuickActionOutputList listOutput:
|
||||
{
|
||||
output += "\n\n";
|
||||
output += cMultiLanguageSupport.GetItem("QuickAction.Copy.Output") + "\n";
|
||||
|
||||
|
||||
foreach (var value in listOutput.Values[0])
|
||||
{
|
||||
if (ShouldHideQuickActionOutput(value.Key, quickActionDefinition))
|
||||
continue;
|
||||
|
||||
if (quickActionDefinition.ColumnOutputFormattings?.TryGetValue(value.Key, out var outputFormatting) ?? false)
|
||||
output += outputFormatting.Names.GetValue();
|
||||
else
|
||||
output += value.Key;
|
||||
|
||||
output += " | ";
|
||||
}
|
||||
|
||||
for (int i = 0; i < listOutput.Values.Count; i++)
|
||||
{
|
||||
output += "\n";
|
||||
|
||||
for (int j = 0; j < listOutput.Values[i].Count; j++)
|
||||
{
|
||||
string valueKey = listOutput.Values[0][j].Key;
|
||||
|
||||
if (ShouldHideQuickActionOutput(valueKey, quickActionDefinition))
|
||||
continue;
|
||||
|
||||
string displayValue = listOutput.GetDisplayValue(i, j, quickActionDefinition.ColumnOutputFormattings);
|
||||
|
||||
if (string.IsNullOrWhiteSpace(displayValue))
|
||||
continue;
|
||||
|
||||
output += displayValue;
|
||||
output += " | ";
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case QuickActionStatusMonitor.cQuickActionOutputObject objectOutput:
|
||||
{
|
||||
output += "\n\n";
|
||||
output += cMultiLanguageSupport.GetItem("QuickAction.Copy.Output") + "\n";
|
||||
|
||||
for (int i = 0; i < objectOutput.Values.Count; i++)
|
||||
{
|
||||
var value = objectOutput.Values[i];
|
||||
|
||||
if (ShouldHideQuickActionOutput(value.Key, quickActionDefinition))
|
||||
continue;
|
||||
|
||||
string columnTitle = string.Empty;
|
||||
|
||||
if (quickActionDefinition.ColumnOutputFormattings?.TryGetValue(value.Key, out var outputFormatting) ?? false)
|
||||
columnTitle = outputFormatting.Names.GetValue();
|
||||
else
|
||||
columnTitle = value.Key;
|
||||
|
||||
if (!string.IsNullOrEmpty(columnTitle))
|
||||
output += $"{columnTitle}: ";
|
||||
|
||||
string displayValue = objectOutput.GetDisplayValue(i, quickActionDefinition.ColumnOutputFormattings);
|
||||
output += !string.IsNullOrWhiteSpace(displayValue) ? displayValue : null;
|
||||
|
||||
output += "\n";
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
private static string GetQuickActionAsciiValueComparisonString(List<QuickActionStatusMonitor.cQuickActionMeasureValue> measureValues)
|
||||
{
|
||||
string output = string.Empty;
|
||||
|
||||
try
|
||||
{
|
||||
if (measureValues is null || measureValues.Count <= 0)
|
||||
return output;
|
||||
|
||||
output += "\n\n" + cMultiLanguageSupport.GetItem("QuickAction.Copy.Measure");
|
||||
|
||||
RawValueFormatter.SetDefaultCulture(new System.Globalization.CultureInfo(cFasdCockpitConfig.Instance.SelectedLanguage));
|
||||
|
||||
foreach (var measureValue in measureValues)
|
||||
{
|
||||
try
|
||||
{
|
||||
string value = RawValueFormatter.GetDisplayValue(measureValue.Value, measureValue.Display);
|
||||
string postValue = RawValueFormatter.GetDisplayValue(measureValue.PostValue, measureValue.Display);
|
||||
string difference = string.Empty;
|
||||
|
||||
if (measureValue.Difference != null)
|
||||
difference = $" (∆ {RawValueFormatter.GetDisplayValue(measureValue.Difference, measureValue.Display)})";
|
||||
|
||||
output += "\n" + measureValue.Names.GetValue(cF4SDCockpitXmlConfig.Instance.HealthCardConfig.ProtocollLanguage) + ": " + value + " ➜ " + postValue + difference;
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Html
|
||||
|
||||
public static string GetHtmlFrame(string Content)
|
||||
{
|
||||
var strLen1 = (Content.Length + 142).ToString("D10");
|
||||
@@ -618,229 +403,6 @@ namespace FasdDesktopUi.Basics
|
||||
return RetVal;
|
||||
}
|
||||
|
||||
public static string GetQuickActionHtmlString(cQuickActionCopyData copyData, cFasdQuickAction quickActionDefinition)
|
||||
{
|
||||
string output = string.Empty;
|
||||
|
||||
try
|
||||
{
|
||||
output += GetQuickActionHtmlDescriptionString(copyData.Name, copyData.AffectedDeviceName, copyData.WasRunningOnAffectedDevice, copyData.ExecutionTime, copyData.QuickActionOutput?.ResultCode);
|
||||
output += GetQuickActionHtmlErrorString(copyData.QuickActionOutput?.ErrorDescription);
|
||||
output += GetQuickActionHtmlOutputString(copyData.QuickActionOutput, quickActionDefinition);
|
||||
output += GetQuickActionHtmlValueComparisonString(copyData.MeasureValues);
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
private static string GetQuickActionHtmlDescriptionString(string quickActionName, string deviceName, bool wasRunningOnAffectedDevice, DateTime executionTime, enumQuickActionSuccess? quickActionStatus)
|
||||
{
|
||||
string output = string.Empty;
|
||||
try
|
||||
{
|
||||
var quickActionStatusString = string.Empty;
|
||||
|
||||
switch (quickActionStatus)
|
||||
{
|
||||
case null:
|
||||
case enumQuickActionSuccess.successfull:
|
||||
quickActionStatusString = cMultiLanguageSupport.GetItem("QuickAction.Copy.RevisionStatus.Successfull");
|
||||
break;
|
||||
case enumQuickActionSuccess.error:
|
||||
quickActionStatusString = cMultiLanguageSupport.GetItem("QuickAction.Copy.RevisionStatus.Error");
|
||||
break;
|
||||
}
|
||||
|
||||
var rawDescription = wasRunningOnAffectedDevice ? cMultiLanguageSupport.GetItem("QuickAction.Remote.Copy.Description.Html") : cMultiLanguageSupport.GetItem("QuickAction.Local.Copy.Description.Html");
|
||||
output = string.Format(rawDescription, quickActionName, deviceName, executionTime.ToString("g", new CultureInfo(cFasdCockpitConfig.Instance.SelectedLanguage)), quickActionStatusString);
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
private static string GetQuickActionHtmlErrorString(string errorMessage)
|
||||
{
|
||||
string output = string.Empty;
|
||||
try
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(errorMessage))
|
||||
output = "<br/><p style=\"color:red\">" + errorMessage + "</p>";
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
public static string GetQuickActionHtmlOutputString(QuickActionStatusMonitor.cQuickActionOutput quickActionOutput, cFasdQuickAction quickActionDefinition)
|
||||
{
|
||||
string output = string.Empty;
|
||||
|
||||
try
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(quickActionOutput?.ErrorDescription))
|
||||
return output;
|
||||
|
||||
output += "<br/>";
|
||||
|
||||
switch (quickActionOutput)
|
||||
{
|
||||
case QuickActionStatusMonitor.cQuickActionOutputSingle singleOutput:
|
||||
{
|
||||
if (singleOutput.Value is null)
|
||||
return output;
|
||||
|
||||
var displayValue = singleOutput.GetDisplayValue(quickActionDefinition?.ColumnOutputFormattings);
|
||||
output += "<p>" + cMultiLanguageSupport.GetItem("QuickAction.Copy.Output.Html") + " " + displayValue + "</p>";
|
||||
break;
|
||||
}
|
||||
case QuickActionStatusMonitor.cQuickActionOutputList listOutput:
|
||||
{
|
||||
output += "<p>" + cMultiLanguageSupport.GetItem("QuickAction.Copy.Output.Html") + "</p>";
|
||||
|
||||
output += "<table border=\"1\">";
|
||||
output += "<tr>";
|
||||
|
||||
foreach (var value in listOutput.Values[0])
|
||||
{
|
||||
if (ShouldHideQuickActionOutput(value.Key, quickActionDefinition))
|
||||
continue;
|
||||
|
||||
string headingValue = value.Key;
|
||||
if (quickActionDefinition.ColumnOutputFormattings?.TryGetValue(value.Key, out var outputFormatting) ?? false)
|
||||
headingValue = outputFormatting.Names.GetValue();
|
||||
|
||||
output += "<th align=\"left\">";
|
||||
output += headingValue;
|
||||
output += "</th>";
|
||||
}
|
||||
|
||||
output += "</tr>";
|
||||
|
||||
for (int i = 0; i < listOutput.Values.Count; i++)
|
||||
{
|
||||
output += "<tr>";
|
||||
|
||||
for (int j = 0; j < listOutput.Values[i].Count; j++)
|
||||
{
|
||||
string valueKey = listOutput.Values[0][j].Key;
|
||||
if (ShouldHideQuickActionOutput(valueKey, quickActionDefinition))
|
||||
continue;
|
||||
|
||||
string displayValue = listOutput.GetDisplayValue(i, j, quickActionDefinition.ColumnOutputFormattings);
|
||||
|
||||
if (string.IsNullOrWhiteSpace(displayValue))
|
||||
continue;
|
||||
|
||||
output += "<td>";
|
||||
output += displayValue;
|
||||
output += "</td>";
|
||||
}
|
||||
|
||||
output += "</tr>";
|
||||
}
|
||||
|
||||
output += "</table>";
|
||||
break;
|
||||
}
|
||||
case QuickActionStatusMonitor.cQuickActionOutputObject objectOutput:
|
||||
{
|
||||
output += "<p>" + cMultiLanguageSupport.GetItem("QuickAction.Copy.Output.Html") + "</p>";
|
||||
|
||||
output += "<table border=\"1\">";
|
||||
|
||||
for (int i = 0; i < objectOutput.Values.Count; i++)
|
||||
{
|
||||
var value = objectOutput.Values[i];
|
||||
|
||||
if (ShouldHideQuickActionOutput(value.Key, quickActionDefinition))
|
||||
continue;
|
||||
|
||||
string headingValue = value.Key;
|
||||
if (quickActionDefinition.ColumnOutputFormattings?.TryGetValue(value.Key, out var outputFormatting) ?? false)
|
||||
headingValue = outputFormatting.Names.GetValue();
|
||||
|
||||
output += "<tr>";
|
||||
output += "<td>";
|
||||
output += headingValue;
|
||||
output += "</td>";
|
||||
|
||||
output += "<td>";
|
||||
string displayValue = objectOutput.GetDisplayValue(i, quickActionDefinition.ColumnOutputFormattings);
|
||||
output += !string.IsNullOrWhiteSpace(displayValue) ? displayValue : null;
|
||||
output += "</td>";
|
||||
|
||||
output += "</tr>";
|
||||
}
|
||||
|
||||
output += "</table>";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
public static string GetQuickActionHtmlValueComparisonString(List<QuickActionStatusMonitor.cQuickActionMeasureValue> measureValues)
|
||||
{
|
||||
string output = string.Empty;
|
||||
|
||||
try
|
||||
{
|
||||
if (measureValues is null || measureValues.Count <= 0)
|
||||
return output;
|
||||
|
||||
output += "<p>" + cMultiLanguageSupport.GetItem("QuickAction.Copy.Measure.Html") + "</p>";
|
||||
|
||||
RawValueFormatter.SetDefaultCulture(new System.Globalization.CultureInfo(cFasdCockpitConfig.Instance.SelectedLanguage));
|
||||
|
||||
foreach (var measureValue in measureValues)
|
||||
{
|
||||
try
|
||||
{
|
||||
string value = RawValueFormatter.GetDisplayValue(measureValue.Value, measureValue.Display);
|
||||
string postValue = RawValueFormatter.GetDisplayValue(measureValue.PostValue, measureValue.Display);
|
||||
string difference = string.Empty;
|
||||
|
||||
if (measureValue.Difference != null)
|
||||
difference = $" (∆ {RawValueFormatter.GetDisplayValue(measureValue.Difference, measureValue.Display)})";
|
||||
|
||||
output += "<p>";
|
||||
output += "<b>" + measureValue.Names.GetValue(cF4SDCockpitXmlConfig.Instance.HealthCardConfig.ProtocollLanguage) + ": </b>" + value + " ➜ " + postValue + difference;
|
||||
output += "</p>";
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region ToolTipHandling
|
||||
|
||||
@@ -461,7 +461,7 @@ namespace FasdDesktopUi.Pages.DetailsPage
|
||||
List<Task> tasks = new List<Task>
|
||||
{
|
||||
_supportCase?.SupportCaseDataProviderArtifact?.HealthCardDataHelper?.UpdateOnlineStatusAsync(),
|
||||
_supportCase?.SupportCaseDataProviderArtifact?.HealthCardDataHelper?.RefreshLatestDataAsync()
|
||||
_supportCase?.SupportCaseDataProviderArtifact?.HealthCardDataHelper?.LoadingHelper?.RefreshLatestDataAsync()
|
||||
};
|
||||
|
||||
await Task.WhenAll(tasks);
|
||||
@@ -1591,7 +1591,7 @@ namespace FasdDesktopUi.Pages.DetailsPage
|
||||
{
|
||||
midnightTimer.Stop();
|
||||
|
||||
var from = _supportCase?.SupportCaseDataProviderArtifact?.HealthCardDataHelper?.LastDataRequest;
|
||||
var from = _supportCase?.SupportCaseDataProviderArtifact?.HealthCardDataHelper?.LoadingHelper?.LastDataRequest;
|
||||
|
||||
if (from == null)
|
||||
{
|
||||
|
||||
@@ -147,8 +147,8 @@ namespace FasdDesktopUi.Pages.DetailsPage.ViewModels
|
||||
|
||||
#region DetailsData property
|
||||
|
||||
private List<cDetailsPageDataHistoryDataModel> detailsDataList;
|
||||
public List<cDetailsPageDataHistoryDataModel> DetailsDataList
|
||||
private cDetailsPageDataHistoryDataModel detailsDataList;
|
||||
public cDetailsPageDataHistoryDataModel DetailsDataList
|
||||
{
|
||||
get { return detailsDataList; }
|
||||
set
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace FasdDesktopUi.Pages.DetailsPage.Models
|
||||
|
||||
//Details
|
||||
public TimeSpan TimeSinceLastRefresh { get; set; } = new TimeSpan(0, 1, 0);
|
||||
public List<cDetailsPageDataHistoryDataModel> DataHistoryList { get; set; }
|
||||
public cDetailsPageDataHistoryDataModel DataHistoryList { get; set; }
|
||||
public int ShownValueColumnsCount { get; set; }
|
||||
|
||||
//Customizable Section
|
||||
|
||||
@@ -10,19 +10,12 @@ using FasdDesktopUi.Basics.Models;
|
||||
|
||||
namespace FasdDesktopUi.Pages.DetailsPage.Models
|
||||
{
|
||||
public class DetailsPageDataHistoryValueModel : cDataHistoryValueModel
|
||||
public class DetailsPageDataHistoryColumnModel : cDataHistoryValueModel
|
||||
{
|
||||
public enumHistoryTitleType? PresentationStyle { get; set; }
|
||||
|
||||
public List<List<string>> DetailedData { get; set; }
|
||||
public List<cDataHistoryValueModel> ColumnValues { get; set; }
|
||||
}
|
||||
|
||||
public class DetailsPageDataHistoryColumnModel : DetailsPageDataHistoryValueModel
|
||||
{
|
||||
public List<DetailsPageDataHistoryValueModel> ColumnValues { get; set; }
|
||||
}
|
||||
|
||||
public class cDetailsPageDataHistoryDataModel
|
||||
public class cDetailsPageDataHistoryCategoryDataModel
|
||||
{
|
||||
public DetailsPageDataHistoryColumnModel TitleColumn { get; set; }
|
||||
public List<DetailsPageDataHistoryColumnModel> ValueColumns { get; set; }
|
||||
@@ -30,9 +23,13 @@ namespace FasdDesktopUi.Pages.DetailsPage.Models
|
||||
public double ValueColumnWidth { get; set; } = 100;
|
||||
}
|
||||
|
||||
public class cDetailsPageDataHistoryDataModel : List<cDetailsPageDataHistoryCategoryDataModel>
|
||||
{
|
||||
}
|
||||
|
||||
public class DataHistoryEventArgs : RoutedEventArgs
|
||||
{
|
||||
public DetailsPageDataHistoryValueModel HistoryValueData { get; set; }
|
||||
public cDataHistoryValueModel HistoryValueData { get; set; }
|
||||
|
||||
public DataHistoryEventArgs()
|
||||
{
|
||||
|
||||
@@ -109,11 +109,11 @@ namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty HistoryDataListProperty =
|
||||
DependencyProperty.Register("HistoryDataList", typeof(List<cDetailsPageDataHistoryDataModel>), typeof(DetailsPageDataHistoryCollection), new PropertyMetadata(new List<cDetailsPageDataHistoryDataModel>(), new PropertyChangedCallback(RefreshDataCallback)));
|
||||
DependencyProperty.Register("HistoryDataList", typeof(cDetailsPageDataHistoryDataModel), typeof(DetailsPageDataHistoryCollection), new PropertyMetadata(new cDetailsPageDataHistoryDataModel(), new PropertyChangedCallback(RefreshDataCallback)));
|
||||
|
||||
public List<cDetailsPageDataHistoryDataModel> HistoryDataList
|
||||
public cDetailsPageDataHistoryDataModel HistoryDataList
|
||||
{
|
||||
get { return (List<cDetailsPageDataHistoryDataModel>)GetValue(HistoryDataListProperty); }
|
||||
get { return (cDetailsPageDataHistoryDataModel)GetValue(HistoryDataListProperty); }
|
||||
set { SetValue(HistoryDataListProperty, value); }
|
||||
}
|
||||
|
||||
@@ -380,7 +380,7 @@ namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
|
||||
#region UpdateData
|
||||
|
||||
public void UpdateHistory(List<cDetailsPageDataHistoryDataModel> historyData)
|
||||
public void UpdateHistory(cDetailsPageDataHistoryDataModel historyData)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -414,7 +414,7 @@ namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
}
|
||||
}
|
||||
|
||||
private bool DidHistoryCategoryChange(cDetailsPageDataHistoryDataModel oldValue, cDetailsPageDataHistoryDataModel newValue)
|
||||
private bool DidHistoryCategoryChange(cDetailsPageDataHistoryCategoryDataModel oldValue, cDetailsPageDataHistoryCategoryDataModel newValue)
|
||||
{
|
||||
var CM = MethodBase.GetCurrentMethod();
|
||||
LogMethodBegin(CM);
|
||||
@@ -490,7 +490,7 @@ namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
return new Size(formattedText.Width, formattedText.Height);
|
||||
}
|
||||
|
||||
private double GetTitleColumnWidth(cDetailsPageDataHistoryDataModel detailsData)
|
||||
private double GetTitleColumnWidth(cDetailsPageDataHistoryCategoryDataModel detailsData)
|
||||
{
|
||||
double maxTitleLength = MeasureStringSize(detailsData.TitleColumn.Content, new TextBox { Style = titleColumnOverViewTitleStyle }).Width + 90;
|
||||
|
||||
@@ -518,7 +518,7 @@ namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
return maxTitleLength;
|
||||
}
|
||||
|
||||
private double GetValueColumnWidth(cDetailsPageDataHistoryDataModel detailsData)
|
||||
private double GetValueColumnWidth(cDetailsPageDataHistoryCategoryDataModel detailsData)
|
||||
{
|
||||
double maxValueWidth = 55; //55 to set MinWidth
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
{
|
||||
foreach (DetailsPageDataHistoryValueColumn valueColumn in _me.MainGrid.Children)
|
||||
{
|
||||
valueColumn.ColumnValues = new DetailsPageDataHistoryColumnModel() { HighlightColor = Basics.Enums.enumHighlightColor.none, IsLoading = true, ColumnValues = new List<DetailsPageDataHistoryValueModel>() { new DetailsPageDataHistoryValueModel() { Content = "-", IsLoading = true } } };
|
||||
valueColumn.ColumnValues = new DetailsPageDataHistoryColumnModel() { HighlightColor = Basics.Enums.enumHighlightColor.none, IsLoading = true, ColumnValues = new List<cDataHistoryValueModel>() { new cDataHistoryValueModel() { Content = "-", IsLoading = true } } };
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -122,11 +122,11 @@ namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty HistoryDataProperty =
|
||||
DependencyProperty.Register("HistoryData", typeof(cDetailsPageDataHistoryDataModel), typeof(DetailsPageDataHistorySection), new PropertyMetadata(new cDetailsPageDataHistoryDataModel(), new PropertyChangedCallback(RefreshDataCallback)));
|
||||
DependencyProperty.Register("HistoryData", typeof(cDetailsPageDataHistoryCategoryDataModel), typeof(DetailsPageDataHistorySection), new PropertyMetadata(new cDetailsPageDataHistoryCategoryDataModel(), new PropertyChangedCallback(RefreshDataCallback)));
|
||||
|
||||
public cDetailsPageDataHistoryDataModel HistoryData
|
||||
public cDetailsPageDataHistoryCategoryDataModel HistoryData
|
||||
{
|
||||
get { return (cDetailsPageDataHistoryDataModel)GetValue(HistoryDataProperty); }
|
||||
get { return (cDetailsPageDataHistoryCategoryDataModel)GetValue(HistoryDataProperty); }
|
||||
set { SetValue(HistoryDataProperty, value); }
|
||||
}
|
||||
|
||||
@@ -292,19 +292,6 @@ namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
valueColumnControl.AggregateRowIndexes = aggregateRowIndexes;
|
||||
|
||||
valueColumnControl.ColumnValues = valueColumnEnumerator.Current;
|
||||
|
||||
foreach (var rowValue in valueColumnControl.ColumnValues.ColumnValues)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (titleColumnEnumerator.MoveNext())
|
||||
rowValue.DetailedData = titleColumnEnumerator.Current.DetailedData;
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
@@ -346,7 +333,7 @@ namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
return false;
|
||||
}
|
||||
|
||||
public void UpdateHistoryData(cDetailsPageDataHistoryDataModel historyData)
|
||||
public void UpdateHistoryData(cDetailsPageDataHistoryCategoryDataModel historyData)
|
||||
{
|
||||
var CM = MethodBase.GetCurrentMethod();
|
||||
LogMethodBegin(CM);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
@@ -13,17 +14,19 @@ using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
using C4IT.FASD.Base;
|
||||
using C4IT.Logging;
|
||||
|
||||
using F4SD_AdaptableIcon.Enums;
|
||||
|
||||
using FasdDesktopUi.Basics.Enums;
|
||||
using FasdDesktopUi.Basics.Models;
|
||||
using FasdDesktopUi.Basics.UiActions;
|
||||
using FasdDesktopUi.Basics.UserControls;
|
||||
using FasdDesktopUi.Pages.DetailsPage.Models;
|
||||
using FasdDesktopUi.Basics.Enums;
|
||||
|
||||
using C4IT.Logging;
|
||||
using FasdDesktopUi.Basics.UserControls.AdaptableIcon;
|
||||
using C4IT.FASD.Base;
|
||||
using System.Reflection;
|
||||
using FasdDesktopUi.Pages.DetailsPage.Models;
|
||||
|
||||
using static C4IT.Logging.cLogManager;
|
||||
using F4SD_AdaptableIcon.Enums;
|
||||
|
||||
namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
{
|
||||
@@ -165,7 +168,7 @@ namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
if (!(sender is FrameworkElement FE))
|
||||
return;
|
||||
|
||||
if (!(FE.Tag is DetailsPageDataHistoryValueModel HistorySubtitleValue))
|
||||
if (!(FE.Tag is cDataHistoryValueModel HistorySubtitleValue))
|
||||
return;
|
||||
|
||||
if (HistorySubtitleValue.UiAction == null)
|
||||
@@ -284,7 +287,7 @@ namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
if (!(sender is FrameworkElement FE))
|
||||
return;
|
||||
|
||||
if (!(FE.Tag is DetailsPageDataHistoryValueModel HistorySubtitleValue))
|
||||
if (!(FE.Tag is cDataHistoryValueModel HistorySubtitleValue))
|
||||
return;
|
||||
|
||||
if (string.IsNullOrEmpty(HistorySubtitleValue.ContentDescription) || HistorySubtitleValue.ContentDescription == HistorySubtitleValue.Content)
|
||||
|
||||
@@ -129,7 +129,7 @@ namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateBorderThresholdValues(Border border, DetailsPageDataHistoryValueModel valueInfo)
|
||||
private void UpdateBorderThresholdValues(Border border, cDataHistoryValueModel valueInfo)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -236,7 +236,7 @@ namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
if (!(sender is FrameworkElement FE))
|
||||
return;
|
||||
|
||||
if (!(FE.Tag is DetailsPageDataHistoryValueModel HistoryValue))
|
||||
if (!(FE.Tag is cDataHistoryValueModel HistoryValue))
|
||||
return;
|
||||
|
||||
if (HistoryValue.UiAction == null)
|
||||
@@ -469,7 +469,7 @@ namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
|
||||
#region UpdateValues
|
||||
|
||||
private bool DidCellValueChange(DetailsPageDataHistoryValueModel oldData, DetailsPageDataHistoryValueModel newData)
|
||||
private bool DidCellValueChange(cDataHistoryValueModel oldData, cDataHistoryValueModel newData)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
try
|
||||
{
|
||||
string newText = string.Empty;
|
||||
if (DataProvider?.HealthCardDataHelper?.LastDataRequest is null)
|
||||
if (DataProvider?.HealthCardDataHelper?.LoadingHelper?.LastDataRequest is null)
|
||||
{
|
||||
LastDataRequestTextBlock.Text = newText;
|
||||
return;
|
||||
@@ -82,7 +82,7 @@ namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
string dateAddtionFormat = cMultiLanguageSupport.GetItem("DetailsPage.LastRefresh");
|
||||
string timeText = string.Empty;
|
||||
|
||||
var from = DataProvider?.HealthCardDataHelper?.LastDataRequest;
|
||||
var from = DataProvider?.HealthCardDataHelper?.LoadingHelper?.LastDataRequest;
|
||||
if (from == null)
|
||||
return;
|
||||
|
||||
|
||||
@@ -50,24 +50,17 @@
|
||||
</Style>
|
||||
</StackPanel.Resources>
|
||||
|
||||
<ico:AdaptableIcon x:Name="SlimPageButton"
|
||||
MouseLeftButtonUp="SlimPageButton_MouseLeftButtonUp"
|
||||
TouchDown="SlimPageButton_TouchDown"
|
||||
ToolTip="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Global.NavBar.ToSlim}"
|
||||
SelectedInternIcon="window_toSlim"
|
||||
Margin="0"/>
|
||||
|
||||
<ico:AdaptableIcon x:Name="MinimizeButton"
|
||||
BorderPadding="0 10 0 0"
|
||||
VerticalAlignment="Bottom"
|
||||
MouseUp="MinimizeButton_MouseUp"
|
||||
TouchDown="MinimizeButton_TouchDown"
|
||||
MouseUp="MinimizeButton_Click"
|
||||
TouchDown="MinimizeButton_Click"
|
||||
ToolTip="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Global.NavBar.Minimize}"
|
||||
SelectedInternIcon="window_minimize" />
|
||||
|
||||
<ico:AdaptableIcon x:Name="WindowSizeButton"
|
||||
MouseUp="WindowSizeButton_MouseUp"
|
||||
TouchDown="WindowSizeButton_TouchDown">
|
||||
MouseUp="WindowSizeButton_Click"
|
||||
TouchDown="WindowSizeButton_Click">
|
||||
|
||||
<ico:AdaptableIcon.Resources>
|
||||
<Style TargetType="ico:AdaptableIcon"
|
||||
@@ -100,8 +93,8 @@
|
||||
</ico:AdaptableIcon>
|
||||
|
||||
<ico:AdaptableIcon x:Name="CloseButton"
|
||||
MouseUp="CloseButton_MouseUp"
|
||||
TouchDown="CloseButton_TouchDown"
|
||||
MouseUp="CloseButton_Click"
|
||||
TouchDown="CloseButton_Click"
|
||||
Margin="7.5 0 0 0"
|
||||
ToolTip="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Global.NavBar.Close}"
|
||||
SelectedInternIcon="window_close" />
|
||||
|
||||
@@ -1,13 +1,6 @@
|
||||
using FasdDesktopUi.Basics;
|
||||
using FasdDesktopUi.Pages.SettingsPage;
|
||||
using FasdDesktopUi.Pages.SlimPage;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Windows;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using static C4IT.Logging.cLogManager;
|
||||
|
||||
namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
{
|
||||
@@ -18,84 +11,22 @@ namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
#region MinimizeButton
|
||||
|
||||
private void Minimize_Click(object sender)
|
||||
private void MinimizeButton_Click(object sender, InputEventArgs e)
|
||||
{
|
||||
if (sender is UIElement senderVisual)
|
||||
Window.GetWindow(senderVisual).WindowState = WindowState.Minimized;
|
||||
}
|
||||
|
||||
private void MinimizeButton_MouseUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
Minimize_Click(sender);
|
||||
}
|
||||
|
||||
private void MinimizeButton_TouchDown(object sender, TouchEventArgs e)
|
||||
{
|
||||
Minimize_Click(sender);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region WindowSizeButton
|
||||
|
||||
private void WindowSize_Click(object sender)
|
||||
private void WindowSizeButton_Click(object sender, InputEventArgs e)
|
||||
{
|
||||
if (sender is UIElement senderVisual)
|
||||
Window.GetWindow(senderVisual).WindowState = Window.GetWindow(senderVisual).WindowState == WindowState.Maximized ? WindowState.Normal : WindowState.Maximized;
|
||||
}
|
||||
|
||||
private void WindowSizeButton_MouseUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
WindowSize_Click(sender);
|
||||
}
|
||||
|
||||
private void WindowSizeButton_TouchDown(object sender, TouchEventArgs e)
|
||||
{
|
||||
WindowSize_Click(sender);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CloseButton
|
||||
|
||||
private void CloseButton_Click(object sender)
|
||||
private void CloseButton_Click(object sender, InputEventArgs e)
|
||||
{
|
||||
if (sender is UIElement senderVisual)
|
||||
Window.GetWindow(senderVisual).Close();
|
||||
}
|
||||
|
||||
private void CloseButton_MouseUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
CloseButton_Click(sender);
|
||||
}
|
||||
|
||||
private void CloseButton_TouchDown(object sender, TouchEventArgs e)
|
||||
{
|
||||
CloseButton_Click(sender);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region SlimPageButton
|
||||
|
||||
private void SlimPageButton_Click()
|
||||
{
|
||||
App.HideAllSettingViews();
|
||||
Window.GetWindow(this).Hide();
|
||||
cSupportCaseDataProvider.slimPage?.Show();
|
||||
}
|
||||
private void SlimPageButton_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
SlimPageButton_Click();
|
||||
}
|
||||
|
||||
private void SlimPageButton_TouchDown(object sender, TouchEventArgs e)
|
||||
{
|
||||
SlimPageButton_Click();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -348,8 +348,8 @@ namespace FasdDesktopUi.Pages.SlimPage
|
||||
|
||||
if (_supportCase != null)
|
||||
{
|
||||
_supportCase.SupportCaseDataProviderArtifact.HealthCardDataHelper.DataChanged -= DataProvider_DataChanged;
|
||||
_supportCase.SupportCaseDataProviderArtifact.HealthCardDataHelper.DataFullyLoaded -= DataProvider_DataFullyLoaded;
|
||||
_supportCase.SupportCaseDataProviderArtifact.HealthCardDataHelper.LoadingHelper.DataChanged -= DataProvider_DataChanged;
|
||||
_supportCase.SupportCaseDataProviderArtifact.HealthCardDataHelper.LoadingHelper.DataFullyLoaded -= DataProvider_DataFullyLoaded;
|
||||
}
|
||||
}
|
||||
catch (Exception E)
|
||||
|
||||
@@ -19,14 +19,14 @@ namespace FasdDesktopUi.Pages
|
||||
{
|
||||
if (_supportCase != null)
|
||||
{
|
||||
_supportCase.SupportCaseDataProviderArtifact.HealthCardDataHelper.DataChanged -= DataProvider_DataChanged;
|
||||
_supportCase.SupportCaseDataProviderArtifact.HealthCardDataHelper.DataFullyLoaded -= DataProvider_DataFullyLoaded;
|
||||
_supportCase.SupportCaseDataProviderArtifact.HealthCardDataHelper.LoadingHelper.DataChanged -= DataProvider_DataChanged;
|
||||
_supportCase.SupportCaseDataProviderArtifact.HealthCardDataHelper.LoadingHelper.DataFullyLoaded -= DataProvider_DataFullyLoaded;
|
||||
_supportCase.SupportCaseDataProviderArtifact.DirectConnectionHelper.DirectConnectionChanged -= DirectConnectionHelper_DirectConnectionChanged;
|
||||
}
|
||||
|
||||
_supportCase = supportCase;
|
||||
_supportCase.SupportCaseDataProviderArtifact.HealthCardDataHelper.DataChanged += DataProvider_DataChanged;
|
||||
_supportCase.SupportCaseDataProviderArtifact.HealthCardDataHelper.DataFullyLoaded += DataProvider_DataFullyLoaded;
|
||||
_supportCase.SupportCaseDataProviderArtifact.HealthCardDataHelper.LoadingHelper.DataChanged += DataProvider_DataChanged;
|
||||
_supportCase.SupportCaseDataProviderArtifact.HealthCardDataHelper.LoadingHelper.DataFullyLoaded += DataProvider_DataFullyLoaded;
|
||||
_supportCase.SupportCaseDataProviderArtifact.DirectConnectionHelper.DirectConnectionChanged += DirectConnectionHelper_DirectConnectionChanged;
|
||||
}
|
||||
|
||||
|
||||
@@ -97,12 +97,14 @@
|
||||
Value="7.5" />
|
||||
<Setter Property="Border.BorderThickness"
|
||||
Value="1" />
|
||||
<Setter Property="BorderBrush"
|
||||
Value="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
||||
<Border x:Name="templateRoot"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding Border.CornerRadius}"
|
||||
SnapsToDevicePixels="true"
|
||||
|
||||
@@ -47,4 +47,34 @@
|
||||
Value="True" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="MandatoryFieldBorderStyle"
|
||||
TargetType="Border">
|
||||
<Setter Property="Margin"
|
||||
Value="0 5 0 0" />
|
||||
<Setter Property="BorderThickness"
|
||||
Value="1" />
|
||||
<Setter Property="Padding"
|
||||
Value="0" />
|
||||
<Setter Property="CornerRadius"
|
||||
Value="7.5" />
|
||||
<Setter Property="Background"
|
||||
Value="{DynamicResource BackgroundColor.DetailsPage.DataHistory.ValueColumn}" />
|
||||
<Setter Property="BorderBrush"
|
||||
Value="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver"
|
||||
Value="True">
|
||||
<Setter Property="Background"
|
||||
Value="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
|
||||
<Setter Property="BorderBrush"
|
||||
Value="{DynamicResource BackgroundColor.Menu.SubCategory}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled"
|
||||
Value="False">
|
||||
<Setter Property="Opacity"
|
||||
Value="0.5" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user