// F e a t u r e s private void LoadAddressList() { ItemPanel_Values.BeginUpdate(); ItemPanel_Values.Items.Clear(); foreach (int addr in AddressList) { ItemPanel_Values.Items.Add(GetAddressItem(addr)); } ItemPanel_Values.EndUpdate(); ItemPanel_Values.Refresh(); }
private void SetSelectedAddress(int addr) { int index = GetSelectedIndex(); if (index > -1) { AddressList[index] = addr; UpdateButtonText(index, addr); ItemPanel_Values.Refresh(); } }
private void AddAddress(int addr) { // Add to addresslist AddressList.Add(addr); // Add list item var item = GetAddressItem(addr); ItemPanel_Values.Items.Add(item); ItemPanel_Values.SelectedItem = item; ItemPanel_Values.Refresh(); }
private void RemoveSelectedAddress() { int index = GetSelectedIndex(); if (index > -1) { // Remove from addresslist AddressList.RemoveAt(index); // Remove item ItemPanel_Values.Items.RemoveAt(index); ItemPanel_Values.SelectedIndex = -1; ItemPanel_Values.Refresh(); } }