Exemplo n.º 1
0
        private void Add(object o, EventArgs e)
        {
            queueOnRefill.Enqueue(auto);
            tempNum     = NumberOfAuto;
            queueInMove = true;
            Timer waittimer = new Timer((100 + (AutoGenerationAndManagement._maximumautosinqueue - NumberOfAuto) * 100) * Pricing.Coefficient + 20);

            waittimer.AutoReset = false;
            waittimer.Elapsed  += CheckPositionInQueue;
            waittimer.Enabled   = true;
            _refillwindow.Animation(50 + (QueueLength / AutoGenerationAndManagement._maximumautosinqueue * (AutoGenerationAndManagement._maximumautosinqueue - NumberOfAuto)), 0, TimeSpan.FromSeconds(0.1 + (AutoGenerationAndManagement._maximumautosinqueue - NumberOfAuto) * 0.1), auto.ImageLink);
        }
Exemplo n.º 2
0
        private void CreateAuto(object o, EventArgs e)
        {
            timer.Interval = time * WorldTime.Coefficient() * Pricing.Coefficient * Pricing.WishBuyFuel();
            auto           = new Auto();
            SetImageOnAuto(auto);
            _refillwindow.Animation(150, 0, TimeSpan.FromSeconds(0.3), auto.ImageLink);
            Timer waittimer = new Timer(300 * Pricing.Coefficient + 20);

            waittimer.AutoReset = false;
            waittimer.Elapsed  += AboutTurningOnRefill;
            waittimer.Enabled   = true;
            CheckReadyProperty();
        }
Exemplo n.º 3
0
 private void EndingProvideFuel(object o, EventArgs e)
 {
     Occupied = false;
     _refillwindow.Animation(600, 300 + Number * 140, TimeSpan.FromSeconds(1.5), auto.ImageLink);
     _refillwindow.SetFuel(Number, "", "");
     _refillwindow.RemoveImage(auto.ImageLink);
     ListDispenserAndDequeue.QueueList[Number].DispenserWasReleased();
 }