private void buttonAllProfit_Click(object sender, EventArgs e) { var url = Links.NHM_Profit_Check + "CUSTOM"; Dictionary <AlgorithmType, double> total = new Dictionary <AlgorithmType, double>(); foreach (var curCDev in ComputeDeviceManager.Avaliable.AllAvaliableDevices) { foreach (var algorithm in curCDev.AlgorithmSettings.Values) { if (total.ContainsKey(algorithm.NiceHashID)) { total[algorithm.NiceHashID] += algorithm.BenchmarkSpeed; } else { total[algorithm.NiceHashID] = algorithm.BenchmarkSpeed; } } } foreach (var algorithm in total) { var id = (int)algorithm.Key; url += "&speed" + id + "=" + ProfitabilityCalculator.GetFormatedSpeed(algorithm.Value, algorithm.Key).ToString("F2", System.Globalization.CultureInfo.InvariantCulture); } url += "&nhmver=" + Application.ProductVersion.ToString(); // Add version info url += "&cost=1&power=1"; // Set default power and cost to 1 System.Diagnostics.Process.Start(url); }
private void buttonSelectedProfit_Click(object sender, EventArgs e) { if (_selectedComputeDevice == null) { MessageBox.Show(International.GetText("FormSettings_ButtonProfitSingle"), International.GetText("Warning_with_Exclamation"), MessageBoxButtons.OK); return; } var url = Links.NHM_Profit_Check + _selectedComputeDevice.Name; foreach (var algorithm in _selectedComputeDevice.AlgorithmSettings.Values) { var id = (int)algorithm.NiceHashID; url += "&speed" + id + "=" + ProfitabilityCalculator.GetFormatedSpeed(algorithm.BenchmarkSpeed, algorithm.NiceHashID).ToString("F2", System.Globalization.CultureInfo.InvariantCulture); } url += "&nhmver=" + Application.ProductVersion.ToString(); // Add version info url += "&cost=1&power=1"; // Set default power and cost to 1 System.Diagnostics.Process.Start(url); }