public SniffWindow(IEnumerable<CanPort> OnPorts)
        {
            // Необъяснимый костыль для поправки локализации строковых конвертеров
            Language = System.Windows.Markup.XmlLanguage.GetLanguage(System.Globalization.CultureInfo.CurrentCulture.IetfLanguageTag);

            HighlightBrushes = new List<Brush>()
                            {
                                Brushes.Black,
                                Brushes.Tomato, Brushes.Orange, Brushes.OrangeRed,
                                Brushes.Green, Brushes.YellowGreen, Brushes.Plum,
                                Brushes.Blue, Brushes.Violet, Brushes.BlueViolet, Brushes.CadetBlue
                            };

            Frames = new FramesProcessor();
            Frames.NewItemAdEnd += new EventHandler<FramesProcessor.NewItemAdEndEventArgs>(Frames_NewItemAdEnd);

            InitializeComponent();

            ListeningPorts = new ObservableCollection<CanPort>();
            ListeningPorts.CollectionChanged += new NotifyCollectionChangedEventHandler(ListeningPorts_CollectionChanged);
            foreach (var lp in OnPorts) ListeningPorts.Add(lp);

            Dispatcher.BeginInvoke((Action<String>)(txt => FiltersEdit.Text = txt), Properties.Settings.Default.LastFilters);
        }
 void Frames_NewItemAdEnd(object sender, FramesProcessor.NewItemAdEndEventArgs e)
 {
     if (Autoscroll)
         LogGrid.ScrollIntoView(e.LastItem);
 }