/// <summary> /// Creates a GuiVesselsManager to link and manage the given two ListViews. /// </summary> /// <param name="master">The master GuiTabsManager</param> /// <param name="vesselsList">The ListView to manage the vessel list</param> /// <param name="vesselsDetails">The ListView to manage the vessel details</param> /// <param name="vesselsCount">The Label to display the visible items count</param> public GuiVesselsManager(GuiTabsManager master, ListView vesselsList, Canvas vesselsDetails, Label vesselsCount) { Filter = new GuiVesselsFilter(); Master = master; Vessels = new List <KmlVessel>(); VesselsList = vesselsList; VesselsDetails = vesselsDetails; VesselsCount = vesselsCount; PartGraph = new GuiVesselsPartGraph(vesselsDetails, master); VesselsList.SelectionChanged += VesselsList_SelectionChanged; vesselsDetails.SizeChanged += vesselsDetails_SizeChanged; }
/// <summary> /// Creates a GuiVesselsManager to link and manage the given two ListViews. /// </summary> /// <param name="master">The master GuiTabsManager</param> /// <param name="vesselsList">The ListView to manage the vessel list</param> /// <param name="vesselsDetails">The ListView to manage the vessel details</param> /// <param name="vesselsCount">The Label to display the visible items count</param> public GuiVesselsManager(GuiTabsManager master, ListView vesselsList, Canvas vesselsDetails, Label vesselsCount) { Filter = new GuiVesselsFilter(); Master = master; Vessels = new List <KmlVessel>(); VesselsList = vesselsList; VesselsDetails = vesselsDetails; VesselsCount = vesselsCount; PartGraph = new GuiVesselsPartGraph(vesselsDetails, master); partGraphTimer = new DispatcherTimer(DispatcherPriority.Background); partGraphTimer.Tick += new EventHandler(partGraphTimer_Tick); partGraphTimer.Interval = new TimeSpan(0, 0, 0, 0, 200); partGraphTimer.Start(); // Replaced by pulling from partGraphTimer // TODO GuiVesselsManager: Delete the VesselsList Eventhandlers, if stay with DispatcherTimer // vesselsDetails.SizeChanged += vesselsDetails_SizeChanged; VesselsList.SelectionChanged += VesselsList_SelectionChanged; }