Beispiel #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="hitPoint"></param>
        /// <param name="outlookBar"></param>
        public HitInfo(Point hitPoint, WOutlookBar outlookBar)
        {
            Bar activeBar = outlookBar.ActiveBar;

            //--- First look if bar was hitted -------//
            foreach (Bar bar in outlookBar.Bars)
            {
                if (bar.BarRect.Contains(hitPoint))
                {
                    m_HittedObject = HittedObject.Bar;
                    m_HittedBar    = bar;
                    return;
                }
            }
            //----------------------------------------//

            //--- look if scroll buttons hitted ------//
            if (outlookBar.IsUpScrollBtnVisible && outlookBar.UpScrollBtnRect.Contains(hitPoint))
            {
                m_HittedObject = HittedObject.UpScrollButton;
                return;
            }

            if (outlookBar.IsDownScrollBtnVisible && outlookBar.DownScrollBtnRect.Contains(hitPoint))
            {
                m_HittedObject = HittedObject.DownScrollButton;
                return;
            }
            //----------------------------------------//

            //--- look if bar item hitted -----------//
            if (activeBar != null)
            {
                for (int it = activeBar.FirstVisibleIndex; it < activeBar.Items.Count; it++)
                {
                    Item item = activeBar.Items[it];
                    if (item.Bounds.Contains(hitPoint) && activeBar.BarClientRect.Contains(hitPoint))
                    {
                        m_HittedObject = HittedObject.Item;
                        m_HittedItem   = item;
                        return;
                    }
                }
            }
            //----------------------------------------//
        }
Beispiel #2
0
 public Bars(WOutlookBar parent)
 {
     m_pOutlookBar = parent;
 }