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