Hide() public method

public Hide ( ) : void
return void
 /// <summary>
 /// Clear any existing selection in the view when we leave the launcher.
 /// </summary>
 /// <param name="e"></param>
 protected override void OnLeave(EventArgs e)
 {
     base.OnLeave(e);
     if (m_vectorRefView != null && m_vectorRefView.RootBox != null)
     {
         ICmPossibility[] possibilities = m_autoComplete.Possibilities.ToArray();
         if (possibilities.Length == 1)
         {
             ICmObject selected = m_vectorRefView.SelectedObject;
             if (possibilities[0] != selected)
             {
                 if (selected == null)
                 {
                     AddItem(possibilities[0]);
                 }
                 else
                 {
                     var newTargets = new List <ICmObject>();
                     foreach (ICmObject target in Targets)
                     {
                         newTargets.Add(target == selected ? possibilities[0] : target);
                     }
                     SetItems(newTargets);
                 }
             }
         }
         else
         {
             UpdateDisplayFromDatabase();
         }
     }
     m_autoComplete.Hide();
 }
 /// <summary>
 /// Clear any existing selection in the view when we leave the launcher.
 /// </summary>
 /// <param name="e"></param>
 protected override void OnLeave(EventArgs e)
 {
     base.OnLeave(e);
     if (m_atomicRefView != null && m_atomicRefView.RootBox != null)
     {
         if (AllowEmptyItem && m_atomicRefView.RootBox.DataAccess.get_StringProp(m_obj.Hvo, PossibilityAtomicReferenceView.kflidFake).Length == 0 && Target != null)
         {
             AddItem(null);
         }
         else
         {
             ICmPossibility[] possibilities = m_autoComplete.Possibilities.ToArray();
             if (possibilities.Length == 1)
             {
                 if (possibilities[0] != Target)
                 {
                     AddItem(possibilities[0]);
                 }
             }
             else
             {
                 UpdateDisplayFromDatabase();
             }
         }
     }
     m_autoComplete.Hide();
 }
Beispiel #3
0
 /// <summary>
 /// Clear any existing selection in the view when we leave the launcher.
 /// </summary>
 /// <param name="e"></param>
 protected override void OnLeave(EventArgs e)
 {
     base.OnLeave(e);
     if (m_atomicRefView != null && m_atomicRefView.RootBox != null)
     {
         if (AllowEmptyItem && m_atomicRefView.RootBox.DataAccess.get_StringProp(m_obj.Hvo, PossibilityAtomicReferenceView.kflidFake).Length == 0 && Target != null)
         {
             AddItem(null);
         }
         else
         {
             UpdateAutoComplete();
         }
     }
     m_autoComplete.Hide();
 }