void comboBoxTypes_SelectedIndexChanged(object sender, EventArgs e)
{
var index = this.comboBoxTypes.SelectedIndex;
if(Enum.IsDefined(typeof(MeasType), index))
{
MeasType type = (MeasType) Enum.ToObject(typeof(MeasType), index);
var collection = cache.GetCollection(type);
if (collection != null)
{
if (activeCollection != null)
{
activeCollection.RemoveObserver(this.measurementView);
}
activeCollection = collection;
collection.AddObserver(this.measurementView);
}
}
}