public void Delete()
        {
            if (ToDeleteInterfaces.Count != 0)
            {
                foreach (var interfaceProfile in ToDeleteInterfaces)
                {
                    DeleteInterfaceProfiles(interfaceProfile);
                    InterfaceProfiles.Remove(interfaceProfile);
                }
            }

            UpdateInterfaceProfileListKey();

            if (ToDeleteNetworks.Count != 0)
            {
                foreach (var networkProfile in ToDeleteNetworks)
                {
                    DeleteNetworkProfiles(networkProfile);
                    NetworkProfiles.Remove(networkProfile);
                }
            }

            // Clear trackers
            ToDeleteInterfaces.Clear();
            ToDeleteNetworks.Clear();
        }
        public void LoadAll()
        {
            // Clear collections so no duplicate
            InterfaceProfiles.Clear();
            NetworkProfiles.Clear();
            ToDeleteInterfaces.Clear();
            ToDeleteNetworks.Clear();

            // Load all interfaces
            GetInterfaces();
            GetNetworks();
        }
        public void InterfaceUnchecked(RoutedEventArgs e)
        {
            var item = e.Source as CheckBox;

            if (item == null)
            {
                return;
            }
            var profile = item.DataContext as InterfaceProfile;

            if (profile != null && ToDeleteInterfaces.Contains(profile))
            {
                ToDeleteInterfaces.Remove(profile);
            }
        }