aktueller Stand

This commit is contained in:
Meik
2026-01-28 12:08:39 +01:00
parent 1283750829
commit ee1f54675e
104 changed files with 6797 additions and 1867 deletions

View File

@@ -3,10 +3,11 @@ using C4IT.FASD.Cockpit.Communication;
using C4IT.FASD.Security;
using C4IT.Graphics;
using C4IT.Logging;
using C4IT.MultiLanguage;
using FasdDesktopUi.Basics;
using FasdDesktopUi.Basics.Helper;
using FasdDesktopUi.Basics.Models;
using C4IT.MultiLanguage;
using FasdDesktopUi.Basics;
using FasdDesktopUi.Basics.Helper;
using FasdDesktopUi.Basics.Models;
using FasdDesktopUi.Basics.Services.Models;
using FasdDesktopUi.Pages.CustomMessageBox;
using FasdDesktopUi.Pages.PhoneSettingsPage;
using FasdDesktopUi.Pages.SearchPage;
@@ -35,10 +36,11 @@ namespace FasdDesktopUi
static public System.Windows.Forms.ToolStripItem M42OptionMenuItem = null;
public System.Windows.Forms.NotifyIcon notifyIcon = new System.Windows.Forms.NotifyIcon() { Text = $"First Aid Service Desk" };
public bool UseOsLanguage = string.IsNullOrEmpty(cFasdCockpitConfig.Instance.SelectedLanguage);
private TrayTicketNotificationManager _ticketTrayNotification;
public System.Windows.Forms.NotifyIcon notifyIcon = new System.Windows.Forms.NotifyIcon() { Text = $"First Aid Service Desk" };
public bool UseOsLanguage = string.IsNullOrEmpty(cFasdCockpitConfig.Instance.SelectedLanguage);
private TrayTicketNotificationManager _ticketTrayNotification;
private TileScope? _pendingTicketOverviewScope;
private async void Application_Startup(object sender, StartupEventArgs e)
{
@@ -166,42 +168,50 @@ namespace FasdDesktopUi
}
private void NotifyIcon_Click(object sender, EventArgs e)
{
try
{
if (e is System.Windows.Forms.MouseEventArgs mouseEventArgs)
if (mouseEventArgs.Button == System.Windows.Forms.MouseButtons.Right)
return;
private void NotifyIcon_Click(object sender, EventArgs e)
{
try
{
if (e is System.Windows.Forms.MouseEventArgs mouseEventArgs)
if (mouseEventArgs.Button == System.Windows.Forms.MouseButtons.Right)
return;
var searchView = SearchPageView.Instance;
if (searchView == null)
return;
#if isDemo
var hasNotification = HasPendingTicketOverviewNotification();
if (searchView.IsVisible && !hasNotification)
{
searchView.Hide();
return;
}
if (!searchView.IsVisible)
searchView.ActivateSearchView();
else
searchView.BringToFrontPreserveState();
searchView.ShowTicketOverviewPane();
if (hasNotification)
ClearTicketOverviewTrayNotification();
#else
if (SearchPageView.Instance.IsVisible)
SearchPageView.Instance.Hide();
else
SearchPageView.Instance.ActivateSearchView();
var searchView = SearchPageView.Instance;
if (searchView == null)
return;
var hasNotification = HasPendingTicketOverviewNotification();
if (hasNotification)
{
if (!searchView.IsVisible)
searchView.ActivateSearchView();
else
searchView.BringToFrontPreserveState();
searchView.ShowTicketOverviewPaneForScope(PendingTicketOverviewScope);
ClearTicketOverviewTrayNotification();
return;
}
#if isDemo
if (searchView.IsVisible)
{
searchView.Hide();
return;
}
if (!searchView.IsVisible)
searchView.ActivateSearchView();
else
searchView.BringToFrontPreserveState();
searchView.ShowTicketOverviewPane();
#else
if (SearchPageView.Instance.IsVisible)
SearchPageView.Instance.Hide();
else
SearchPageView.Instance.ActivateSearchView();
#endif
}
catch (Exception E)
@@ -271,48 +281,56 @@ namespace FasdDesktopUi
}
}
private void NotifyIcon_BalloonTipClicked(object sender, EventArgs e)
{
try
{
SearchPageView.Instance?.BringToFrontPreserveState();
SearchPageView.Instance?.ShowTicketOverviewPane();
ClearTicketOverviewTrayNotification();
}
catch (Exception E)
{
LogException(E);
}
}
private void NotifyIcon_BalloonTipClicked(object sender, EventArgs e)
{
try
{
SearchPageView.Instance?.BringToFrontPreserveState();
SearchPageView.Instance?.ShowTicketOverviewPaneForScope(PendingTicketOverviewScope);
ClearTicketOverviewTrayNotification();
}
catch (Exception E)
{
LogException(E);
}
}
private bool HasPendingTicketOverviewNotification()
{
return _ticketTrayNotification?.HasNotification ?? false;
}
public void ShowTicketOverviewTrayNotification(string message)
{
try
{
_ticketTrayNotification?.Show(message);
}
public void ShowTicketOverviewTrayNotification(string message)
{
try
{
_ticketTrayNotification?.Show(message);
}
catch (Exception ex)
{
LogException(ex);
}
}
public void ClearTicketOverviewTrayNotification()
{
try
{
_ticketTrayNotification?.Clear();
}
catch (Exception ex)
{
LogException(ex);
}
}
public void ClearTicketOverviewTrayNotification()
{
try
{
_pendingTicketOverviewScope = null;
_ticketTrayNotification?.Clear();
}
catch (Exception ex)
{
LogException(ex);
}
}
public void SetTicketOverviewNotificationScope(TileScope? scope)
{
_pendingTicketOverviewScope = scope;
}
public TileScope? PendingTicketOverviewScope => _pendingTicketOverviewScope;
private System.Windows.Forms.ToolStripItem SetUpNotifyIconLanguageOption()
{