Esempio n. 1
0
 private void TextBoxCheckBoxMain_Leave(object sender, EventArgs e)
 {
     if (VerifyMiningAddress(false))
     {
         if (ConfigManager.GeneralConfig.BitcoinAddress != textBoxBTCAddress.Text.Trim() ||
             ConfigManager.GeneralConfig.WorkerName != textBoxWorkerName.Text.Trim())
         {
             // Reset credentials
             CryptoStats.SetCredentials(textBoxBTCAddress.Text.Trim(), textBoxWorkerName.Text.Trim());
         }
         // Commit to config.json
         ConfigManager.GeneralConfig.BitcoinAddress  = textBoxBTCAddress.Text.Trim();
         ConfigManager.GeneralConfig.WorkerName      = textBoxWorkerName.Text.Trim();
         ConfigManager.GeneralConfig.ServiceLocation = comboBoxLocation.SelectedIndex;
         ConfigManager.GeneralConfigFileCommit();
     }
 }
Esempio n. 2
0
 private void ConnectionEstablishedCallback(object sender, EventArgs e)
 {
     // send credentials
     CryptoStats.SetCredentials(textBoxBTCAddress.Text.Trim(), textBoxWorkerName.Text.Trim());
 }