コード例 #1
0
 public static void Main(string[] args)
 {
     LoadJson1();
     Mainframe.Main1();
 }
コード例 #2
0
        public static void Registration()
        {
            Console.Clear();
            Mainframe.SlowPrint("Enter the sacred texts: ");
            ConsoleKeyInfo ckey = Console.ReadKey();

            if (ckey.Key == ConsoleKey.UpArrow)
            {
                Console.Clear();
                Console.Write("Enter the sacred texts: ");
                ckey = Console.ReadKey();
                if (ckey.Key == ConsoleKey.UpArrow)
                {
                    Console.Clear();
                    Console.Write("Enter the sacred texts: ");
                    ckey = Console.ReadKey();
                    if (ckey.Key == ConsoleKey.DownArrow)
                    {
                        Console.Clear();
                        Console.Write("Enter the sacred texts: ");
                        ckey = Console.ReadKey();
                        if (ckey.Key == ConsoleKey.DownArrow)
                        {
                            Console.Clear();
                            Console.Write("Enter the sacred texts: ");
                            ckey = Console.ReadKey();
                            if (ckey.Key == ConsoleKey.LeftArrow)
                            {
                                Console.Clear();
                                Console.Write("Enter the sacred texts: ");
                                ckey = Console.ReadKey();
                                if (ckey.Key == ConsoleKey.RightArrow)
                                {
                                    Console.Clear();
                                    Console.Write("Enter the sacred texts: ");
                                    ckey = Console.ReadKey();
                                    if (ckey.Key == ConsoleKey.LeftArrow)
                                    {
                                        Console.Clear();
                                        Console.Write("Enter the sacred texts: ");
                                        ckey = Console.ReadKey();
                                        if (ckey.Key == ConsoleKey.RightArrow)
                                        {
                                            Console.Clear();
                                            Console.Write("Enter the sacred texts: ");
                                            ckey = Console.ReadKey();
                                            if (ckey.Key == ConsoleKey.B)
                                            {
                                                Console.Clear();
                                                Console.Write("Enter the sacred texts: ");
                                                ckey = Console.ReadKey();
                                                if (ckey.Key == ConsoleKey.A)
                                                {
                                                    Console.Clear();
                                                    while (true)
                                                    {
                                                        Mainframe.SlowPrint("New username: "******"Confirm username: "******"New password: "******"Confirm password: "******"D:\C#\VS\Login Page With Json\passwords.json";
                                                                var jsonData = File.ReadAllText(filePath);
                                                                var users    = JsonConvert.DeserializeObject <List <Data> >(jsonData) ?? new List <Data>();

                                                                users.Add(new Data()
                                                                {
                                                                    Id       = randomID,
                                                                    username = Mainframe.newUser,
                                                                    password = Mainframe.newPass
                                                                });

                                                                jsonData = JsonConvert.SerializeObject(users);
                                                                File.WriteAllText(filePath, jsonData);
                                                                break;
                                                            }
                                                        }
                                                    }
                                                    Console.WriteLine("Complete");
                                                    Mainframe.Main1();
                                                }
                                                else
                                                {
                                                    Console.Clear();
                                                    Console.WriteLine("Absolute donkey");
                                                    Console.ReadKey();
                                                }
                                            }
                                            else
                                            {
                                                Console.Clear();
                                                Console.WriteLine("Absolute donkey");
                                                Console.ReadKey();
                                            }
                                        }
                                        else
                                        {
                                            Console.Clear();
                                            Console.WriteLine("Absolute donkey");
                                            Console.ReadKey();
                                        }
                                    }
                                    else
                                    {
                                        Console.Clear();
                                        Console.WriteLine("Absolute donkey");
                                        Console.ReadKey();
                                    }
                                }
                                else
                                {
                                    Console.Clear();
                                    Console.WriteLine("Absolute donkey");
                                    Console.ReadKey();
                                }
                            }
                            else
                            {
                                Console.Clear();
                                Console.WriteLine("Absolute donkey");
                                Console.ReadKey();
                            }
                        }
                        else
                        {
                            Console.Clear();
                            Console.WriteLine("Absolute donkey");
                            Console.ReadKey();
                        }
                    }
                    else
                    {
                        Console.Clear();
                        Console.WriteLine("Absolute donkey");
                        Console.ReadKey();
                    }
                }
                else
                {
                    Console.Clear();
                    Console.WriteLine("Absolute donkey");
                    Console.ReadKey();
                }
            }
            else
            {
                Console.Clear();
                Console.WriteLine("Absolute donkey");
                Console.ReadKey();
            }
        }