public MainWindow() { InitializeComponent(); timerInterval = TimeSpan.FromSeconds(1); var timer = new DispatcherTimer { Interval = timerInterval }; timer.Tick += Timer_Tick; caffe = new Caffe(); visitorsQueue.ItemsSource = caffe.VisitorsQueue; tablesList.ItemsSource = caffe.Tables; timer.Start(); }
public Visitor(Caffe caffe) { this.caffe = caffe; workerThread = new Thread(WorkerProc); Name = string.Format("{0}, {1}", App.GetRandomName(), App.RandomizerNext(18, 65)); }