1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-22 03:03:46 +00:00

redid lock pin page with pin control.

This commit is contained in:
Kyle Spearrin
2016-06-06 18:48:52 -04:00
parent 2c19413275
commit 89e4189779
6 changed files with 96 additions and 104 deletions

View File

@@ -6,33 +6,32 @@ namespace Bit.App.Models.Page
{
public class PinPageModel : INotifyPropertyChanged
{
private string _labelText;
private List<string> _pin;
public PinPageModel()
{
LabelText = "_ _ _ _";
PIN = new List<string>();
}
private string _pin = string.Empty;
public event PropertyChangedEventHandler PropertyChanged;
public string LabelText
{
get { return _labelText; }
set
get
{
_labelText = value;
PropertyChanged(this, new PropertyChangedEventArgs(nameof(LabelText)));
var newText = string.Empty;
for(int i = 0; i < 4; i++)
{
newText += _pin.Length <= i ? "- " : "● ";
}
return newText.TrimEnd();
}
}
public List<string> PIN
public string PIN
{
get { return _pin; }
set
{
_pin = value;
PropertyChanged(this, new PropertyChangedEventArgs(nameof(PIN)));
PropertyChanged(this, new PropertyChangedEventArgs(nameof(LabelText)));
}
}
}