示例#1
0
        public DiningRoomWindow()
        {
            _diningRoomController = new DiningRoomController();
            InitializeComponent();

            _evOrderRepeater = new OperationEventRepeater <Order>();
            _evOrderRepeater.OperationEvent += DoOrderAlterations;
            _diningRoomController.AddOrderAlterEvent(_evOrderRepeater.Repeater);

            _evTableRepeater = new OperationEventRepeater <Table>();
            _evTableRepeater.OperationEvent += DoTableAlterations;
            _diningRoomController.AddTableAlterEvent(_evTableRepeater.Repeater);
        }
示例#2
0
        public DiningRoomTable(string tableName, DiningRoomController controller)
        {
            InitializeComponent();
            _diningRoomController = controller;
            _tableId = Convert.ToUInt32(tableName.Substring(8));

            _evOrderRepeater = new OperationEventRepeater <Order>();
            _evOrderRepeater.OperationEvent += DoOrderAlterations;
            _diningRoomController.AddOrderAlterEvent(_evOrderRepeater.Repeater);

            _evTableRepeater = new OperationEventRepeater <Table>();
            _evTableRepeater.OperationEvent += DoTableAlterations;
            _diningRoomController.AddTableAlterEvent(_evTableRepeater.Repeater);
        }