Exemplo n.º 1
0
        private void ShowToolTip()
        {
            int        index = -1;
            BarSubItem item  = null;

            for (int i = 0; i < ToolTipList.Count; i++)
            {
                item = ToolTipList[i].ToolTipItem;
                link = item.Links[0] as BarSubItemLink;
                if (ExampleHelper.GlyphContainsCursor(link))
                {
                    index = i;
                    break;
                }
            }

            if (index != -1)
            {
                ToolTipControllerShowEventArgs args = new ToolTipControllerShowEventArgs()
                {
                    ToolTipLocation = ToolTipLocation.Fixed, SuperTip = new SuperToolTip()
                };
                args.SuperTip.Items.Add(itemsAndLinks.ContainsKey(item) ? ToolTipList[index].RemoveToolTip : ToolTipList[index].AddToolTip);
                Point linkPoint = ExampleHelper.GetToolTipLocation(link);
                barManger.GetToolTipController().ShowHint(args, linkPoint);
                isToolTipShown = true;
            }
        }
Exemplo n.º 2
0
 private void HideToolTipIfRequired()
 {
     if (isToolTipShown && !ExampleHelper.GlyphContainsCursor(link))
     {
         HideToolTip();
     }
 }
Exemplo n.º 3
0
        private void InitContacts()
        {
            Image img = ExampleHelper.GetImage(false);

            barSubItem3.Glyph = img;
            barSubItem4.Glyph = img;
            barSubItem5.Glyph = img;
            barSubItem6.Glyph = img;
        }
Exemplo n.º 4
0
 private void AddToFavorites(ItemClickEventArgs e)
 {
     if (ExampleHelper.GlyphContainsCursor(e.Link as BarSubItemLink))
     {
         bool inFavorites = true;
         if (barSubItem2.ContainsItem(e.Item))
         {
             inFavorites = false;
             barSubItem2.ItemLinks.Remove(itemsAndLinks[e.Item]);
             itemsAndLinks.Remove(e.Item);
         }
         else
         {
             itemsAndLinks[e.Item] = barSubItem2.ItemLinks.Add(e.Item);
         }
         e.Item.Glyph = ExampleHelper.GetImage(inFavorites);
     }
 }