public void SetCurrency(PoolType poolType) { PoolType = poolType; Properties.Settings.Default.Currency = (int)poolType; Properties.Settings.Default.Save(); if (!PoolDispatcherTimer.IsEnabled) { PoolDispatcherTimer.Start(); } }
public override void LoaderControl_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e) { if (sender != null && Miner != null) { if (!((bool)e.NewValue)) { PoolDispatcherTimer.Stop(); } else { PoolDispatcherTimer.Start(); } } }
public void SetMiner(Models.Miner miner) { if (Miner != null && Miner.Id == miner.Id) { return; } if (PoolDispatcherTimer.IsEnabled) { PoolDispatcherTimer.Stop(); } if (BackgroundWorker.IsBusy) { BackgroundWorker.CancelAsync(); } Miner = miner; PoolDispatcherTimer.Interval = new TimeSpan(0, 0, 0); PoolDispatcherTimer.Start(); }
public void SetPool(Pool pool) { if (Pool != null && Pool.Id == pool.Id) { return; } if (PoolDispatcherTimer.IsEnabled) { PoolDispatcherTimer.Stop(); } if (BackgroundWorker.IsBusy) { BackgroundWorker.CancelAsync(); } Pool = pool; AccountName.Content = Pool.Name; PoolDispatcherTimer.Interval = new TimeSpan(0, 0, 0); PoolDispatcherTimer.Start(); }