Contact and settings updates.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user