private void Used_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            //allow to edit ports and save that
            InterfaceClass li = null;
            bool           removeInterfaceFromUsed = false;

            foreach (var iface in UsedInterfaces)
            {
                if (iface.ToString().Equals(LBUsed.SelectedItem.ToString()))
                {
                    li = iface;
                    if (LBUsed.SelectedItem != null)
                    {
                        BaseWindow editInterfaceWindow = new BaseWindow()
                        {
                            Owner = MyBaseWindow, MaxHeight = 75, Width = 300
                        };
                        EditInterface editInterface = new EditInterface(ref li, ref editInterfaceWindow);
                        editInterfaceWindow.ClientArea.Content = editInterface;

                        editInterfaceWindow.Closing += new CancelEventHandler(delegate(object o, System.ComponentModel.CancelEventArgs cancelEventArgs) {
                            iface.Ports             = editInterface.getPorts();
                            removeInterfaceFromUsed = !(bool)editInterface.checkBox.IsChecked;
                        });
                        editInterfaceWindow.ShowDialog();
                    }
                    break;
                }
            }
            if (removeInterfaceFromUsed && li != null)
            {
                AvaliableInterfaces.Add(li);
                UsedInterfaces.Remove(li);
            }
        }
 private void MIExtensions_Click(object sender, RoutedEventArgs e)
 {
     fileExtensionsWindow = new BaseWindow()
     {
         Owner = this
     };
     fileExtensionsWindow.ClientArea.Content = new FileExtensions(ref UsedExtensions, ref AvaliableExtensions, ref fileExtensionsWindow);
     fileExtensionsWindow.ShowDialog();
 }
        private void MISourceInterfaces_Click(object sender, RoutedEventArgs e)
        {
            networkSettingsWindow = new BaseWindow()
            {
                Owner = this
            };
            networkSettingsWindow.ClientArea.Content = new NetworkSettings(ref UsedInterfaces, ref AvaliableInterfaces, ref networkSettingsWindow);
            //stop sniffer
            if (MISniff.IsChecked)
            {
                MISniff.IsChecked = false;
                MISniff_Click(this, e);
            }

            networkSettingsWindow.ShowDialog();
        }