Contact and settings updates.

This commit is contained in:
Burak Kaan Köse
2026-03-06 12:31:37 +01:00
parent 51f64466c2
commit e1be644631
14 changed files with 119 additions and 54 deletions
+15 -1
View File
@@ -34,6 +34,7 @@ public sealed partial class ShellWindow : WindowEx, IWinoShellWindow,
public INavigationService NavigationService { get; } = WinoApplication.Current.Services.GetService<INavigationService>() ?? throw new Exception("NavigationService not registered in DI container.");
public ICommand ShowWinoCommand { get; set; }
public ICommand ShowWinoCalendarCommand { get; set; }
public ICommand ExitWinoCommand { get; set; }
public ObservableCollection<SynchronizationActionItem> SyncActionItems { get; } = new();
@@ -60,7 +61,8 @@ public sealed partial class ShellWindow : WindowEx, IWinoShellWindow,
// Register global mouse button listener for back button
RegisterMouseBackButtonListener();
ShowWinoCommand = new RelayCommand(RestoreFromTray);
ShowWinoCommand = new RelayCommand(() => RestoreAndSwitchMode(WinoApplicationMode.Mail));
ShowWinoCalendarCommand = new RelayCommand(() => RestoreAndSwitchMode(WinoApplicationMode.Calendar));
ExitWinoCommand = new RelayCommand(ForceClose);
this.SetIcon("Assets/Wino_Icon.ico");
@@ -281,6 +283,18 @@ public sealed partial class ShellWindow : WindowEx, IWinoShellWindow,
BringToFront();
}
private void RestoreAndSwitchMode(WinoApplicationMode mode)
{
_currentMode = mode;
_isApplyingActivationMode = true;
AppModeSegmentedControl.SelectedIndex = mode == WinoApplicationMode.Mail ? 0 : 1;
_isApplyingActivationMode = false;
NavigationService.ChangeApplicationMode(mode);
RestoreFromTray();
}
public void ForceClose()
{
// Unsubscribe from the closing event to avoid infinite loop