private async void Start_Click(object sender, RoutedEventArgs e) { Progress <MiningStatus> startingProgress = new Progress <MiningStatus>((data) => { // TODO: Add an Amount Earned feature InfoText = data.info; HashrateText = "Hashrate: " + data.hashRate; LastBlockText = "Block: " + data.lastBlock; AcceptedSharesText = "Accepted Shares: " + data.acceptedShares; RejectedSharesText = "Rejected Shares: " + data.rejectedShares; TemperatureText = "Temperature: " + data.temperature; }); ReadyToStart = false; ShowStop = true; ShowStats = true; string poolInfo = (lastPoolDataValue.id == -1 ? "Custom Pool (" + lastPoolDataValue.stratum + ")" : lastPoolDataValue.name + " (" + PoolInput.Trim() + ")"); MiningInfoText = "Mining on " + poolInfo; logger.Info("Strating miners on " + poolInfo); await linker.minerManager.StartMining(AddressInput.Trim(), PoolInput.Trim(), startingProgress); ShowStats = false; ShowStop = false; ReadyToStart = true; }
private async void Start_Click(object sender, RoutedEventArgs e) { Progress <MiningStatus> startingProgress = new Progress <MiningStatus>((data) => { // TODO: Add an Amount Earned feature InfoText = data.info; // If this is just an overall status rather than a miner status if (data.id == "NONE") { return; } MiningTab tab = MiningTabs.FirstOrDefault(x => (x.id.Contains(data.id) || data.id.Contains(x.id))); tab.Data.HashrateText = "Hashrate: " + data.hashRate; tab.Data.LastBlockText = "Block: " + data.lastBlock; tab.Data.AcceptedSharesText = "Accepted Shares: " + data.acceptedShares; tab.Data.RejectedSharesText = "Rejected Shares: " + data.rejectedShares; tab.Data.TemperatureText = "Temperature: " + data.temperature; }); // Select first tab tabDynamic.SelectedIndex = 0; // Show & Hide screens ReadyToStart = false; ShowStop = true; ShowStats = true; EnableAdvanced = false; // Log Pool Info string poolInfo = (lastPoolDataValue.id == -1 ? "Custom Pool (" + lastPoolDataValue.stratum + ")" : lastPoolDataValue.name + " (" + PoolInput.Trim() + ")"); MiningInfoText = "Mining on " + poolInfo; logger.Info("Starting miners on " + poolInfo); await linker.minerManager.StartMining(AddressInput.Trim(), PoolInput.Trim(), startingProgress); EnableAdvanced = true; ShowStats = false; ShowStop = false; ReadyToStart = true; }