Ejemplo n.º 1
0
 public void StartMining(IMiner miner)
 {
     StopMining();
     MiningCommand = MinerProgramCommand.Run;
     SelectedMiner = miner;
     StartMining();
 }
Ejemplo n.º 2
0
 public void StopMining()
 {
     try
     {
         m_keepMining = false;
         Alarm.Clear();
         MiningCommand = MinerProgramCommand.Stop;
         //clear both queues so that threads wint start running them
         DownloadingQueue.Clear();
         //sometimes if downloaidnf thread is stuck in a long download and we want to stop we might hav to abort thread
         if (m_Downloading)
         {
             m_downloadingThread.Abort();
         }
         MiningQueue.Clear();
         RunningMiners.Clear();
         if (ActiveMiner != null)
         {
             ActiveMiner.StopMining();
             ActiveMiner = null;
         }
     }
     catch (Exception e)
     {
     }
 }
Ejemplo n.º 3
0
 public void StartMining(IMiner miner)
 {
     StopMining();
     MiningCommand = MinerProgramCommand.Run;
     ActiveMiner   = miner;
     StartMining();
 }
Ejemplo n.º 4
0
        public DigibyteMiner()
        {
            MiningQueue      = new TSQueue <IMinerProgram>();
            DownloadingQueue = new TSQueue <IMinerProgram>();
            RunningMiners    = new TSList <IMinerProgram>();
            MiningCommand    = MinerProgramCommand.Stop;

            m_minerThread       = new Thread(new ParameterizedThreadStart(MiningThread));
            m_downloadingThread = new Thread(new ParameterizedThreadStart(DownLoadingThread));
            InitiateThreads();
        }