private void IniWacher() { Wacher = new HiveOSWacher(this, Config); Wacher.InformReceived += inf => Task.Run(() => this.InformReceived?.Invoke(inf)); Wacher.HiveStatusChanged += st => { switch (st) { case HiveOSWacher.HiveStatus.Normal: { CurrentStatus = RigStatus.works; ScanningStop(); } break; case HiveOSWacher.HiveStatus.LowHashrate: { CurrentStatus = RigStatus.online; ScanningStop(); } break; case HiveOSWacher.HiveStatus.WorkerOffline: { CurrentStatus = RigStatus.offline; ScanningStart(); } break; } }; Wacher.StartWach(); }
private protected override void WachingStop() { Wacher?.RemoveLinks(); Wacher = null; }