public Cash(Shop shop) { Shop = shop; StateId = 0; Byers=new List<Byer>(); CurrentByer = null; }
public Byer(Shop shop) { Random rnd = new Random(Environment.TickCount); TimeArrived = shop.Time; HandlingTime = new TimeSpan(0, 0, rnd.Next(shop.HandlingTimeFrom, shop.HandlingTimeTo)); PatienceTime = new TimeSpan(0, 0, rnd.Next(shop.PatienceTimeFrom, shop.PatienceTimeTo)); Money = rnd.Next(shop.ByerReceiptsFrom, shop.ByerReceiptsTo); }
public OptionsForm(Shop shop) { InitializeComponent(); _shop = shop; cmbTimeStep.SelectedItem = shop.TimeStep.ToString(); txtMinQueryLength.Text = shop.MinQueryLength.ToString(); txtMaxQueryLength.Text = shop.MaxQueryLength.ToString(); txtByersInMorning.Text = shop.ByersInMorning.ToString(); txtByersInDay.Text = shop.ByersInDay.ToString(); txtByersInEvening.Text = shop.ByersInEvening.ToString(); txtHandlingTimeFrom.Text = shop.HandlingTimeFrom.ToString(); txtHandlingTimeTo.Text = shop.HandlingTimeTo.ToString(); txtPatienceTimeFrom.Text = shop.PatienceTimeFrom.ToString(); txtPatienceTimeTo.Text = shop.PatienceTimeTo.ToString(); txtByerReceiptsFrom.Text = shop.ByerReceiptsFrom.ToString(); txtByerReceiptsTo.Text = shop.ByerReceiptsTo.ToString(); chkDiscountDay.Checked = shop.DiscountDay; }