예제 #1
0
 protected override void CreateChildElements()
 {
     this.bodyElement           = new RangeSelectorBodyElement();
     this.scrollSelectorElement = new RangeSelectorScrollElement();
     this.Children.Add((RadElement)this.bodyElement);
     this.Children.Add((RadElement)this.scrollSelectorElement);
 }
예제 #2
0
        protected override void OnMouseMove(MouseEventArgs e)
        {
            RangeSelectorScrollElement scrollSelectorElement = this.RangeSelectorElement.ScrollSelectorElement;

            if (scrollSelectorElement.ToolTip == null)
            {
                scrollSelectorElement.ToolTip = this.ElementTree.ComponentTreeHandler.Behavior.ToolTip;
                scrollSelectorElement.ToolTip.InitialDelay = 0;
            }
            if ((e.Button & MouseButtons.Left) == MouseButtons.Left)
            {
                this.ticks = DateTime.Now.Ticks;
                if (this.ticks - this.prev > this.RangeSelectorElement.LayoutsRefreshRateInTicks)
                {
                    this.MoveRange(e);
                }
                this.prev = this.ticks;
            }
            if (!((PointF)e.Location == this.oldLocation) && this.ElementTree.ComponentTreeHandler.Behavior.ShowItemToolTips)
            {
                string text = string.Format(scrollSelectorElement.ToolTipSelectionFormatString, (object)scrollSelectorElement.Start, (object)scrollSelectorElement.End);
                scrollSelectorElement.ToolTip.Show(text, (IWin32Window)this.ElementTree.Control, e.X + scrollSelectorElement.ToolTipOffset.X, e.Y + scrollSelectorElement.ToolTipOffset.Y, scrollSelectorElement.ToolTipDuration);
            }
            this.oldLocation = (PointF)e.Location;
        }