private void SplashBackgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     if (Program.jumpBack)
     {
         Utilities.Close(this);
     }
     else
     {
         Utilities.Hide(this);
         var walletWindow = new wallet(WalletPath, WalletPassword, (Process)e.Result);
         walletWindow.Closed += (s, args) => Utilities.Close(this);
         walletWindow.Show();
     }
 }
Beispiel #2
0
        private void ImportWalletButton_Click(object sender, EventArgs e)
        {
            ImportWalletPrompt IWP = new ImportWalletPrompt();

            Utilities.Hide(this);
            var IWPreturn = IWP.ShowDialog();

            if (IWPreturn == DialogResult.OK)
            {
                WalletPath     = IWP.ImportWalletPath;
                WalletPassword = IWP.ImportWalletPassword;
                Utilities.SetDialogResult(this, DialogResult.OK);
                Utilities.Close(IWP);
                Utilities.Close(this);
            }
            this.Show();
        }
Beispiel #3
0
        private void CreateWalletButton_Click(object sender, EventArgs e)
        {
            CreateWalletPrompt CWP = new CreateWalletPrompt();

            Utilities.Hide(this);
            var CWPreturn = CWP.ShowDialog();

            if (CWPreturn == DialogResult.OK)
            {
                WalletPath     = CWP.WalletPath;
                WalletPassword = CWP.WalletPassword;
                Utilities.SetDialogResult(this, DialogResult.OK);
                Utilities.Close(CWP);
                Utilities.Close(this);
            }
            this.Show();
        }
Beispiel #4
0
        private void SelectWalletButton_Click(object sender, EventArgs e)
        {
            var            curDir           = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            OpenFileDialog findWalletDialog = new OpenFileDialog
            {
                InitialDirectory = curDir,
                Filter           = "wallet files (*.wallet)|*.wallet|All files (*.*)|*.*",
                FilterIndex      = 2,
                RestoreDirectory = true
            };

            if (findWalletDialog.ShowDialog() == DialogResult.OK)
            {
                if (System.IO.File.Exists(findWalletDialog.FileName))
                {
                    WalletPath = findWalletDialog.FileName;
                    var pPrompt = new passwordPrompt();
                    Utilities.Hide(this);
                    var pResult = pPrompt.ShowDialog();
                    if (pResult != DialogResult.OK)
                    {
                        findWalletDialog.Dispose();
                        Utilities.Close(pPrompt);
                        this.Show();
                        return;
                    }
                    else
                    {
                        WalletPassword = pPrompt.WalletPassword;
                        Utilities.Close(pPrompt);
                        Utilities.SetAppClosing(false);
                        this.DialogResult = DialogResult.OK;
                        Utilities.Close(this);
                    }
                }
            }
        }