Beispiel #1
0
 public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
 {
     if (indexPath.Section == 0)
     {
         if (indexPath.Row == 0)
         {
             return(_controller.MasterPasswordCell);
         }
     }
     else if (indexPath.Section == 1)
     {
         if (indexPath.Row == 0)
         {
             var cell = new ExtendedUITableViewCell();
             if (_controller._biometricIntegrityValid)
             {
                 var biometricButtonText = _controller._deviceActionService.SupportsFaceBiometric() ?
                                           AppResources.UseFaceIDToUnlock : AppResources.UseFingerprintToUnlock;
                 cell.TextLabel.TextColor = ThemeHelpers.PrimaryColor;
                 cell.TextLabel.Text      = biometricButtonText;
             }
             else
             {
                 cell.TextLabel.TextColor     = ThemeHelpers.DangerColor;
                 cell.TextLabel.Font          = ThemeHelpers.GetDangerFont();
                 cell.TextLabel.Lines         = 0;
                 cell.TextLabel.LineBreakMode = UILineBreakMode.WordWrap;
                 cell.TextLabel.Text          = AppResources.BiometricInvalidatedExtension;
             }
             return(cell);
         }
     }
     return(new ExtendedUITableViewCell());
 }
Beispiel #2
0
            public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
            {
                if (indexPath.Section == 0)
                {
                    var cell = new ExtendedUITableViewCell();
                    cell.TextLabel.TextColor = ThemeHelpers.PrimaryColor;
                    if (indexPath.Row == 0)
                    {
                        cell.TextLabel.Text = AppResources.RegeneratePassword;
                    }
                    else if (indexPath.Row == 1)
                    {
                        cell.TextLabel.Text = AppResources.CopyPassword;
                    }
                    return(cell);
                }

                if (indexPath.Row == 0)
                {
                    return(_controller.LengthCell);
                }
                else if (indexPath.Row == 1)
                {
                    return(_controller.UppercaseCell);
                }
                else if (indexPath.Row == 2)
                {
                    return(_controller.LowercaseCell);
                }
                else if (indexPath.Row == 3)
                {
                    return(_controller.NumbersCell);
                }
                else if (indexPath.Row == 4)
                {
                    return(_controller.SpecialCell);
                }
                else if (indexPath.Row == 5)
                {
                    return(_controller.MinNumbersCell);
                }
                else if (indexPath.Row == 6)
                {
                    return(_controller.MinSpecialCell);
                }

                return(new ExtendedUITableViewCell());
            }
            public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
            {
                if (!_controller.TryGetTarget(out var controller))
                {
                    return(new ExtendedUITableViewCell());
                }

                if (indexPath.Section == 0)
                {
                    if (indexPath.Row == 0)
                    {
                        if (controller._biometricUnlockOnly)
                        {
                            return(controller.BiometricCell);
                        }
                        else
                        {
                            return(controller.MasterPasswordCell);
                        }
                    }
                }
                else if (indexPath.Section == 1)
                {
                    if (indexPath.Row == 0)
                    {
                        if (controller._passwordReprompt)
                        {
                            var cell = new ExtendedUITableViewCell();
                            cell.TextLabel.TextColor     = ThemeHelpers.DangerColor;
                            cell.TextLabel.Font          = ThemeHelpers.GetDangerFont();
                            cell.TextLabel.Lines         = 0;
                            cell.TextLabel.LineBreakMode = UILineBreakMode.WordWrap;
                            cell.TextLabel.Text          = AppResources.PasswordConfirmationDesc;
                            return(cell);
                        }
                        else if (!controller._biometricUnlockOnly)
                        {
                            return(controller.BiometricCell);
                        }
                    }
                }
                return(new ExtendedUITableViewCell());
            }
Beispiel #4
0
 public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
 {
     if (indexPath.Section == 0)
     {
         if (indexPath.Row == 0)
         {
             return(_controller.MasterPasswordCell);
         }
     }
     else if (indexPath.Section == 1)
     {
         if (indexPath.Row == 0)
         {
             var cell = new ExtendedUITableViewCell();
             cell.TextLabel.TextColor = ThemeHelpers.PrimaryColor;
             cell.TextLabel.Text      = AppResources.UseFingerprintToUnlock;
             return(cell);
         }
     }
     return(new ExtendedUITableViewCell());
 }
 public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
 {
     if (indexPath.Section == 0)
     {
         if (indexPath.Row == 0)
         {
             return(_controller.MasterPasswordCell);
         }
     }
     else if (indexPath.Section == 1)
     {
         if (indexPath.Row == 0)
         {
             var fingerprintButtonText = _controller._deviceActionService.SupportsFaceBiometric() ?
                                         AppResources.UseFaceIDToUnlock : AppResources.UseFingerprintToUnlock;
             var cell = new ExtendedUITableViewCell();
             cell.TextLabel.TextColor = ThemeHelpers.PrimaryColor;
             cell.TextLabel.Text      = fingerprintButtonText;
             return(cell);
         }
     }
     return(new ExtendedUITableViewCell());
 }
Beispiel #6
0
            public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
            {
                if (indexPath.Section == 0)
                {
                    var cell = new ExtendedUITableViewCell();
                    cell.TextLabel.TextColor = ThemeHelpers.PrimaryColor;
                    if (indexPath.Row == 0)
                    {
                        cell.TextLabel.Text = AppResources.RegeneratePassword;
                    }
                    else if (indexPath.Row == 1)
                    {
                        cell.TextLabel.Text = AppResources.CopyPassword;
                    }
                    return(cell);
                }

                if (indexPath.Row == 0)
                {
                    return(_controller.TypePickerCell);
                }

                if (_controller._passType == "password")
                {
                    if (indexPath.Row == 1)
                    {
                        return(_controller.LengthCell);
                    }
                    else if (indexPath.Row == 2)
                    {
                        return(_controller.UppercaseCell);
                    }
                    else if (indexPath.Row == 3)
                    {
                        return(_controller.LowercaseCell);
                    }
                    else if (indexPath.Row == 4)
                    {
                        return(_controller.NumbersCell);
                    }
                    else if (indexPath.Row == 5)
                    {
                        return(_controller.SpecialCell);
                    }
                    else if (indexPath.Row == 6)
                    {
                        return(_controller.MinNumbersCell);
                    }
                    else if (indexPath.Row == 7)
                    {
                        return(_controller.MinSpecialCell);
                    }
                    else if (indexPath.Row == 8)
                    {
                        return(_controller.AmbiguousCell);
                    }
                }
                else
                {
                    if (indexPath.Row == 1)
                    {
                        return(_controller.NumWordsCell);
                    }
                    else if (indexPath.Row == 2)
                    {
                        return(_controller.WordSeparatorCell);
                    }
                    else if (indexPath.Row == 3)
                    {
                        return(_controller.CapitalizeCell);
                    }
                    else if (indexPath.Row == 4)
                    {
                        return(_controller.IncludeNumberCell);
                    }
                }

                return(new ExtendedUITableViewCell());
            }