Exemplo n.º 1
0
        public void UpdateInterfaceList()
        {
            ListBoxInterfaces.Items.Clear();
            ListBoxInterfaces.IsLoaded = true;
            var names = actProfile.GetNetworkInterfaceNames();

            foreach (var name in names)
            {
                ListBoxInterfaces.Items.Add(name);
                ListBoxInterfaces.SetItemChecked(ListBoxInterfaces.Items.Count - 1, actProfile.IsNetworkInterfaceInProfile(name));
            }

            if (ListBoxInterfaces.Items.Count > 0)
            {
                ListBoxInterfaces.SetSelected(0, true);
            }
        }