public async Task <NutritionTable> GetTableAsync(byte[] picture, uint width, uint height) { var ocrString = await OCRAsync(picture, width, height); await new Windows.UI.Popups.MessageDialog(ocrString).ShowAsync(); return(NutritionTable.Parse(ocrString)); }
public void Update(NutritionTable nutritionTable) { var balance = NutritionService.GetBalance(nutritionTable); KCals = balance.KCals; CarbPercentage = balance.CarbPercentage; ProteinPercentage = balance.ProteinPercentage; FatPercentage = balance.FatPercentage; CarbKCals = balance.CarbsKCals; ProteinKCals = balance.ProteinKCals; FatKCals = balance.FatKCals; }
void Done() { var nutritionTable = new NutritionTable { Carbs = Carbs.Value, SugarCarbs = SugarCarbs.Value, Protein = Protein.Value, Fat = Fat.Value, SaturatedFats = SaturatedFats.Value, Salt = Salt.Value, }; ShowViewModel <InfoViewModel>(nutritionTable); }
public IHealthBalance GetBalance(NutritionTable table) { return(new HealthBalance(table)); }
public double GetScore(NutritionTable table) { throw new NotImplementedException(); }
public HealthBalance(NutritionTable table) { this.nutritionTable = table; }