Ejemplo 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
             NiceHashStats.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();
     }
 }
Ejemplo n.º 2
0
 void ConnectionEstablishedCallback(object sender, EventArgs e)
 {
     // send credentials
     NiceHashStats.SetCredentials(textBoxBTCAddress.Text.Trim(), textBoxWorkerName.Text.Trim());
 }