1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-13 14:53:18 +00:00
Files
mobile/src/App/Models/Page/PasswordGeneratorPageModel.cs
2018-12-15 16:56:06 -05:00

41 lines
1.1 KiB
C#

using System;
using System.ComponentModel;
using Bit.App.Utilities;
using Xamarin.Forms;
namespace Bit.App.Models.Page
{
public class PasswordGeneratorPageModel : INotifyPropertyChanged
{
private string _password = " ";
private string _length;
public PasswordGeneratorPageModel() { }
public event PropertyChangedEventHandler PropertyChanged;
public string Password
{
get { return _password; }
set
{
_password = value;
PropertyChanged(this, new PropertyChangedEventArgs(nameof(Password)));
// PropertyChanged(this, new PropertyChangedEventArgs(nameof(FormattedPassword)));
}
}
public FormattedString FormattedPassword => PasswordFormatter.FormatPassword(_password);
public string Length
{
get { return _length; }
set
{
_length = value;
PropertyChanged(this, new PropertyChangedEventArgs(nameof(Length)));
}
}
}
}