aktueller Stand

This commit is contained in:
Meik
2026-02-03 16:46:49 +01:00
parent 7192319e1e
commit 696629b5a8
5 changed files with 431 additions and 284 deletions

View File

@@ -39,8 +39,12 @@ namespace FasdDesktopUi
public System.Windows.Forms.NotifyIcon notifyIcon = new System.Windows.Forms.NotifyIcon() { Text = $"First Aid Service Desk" };
public bool UseOsLanguage = string.IsNullOrEmpty(cFasdCockpitConfig.Instance.SelectedLanguage);
#region Ticketübersicht
private TrayTicketNotificationManager _ticketTrayNotification;
private TileScope? _pendingTicketOverviewScope;
#endregion
private async void Application_Startup(object sender, StartupEventArgs e)
{
@@ -181,18 +185,8 @@ namespace FasdDesktopUi
if (searchView == null)
return;
var hasNotification = HasPendingTicketOverviewNotification();
if (hasNotification)
{
if (!searchView.IsVisible)
searchView.ActivateSearchView();
else
searchView.BringToFrontPreserveState();
searchView.ShowTicketOverviewPaneForScope(PendingTicketOverviewScope);
ClearTicketOverviewTrayNotification();
if (TryHandleTicketOverviewNotificationClick(searchView))
return;
}
#if isDemo
if (searchView.IsVisible)
@@ -278,9 +272,29 @@ namespace FasdDesktopUi
finally
{
LogMethodEnd(CM);
}
}
}
}
#region Ticketübersicht
private bool TryHandleTicketOverviewNotificationClick(SearchPageView searchView)
{
if (searchView == null)
return false;
if (!HasPendingTicketOverviewNotification())
return false;
if (!searchView.IsVisible)
searchView.ActivateSearchView();
else
searchView.BringToFrontPreserveState();
searchView.ShowTicketOverviewPaneForScope(PendingTicketOverviewScope);
ClearTicketOverviewTrayNotification();
return true;
}
private void NotifyIcon_BalloonTipClicked(object sender, EventArgs e)
{
try
@@ -294,11 +308,11 @@ namespace FasdDesktopUi
LogException(E);
}
}
private bool HasPendingTicketOverviewNotification()
{
return _ticketTrayNotification?.HasNotification ?? false;
}
private bool HasPendingTicketOverviewNotification()
{
return _ticketTrayNotification?.HasNotification ?? false;
}
public void ShowTicketOverviewTrayNotification(string message)
{
@@ -331,9 +345,11 @@ namespace FasdDesktopUi
}
public TileScope? PendingTicketOverviewScope => _pendingTicketOverviewScope;
private System.Windows.Forms.ToolStripItem SetUpNotifyIconLanguageOption()
{
#endregion
private System.Windows.Forms.ToolStripItem SetUpNotifyIconLanguageOption()
{
try
{
var output = new System.Windows.Forms.ToolStripMenuItem() { Text = cMultiLanguageSupport.GetItem("Menu.SelectLanguage") };