Esempio n. 1
0
        public void SetCurrency(PoolType poolType)
        {
            PoolType = poolType;

            Properties.Settings.Default.Currency = (int)poolType;
            Properties.Settings.Default.Save();

            if (!PoolDispatcherTimer.IsEnabled)
            {
                PoolDispatcherTimer.Start();
            }
        }
Esempio n. 2
0
 public override void LoaderControl_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
 {
     if (sender != null && Miner != null)
     {
         if (!((bool)e.NewValue))
         {
             PoolDispatcherTimer.Stop();
         }
         else
         {
             PoolDispatcherTimer.Start();
         }
     }
 }
Esempio n. 3
0
        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();
        }
Esempio n. 4
0
        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();
        }