Ejemplo n.º 1
0
        void Download_ProgressDone(object sender, ReceivedDataEventArgs e)
        {
            if (!e.isCancel && e.fileName == verifyingKey)
            {
                veriStatus = true;
            }
            else if (!e.isCancel && e.fileName == provingKey)
            {
                provStatus = true;
            }
            if (veriStatus && provStatus)
            {
                checkParamsDone = true;
                if (start.isEnableAutoBackup())
                {
                    command += " -backupwallet";
                }
                Task.Run(() =>
                         api.startWallet(command));
            }

            if (e.isCancel)
            {
                startWallet.CancelAsync();
            }
        }
Ejemplo n.º 2
0
 protected void OnDownloadProgressDone(ReceivedDataEventArgs e)
 {
     if (downloadProgressDone != null)
     {
         downloadProgressDone(this, e);
     }
 }
Ejemplo n.º 3
0
 protected void OnProgressDone(ReceivedDataEventArgs e)
 {
     if (progressDone != null)
     {
         progressDone(this, e);
     }
 }
Ejemplo n.º 4
0
        void Download_ProgressChange(object sender, ReceivedDataEventArgs e)
        {
            switch (e.fileName)
            {
            case verifyingKey:
                pbProcess.Invoke(new Action(() => pbProcess.Value = e.progress * 100));
                break;

            case provingKey:
                pbProving.Invoke(new Action(() => pbProving.Value = e.progress * 100));
                break;

            case groth16Key:
                pbGroth.Invoke(new Action(() => pbGroth.Value = e.progress * 100));
                break;

            case saplingSpend:
                pbSpend.Invoke(new Action(() => pbSpend.Value = e.progress * 100));
                break;

            case saplingOutput:
                pbOutput.Invoke(new Action(() => pbOutput.Value = e.progress * 100));
                break;
            }
        }
Ejemplo n.º 5
0
 void NewVersion_ProgressDone(object sender, ReceivedDataEventArgs e)
 {
     if (e.isCancel == false)
     {
         try
         {
             isFinished = true;
             ProcessStartInfo startInfo = new ProcessStartInfo();
             startInfo.CreateNoWindow  = false;
             startInfo.UseShellExecute = true;
             startInfo.FileName        = Path.GetTempPath() + "\\SimpleWallet.exe";
             Process.Start(startInfo);
         }
         catch (Exception ex) { }
         this.Invoke(new Action(() => this.Close()));
     }
 }
Ejemplo n.º 6
0
        void NewVersion_ProgressDone(object sender, ReceivedDataEventArgs e)
        {
            if (e.isCancel == false)
            {
                try
                {
                    isFinished = true;
                    ProcessStartInfo startInfo = new ProcessStartInfo();
                    startInfo.CreateNoWindow  = false;
                    startInfo.UseShellExecute = true;
                    //startInfo.FileName = Path.GetTempPath() + "\\SimpleWallet_new.exe";
                    //MessageBox.Show(Path.GetTempPath() + "\\SimpleWallet_new.exe");

                    startInfo.FileName = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "\\SimpleWallet_new.exe";
                    MessageBox.Show(System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "\\SimpleWallet_new.exe");
                    Process.Start(startInfo);
                }
                catch (Exception ex) {  }
                this.Invoke(new Action(() => this.Close()));
            }
        }
Ejemplo n.º 7
0
 void Download_ProgressChange(object sender, ReceivedDataEventArgs e)
 {
     pbProcess.Invoke(new Action(() => pbProcess.Value = e.progress * 100));
 }
Ejemplo n.º 8
0
 void NewVersion_ProgressChange(object sender, ReceivedDataEventArgs e)
 {
     pbDownloading.Invoke(new Action(() => pbDownloading.Value = e.progress * 100));
 }