public void GenerateAutos() { time = _timeinterval * 50 * Pricing.WishBuyFuel(); timer = new Timer(time * Pricing.Coefficient); timer.Elapsed += CreateAuto; timer.AutoReset = true; timer.Enabled = true; }
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(); }