public float GetValueForColor(HorseColor color)
 {
     float result = 1.0f;
     _horseColorValues.TryGetValue(color, out result);
     return result;
 }
 public ColorWeight(HorseColor color, float weight)
 {
     Color = color;
     Weight = weight;
 }
        void UpdateHorsesColors(HorseColor color)
        {
            var selected = objectListView1.SelectedObjects.Cast<Horse>().ToArray();

            if (selected.Length > 2)
            {
                if (System.Windows.Forms.MessageBox.Show("This will set color for following horses:\r\n" +
                    string.Join(", ", (IEnumerable<Horse>)selected) + "\r\nContinue?",
                    "Confirm", System.Windows.Forms.MessageBoxButtons.OKCancel) != System.Windows.Forms.DialogResult.OK)
                {
                    return;
                }
            }

            foreach (var horse in selected)
            {
                horse.Color = color;
            }
            Context.SubmitChangesToHorses();
        }