public bool CheckUser(string login, string password)//проверка правильности пароля
        {
            SQLiteTable users = dBEngine["users"];
            List <KeyValuePair <string, string> > searchPattern = new List <KeyValuePair <string, string> >();

            searchPattern.Add(new KeyValuePair <string, string>("login", login));//
            searchPattern.Add(new KeyValuePair <string, string>("password", password));
            KeyValuePair <long, List <string> >?userInDb = users.GetOneRow(searchPattern);

            if (userInDb != null)
            {
                userLoggedId = Convert.ToInt32(userInDb.Value.Key);

                return(true);
            }
            return(false);
        }