Beispiel #1
0
 public CryptoDelivery(Auth.ServerPackage package)
 {
     _authPackage = package;
     InitializeComponent();
     _background = new Logic();
     _oldbackground = new Logic();
     _options = new Options();
     toolStripStatusInfo.Text = "Ready";
     notifyIcon.Visible = true;
     Worker1.WorkerSupportsCancellation = true;
     LoadOptions();
     UpdateToolStripStatusCurrency();
     btn_GetValues_Click(new object(),new EventArgs());
     InitTimerValidation();
 }
Beispiel #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         this.Enabled = false;
         button1.Enabled = false;
         Auth auth = new Auth();
         var serverpackage = auth.ValidateUser();
         if (serverpackage.validationResult == Auth.ValidationResult.actual)
         {
             lb_accountHasExpired.Text = String.Format("Account active for {0} day(s)",
                 serverpackage.GetDaysToExpire());
             serverpackage.locked = false;
         }
         else if(serverpackage.validationResult == Auth.ValidationResult.expired)
         {
             lb_accountHasExpired.Text = String.Format("Your account has expired!");
             serverpackage.locked = true;
         }
         else if (serverpackage.validationResult == Auth.ValidationResult.temporary)
         {
             lb_accountHasExpired.Text = String.Format("Right now, you use it for free!");
             serverpackage.locked = false;
             label9.Visible = true;
             button2.Visible = true;
             lb_accountHasExpired.Location = new System.Drawing.Point(36, 9);
             label1.Visible = label2.Visible = label3.Visible = label4.Visible =
                 label5.Visible = label6.Visible = label7.Visible =
                 label8.Visible = button1.Visible = false;
         }
         package = serverpackage;
         lb_addressBtc.Text = package.wallet;
         this.Enabled = true;
         button1.Enabled = true;
     }
     catch (Exception ee)
     {
         Log.Error(ee);
         HandleError.CloseProgram();
     }
 }