private void toolTipController1_BeforeShow(object sender, ToolTipControllerShowEventArgs e)
        {
            ToolTipController   controller  = sender as ToolTipController;
            AppointmentViewInfo aptViewInfo = controller.ActiveObject as AppointmentViewInfo;

            if (aptViewInfo == null)
            {
                return;
            }

            if (toolTipController1.ToolTipType == ToolTipType.Standard)
            {
                e.IconType = ToolTipIconType.Information;
                e.ToolTip  = aptViewInfo.Description;
            }

            if (toolTipController1.ToolTipType == ToolTipType.SuperTip)
            {
                SuperToolTip          SuperTip = new SuperToolTip();
                SuperToolTipSetupArgs args     = new SuperToolTipSetupArgs();
                args.Title.Text    = "Info";
                args.Title.Font    = new Font("Times New Roman", 14);
                args.Contents.Text = aptViewInfo.Description;
                //args.Contents.Image = resImage;
                args.ShowFooterSeparator = true;
                args.Footer.Font         = new Font("Comic Sans MS", 8);
                args.Footer.Text         = "SuperTip";
                SuperTip.Setup(args);
                e.SuperTip = SuperTip;
            }
        }
예제 #2
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;
            }
        }
예제 #3
0
        /// <summary>
        /// 创建显示ToolTip事件实例
        /// </summary>
        /// <param name="tooltipText"></param>
        /// <returns></returns>
        private ToolTipControllerShowEventArgs CreateShowArgs(string tooltipText)
        {
            ToolTipControllerShowEventArgs args = toolTipController1.CreateShowArgs();

            args.ToolTip = tooltipText;
            return(args);
        }
예제 #4
0
        void ShowItemSuperTip(BarItemLink item)
        {
            var args = new ToolTipControllerShowEventArgs {
                ToolTipType = ToolTipType.SuperTip,
                SuperTip    = new SuperToolTip()
            };

            foreach (var choiceActionItem in _newObjectAction.Items)
            {
                var formatTestAction = EasyTestTagHelper.FormatTestAction(_newObjectAction.Caption + '.' + choiceActionItem.GetItemPath());
                if (formatTestAction == item.Item.Tag as string)
                {
                    var data = choiceActionItem.Data;
                    if (data != null)
                    {
                        var newObjectActionTooltip =
                            ((IModelClassNewObjectActionTooltip)
                             _newObjectAction.Application.Model.BOModel.GetClass((Type)data)).NewObjectActionTooltip;
                        if (!string.IsNullOrEmpty(newObjectActionTooltip))
                        {
                            args.SuperTip.Items.Add(newObjectActionTooltip);
                            ToolTipController.DefaultController.ShowHint(args);
                        }
                    }
                }
            }
        }
예제 #5
0
        private void ShowToolTipsGrid()
        {
            toolinfo = new ToolTipControllerShowEventArgs();
            detailView detailData = gridMain.GetFocusedRow() as detailView;

            if (detailData != null)
            {
                toolinfo.AllowHtmlText = DefaultBoolean.True;
                toolinfo.ToolTip       = NewLineStr(detailData.detail.Replace('#', '\r').Replace('^', '\n'), 50);
                toolinfo.Rounded       = true; //圆角
                toolinfo.RoundRadius   = 7;    //圆角率
                toolinfo.ToolTipType   = ToolTipType.Standard;
                SetToolTipsSetting(toolinfo, pubDefines.toolTipsType.type_GridDetail);
                if (toolinfo.Title != "" || toolinfo.ToolTip != "")
                {
                    Point pLocate = new Point(MousePosition.X, MousePosition.Y); // 0,0 是左上角
                    //pLocate = gridControlGrid.PointToScreen(pLocate); // p.X, p.Y 是控件左上角在屏幕上的坐标
                    SetToolTipsControllerSetting(toolTipControllerGrid, pubDefines.toolTipsType.type_GridDetail);
                    if (toolinfo.ToolTip != "")
                    {
                        toolTipControllerGrid.ShowHint(toolinfo, pLocate);
                    }
                    else
                    {
                        toolTipControllerGrid.HideHint();
                    }
                }
            }
        }
예제 #6
0
        private void onObjectHotTracked(HotTrackEventArgs e)
        {
            var series = e.Series();
            var point  = e.HitInfo.SeriesPoint;

            if (series == null || point == null || !point.Values.Any())
            {
                hideToolTip(e);
                return;
            }

            var value     = point.Values[0];
            var intValue  = Math.Ceiling(point.Values[0]);
            var valueText = _doubleFormatter.Format(point.Values[0]);

            if (value == intValue)
            {
                valueText = _intFormatter.Format(Convert.ToInt32(intValue));
            }

            var superToolTip = _toolTipCreator.CreateToolTip($"{AxisY.Title.Text}: {valueText}", series.Name);
            var args         = new ToolTipControllerShowEventArgs {
                SuperTip = superToolTip
            };

            ToolTipController.ShowHint(args);
        }
        private void toolTipController1_BeforeShow(object sender, ToolTipControllerShowEventArgs e)
        {
            TreeMapItem item = e.SelectedObject as TreeMapItem;

            if (item == null)
            {
                return;
            }
            if (item.IsGroup)
            {
                return;
            }

            SuperToolTip superTip = new SuperToolTip {
                AllowHtmlText = DefaultBoolean.True
            };

            superTip.Items.Add(new ToolTipTitleItem {
                Text = String.Format("{0} statistics", item.Label)
            });
            superTip.Items.Add(new ToolTipSeparatorItem());
            superTip.Items.Add(new ToolTipItem {
                Text = String.Format("<b>GDP (2014):</b> {0:C1} trillions", item.Value)
            });
            e.SuperTip = superTip;
        }
예제 #8
0
        void mapTooltipController_BeforeShow(object sender, ToolTipControllerShowEventArgs e)
        {
            if (!(e.SelectedObject is MapPath))
            {
                return;
            }
            var mapPath = (MapPath)e.SelectedObject;

            SuperToolTip superTip = new SuperToolTip()
            {
                MaxWidth = 350, AllowHtmlText = DefaultBoolean.True
            };

            e.AutoHide    = false;
            e.ToolTipType = ToolTipType.SuperTip;

            if (IsCountyMode)
            {
                if (!GenerateCountyToolTip(CountyFromMapAttribute(mapPath.Attributes), superTip))
                {
                    e.Show = false;
                }
            }
            else
            {
                if (!GenerateStateToolTip(StateFromMapAttribute(mapPath.Attributes), superTip))
                {
                    e.Show = false;
                }
            }
            e.SuperTip = superTip;
        }
예제 #9
0
        void gridTooltipController_BeforeShow(object sender, ToolTipControllerShowEventArgs e)
        {
            ListVoteResults lr = e.SelectedObject as ListVoteResults;

            if (lr == null)
            {
                return;
            }
            SuperToolTip superTip = new SuperToolTip()
            {
                MaxWidth = 350, AllowHtmlText = DefaultBoolean.True
            };

            e.AutoHide    = false;
            e.ToolTipType = ToolTipType.SuperTip;
            e.Show        = false;
            if (IsCountyMode && !string.IsNullOrEmpty(lr.CountyFIPS))
            {
                e.Show = GenerateCountyToolTip(CountyInfo.GetCounty(lr.CountyFIPS), superTip);
            }

            if (!IsCountyMode)
            {
                e.Show = GenerateStateToolTip(StateInfo.GetState(lr.State), superTip);
            }

            e.SuperTip = superTip;
        }
예제 #10
0
 public static void ShowTip(this Control ctl, string content, ToolTipLocation tipLocation = ToolTipLocation.BottomCenter, ToolTipType toolTipType = ToolTipType.Standard, int showTime = 2000, bool isAutoHide = true, ToolTipIconType tipIconType = ToolTipIconType.Application, ImageList imgList = null, int imgIndex = 0)
 {
     try
     {
         var myToolTipClt = new ToolTipController();
         ToolTipControllerShowEventArgs args = myToolTipClt.CreateShowArgs();
         myToolTipClt.ImageList            = imgList;
         myToolTipClt.ImageIndex           = (imgList == null ? 0 : imgIndex);
         args.AutoHide                     = isAutoHide;
         myToolTipClt.Appearance.BackColor = Color.FromArgb(254, 254, 254);
         myToolTipClt.ShowBeak             = true;
         myToolTipClt.AllowHtmlText        = true;
         myToolTipClt.ShowShadow           = true;
         myToolTipClt.Rounded              = true;
         myToolTipClt.AutoPopDelay         = (showTime == 0 ? 2000 : showTime);
         myToolTipClt.SetToolTip(ctl, content);
         myToolTipClt.SetToolTipIconType(ctl, tipIconType);
         myToolTipClt.Active      = true;
         myToolTipClt.ToolTipType = toolTipType;
         myToolTipClt.HideHint();
         myToolTipClt.ShowHint(content, null, ctl, tipLocation);
     }
     catch (Exception ex)
     {
         LogUtil.WriteException(ex);
     }
 }
예제 #11
0
        private void ToolTipController_BeforeShow(object sender, ToolTipControllerShowEventArgs e)
        {
            ToolTipController   controller  = sender as ToolTipController;
            AppointmentViewInfo aptViewInfo = controller.ActiveObject as AppointmentViewInfo;

            if (aptViewInfo == null)
            {
                return;
            }

            if (toolTipController.ToolTipType == ToolTipType.SuperTip)
            {
                var selectedObject = e.SelectedObject as TimeLineAppointmentViewInfo;
                var appointment    = selectedObject.Appointment;

                SuperToolTip          SuperTip = new SuperToolTip();
                SuperToolTipSetupArgs args     = new SuperToolTipSetupArgs();
                var font = new Font("Tahoma", 10);
                args.Title.Text          = appointment.Start.ToString("g") + " - " + appointment.End.ToString("g");
                args.Title.Font          = font;
                args.Contents.Text       = aptViewInfo.DisplayText + Environment.NewLine + aptViewInfo.Description + Environment.NewLine + "Кол-во:" + appointment.CustomFields["PassengersCount"]?.ToString();
                args.Contents.Font       = font;
                args.Contents.Image      = Properties.Resources.info_32x32;
                args.ShowFooterSeparator = true;
                args.Footer.Font         = font;
                args.Footer.Text         = appointment.CustomFields["TripTypeName"]?.ToString();
                SuperTip.Setup(args);
                e.SuperTip = SuperTip;
            }
        }
예제 #12
0
        private Boolean Check(Boolean Show)
        {
            Boolean Check = true;

            if (!Edit_AC.Checked && !String.IsNullOrEmpty(Edit_DeviceNumber.Text))
            {
                if (DeviceNumberId.IsEmpty())
                {
                    Edit_DeviceNumber.ErrorText          = DeviceNumberTooltTip;
                    Edit_DeviceNumber.ErrorIconAlignment = ErrorIconAlignment.MiddleRight;
                    Check = false;
                }
                if (!Check || Show)
                {
                    ToolTip t = new ToolTip();
                    t.ToolTipTitle = DeviceNumber;
                    t.ToolTipIcon  = DeviceNumberId.IsEmpty() ? ToolTipIcon.Error : ToolTipIcon.Info;
                    t.Show(DeviceNumberTooltTip, Edit_DeviceNumber, 3000);
                }
            }
            else
            {
                DeviceNumber                = "";
                DeviceNumberId              = Guid.Empty;
                DeviceNumberTooltTip        = "";
                Edit_DeviceNumber.ErrorText = "";
                WarrantyEndDate             = null;
            }
            for (Int32 i = 0; i < DataList.Count; i++)
            {
                DataList[i].Validate();
            }

            View_Sensors.RefreshData();
            if (DataList.Any(sensor => !sensor.Valid))
            {
                Int32 i = DataList.IndexOf(DataList.First(sensor => !sensor.Valid));
                ToolTipControllerShowEventArgs Args = Controller_ToolTip.CreateShowArgs();
                Args.SelectedControl = Control_Sensors;
                Args.ToolTipType     = ToolTipType.SuperTip;
                Args.SuperTip        = new SuperToolTip();
                SuperToolTipSetupArgs toolTipArgs = new SuperToolTipSetupArgs();
                toolTipArgs.Title.Text    = DataList[i].Sensor ?? "<Пусто>";
                toolTipArgs.Contents.Text = DataList[i].ToolTip;
                Args.SuperTip.Setup(toolTipArgs);
                Args.IconType = DataList[i].Valid ? ToolTipIconType.Information : ToolTipIconType.Error;
                GridRowInfo RowInfo = (View_Sensors.GetViewInfo() as GridViewInfo).GetGridRowInfo(i);
                if (RowInfo.IsNull())
                {
                    Controller_ToolTip.ShowHint(Args, Control_Sensors);
                }
                else
                {
                    Controller_ToolTip.ShowHint(Args, Control_Sensors.GetLocation() + (Size)RowInfo.TotalBounds.Location + RowInfo.TotalBounds.Size);
                }
                return(false);
            }
            return(Check);
        }
예제 #13
0
        private void ShowItemSuperTip(BarItemLink item)
        {
            ToolTipControllerShowEventArgs args = new ToolTipControllerShowEventArgs();

            args.ToolTipType = ToolTipType.SuperTip;
            args.SuperTip    = new SuperToolTip();
            args.SuperTip.Items.Add(item.Item.Hint);
            ToolTipController.DefaultController.ShowHint(args);
        }
예제 #14
0
        private void toolTipController1_BeforeShow(object sender, ToolTipControllerShowEventArgs e)
        {
            ToolTipController     controller = sender as ToolTipController;
            SchedulerViewCellBase cell       = controller.ActiveObject as SchedulerViewCellBase;

            if (cell != null)
            {
                e.ToolTip = cell.Interval.ToString();
            }
        }
        private void toolTipLocationControl_ToolTipLocationChanged(string senderName)
        {
            ToolTipControllerShowEventArgs args = toolTipController1.CreateShowArgs();

            args.ToolTip    = senderName;
            args.IconType   = ToolTipIconType.Information;
            args.ImageIndex = -1;
            args.IconSize   = ToolTipIconSize.Small;
            toolTipController1.ShowHint(args);
        }
        protected virtual void MyShowHint(Point position, ToolTipLocation location)
        {
            if (GridControl == null)
            {
                return;
            }
            ToolTipControllerShowEventArgs tool = GridControl.ToolTipController.CreateShowArgs();

            tool.ToolTip         = GetToolTipText();
            tool.SelectedObject  = this;
            tool.SelectedControl = GridControl;
            tool.AutoHide        = false;
            tool.ToolTipLocation = location;
            GridControl.ToolTipController.ShowHint(tool, position);
        }
예제 #17
0
        public static void ShowError(DXErrorProvider errorProvider, BaseEdit control, ToolTipController tipController, string errorMessage)
        {
            control.Properties.Appearance.BorderColor = Color.Red;
            control.Focus();
            control.SelectAll();
            errorProvider.SetError(control, errorMessage);
            ToolTipControllerShowEventArgs args = new ToolTipControllerShowEventArgs();

            args.ToolTipImage    = DXErrorProvider.GetErrorIconInternal(ErrorType.Critical);
            args.ToolTip         = control.ErrorText;
            args.SelectedControl = control;
            args.SuperTip        = null; // here

            tipController.ShowHint(args, control.Parent.PointToScreen(control.Location));
        }
예제 #18
0
        /// <summary>
        /// Build the arguments for displaying a SuperTooltip
        /// </summary>
        /// <param name="stt"></param>
        /// <param name="control"></param>
        /// <returns></returns>

        public static ToolTipControllerShowEventArgs BuildSuperTooltipArgs(
            SuperToolTip stt,
            Control control)
        {
            ToolTipControllerShowEventArgs ttcArgs = new ToolTipControllerShowEventArgs();

            ttcArgs.SuperTip        = stt;
            ttcArgs.ToolTipType     = ToolTipType.SuperTip;
            ttcArgs.Rounded         = false;
            ttcArgs.RoundRadius     = 1;
            ttcArgs.ShowBeak        = true;      // (beak doesn't show for supertip)
            ttcArgs.ToolTipLocation = ToolTipLocation.TopCenter;
            ttcArgs.SelectedControl = control;
            return(ttcArgs);
        }
예제 #19
0
        private void CheckAddress()
        {
            string title;
            string msg;
            List <AccessoryDecoderConnection> connections = null;
            SuperToolTip     sttInfo  = new SuperToolTip();
            ToolTipTitleItem sttTitle = new ToolTipTitleItem();
            ToolTipItem      sttItem  = new ToolTipItem();

            // Obtain all duplicated addresses
            connections.AddRange(AccessoryDecoderConnection.GetDuplicated());


            if (this.Address <= 0)
            {
                title = "INFORMATION";
                msg   = "Accessory addresses must start at address 1. A connection with address 0 mens that the connection is disabled.";

                sttTitle.Appearance.Image = Properties.Resources.ICO_INFORMATION_16;
            }
            else if (connections.Count > 0)
            {
                title = "WARNING";
                msg   = string.Format("The address {0} is used in other {1} accessory connection(s).", this.Address, connections.Count);

                sttTitle.Appearance.Image = Properties.Resources.ICO_ERROR_16;
            }
            else
            {
                title = "INFORMATION";
                msg   = string.Format("Accessory address is valid. Used only in the current connection.");

                sttTitle.Appearance.Image = Properties.Resources.ICO_INFORMATION_16;
            }

            sttTitle.Appearance.Options.UseImage = true;
            sttTitle.Text      = title;
            sttItem.LeftIndent = 6;
            sttItem.Text       = msg;
            sttInfo.Items.Add(sttTitle);
            sttInfo.Items.Add(sttItem);

            var sea = new ToolTipControllerShowEventArgs();

            sea.SuperTip    = sttInfo;
            sea.ToolTipType = ToolTipType.SuperTip;
            toolTipController.ShowHint(sea, Cursor.Position);
        }
예제 #20
0
        public static void ShowTooltip(ToolTipController tooltip, string msg, string title = "<b>Hướng dẫn</b>")
        {
            var targ = new ToolTipControllerShowEventArgs
            {
                Title       = title,
                ToolTip     = msg,
                ShowBeak    = true,
                Rounded     = true,
                RoundRadius = 7,
                ToolTipType = ToolTipType.SuperTip,
                IconType    = ToolTipIconType.Information,
                IconSize    = ToolTipIconSize.Small
            };

            tooltip.ShowHint(targ);
        }
예제 #21
0
        private void onObjectHotTracked(HotTrackEventArgs e)
        {
            var series = e.Series();

            _latestTrackedCurvedData = null;
            _latestSeriesPoint       = null;
            if (series == null)
            {
                hideToolTip(e);
                return;
            }

            var diagramCoordinates = Chart.DiagramCoordinatesAt(e);

            _latestSeriesPoint = e.HitInfo.SeriesPoint;
            SuperToolTip superToolTip = null;

            var observedCurveData = _presenter.ObservedCurveDataFor(diagramCoordinates.Pane.Name, series.Name);

            if (observedCurveData != null)
            {
                superToolTip = getSuperToolTipFor(observedCurveData, _latestSeriesPoint, diagramCoordinates);
            }

            if (superToolTip == null)
            {
                _latestTrackedCurvedData = _presenter.CurveDataFor(diagramCoordinates.Pane.Name, series.Name);
                if (_latestTrackedCurvedData == null)
                {
                    hideToolTip(e);
                    return;
                }

                superToolTip = getSuperToolTipFor(_latestTrackedCurvedData, _latestSeriesPoint, diagramCoordinates);
            }
            if (superToolTip == null)
            {
                hideToolTip(e);
                return;
            }

            var args = new ToolTipControllerShowEventArgs {
                SuperTip = superToolTip
            };

            Chart.ToolTipController.ShowHint(args);
        }
예제 #22
0
        /// <summary>
        ///  展现ToolTip
        /// </summary>
        /// <param name="toolTip">ToolTipController</param>
        /// <param name="title">ToolTip标题</param>
        /// <param name="contnent">ToolTip内容</param>
        /// <param name="point">Point</param>
        /// <param name="toolTipRule">委托</param>
        public static void ShowToolTip(ToolTipController toolTip, string title, string content, Point point, Action <ToolTipController> toolTipRule)
        {
            ToolTipControllerShowEventArgs _args = toolTip.CreateShowArgs();

            toolTip.ShowBeak   = true;
            toolTip.ShowShadow = true;
            toolTip.Rounded    = true;
            _args.Title        = title;
            _args.ToolTip      = content;
            _args.Rounded      = true;
            _args.ToolTipType  = ToolTipType.Default;
            if (toolTipRule != null)
            {
                toolTipRule(toolTip);
            }
            toolTip.ShowHint(_args, point);
        }
예제 #23
0
 private void SetToolTipsSetting(ToolTipControllerShowEventArgs showTips, string sType)
 {
     if (sType == pubDefines.toolTipsType.type_Weather)
     {
         showTips.ToolTipLocation        = ToolTipLocation.TopLeft; //位置
         showTips.ShowBeak               = false;                   //去掉鸟嘴
         showTips.Title                  = "天气详情:";
         showTips.Appearance.BorderColor = Color.Blue;
     }
     else if (sType == pubDefines.toolTipsType.type_GridDetail)
     {
         showTips.ToolTipLocation        = ToolTipLocation.Default; //位置
         showTips.ShowBeak               = false;                   //去掉鸟嘴
         showTips.Title                  = "详细说明:";
         showTips.Appearance.BorderColor = Color.Blue;
     }
 }
        private void chartControl_Click(object sender, EventArgs e)
        {
            if (SelectedAnnotation == null)
            {
                return;
            }
            IDetailInfoProvider            detailProvider = SelectedAnnotation.Tag as IDetailInfoProvider;
            ToolTipControllerShowEventArgs sa             = new ToolTipControllerShowEventArgs();

            sa.AllowHtmlText = DefaultBoolean.True;
            sa.ToolTipType   = ToolTipType.SuperTip;
            sa.Appearance.TextOptions.WordWrap = WordWrap.Wrap;
            sa.ToolTip        = detailProvider.DetailString;
            sa.SelectedObject = detailProvider;
            //sa.AppearanceTitle.Font = new Font("Lucida Console", 6);
            //sa.Appearance.Font = new Font("Lucida Console", 6);
            toolTipController1.ShowHint(sa);
        }
예제 #25
0
 /// <summary>
 /// ToolTip消息提示
 /// </summary>
 /// <param name="title">标题</param>
 /// <param name="content">内容</param>
 /// <param name="showTime">显示时长</param>
 /// <param name="isAutoHide">自动隐藏</param>
 public static void NewToolTip(string title, string content, int showTime, bool isAutoHide)
 {
     try
     {
         MyToolTipClt              = new ToolTipController();
         args                      = MyToolTipClt.CreateShowArgs();
         title                     = string.IsNullOrEmpty(title) ? "温馨提示" : title;
         args.AutoHide             = isAutoHide;
         MyToolTipClt.ShowBeak     = true;
         MyToolTipClt.ShowShadow   = true;
         MyToolTipClt.Rounded      = true;
         MyToolTipClt.AutoPopDelay = (showTime == 0 ? 2000 : showTime);
         MyToolTipClt.Active       = true;
         MyToolTipClt.HideHint();
         MyToolTipClt.ShowHint(content, title, Control.MousePosition);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #26
0
        public bool PreFilterMessage(ref Message m)
        {
            Rectangle BarItemRect = new Rectangle();
            int       index       = 0;

            if (m.Msg == WM_MouseMove)
            {
                for (int i = 0; i < ToolTipList.Count; i++)
                {
                    try
                    {
                        BarItemRect = GetLinksScreenRect(ToolTipList[i].ToolTipItem.Links[0]);
                    }
                    catch { }
                    if (!BarItemRect.IsEmpty)
                    {
                        if (BarItemRect.Contains(MousePosition))
                        {
                            index = i; break;
                        }
                    }
                }

                if (BarItemRect.Contains(MousePosition))
                {
                    ToolTipControllerShowEventArgs te = new ToolTipControllerShowEventArgs();
                    te.ToolTipLocation = ToolTipLocation.Fixed;
                    te.SuperTip        = new SuperToolTip();
                    te.SuperTip.Items.Add(!barManager1.IsCustomizing? ToolTipList[index].ToolTip : ToolTipList[index].ToolTipCustomizationMode);
                    Point linkPoint = new Point(BarItemRect.Right, BarItemRect.Bottom);
                    barManager1.GetToolTipController().ShowHint(te, linkPoint);
                }
                else
                {
                    barManager1.GetToolTipController().HideHint();
                }
            }

            return(false);
        }
예제 #27
0
        /// <summary>
        /// init tooltip
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void toolTipController_BeforeShow(object sender, ToolTipControllerShowEventArgs e)
        {
            ToolTipController   controller  = sender as ToolTipController;
            AppointmentViewInfo aptViewInfo = controller.ActiveObject as AppointmentViewInfo;

            if (aptViewInfo == null)
            {
                return;
            }
            toolTipController.ToolTipType = ToolTipType.SuperTip;

            if (toolTipController.ToolTipType == ToolTipType.SuperTip)
            {
                SuperToolTip          SuperTip = new SuperToolTip();
                SuperToolTipSetupArgs args     = new SuperToolTipSetupArgs();
                args.Contents.Text       = aptViewInfo.Description;
                args.ShowFooterSeparator = true;
                args.Footer.Text         = aptViewInfo.Appointment.Start.ToShortTimeString() + " ~ " + aptViewInfo.Appointment.End.ToShortTimeString();//"SuperTip";
                SuperTip.Setup(args);
                e.SuperTip = SuperTip;
            }
        }
예제 #28
0
        private void OnToolTipControllerBeforeShow(object sender, ToolTipControllerShowEventArgs e)
        {
            SeriesPoint point = e.SelectedObject as SeriesPoint;

            if (point == null)
            {
                return;
            }
            DataRowView rowView = point.Tag as DataRowView;

            if (rowView == null)
            {
                return;
            }
            if (Convert.ToDouble(rowView["UnitPrice"]) > 25)
            {
                e.Appearance.BackColor = Color.Blue;
            }
            else
            {
                e.Appearance.BackColor = Color.Green;
            }
        }
예제 #29
0
 private void InitToolTipControl(string title, string displayText, Point pt, int imageIndex)
 {
     try
     {
         ToolTipControllerShowEventArgs args = toolTipControllerSplit.CreateShowArgs();
         args.IconSize        = ToolTipIconSize.Large;
         args.Rounded         = true;
         args.RoundRadius     = 7;
         args.Show            = true;
         args.ShowBeak        = true;
         args.ToolTipLocation = ToolTipLocation.TopRight;
         args.Title           = title;
         args.ToolTip         = displayText;
         args.IconType        = ToolTipIconType.Information;
         args.IconSize        = ToolTipIconSize.Large;
         toolTipControllerSplit.ImageIndex = imageIndex;
         toolTipControllerSplit.ShowHint(args, pt);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        protected new void ShowDataControllerError()
        {
            if (GridControl == null || !GridControl.IsHandleCreated)
            {
                return;
            }
            if (lastError != DataController.LastErrorText)
            {
                lastError = DataController.LastErrorText;
                if (!string.IsNullOrEmpty(lastError))
                {
                    OnDataControllerError(lastError);
                }
            }
            if (DataController.LastErrorText == "")
            {
                if (GridControl.EditorHelper.RealToolTipController.ActiveObject == null)
                {
                    HideHint();
                }
                return;
            }

            ToolTipControllerShowEventArgs ee = new ToolTipControllerShowEventArgs();

            ee.AutoHide        = false;
            ee.Title           = "Error";
            ee.ToolTipLocation = ToolTipLocation.RightTop;
            //set an exception text here
            ee.ToolTip = string.Format(GridLocalizer.Active.GetLocalizedString(GridStringId.ServerRequestError),
                                       DataController.LastErrorText);
            ee.ToolTipType = ToolTipType.SuperTip;
            ee.IconType    = ToolTipIconType.Error;
            ee.IconSize    = ToolTipIconSize.Small;
            ToolTipController.DefaultController.ShowHint(ee, GridControl.PointToScreen(new Point(ViewRect.Left, ViewRect.Bottom)));
            lastError = DataController.LastErrorText;
        }
예제 #31
0
        static void ShowColumnTooltip(GridColumn column, ToolTipControllerShowEventArgs args)
        {
            var view = column.View;
            var viewInfo = (GridViewInfo)view.GetViewInfo();
            args.ToolTipLocation = ToolTipLocation.TopRight;
            args.SelectedControl = view.GridControl;

            var controller = new ToolTipController();
            controller.ShowHint(args, view.GridControl.PointToScreen(viewInfo.ColumnsInfo[column].Bounds.Location));
        }
 void ShowItemSuperTip(BarItemLink item) {
     var args = new ToolTipControllerShowEventArgs{
         ToolTipType = ToolTipType.SuperTip,
         SuperTip = new SuperToolTip()
     };
     foreach (var choiceActionItem in _newObjectAction.Items) {
         var formatTestAction = EasyTestTagHelper.FormatTestAction(_newObjectAction.Caption + '.' + choiceActionItem.GetItemPath());
         if (formatTestAction==item.Item.Tag as string) {
             var data = choiceActionItem.Data;
             if (data!=null) {
                 var newObjectActionTooltip =
                     ((IModelClassNewObjectActionTooltip)
                      _newObjectAction.Application.Model.BOModel.GetClass((Type) data)).NewObjectActionTooltip;
                 if (!string.IsNullOrEmpty(newObjectActionTooltip)) {
                     args.SuperTip.Items.Add(newObjectActionTooltip);
                     ToolTipController.DefaultController.ShowHint(args);
                 }
             }
         }
     }
     
 }
예제 #33
0
		private void slidesListView_ItemHover(object sender, ItemHoverEventArgs e)
		{
			toolTipController.HideHint();
			var slideMaster = e.Item?.Tag as SlideMaster;
			if (String.IsNullOrEmpty(slideMaster?.ToolTipHeader) || String.IsNullOrEmpty(slideMaster.ToolTipBody)) return;

			var toolTipParameters = new ToolTipControllerShowEventArgs();
			var superTip = new SuperToolTip();
			var toolTipSetupArgs = new SuperToolTipSetupArgs();
			toolTipSetupArgs.AllowHtmlText = DefaultBoolean.True;
			toolTipSetupArgs.Title.Text = String.Format("<b>{0}</b>", slideMaster.ToolTipHeader);
			toolTipSetupArgs.Title.Font = new Font("Arial", 10);
			toolTipSetupArgs.Contents.Font = new Font("Arial", 9);
			toolTipSetupArgs.Contents.Text = String.Format("<color=gray>{0}</color>", slideMaster.ToolTipBody);
			superTip.Setup(toolTipSetupArgs);
			toolTipParameters.SuperTip = superTip;

			toolTipController.ShowHint(toolTipParameters, MousePosition);
		}
예제 #34
0
 private void toolTipController_BeforeShow(object sender, ToolTipControllerShowEventArgs e)
 {
     if (e.ToolTip == "test")
     {
         e.Show = false;
         this.BackgroundDisplayTooltip(e);
     }
     else if (e.ToolTip.Length > 0)
     {
         e.Show = true;
     }
 }
예제 #35
0
 public static void ShowError(DXErrorProvider errorProvider, BaseEdit control, ToolTipController tipController, string errorMessage)
 {
     control.Properties.Appearance.BorderColor = Color.Red;
     control.Focus();
     control.SelectAll();
     errorProvider.SetError(control, errorMessage);
     ToolTipControllerShowEventArgs args = new ToolTipControllerShowEventArgs();
     args.ToolTipImage = DXErrorProvider.GetErrorIconInternal(ErrorType.Critical);
     args.ToolTip = control.ErrorText;
     args.SelectedControl = control;
     args.SuperTip = null; // here
     
     tipController.ShowHint(args, control.Parent.PointToScreen(control.Location));
 }