示例#1
0
        /// <summary>
        /// Open existing wallet.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnOpen_Click(object sender, EventArgs e)
        {
            LoginPrompt login = new LoginPrompt();

            login.ShowDialog();
            String password = login.Password;

            login.Close();
            login.Dispose();

            OpenMain((string)cbWallets.SelectedValue, false, password);
        }
示例#2
0
        /// <summary>
        /// Show login window. Login to wallet when login is entered. If users cancels, close application.
        /// </summary>
        private void ShowLogin()
        {
            var loginPrompt = new LoginPrompt();

            if (loginPrompt.ShowDialog(this) == DialogResult.OK)
            {
                Wallet.Login(loginPrompt.Password);
            }
            else
            {
                Close();
            }
        }
示例#3
0
        /// <summary>
        /// Show dialog for new wallet name. Open new wallet.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnNew_Click(object sender, EventArgs e)
        {
            var createForm = new CreateWallet(existingWallets);

            createForm.Height = Height;
            createForm.Owner  = this;

            if (createForm.ShowDialog() == DialogResult.OK)
            {
                LoginPrompt login = new LoginPrompt();
                login.ShowDialog();
                String password = login.Password;
                login.Close();
                login.Dispose();

                string fullWalletPath = System.IO.Path.Combine(WalletPath, createForm.WalletName + ".bin");
                OpenMain(fullWalletPath, true, password);
            }
        }