protected bool Equals(Range other)
		{
			return From == other.From && To == other.To && Price == other.Price;
		}
		private void BtnEditClick(object sender, EventArgs e)
		{
			if (_lbRanges.Items.Count > 0)
				if (_lbRanges.SelectedItem != null)
				{
					var range = new Range(_lbRanges.SelectedValue);
					_txtRangeFrom.Text = range.From.ToString();
					_txtRangeTo.Text = range.To == 0 ? "" : range.To.ToString();

					decimal price;
					decimal.TryParse(range.Price.ToString(), out price);
					var value = price/100m;

					_txtPrice.Text = value.ToString("F");
					_lbRanges.Items.Remove(_lbRanges.SelectedItem);
				}
		}
		private int CompareListItems(ListItem li1, ListItem li2)
		{
			var range1 = new Range(li1.Value);
			var range2 = new Range(li2.Value);

			return range1.From != range2.From ? range1.From - range2.From : (range1.To != range2.To ? range1.To - range2.To : range1.Price - range2.Price);
		}
		private void BtnAddClick(object sender, EventArgs e)
		{
			var amount = string.Empty;
			float price;
			if (_data != null && float.TryParse(_txtPrice.Text, out price))
			{
				amount = Math.Round(price*100).ToString();
			}

			var range = new Range(_txtRangeFrom.Text, _txtRangeTo.Text, amount);

			if (!_lbRanges.Items.Cast<ListItem>().Select(item => new Range(item.Value)).Contains(range))
				_lbRanges.Items.Add(range.ToListItem());

			SortItems();
			Save();
		}