Пример #1
0
        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();
        }
Пример #2
0
 public Visitor(Caffe caffe)
 {
     this.caffe   = caffe;
     workerThread = new Thread(WorkerProc);
     Name         = string.Format("{0}, {1}", App.GetRandomName(), App.RandomizerNext(18, 65));
 }