Esempio n. 1
0
 /// <summary>
 /// Select should be called from within other GuiManagers
 /// and wants this manager to get avtive and go to given item.
 /// </summary>
 /// <param name="item">The KmlItem to select</param>
 public void Select(KmlItem item)
 {
     foreach (GuiVesselsNode node in VesselsList.Items)
     {
         if (node.DataVessel == item)
         {
             VesselsList.SelectedItem = node;
             VesselsList.ScrollIntoView(node);
             Focus();
             return;
         }
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Select should be called from within other GuiManagers
 /// and wants this manager to get avtive and go to given item.
 /// </summary>
 /// <param name="item">The KmlItem to select</param>
 public void Select(KmlItem item)
 {
     foreach (GuiVesselsNode node in VesselsList.Items)
     {
         if (node.DataVessel == item)
         {
             // Force a refreh, by causing SelectionChanged to invoke
             VesselsList.SelectedItem = null;
             VesselsList.SelectedItem = node;
             VesselsList.ScrollIntoView(node);
             Focus();
             return;
         }
     }
 }