示例#1
0
 private void Init(VaultViewCipherPage page, VaultViewCipherPageModel.Field field, ExtendedButton copyButton)
 {
     Value.LineBreakMode = LineBreakMode.WordWrap;
     if (copyButton != null)
     {
         copyButton.Command = new Command(() => page.Copy(field.Value, field.Name));
     }
 }
示例#2
0
 public UriViewCell(VaultViewCipherPage page, VaultViewCipherPageModel.LoginUri uri)
     : base(uri.Label, uri.Host, uri.ShowLaunch ? "launch.png" : null, "clipboard.png")
 {
     Value.LineBreakMode = LineBreakMode.TailTruncation;
     if (Button1 != null)
     {
         Button1.Command = new Command(async() =>
         {
             if (Device.RuntimePlatform == Device.Android && uri.IsApp)
             {
                 await page._deviceActionService.LaunchAppAsync(uri.Value, page);
             }
             else if (uri.IsWebsite)
             {
                 Device.OpenUri(new Uri(uri.Value));
             }
         });
     }
     Button2.Command = new Command(() => page.Copy(uri.Value, AppResources.URI));
 }