예제 #1
0
        protected override void OnCollectionChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
        {
            base.OnCollectionChanged(e);
            var database = CredentialDatabaseFactory.OpenDefault();

            database.Save(this.password, this.Where(c => !string.IsNullOrEmpty(c.Password) && !string.IsNullOrEmpty(c.UserName)).ToList());
        }
예제 #2
0
        public UIModel(string password)
        {
            this.password = password;
            var database = CredentialDatabaseFactory.OpenDefault();
            var data     = database.GetCredentials(password);

            foreach (var item in data)
            {
                this.Add(item);
            }
        }