Exemplo n.º 1
0
        public bool Check(string username, string password)
        {
            var user = _fileStore.GetUsers()
                       .Where(x => x.Username == username && x.Password == password)
                       .FirstOrDefault();

            return(user != null);
        }
        private void button3_Click(object sender, EventArgs e)
        {
            var    _users   = _fileUserStore.GetUsers();
            int    i        = 1;
            string allUsers = "";

            foreach (var item in _users)
            {
                allUsers += (i.ToString() + ". " + item.Name.ToString() + "  " +
                             item.Username.ToString() + "  " + item.Password.ToString() + "\n");
                i++;
            }
            MessageBox.Show(allUsers, "User's list");
            this.Close();
        }