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