protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); if (!(e.Parameter is DrxNavigationInfo info)) { return; } _store = info.Store; }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); if (!(e.Parameter is DrxNavigationInfo info)) { return; } _store = info.Store; FlagSelector.Store = _store; HandleCommand(info.Command); }
public async void Execute(object parameter) { var service = (DrxStoreServiceViewModel)parameter; var store = new DrxStoreViewModel(new DrxStore(), service); store.Model.RegisterLocalBacker(); if (!await store.RestoreWithUiAsync()) { return; } await service.AddStoreAsync(store); }
public async void Execute(object parameter) { var service = (DrxStoreServiceViewModel)parameter; var store = new DrxStoreViewModel(new DrxStore(), service); store.Model.RegisterLocalBacker(); var result = await new StorePropertiesDialog(store, true).ShowAsync(); if (result != ContentDialogResult.Primary || string.IsNullOrWhiteSpace(store.Name)) { return; } await service.AddStoreAsync(store); }
public StorePropertiesDialog(DrxStoreViewModel store, bool creating = false) { InitializeComponent(); Store = store; _creating = creating; // Add all the providers to the available list, and set the provider foreach (var provider in CryptoProviders.UiProviders) { ProviderCollection.Add(((CryptoProviderAttribute)provider.GetCustomAttribute(typeof(CryptoProviderAttribute))).Name); } LoadCryptoProvider(); LoadCryptoUi(); if (!creating) { return; } Title = "New Store"; PrimaryButtonText = "Create"; }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); if (!(e.Parameter is DrxNavigationInfo info)) { return; } _store = info.Store; // avoid crashes if (_store == null) { return; } // Setter updates UI so run on main thread UpdateDocuments(); // Handle the navigation command HandleCommand(info.Command); }
public StoreBackupDialog(DrxStoreViewModel store) { InitializeComponent(); _store = store; }