예제 #1
0
        public void Login()
        {
            Program.currentLoggedInAddress = null;
            Console.Clear();
            Console.WriteLine("Tiến hành đăng nhập hệ thống SHB.");
            Console.WriteLine("Vui lòng nhập address: ");
            var address = Console.ReadLine();

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

            if (blockchainAddress == null)
            {
                Console.WriteLine("Sai thông tin địa chỉ, vui lòng đăng nhập lại.");
                return;
            }

            Program.currentLoggedInAddress = blockchainAddress;
        }
예제 #2
0
        public void Login()
        {
            Program.currentLoggedInAccount = null;
            Console.Clear();
            Console.WriteLine("Tien hanh dang nhap he thong Blockchain.");
            Console.WriteLine("Vui lòng nhập address: ");
            var address = Console.ReadLine();

            Console.WriteLine("Vui long nhap private key: ");
            var privatekey        = Console.ReadLine();
            var blockchainAccount = _model.FindByAddressAndPrivateKey(address, privatekey);

            if (blockchainAccount == null)
            {
                Console.WriteLine("Sai dia chi, vui long nhap lai.");
                Console.WriteLine("An phim bat ki de tiep tuc.");
                Console.Read();
                return;
            }

            Program.CurrentAddress = blockchainAccount;
        }
예제 #3
0
        public void Login()
        {
            Program.currentLoggedInAddress = null;
            Console.Clear();
            Console.WriteLine("Login of Blockchain e-wallet system.");
            Console.WriteLine("Please enter the login address: ");
            var address = Console.ReadLine();

            Console.WriteLine("Please enter the private key: ");
            var privateKey        = Console.ReadLine();
            var blockchainAddress = blockchainAddressModel.FindByAddressAndPrivateKey(address, privateKey);

            if (blockchainAddress == null)
            {
                Console.WriteLine("Incorrect account address, please check and login again.");
                Console.WriteLine("Press any key to continue.");
                Console.ReadLine();
                return;
            }

            // trong trường hợp trả về khác null.
            // set giá trị vào biến CurrentLoggedInAddress.
            Program.currentLoggedInAddress = blockchainAddress;
        }
        public void Login()
        {
            Program.currentLoggedInAddress = null;
            Console.Clear();
            Console.WriteLine("Tiến hành đăng nhập hệ thống Blockchain.");
            Console.WriteLine("Vui lòng nhập địa chỉ đăng nhập: ");
            var address = Console.ReadLine();

            Console.WriteLine("Vui lòng nhập private key: ");
            var privateKey        = Console.ReadLine();
            var blockchainAddress = blockchainAddressModel.FindByAddressAndPrivateKey(address, privateKey);

            if (blockchainAddress == null)
            {
                Console.WriteLine("Sai địa chỉ tài khoản, vui lòng đăng nhập lại.");
                Console.WriteLine("Ấn phím bất kỳ để tiếp tục.");
                Console.ReadLine();
                return;
            }

            // trong trường hợp trả về khác null.
            // set giá trị vào biến CurrentLoggedInAddress.
            Program.currentLoggedInAddress = blockchainAddress;
        }