private void limitListControl_OnEdit()
{
if (limitListControl.HasSelected)
{
var limit = limitListControl.SelectedObject as Limit;
if (limit != null)
{
var form = new LimitForm(limit);
if (DialogResult.OK == form.ShowDialog())
{
limit = form.Limit;
ListViewItem lvi = limitListControl.SelectedItems[0];
UpdateLimitInListView(lvi, limit);
}
}
}
}