예제 #1
0
        private static SadGuiState Unlock()
        {
            var dialog = new MogwaiInputDialog("UnlockWallet", "wallet password?", 40, 8);

            dialog.AddButton("ok");
            dialog.Button.Click += (btn, args) =>
            {
                var password = dialog.Input.Text;
                _controller.UnlockWallet(password);
                _state = _controller.IsWalletUnlocked ? SadGuiState.Selection : SadGuiState.Fatalerror;
                dialog.Hide();
            };
            dialog.Show(true);

            return(SadGuiState.Action);
        }
예제 #2
0
        private static SadGuiState Unlock()
        {
            var dialog = new MogwaiInputDialog("UnlockWallet", "wallet password?", 40, 8);

            dialog.AddButon("ok");
            dialog.button.Click += (btn, args) =>
            {
                string password = dialog.input.Text;
                _controller.UnlockWallet(password);
                if (_controller.IsWalletUnlocked)
                {
                    _state = SadGuiState.SELECTION;
                }
                else
                {
                    _state = SadGuiState.FATALERROR;
                }
                dialog.Hide();
            };
            dialog.Show(true);

            return(SadGuiState.ACTION);
        }