/// <summary> Constructor. </summary>
        /// <param name="owner">	   The owner. </param>
        /// <param name="item">		   The item. </param>
        /// <param name="index">	   The index. </param>
        public ELLSequenceItemViewModel(ISequenceRoot owner, ELLSequenceItemXML item, int index)
        {
            _owner             = owner;
            _sequenceItem      = item;
            Index              = index;
            _addressCollection = new CheckableAddressCollection(_owner.DeviceTypes.Keys.OrderBy(ch => ch));

            List <char> currentAddresses = new List <char>();

            foreach (char address in item.Addresses)
            {
                if (_owner.DeviceTypes.ContainsKey(address))
                {
                    currentAddresses.Add(address);
                    _addressCollection.Items.First(i => i.Value == address).IsChecked = true;
                }
            }
            if (currentAddresses.Count == 0)
            {
                currentAddresses.Add(_owner.DeviceTypes.Keys.First());
                _addressCollection.Items.First(i => i.Value == _owner.DeviceTypes.Keys.First()).IsChecked = true;
            }
            _sequenceItem.Addresses = currentAddresses;
            UpdateOptions();

            _addressCollection.ItemUpdate += AddressCollection_ItemUpdate;
            _owner = owner;
        }
 /// <summary> Default constructor. </summary>
 public ELLSequenceItemViewModel()
 {
     _sequenceItem                  = new ELLSequenceItemXML();
     _addressCollection             = new CheckableAddressCollection(new List <char>());
     _addressCollection.ItemUpdate += AddressCollection_ItemUpdate;
 }