diff
This commit is contained in:
@@ -37,7 +37,7 @@ namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
if (value != null)
|
||||
{
|
||||
UpdateHeaderHighlights();
|
||||
SetTicketHeadingVisibility();
|
||||
SetHeadingVisibility();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -100,11 +100,9 @@ namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
else if (DataProvider.HealthCardDataHelper.SelectedHealthCard.InformationClasses.Any(identity => identity is enumFasdInformationClass.User))
|
||||
highlightedBorder = UserStackHighlightBorder;
|
||||
|
||||
if (highlightedBorder != null)
|
||||
highlightedBorder.SetResourceReference(BackgroundProperty, "BackgroundColor.Menu.MainCategory");
|
||||
highlightedBorder?.SetResourceReference(BackgroundProperty, "BackgroundColor.Menu.MainCategory");
|
||||
|
||||
if (swapIcon != null)
|
||||
swapIcon.SetResourceReference(AdaptableIcon.IconBackgroundColorProperty, "BackgroundColor.Menu.MainCategory");
|
||||
swapIcon?.SetResourceReference(AdaptableIcon.IconBackgroundColorProperty, "BackgroundColor.Menu.MainCategory");
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
@@ -112,16 +110,20 @@ namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
}
|
||||
}
|
||||
|
||||
private void SetTicketHeadingVisibility()
|
||||
private async Task SetHeadingVisibility()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (DataProvider is null)
|
||||
return;
|
||||
cCollectorStatusInfo modules = await cFasdCockpitConfig.Instance.CheckCollectorStatusAsync();
|
||||
if (modules != null)
|
||||
{
|
||||
TicketStack.Visibility = modules.HasM42Config ? Visibility.Visible : Visibility.Collapsed;
|
||||
MobileDeviceStack.Visibility = modules.HasMobileDeviceConfig ? Visibility.Visible : Visibility.Collapsed;
|
||||
VirtualSessionStack.Visibility = modules.HasCitrixConfig ? Visibility.Visible : Visibility.Collapsed;
|
||||
}
|
||||
|
||||
//bool isTicketIntegrationActive = cFasdCockpitCommunicationBase.CockpitUserInfo?.Roles?.Any(role => string.Equals(role, "Cockpit.TicketAgent", StringComparison.OrdinalIgnoreCase)) ?? false;
|
||||
bool isTicketIntegrationActive = cF4SDCockpitXmlConfig.Instance.HealthCardConfig.HealthCards.Values.Any(_e => _e.InformationClasses.Contains(enumFasdInformationClass.Ticket));
|
||||
TicketStack.Visibility = isTicketIntegrationActive ? Visibility.Visible : Visibility.Collapsed;
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
@@ -144,7 +146,7 @@ namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
return;
|
||||
|
||||
_me.ResetControl();
|
||||
_me.SetTicketHeadingVisibility();
|
||||
//_me.SetTicketHeadingVisibility();
|
||||
_me.InitializeHeadings();
|
||||
_me.UpdateHeaderHighlights();
|
||||
}
|
||||
@@ -260,10 +262,11 @@ namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
VirtualSessionSwapIcon.Tag = virtualSessionDataEmpty;
|
||||
MobileDeviceSwapIcon.Tag = mobileDeviceDataEmpty;
|
||||
|
||||
ComputerStackHighlightBorder.Tag = computerDataEmpty;
|
||||
TicketStackHighlightBorder.Tag = ticketDataEmpty;
|
||||
VirtualSessionStackHighlightBorder.Tag = virtualSessionDataEmpty;
|
||||
MobileDeviceStackHighlightBorder.Tag = mobileDeviceDataEmpty;
|
||||
UserStackHighlightBorder.Tag = userDataEmpty.InformationClass;
|
||||
ComputerStackHighlightBorder.Tag = computerDataEmpty.InformationClass;
|
||||
TicketStackHighlightBorder.Tag = ticketDataEmpty.InformationClass;
|
||||
VirtualSessionStackHighlightBorder.Tag = virtualSessionDataEmpty.InformationClass;
|
||||
MobileDeviceStackHighlightBorder.Tag = mobileDeviceDataEmpty.InformationClass;
|
||||
|
||||
ComputerSwapIcon.Style = (Style)FindResource("SwapIconStyle");
|
||||
TicketSwapIcon.Style = (Style)FindResource("SwapIconStyle");
|
||||
@@ -300,16 +303,6 @@ namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
MobileDeviceStackHighlightBorder.ClearValue(OpacityProperty);
|
||||
|
||||
SetEditMode(false);
|
||||
|
||||
if (!cFasdCockpitCommunicationBase.Instance.IsDemo())
|
||||
{
|
||||
if (MobileDeviceStack.Parent is UIElement mobileParent)
|
||||
mobileParent.Visibility = Visibility.Collapsed;
|
||||
|
||||
//if (VirtualSessionStack.Parent is UIElement virtualParent)
|
||||
// virtualParent.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
ResetSelectors();
|
||||
}
|
||||
catch (Exception E)
|
||||
@@ -424,6 +417,7 @@ namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
headingIcon = UserIcon;
|
||||
headingTextBlock = UserTextBlock;
|
||||
copyIcon = UserCopyIcon;
|
||||
highlightBoder = UserStackHighlightBorder;
|
||||
hasValue = heading.HeadingText != cMultiLanguageSupport.GetItem("Header.Select.User");
|
||||
|
||||
if (!hasValue)
|
||||
@@ -482,7 +476,10 @@ namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
|
||||
if (highlightBoder != null)
|
||||
{
|
||||
highlightBoder.Tag = new cSwapCaseInfo() { SelectedCaseInformationClass = heading.InformationClass, HeadingDatas = HeadingData };
|
||||
if (hasValue)
|
||||
highlightBoder.Tag = heading.Realtion;
|
||||
else
|
||||
highlightBoder.Tag = new cSwapCaseInfo() { SelectedCaseInformationClass = heading.InformationClass, HeadingDatas = HeadingData };
|
||||
}
|
||||
|
||||
if (copyIcon != null)
|
||||
@@ -603,7 +600,7 @@ namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
|
||||
#region SwapIcon Click
|
||||
|
||||
private void SwapIcon_Click(object sender)
|
||||
private void SwapIcon_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
try
|
||||
@@ -639,7 +636,7 @@ namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
ShowsRelations = true;
|
||||
cUiActionBase.RaiseEvent(new cShowHeadingSelectionMenuAction(), this, sender);
|
||||
DoShowRelations(swapCaseData, location, SupportCaseController);
|
||||
//Dispatcher.Invoke(async () => await action.RunUiActionAsync(sender, location, false, DataProvider));
|
||||
e.Handled = true;
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
@@ -710,12 +707,12 @@ namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
|
||||
private void SwapIcon_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
SwapIcon_Click(sender);
|
||||
SwapIcon_Click(sender, e);
|
||||
}
|
||||
|
||||
private void SwapIcon_TouchDown(object sender, TouchEventArgs e)
|
||||
{
|
||||
SwapIcon_Click(sender);
|
||||
SwapIcon_Click(sender, e);
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -826,10 +823,17 @@ namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
UndoTicketIcon_Click();
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
// todo hacky solution to toggle blurr border. Think about better solution
|
||||
public event EventHandler EmptySpaceClicked;
|
||||
|
||||
private void HeadingBorder_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
EmptySpaceClicked?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user