Ejemplo n.º 1
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="hitPoint"></param>
        /// <param name="outlookBar"></param>
        public HitInfo(Point hitPoint,OutlookBar outlookBar)
        {
            Bar activeBar = outlookBar.ActiveBar;

            //--- First look if bar was hitted -------//
            for(int i=0;i<outlookBar.Bars.Count;i++){
                Bar bar = outlookBar.Bars[i];
                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;
                    }
                }
            }
            //----------------------------------------//
        }
Ejemplo n.º 2
0
 public Bars(OutlookBar parent)
 {
     m_pOutlookBar = parent;
 }