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); }
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(); }