Exemple #1
0
 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)
Exemple #2
0
 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])
Exemple #3
0
 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()}')
Exemple #4
0
 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()))