예제 #1
0
        public static void Load(this BbqItem item, BbqItemViewModel viewModel)
        {
            item.Id                = viewModel.Id;
            item.BbqEventId        = viewModel.BbqEventId;
            item.Name              = viewModel.Name;
            item.CurrentPhase      = viewModel.CurrentPhase;
            item.Weight            = viewModel.Weight;
            item.TargetTemperature = viewModel.TargetTemperature;
            item.CookStartTime     = viewModel.CookStartTime;
            item.ThermometerIndex  = viewModel.ThermometerIndex;

            // Get the item type from the definition
            item.ItemType = viewModel.Definition.ItemType;
        }
예제 #2
0
        private async void LoadDataCommand_Execute()
        {
            this.SmokerSettings = await this.smokerSettingsManager.GetSmokerSettingsAsync();

            // First get the event
            this.CurrentEvent = await this.eventSelectionService.SelectEventAsync();

            // Start the item logger
            this.loggerService.Start(this.CurrentEvent.Id);

            // Populate the Items for the event
            foreach (var item in await this.dataProvider.GetItemsForEventAsync(this.CurrentEvent.Id))
            {
                BbqItemViewModel vm = new BbqItemViewModel();
                vm.Load(item);
                this.Items.Add(vm);
            }
        }