private void showDetectorDetails(StackPanel Detectorsdetailsbox, TunnelListItem tunnelListItem) { if (tunnelListItem == null) { return; } Detectorsdetailsbox.Visibility = System.Windows.Visibility.Visible; DetectorDataItem item = (DetectorDataItem)tunnelListItem; detectorslist.ItemsSource = item.DetectorList; detectorslist.Items.Refresh(); }
private void showTravelDetails(StackPanel traveltimedetailsbox, TunnelListItem tunnelListItem) { if (tunnelListItem == null) { return; } traveltimedetailsbox.Visibility = System.Windows.Visibility.Visible; TravelTime item = (TravelTime)tunnelListItem; travelSectionID.Text = item.SectionID.ToString(); travelSectiontime.Text = item.SectionTravelTime.ToString(); travelDirection.Text = item.Direction; travelSectionDescription.Text = item.SectionDescription; }
private void showVMSDetails(StackPanel VMSdetailsbox, TunnelListItem tunnelListItem) { if (tunnelListItem == null) { return; } VMSdetailsbox.Visibility = System.Windows.Visibility.Visible; VMSGMessagesItem item = (VMSGMessagesItem)tunnelListItem; VMSGroupID.Text = item.VMSGroupID; VMSMsgID.Text = item.VMSMsgID.ToString(); VMSGroupName.Text = item.GroupName; VMSHebrewText.Text = item.HebrewText; VMSEnglishText.Text = item.EnglishText; VMSEmergency.Text = item.Emergency; }
private void listbox_SelectionChanged(object sender, SelectionChangedEventArgs e) { ListBox listbox = sender as ListBox; TunnelListItem item = listbox.SelectedItem as TunnelListItem; switch (listbox.Name) { case "VMSlistbox": showVMSDetails(VMSdetailsbox, item); break; case "traveltimelistbox": showTravelDetails(traveltimedetailsbox, item); break; case "Detectorslistbox": showDetectorDetails(Detectorsdetailsbox, item); break; } }
private TunnelListItem SearchInList(LogFileItem logitem, ListBox list) { TunnelListItem tempitem = null; list.Items.Refresh(); foreach (TunnelListItem item in list.Items) { if (logitem._newtime.Ticks == item._newtime.Ticks) { tempitem = item; list.SelectedItem = item; list.ScrollIntoView(item); break; } } if (list.Items.Count > 0) { list.Visibility = System.Windows.Visibility.Visible; } return(tempitem); }