Esempio n. 1
0
    public static Account LogOn()
    {
        bool    loggingInFinished = true;
        Account logginUser        = null;

        while (loggingInFinished)
        {
            Console.Clear();
            Console.WriteLine("Pishi name,sup");
            string login = Console.ReadLine();
            Console.Clear();
            System.Console.WriteLine("Pishi password");
            string password = Console.ReadLine();
            logginUser = AccountStore.FindUser(login, password);
            if (logginUser == null)
            {
                continue;
            }


            loggingInFinished = false;
            return(logginUser);
        }
        return(logginUser);
    }
Esempio n. 2
0
        static void Main(string[] args)
        {
            Account account;



            //     while ( true){
            //     AccountStore.InitDb();
            //     account = LoginScreen.DrawLogin();

            //     Console.ReadKey();
            //    }


            AccountStore.InitDb();
            account = AccountStore.FindUser("fe", "fe");
            FriendshipStore.InitDb();
            // System.Console.WriteLine(FriendshipStore.friendships.First().FirstFriend);
            RequestStore.InitDb();
            MainScreen.DrawProfile(account);


            // RequestStore.InitDb();
            // RequestStore.remove(new Friendship{ FirstFriend = 1, SecondFriend = 6});
            // RequestStore.SaveChanges();
        }