private static Bitmap GetBitmap(WalletType type) { Uri uri = new($"avares://WalletWasabi.Fluent/Assets/WalletIcons/{ThemeHelper.CurrentTheme}/generic.png"); switch (type) { case WalletType.Coldcard: uri = new($"avares://WalletWasabi.Fluent/Assets/WalletIcons/{ThemeHelper.CurrentTheme}/coldcard.png"); break; case WalletType.Trezor: uri = new($"avares://WalletWasabi.Fluent/Assets/WalletIcons/{ThemeHelper.CurrentTheme}/trezor.png"); break; case WalletType.Ledger: uri = new($"avares://WalletWasabi.Fluent/Assets/WalletIcons/{ThemeHelper.CurrentTheme}/ledger.png"); break; case WalletType.Normal: case WalletType.Unknown: uri = new($"avares://WalletWasabi.Fluent/Assets/WalletIcons/{ThemeHelper.CurrentTheme}/normal.png"); break; } return(AssetHelpers.GetBitmapAsset(uri)); }
public ApplicationViewModel(IMainWindowService mainWindowService) { _mainWindowService = mainWindowService; QuitCommand = ReactiveCommand.Create(ShutDown); ShowHideCommand = ReactiveCommand.Create(() => { if (IsMainWindowShown) { _mainWindowService.Hide(); } else { _mainWindowService.Show(); } }); ShowCommand = ReactiveCommand.Create(() => _mainWindowService.Show()); AboutCommand = ReactiveCommand.Create( () => MainViewModel.Instance.DialogScreen.To(new AboutViewModel(navigateBack: MainViewModel.Instance.DialogScreen.CurrentPage is not null)), canExecute: MainViewModel.Instance.DialogScreen.WhenAnyValue(x => x.CurrentPage).Select(x => x is null)); using var bitmap = AssetHelpers.GetBitmapAsset("avares://WalletWasabi.Fluent/Assets/WasabiLogo.ico"); TrayIcon = new WindowIcon(bitmap); }
public ContainsNumbersViewModel(PasswordFinderOptions options) { Options = options; Icon = AssetHelpers.GetBitmapAsset($"avares://WalletWasabi.Fluent/Assets/PasswordFinder/{ThemeHelper.CurrentTheme}/numbers.png"); EnableCancel = true; EnableBack = true; YesCommand = ReactiveCommand.Create(() => SetAnswer(true)); NoCommand = ReactiveCommand.Create(() => SetAnswer(false)); }
public ContainsSymbolsViewModel(PasswordFinderOptions options) { Options = options; Icon = AssetHelpers.GetBitmapAsset($"avares://WalletWasabi.Fluent/Assets/PasswordFinder/{ThemeHelper.CurrentTheme}/symbols.png"); SetupCancel(enableCancel: true, enableCancelOnEscape: true, enableCancelOnPressed: true); EnableBack = true; YesCommand = ReactiveCommand.Create(() => SetAnswer(true)); NoCommand = ReactiveCommand.Create(() => SetAnswer(false)); }