Beispiel #1
0
        public void AddNewPack(onepack o)
        {
            if (!bSimulate)
            {
                total_packs++;
                total_weights += o.weight;
            }
            else
            {
                total_sim_weights += o.weight;
                total_sim_packs++;
            }
            last_one_pack = o;

            packhist.Add(o);
            lastmin = DateTime.Now.AddMinutes(-1);
            packhist.RemoveAll(new Predicate <onepack>(screen));
            speed = (UInt32)packhist.Count;
            if (bSimulate)
            {
                return;
            }
            if (total_packs % 100 == 1) //update record for every 100 packs
            {
                ProdHistory.UpdateRecord(this);
                EngWnd.DecreasePacker(100);
            }
        }
Beispiel #2
0
        public void StopRun()
        {
            NodeMaster.Action(new byte[] { this.bot_addr }, "stop");
            NodeMaster.Action(this.wn_addrs, "stop");
            Thread.Sleep(300);
            nc.Stop(100);
            status = PackerStatus.IDLE;

            if (!bSimulate)
            {
                ProdHistory.UpdateRecord(this);
                ResetHistory();
            }
            else
            {
                total_sim_packs   = 0;
                total_sim_weights = 0;
            }
        }