<commit_before>﻿using System.Windows.Controls;

namespace food_tracker {
    public class FoodComboItem : ComboBoxItem, IListItems {

        public double calories { get; set; }
        public double fats { get; set; }
        public double saturatedFat { get; set; }
        public double carbohydrates { get; set; }
        public double sugar { get; set; }
        public double protein { get; set; }
        public double salt { get; set; }
        public double fibre { get; set; }
        public string name { get; set; }
        public double amount { get; set; }
        public int nutritionId { get; set; }

        public FoodComboItem() : base() { }

        public FoodComboItem(string name, int itemId, double cals, double fats, double satFat, double carbs, double sugars, double protein, double salt, double fibre, double amount) {
            this.name = name;
            this.calories = cals;
            this.fats = fats;
            this.salt = salt;
            this.saturatedFat = satFat;
            this.carbohydrates = carbs;
            this.sugar = sugars;
            this.protein = protein;
            this.fibre = fibre;
            this.nutritionId = itemId;
            this.amount = amount;
        }

        public override string ToString() {
            return $"{this.name} - {this.amount}";
        }
    }
}<commit_msg>Combolist item will now just display name if amount is  empty.<commit_after>﻿using System.Windows.Controls;

namespace food_tracker {
    public class FoodComboItem : ComboBoxItem, IListItems {

        public double calories { get; set; }
        public double fats { get; set; }
        public double saturatedFat { get; set; }
        public double carbohydrates { get; set; }
        public double sugar { get; set; }
        public double protein { get; set; }
        public double salt { get; set; }
        public double fibre { get; set; }
        public string name { get; set; }
        public double amount { get; set; }
        public int nutritionId { get; set; }

        public FoodComboItem() : base() { }

        public FoodComboItem(string name, int itemId, double cals, double fats, double satFat, double carbs, double sugars, double protein, double salt, double fibre, double amount) {
            this.name = name;
            this.calories = cals;
            this.fats = fats;
            this.salt = salt;
            this.saturatedFat = satFat;
            this.carbohydrates = carbs;
            this.sugar = sugars;
            this.protein = protein;
            this.fibre = fibre;
            this.nutritionId = itemId;
            this.amount = amount;
        }

        public override string ToString() {
            if (this.amount <= 0) {
                return this.name;
            } else {
                return $"{this.name} - {this.amount}";
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.0917303683113273, 'fraction_numerical': 0.00034746351633078526, 'mean_word_length': 1.8448616600790513, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5260184', 'n_tokens_mistral': 813, 'n_tokens_neox': 760, 'n_words': 254}