コード例 #1
0
        public void Login()
        {
            Program.currentLoggedInAccount = null;
            Console.Clear();
            Console.WriteLine("Tiến hành đăng nhập Hệ thống Ngân hàng Blockchain.");
            Console.WriteLine("Vui lòng điền tên truy cập: ");
            var address = Console.ReadLine();

            Console.WriteLine("Vui lòng nhập mật khẩu: ");
            var privatekey        = Console.ReadLine();
            var blockchainAccount = BlockchainAddressModel.FindByAddrssAndPrivateKey(address, privatekey);

            if (blockchainAccount == null)
            {
                Console.WriteLine("Sai tài khoản, vui lòng thử lại.");
                Console.WriteLine("Ấn enter để tiếp tục.");
                Console.Read();
                return;
            }

            Program.currentLoggedInAccount = blockchainAccount as SHBAccount;
        }
コード例 #2
0
        public void Login()
        {
            Program.CurrentLoggedInAccount = null;
            Console.Clear();
            Console.WriteLine("Login Blockchain System.");
            Console.WriteLine("Address: ");
            var address = Console.ReadLine();

            Console.WriteLine("Private Key: ");
            var privatekey        = Console.ReadLine();
            var blockchainAccount = BlockchainAddressModel.FindByAddrssAndPrivateKey(address, privatekey);

            if (blockchainAccount == null)
            {
                Console.WriteLine("Wrong Address or Private Key. Please try again.");
                Console.WriteLine("Press any key to continue.");
                Console.Read();
                return;
            }

            Program.CurrentLoggedInAccount = blockchainAccount as SHBAccount;
        }