Exemplo n.º 1
0
    public static void CreateAccount()
    {
        Console.Clear();
        Console.WriteLine("Pishi,sup");
        string name = Console.ReadLine();

        Console.Clear();
        System.Console.WriteLine("Pishi familiyu");
        string surname = Console.ReadLine();

        Console.Clear();
        System.Console.WriteLine("Pishi login");
        string login = Console.ReadLine();

        Console.Clear();
        System.Console.WriteLine("Pishi password");
        string password = Console.ReadLine();

        using (var writer = new StreamWriter("new.csv", true))
        {
            using (var csvWriter = new CsvWriter(writer))
            {
                csvWriter.Configuration.Delimiter = ",";
                csvWriter.WriteField(name);
                csvWriter.WriteField(surname);
                csvWriter.WriteField(login);
                csvWriter.WriteField(password);
                csvWriter.WriteField(AccountStore.accounts.Count);

                csvWriter.NextRecord();
            }
        }
        AccountStore.InitDb();
    }
Exemplo 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();
        }