OpenHome.Songcast.ConfigurationWindow.EventSubnetListCountChanged C# (CSharp) Метод

EventSubnetListCountChanged() публичный Метод

public EventSubnetListCountChanged ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Результат void
        void EventSubnetListCountChanged(object sender, EventArgs e)
        {
            if (iConfiguration.Subnet == 0)
            {
                if (iSubnetList.Count > 0)
                {
                    comboBoxNetwork.SelectedIndex = 0;
                    return;
                }
            }

            int index = 0;

            foreach (Subnet subnet in iSubnetList)
            {
                if (subnet.Address == iConfiguration.Subnet)
                {
                    comboBoxNetwork.SelectedIndex = index;
                    return;
                }

                index++;
            }

            comboBoxNetwork.SelectedIndex = -1;
        }