def SetValues(self, values): self.Enable() if all(speed == 0.0 for speed in values): s = '--' else: speeds = (utils.format_speed(speed).strip() for speed in values) s = '; '.join(speeds) self.ChangeValue(s)
def _OnMiningStatus(self, speeds, revenue, devices): self.DeleteAllItems() algorithms = list(speeds.keys()) algorithms.sort(key=lambda algorithm: algorithm.name) for algorithm in algorithms: algo = '%s\n(%s)' % (algorithm.name, ', '.join(algorithm.algorithms)) devicesStr = ','.join([DeviceListRenderer._DeviceToString(device) for device in devices[algorithm]]) speed = ',\n'.join([utils.format_speed(speed) for speed in speeds[algorithm]]) pay = utils.format_balance( revenue[algorithm], self._Settings['gui']['units']) self.AppendItem([algo, devicesStr, speed, pay])
def SetBenchmark(self, values, remaining): self.Disable() s = '; '.join(utils.format_speed(speed).strip() for speed in values) self.ChangeValue(f'{s} ({remaining}) {self._StatusDot()}')
def SetBenchmark(self, values, remaining): self.Disable() s = '; '.join(utils.format_speed(speed).strip() for speed in values) self.ChangeValue('%s (%d)%s' % (s, remaining, self._StatusDot()))