private async void MoreClickedAsync(VaultListPageModel.Login login) { var buttons = new List <string> { AppResources.View, AppResources.Edit }; if (!string.IsNullOrWhiteSpace(login.Password.Value)) { buttons.Add(AppResources.CopyPassword); } if (!string.IsNullOrWhiteSpace(login.Username)) { buttons.Add(AppResources.CopyUsername); } if (!string.IsNullOrWhiteSpace(login.Uri.Value) && (login.Uri.Value.StartsWith("http://") || login.Uri.Value.StartsWith("https://"))) { buttons.Add(AppResources.GoToWebsite); } var selection = await DisplayActionSheet(login.Name, AppResources.Cancel, null, buttons.ToArray()); if (selection == AppResources.View) { var page = new VaultViewLoginPage(login.Id); await Navigation.PushForDeviceAsync(page); } else if (selection == AppResources.Edit) { var page = new VaultEditLoginPage(login.Id); await Navigation.PushForDeviceAsync(page); } else if (selection == AppResources.CopyPassword) { Copy(login.Password.Value, AppResources.Password); } else if (selection == AppResources.CopyUsername) { Copy(login.Username, AppResources.Username); } else if (selection == AppResources.GoToWebsite) { Device.OpenUri(new Uri(login.Uri.Value)); } }
private async Task ClickedItem() { var page = new VaultEditLoginPage(_loginId); await _page.Navigation.PushForDeviceAsync(page); }
private async void ClickedItem(object sender, EventArgs e) { var page = new VaultEditLoginPage(_loginId); await _page.Navigation.PushForDeviceAsync(page); }