void DefaultController_GetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
        {
            NavBarControl navBar = e.SelectedControl as NavBarControl;

            if (navBar != null)
            {
                NavBarHitInfo hi = navBar.CalcHitInfo(e.ControlMousePosition);

                if (hi.InLink)
                {
                    SuperToolTip          superTip = new SuperToolTip();
                    SuperToolTipSetupArgs args     = new SuperToolTipSetupArgs();
                    args.Title.Text = hi.Link.Caption;
                    superTip.Setup(args);
                    e.Info.SuperTip = superTip;
                }
                else
                if (hi.InGroup)
                {
                    SuperToolTip superTip = GetSuperTipByGroup(hi.Group);
                    {
                        if (e.Info == null)
                        {
                            e.Info = new ToolTipControlInfo(e.SelectedControl, "");
                        }
                        e.Info.ToolTipType = ToolTipType.SuperTip;
                        e.Info.SuperTip    = superTip;
                    }
                }
            }
        }
        private void onToolTipControllerGetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
        {
            var gridControl = e.SelectedControl as GridControl;

            if (gridControl == null)
            {
                return;
            }
            var gridView = gridControl.GetViewAt(e.ControlMousePosition) as GridView;

            if (gridView == null)
            {
                return;
            }

            CategoryCategoryItemDTO categoryCategoryItemDTO;

            if (gridView == gridViewCalculationMethods)
            {
                categoryCategoryItemDTO = _gridCalculationMethodsBinder.ElementAt(e);
            }
            else
            {
                categoryCategoryItemDTO = _gridParameterValueVersionsBinder.ElementAt(e);
            }

            if (categoryCategoryItemDTO == null)
            {
                return;
            }

            var superToolTip = _toolTipCreator.ToolTipFor(categoryCategoryItemDTO);

            e.Info = _toolTipCreator.ToolTipControlInfoFor(categoryCategoryItemDTO, superToolTip);
        }
Example #3
0
        /// <summary>
        /// Hien thi tooltip trong luoi
        /// </summary>
        /// <param name="gridControl"></param>
        /// <param name="grid"></param>
        /// <param name="e"></param>
        public static void ShowToolTip(GridControl gridControl, ToolTipControllerGetActiveObjectInfoEventArgs e)
        {
            if (e.SelectedControl != gridControl)
            {
                return;
            }
            ToolTipControlInfo info = null;
            GridView           view = gridControl.GetViewAt(e.ControlMousePosition) as GridView;

            if (view == null)
            {
                return;
            }
            GridHitInfo hi = view.CalcHitInfo(e.ControlMousePosition);

            if (hi.InRowCell)
            {
                info = new ToolTipControlInfo(new CellToolTipInfo(hi.RowHandle, hi.Column, "cell"), GetCellHintText(view, hi.RowHandle, hi.Column));
            }
            else if (hi.Column != null)
            {
                info = new ToolTipControlInfo(hi.Column, GetColumnHintText(hi.Column));
            }
            else if (hi.HitTest == GridHitTest.GroupPanel)
            {
                info = new ToolTipControlInfo(hi.HitTest, "Group panel");
            }
            else if (hi.HitTest == GridHitTest.RowIndicator)
            {
                info = new ToolTipControlInfo(GridHitTest.RowIndicator.ToString() + hi.RowHandle.ToString(), String.Format("Row Handle: {0}", hi.RowHandle));
            }
            e.Info = info;
        }
Example #4
0
        /// <summary>
        /// 为节点提供Tooltip
        /// 说明:
        /// 1.设置tree.ToolTipController属性
        /// 2.ToolTipController的GetActiveObjectInfo事件中使用
        /// 3.举例
        /// tlLHData.CustomNodeTooltip(e, node =>
        ///{
        ///    string _cabId = node.GetKeyID();
        ///    CCabInfo _cabinfo = LHDBHelper.GetCabInfo(_cabId);
        ///    if (_cabinfo != null)
        ///    {
        ///        return string.Format("核对时间:{0}\r\n在线情况:{1}\r\n最后一次活跃时间:{2}\r\n",
        ///                              _cabinfo.ChkDataTime,
        ///                              _cabinfo.CtuOnlineStatus == 1 ? "在线" : "未上线",
        ///                              _cabinfo.LastAliveTime);
        ///    }
        ///    return string.Empty;
        ///});
        /// </summary>
        /// <param name="tree">TreeList</param>
        /// <param name="e">ToolTipControllerGetActiveObjectInfoEventArgs</param>
        /// <param name="builderNodeTooltipFactory">委托</param>
        public static void CustomNodeTooltip(this TreeList tree, ToolTipControllerGetActiveObjectInfoEventArgs e, Func <TreeListNode, string> builderNodeTooltipFactory)
        {
            if (e.SelectedControl is DevExpress.XtraTreeList.TreeList)
            {
                TreeList        _tree = (TreeList)e.SelectedControl;
                TreeListHitInfo _hit  = _tree.CalcHitInfo(e.ControlMousePosition);

                if (_hit.HitInfoType == HitInfoType.Cell)
                {
                    TreeListViewInfo _viewInfo    = _tree.ViewInfo;
                    RowInfo          _rowInfo     = _viewInfo.GetRowInfoByPoint(e.ControlMousePosition);
                    CellInfo         _cellInfo    = _rowInfo.Cells[_hit.Column.VisibleIndex] as CellInfo;
                    EditHitInfo      _editHitInfo = _cellInfo.EditorViewInfo.CalcHitInfo(e.ControlMousePosition);

                    if (_editHitInfo.HitTest == EditHitTest.MaskBox)
                    {
                        string _toolTip = builderNodeTooltipFactory(_hit.Node);

                        if (!string.IsNullOrEmpty(_toolTip))
                        {
                            e.Info = new ToolTipControlInfo(_cellInfo, _toolTip);
                        }
                    }
                }
            }
        }
Example #5
0
        private void toolTipController1_GetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
        {
            if (e.SelectedControl != gridControl1)
            {
                return;
            }
            ToolTipControlInfo info      = null;
            SuperToolTip       sTooltip1 = new SuperToolTip();

            try
            {
                GridView view = gridControl1.GetViewAt(e.ControlMousePosition) as GridView;
                if (view == null)
                {
                    return;
                }
                GridHitInfo hi = view.CalcHitInfo(e.ControlMousePosition);
                if (hi.HitTest == GridHitTest.RowIndicator)
                {
                    info = new ToolTipControlInfo(GridHitTest.RowIndicator.ToString() + hi.RowHandle.ToString(), "Row Handle: " + hi.RowHandle.ToString());
                    ToolTipTitleItem titleItem1 = new ToolTipTitleItem();
                    Image            im         = view.GetRowCellValue(hi.RowHandle, "Picture") as Image;
                    ToolTipItem      item1      = new ToolTipItem();
                    item1.Image = im;
                    sTooltip1.Items.Add(item1);
                }
                info          = new ToolTipControlInfo(hi.HitTest, "");
                info.SuperTip = sTooltip1;
            }
            finally
            {
                e.Info = info;
            }
        }
Example #6
0
        private void onToolTipControllerGetActiveObjectInfo(ToolTipControllerGetActiveObjectInfoEventArgs e)
        {
            if (e.SelectedControl != pivotGrid)
            {
                return;
            }

            var hi = pivotGrid.CalcHitInfo(e.ControlMousePosition);

            if (hi.HitTest != PivotGridHitTest.Value)
            {
                return;
            }

            var ds = hi.ValueInfo.CreateDrillDownDataSource();

            if (hi.ValueInfo.Field == pivotGrid.ParameterField)
            {
                e.Info = toolTipForParameter(ds);
            }

            if (hi.ValueInfo.Field == _pkParameterField)
            {
                e.Info = toolTipForPKParameter(ds);
            }
        }
Example #7
0
        private void toolTipController_GetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
        {
            ToolTipControlInfo info = null;

            try
            {
                var view = gridControlPrintProducts.GetViewAt(e.ControlMousePosition) as GridView;
                if (view == null)
                {
                    return;
                }
                var hi = view.CalcHitInfo(e.ControlMousePosition);
                if (!hi.InRowCell)
                {
                    return;
                }
                if (hi.Column == gridColumnLogo)
                {
                    info = new ToolTipControlInfo(new CellToolTipInfo(hi.RowHandle, hi.Column, "cell"), "Click to change logo");
                }
                else if (hi.Column == gridColumnDelete)
                {
                    info = new ToolTipControlInfo(new CellToolTipInfo(hi.RowHandle, hi.Column, "cell"), "Delete this publication");
                }
            }
            finally
            {
                e.Info = info;
            }
        }
Example #8
0
        private void DefaultController_GetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
        {
            if (e.SelectedControl != this.gridControl1)
            {
                return;
            }

            //Get the view at the current mouse position
            GridView view = this.gridControl1.GetViewAt(e.ControlMousePosition) as GridView;

            if (view == null)
            {
                return;
            }
            //Get the view's element information that resides at the current position
            GridHitInfo        hi   = view.CalcHitInfo(e.ControlMousePosition);
            ToolTipControlInfo info = null;

            //Display a hint for row indicator cells
            if (hi.HitTest == GridHitTest.RowIndicator)
            {
                //An object that uniquely identifies a row indicator cell
                object o    = hi.HitTest.ToString( ) + hi.RowHandle.ToString( );
                string text = "Row " + hi.RowHandle.ToString( );
                info = new ToolTipControlInfo(o, text);
            }
            //Supply tooltip information if applicable, otherwise preserve default tooltip (if any)
            if (info != null)
            {
                e.Info = info;
            }
        }
Example #9
0
        private void OnTooltipGetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
        {
            if (e.SelectedControl != gridControl)
            {
                return;
            }
            var view = gridControl.GetViewAt(e.ControlMousePosition) as GridView;

            if (view == null)
            {
                return;
            }
            var hi = view.CalcHitInfo(e.ControlMousePosition);

            if (!hi.InRowCell)
            {
                return;
            }
            if (hi.Column != bandedGridColumnFormula)
            {
                return;
            }
            var record = view.GetRow(hi.RowHandle) as ProductPackageRecord;

            if (record == null)
            {
                return;
            }
            e.Info = new ToolTipControlInfo(new CellToolTipInfo(hi.RowHandle, hi.Column, "cell"), record.UseFormula ? "Disable Delivery Formula" : "Enable Delivery Formula");
            e.Info.ImmediateToolTip = true;
            e.Info.Interval         = 0;
        }
        private void onToolTipControllerGetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
        {
            var column = _gridView.ColumnAt(e);

            if (!ColumnIsValueOrigin(column))
            {
                return;
            }

            var withValueOrigin = _gridViewBinder.ElementAt(e);

            if (withValueOrigin == null)
            {
                return;
            }

            var superToolTip = _toolTipCreator.ToolTipFor(withValueOrigin.ValueOrigin);

            if (superToolTip == null)
            {
                return;
            }

            e.Info = _toolTipCreator.ToolTipControlInfoFor(withValueOrigin, superToolTip);
        }
Example #11
0
 private void OnToolTipControllerGetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
 {
     if (e.SelectedControl == xtraTabControl && String.Equals(e.Info?.Text, "Close", StringComparison.OrdinalIgnoreCase))
     {
         e.Info.Text = "Delete";
     }
 }
Example #12
0
        private void onGetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
        {
            if (sender != columnMappingGrid.ToolTipController)
            {
                return;
            }
            var view = columnMappingGrid.GetViewAt(e.ControlMousePosition) as GridView;

            if (view == null)
            {
                return;
            }
            var hitInfo = view.CalcHitInfo(e.ControlMousePosition);

            if (!hitInfo.InRow)
            {
                return;
            }
            e.Info = new ToolTipControlInfo(hitInfo.RowHandle, string.Empty)
            {
                SuperTip    = generateToolTipControlInfo(hitInfo.RowHandle),
                ToolTipType = ToolTipType.SuperTip
            };
            columnMappingGrid.ToolTipController.ShowHint(e.Info);
        }
        private void onToolTipControllerGetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
        {
            if (e.SelectedControl != _gridView.GridControl)
            {
                return;
            }


            var parameterDTO = _gridViewBinder.ElementAt(e);

            if (parameterDTO == null)
            {
                return;
            }

            //check if subclass want to display a tool tip as well
            var hi           = _gridView.CalcHitInfo(e.ControlMousePosition);
            var superToolTip = GetToolTipFor(parameterDTO, hi);

            //An object that uniquely identifies a row cell
            e.Info = new ToolTipControlInfo(parameterDTO, string.Empty)
            {
                SuperTip = superToolTip, ToolTipType = ToolTipType.SuperTip
            };
        }
Example #14
0
 private void toolTipController1_GetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
 {
     if (e.Info == null && e.SelectedControl == grdData)
     {
         GridView    view = grdData.FocusedView as GridView;
         GridHitInfo info = view.CalcHitInfo(e.ControlMousePosition);
         if (info.RowHandle >= 0)
         {
             if (info.InRowCell)
             {
                 if (lastRowHandle != info.RowHandle || lastColumn != info.Column)
                 {
                     lastColumn    = info.Column;
                     lastRowHandle = info.RowHandle;
                     string text = "";
                     if (view.GetRowCellValue(info.RowHandle, info.Column) != null)
                     {
                         text = view.GetRowCellValue(info.RowHandle, info.Column).ToString();
                     }
                     lastInfo = new ToolTipControlInfo(new GridToolTipInfo(view, new CellToolTipInfo(info.RowHandle, info.Column, "Text")), text);
                 }
                 e.Info = lastInfo;
             }
         }
     }
 }
Example #15
0
        private void onToolTipControllerGetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
        {
            if (e.SelectedControl != gridControl)
            {
                return;
            }

            var hi = gridView.HitInfoAt(e.ControlMousePosition);

            if (hi == null)
            {
                return;
            }

            if (!Equals(hi.Column, _colName.XtraColumn))
            {
                return;
            }

            var curveDTO = _gridBinderCurves.ElementAt(e);

            if (curveDTO == null)
            {
                return;
            }

            var toolTip = _toolTipCreator.CreateToolTip(_presenter.ToolTipFor(curveDTO));

            e.Info = _toolTipCreator.ToolTipControlInfoFor(curveDTO, toolTip);
        }
Example #16
0
        private void toolTipController1_GetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
        {
            if (e.SelectedControl != grd)
            {
                return;
            }

            ToolTipControlInfo info = null;
            //Get the view at the current mouse position
            GridView view = grd.GetViewAt(e.ControlMousePosition) as GridView;

            if (view == null)
            {
                return;
            }
            //Get the view's element information that resides at the current position
            GridHitInfo hi = view.CalcHitInfo(e.ControlMousePosition);

            //Display a hint for row indicator cells
            if (hi.InRowCell && hi.Column.FieldName == "COLUMNNAME")
            {
                //An object that uniquely identifies a row indicator cell
                object o = hi.Column.FieldName + hi.RowHandle.ToString();
                info = new ToolTipControlInfo(o, "column name has to be camelCase sample: nNo, nProtokolNo");
            }
            //Supply tooltip information if applicable, otherwise preserve default tooltip (if any)
            if (info != null)
            {
                e.Info = info;
            }
        }
Example #17
0
        public SuperToolTip ShowToolTip(ToolTipControllerGetActiveObjectInfoEventArgs e)
        {
            if (e.SelectedControl != this || ToolTipForNode == null)
            {
                return(null);
            }

            var hit = CalcHitInfo(e.ControlMousePosition);

            if (hit.HitInfoType != HitInfoType.Cell)
            {
                return(null);
            }

            var node = NodeFrom(hit.Node);

            if (node == null)
            {
                return(null);
            }

            var cellInfo = new TreeListCellToolTipInfo(hit.Node, hit.Column, null);
            var info     = new ToolTipControlInfo(cellInfo, string.Empty)
            {
                SuperTip = _toolTipMapper.MapFrom(ToolTipForNode(node))
            };

            e.Info = info;

            return(info.SuperTip);
        }
Example #18
0
        private void OnTooltipGetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
        {
            if (e.SelectedControl != gridControl)
            {
                return;
            }
            var view = gridControl.GetViewAt(e.ControlMousePosition) as GridView;

            if (view == null)
            {
                return;
            }
            var hi = view.CalcHitInfo(e.ControlMousePosition);

            if (!hi.InRowCell)
            {
                return;
            }
            if (hi.Column != bandedGridColumnLogo)
            {
                return;
            }
            e.Info = new ToolTipControlInfo(new CellToolTipInfo(hi.RowHandle, hi.Column, "cell"), "Double-Click to change the logo…");
            e.Info.ImmediateToolTip = true;
            e.Info.Interval         = 0;
        }
Example #19
0
 private void showResultToolTip(ToolTipControllerGetActiveObjectInfoEventArgs e)
 {
     if (_resultDTO == null)
     {
         return;
     }
     _optimizedParametersBinder.ShowTooltip(e, _resultDTO.LegendImage);
 }
        void gridTooltipController_GetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
        {
            var hi = gridView.CalcHitInfo(e.ControlMousePosition);

            if (hi.InRow)
            {
                e.Info = new ToolTipControlInfo(gridView.GetRow(hi.RowHandle), "text");
            }
        }
Example #21
0
        /// <summary>
        ///    Returns the element from the enumeration source that should receive the tool tip
        /// </summary>
        /// <param name="e">Tool tip controller event argument for which an element should be retrieved</param>
        public T ElementAt(ToolTipControllerGetActiveObjectInfoEventArgs e)
        {
            if (e.SelectedControl != GridView.GridControl)
            {
                return(default(T));
            }

            return(ElementAt(e.ControlMousePosition));
        }
Example #22
0
        /// <summary>
        ///    This function handle the event which takes care of tool tips.
        ///    The code checks on which area the mouse currently is positioned.
        ///    Depending on the area and the field and the field value different tool tips are generated.
        /// </summary>
        /// <remarks>The object reference for a new ToolTipControlInfo object can be any unique string.</remarks>
        private void onGetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
        {
            if (e.SelectedControl != grdSelection)
            {
                return;
            }
            if (grdSelection.DataSource == null)
            {
                return;
            }

            ToolTipControlInfo info = null;

            //Get the view at the current mouse position
            var view = grdSelection.GetViewAt(e.ControlMousePosition) as GridView;

            if (view == null)
            {
                return;
            }

            //Get the view's element information that resides at the current position
            GridHitInfo hi = view.CalcHitInfo(e.ControlMousePosition);

            //Display a hint for row cells
            if (hi.HitTest == GridHitTest.RowCell || hi.HitTest == GridHitTest.Column)
            {
                //An object that uniquely identifies a row cell
                object o = string.Format("Row {0}-{1}", hi.RowHandle, hi.Column.FieldName);
                info = new ToolTipControlInfo(o, string.Empty);
                if (hi.Column.FieldName == DatabaseConfiguration.ProteinColumns.COL_GENE_ID ||
                    hi.Column.FieldName == DatabaseConfiguration.ProteinColumns.COL_SYMBOL ||
                    hi.Column.FieldName == DatabaseConfiguration.ProteinColumns.COL_OFFICIAL_FULL_NAME)
                {
                    string nameType = hi.Column.FieldName;
                    info.SuperTip    = _toolTipCreator.GetTipForThisNameType(hi.Column.Caption, nameType);
                    info.ToolTipType = ToolTipType.SuperTip;
                }
                else if (hi.Column.FieldName == DatabaseConfiguration.ProteinColumns.COL_NAME_TYPE)
                {
                    info.SuperTip    = _toolTipCreator.GetTipForNameType(hi.Column.Caption);
                    info.ToolTipType = ToolTipType.SuperTip;
                }
                else if (hi.Column.FieldName == DatabaseConfiguration.ProteinColumns.COL_GENE_NAME)
                {
                    info.SuperTip    = _toolTipCreator.GetTipForGeneName(hi.Column.Caption);
                    info.ToolTipType = ToolTipType.SuperTip;
                }
            }

            //Supply tooltip information if applicable, otherwise preserve default tooltip (if any)
            if (info != null)
            {
                e.Info = info;
            }
        }
Example #23
0
    private void GetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e) {
      if (e.Info == null || e.SelectedControl == gridControl1) {
        GridHitInfo info = gridView1.CalcHitInfo(e.ControlMousePosition);

        if (info.InRowCell && info.RowHandle != -1 && info.Column != null && info.Column.FieldName == "Progress") {
          Index index = (Index)gridView1.GetRow(info.RowHandle);
          e.Info = new ToolTipControlInfo($"{info.RowHandle} - {info.Column}", $"{index.GetQuery()}\n{index.Error}");
        }
      }
    }
        void ToolTipController_GetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
        {
            #region #HitTest
            if (!e.SelectedControl.Equals(richEditControl1))
            {
                return;
            }

            //Obtain the mouse cursor's layout position on the page and the current page index:
            PageLayoutPosition pageLayoutPosition = richEditControl1.ActiveView.GetDocumentLayoutPosition(e.ControlMousePosition);
            if (pageLayoutPosition == null)
            {
                return;
            }

            Point      point      = pageLayoutPosition.Position;
            int        pageIndex  = pageLayoutPosition.PageIndex;
            LayoutPage layoutPage = richEditControl1.DocumentLayout.GetPage(pageIndex);

            //Create a HitTestManager instance:
            HitTestManager hitTest = new HitTestManager(richEditControl1.DocumentLayout);

            //Perform the hit test and pass the result to the RichEditHitTestResult object:
            RichEditHitTestResult result = hitTest.HitTest(layoutPage, point);
            if (result != null)
            {
                //Retrieve the current layout element type:
                LayoutElement element = result.LayoutElement;
                string        text    = element.Type.ToString();

                //Obtain the the text character and its bounds under the mouse position
                if (element.Type == LayoutType.CharacterBox)
                {
                    text += String.Format(" : \"{0}\"", (element as CharacterBox).Text);
                    text += GetBounds(element);
                    if (element.Parent.Type == LayoutType.PlainTextBox)
                    {
                        text += String.Format("\r\nPlainTextBox : \"{0}\"", (element.Parent as PlainTextBox).Text);
                        text += GetBounds(element.Parent);
                    }
                }
                else
                {
                    //Get the hovered element's bounds:
                    text += GetBounds(element);
                }

                //Get the element's location:
                string title = GetLocation(element);

                //Display all retrieved information in the tooltip:
                e.Info = new ToolTipControlInfo(element.Bounds, text, title, ToolTipIconType.Information);
            }
            #endregion #HitTest
        }
Example #25
0
 private void ToolTipController_GetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
 {
     if (e.SelectedControl == RibbonControl)
     {
         RibbonHitInfo hitInfo = RibbonControl.CalcHitInfo(e.ControlMousePosition);
         if (hitInfo.InItem && hitInfo.Item is BarStaticItemLink)
         {
             e.Info = null;                             // don't show tooltip that is the same text as the BarStaticItemLlink
         }
     }
 }
Example #26
0
        private static void TreeToolTipController_GetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
        {
            var tree = e.SelectedControl as TreeList;

            if (tree == null)
            {
                return;
            }
            //Display a hint for row indicator cells
            ShowHiddenFieldsTooltip(e, tree.Columns.Count(c => !c.Visible && c.OptionsColumn.ShowInCustomizationForm) > 0);
        }
        private void onToolTipControllerGetActiveObjectInfo(ToolTipControllerGetActiveObjectInfoEventArgs e)
        {
            if (e.SelectedControl != chkApplyGroupingToObservedData)
            {
                return;
            }

            var superToolTip = _toolTipCreator.CreateToolTip(PKSimConstants.UI.ApplyGroupingToObservedDataToolTip, PKSimConstants.UI.ApplyGroupingToObservedData, ApplicationIcons.Info);

            e.Info = _toolTipCreator.ToolTipControlInfoFor(chkApplyGroupingToObservedData, superToolTip);
        }
        private void getObjectToolTip(ToolTipControllerGetActiveObjectInfoEventArgs e)
        {
            if (e.SelectedControl != tbNamingPattern)
            {
                return;
            }

            var superToolTip = _toolTipCreator.CreateToolTip(_presenter.NamingPatternDescriptionToolTip, PKSimConstants.UI.NamingPattern);

            e.Info = _toolTipCreator.ToolTipControlInfoFor(tbNamingPattern, superToolTip);
        }
        public bool ShowTooltip(ToolTipControllerGetActiveObjectInfoEventArgs e, Image image)
        {
            if (!isInImageColumn(e))
            {
                return(false);
            }

            var superToolTip = _toolTipCreator.ToolTipFor(image);

            e.Info = _toolTipCreator.ToolTipControlInfoFor(_gridViewBinder.ElementAt(e), superToolTip);
            return(true);
        }
        private void onGetActiveObjectInfo(ToolTipControllerGetActiveObjectInfoEventArgs e)
        {
            if (e.SelectedControl != historyTreeList)
            {
                return;
            }
            if (historyTreeList.DataSource == null)
            {
                return;
            }

            //Get the view's element information that resides at the current position
            var hi = historyTreeList.CalcHitInfo(e.ControlMousePosition);

            if (hi == null)
            {
                return;
            }
            if (hi.Node == null)
            {
                return;
            }
            if (hi.Column == null)
            {
                return;
            }
            if (hi.Column.FieldName != HistoryColumns.Description.Name)
            {
                return;
            }
            var historyItem = historyItemFrom(hi.Node);

            if (historyItem == null)
            {
                return;
            }

            //An object that uniquely identifies a row cell
            var info = new ToolTipControlInfo(historyItem, string.Empty);

            info.SuperTip = new SuperToolTip();
            info.SuperTip.Appearance.TextOptions.HotkeyPrefix = HKeyPrefix.None;
            addItemToToolTip(info.SuperTip, historyItem.Description);
            addItemToToolTip(info.SuperTip, historyItem.ExtendedDescription);

            //at least two elements to display (there is always one element because of the title)
            if (info.SuperTip.Items.Count == 1)
            {
                return;
            }
            e.Info = info;
        }
		private void toolTipController_GetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
		{
			if (e.SelectedControl != gridControlFiles)
				return;
			var info = e.Info;
			try
			{
				var view = gridControlFiles.GetViewAt(e.ControlMousePosition) as GridView;
				if (view == null)
					return;
				var hi = view.CalcHitInfo(e.ControlMousePosition);
				if (!hi.InRowCell) return;
				var file = FolderContent[gridViewFiles.GetDataSourceRowIndex(hi.RowHandle)];
				info = new ToolTipControlInfo(new CellToolTipInfo(hi.RowHandle, hi.Column, "cell"), file.SourceFileLink.Hint);
			}
			finally
			{
				e.Info = info;
			}
		}
		private void toolTipController1_GetActiveObjectInfo(
			object sender,
			ToolTipControllerGetActiveObjectInfoEventArgs e)
		{
			// http://www.devexpress.com/Support/Center/KB/p/A474.aspx

			if (e.SelectedControl is TreeList)
			{
				var tree = (TreeList)e.SelectedControl;
				var hit = tree.CalcHitInfo(e.ControlMousePosition);

				if (hit.HitInfoType == HitInfoType.Cell)
				{
					var cellInfo = new TreeListCellToolTipInfo(hit.Node, hit.Column, null);

					var fg = hit.Node.Tag as FileGroup;
					var fsi = hit.Node.Tag as ZlpFileInfo;

					string tt;
					if (fg != null)
					{
						tt = fg.GetFullNameIntelligent(Project);
					}
					else if (fsi != null)
					{
						tt = fsi.FullName;
					}
					else
					{
						tt = null;
					}

					if (tt != null)
					{
						e.Info = new ToolTipControlInfo(cellInfo, tt);
					}
				}
			}
		}
		private void OnTooltipGetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
		{
			if (e.SelectedControl != gridControl) return;
			var view = gridControl.GetViewAt(e.ControlMousePosition) as GridView;
			if (view == null) return;
			var hi = view.CalcHitInfo(e.ControlMousePosition);
			if (!hi.InRowCell) return;
			if (hi.Column != bandedGridColumnLogo) return;
			e.Info = new ToolTipControlInfo(new CellToolTipInfo(hi.RowHandle, hi.Column, "cell"), "Double-Click to change the logo…");
			e.Info.ImmediateToolTip = true;
			e.Info.Interval = 0;
		}
		private void toolTipController_GetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
		{
			if (e.SelectedControl != gridControlPublication)
				return;
			var info = e.Info;
			try
			{
				var view = gridControlPublication.GetViewAt(e.ControlMousePosition) as GridView;
				if (view == null)
					return;
				var hi = view.CalcHitInfo(e.ControlMousePosition);
				if (hi.InRowCell)
				{
					var adNotes = new List<string>();

					if (!string.IsNullOrEmpty(PrintProduct.Inserts[advBandedGridViewPublication.GetDataSourceRowIndex(hi.RowHandle)].FullComment))
						adNotes.Add(PrintProduct.Inserts[advBandedGridViewPublication.GetDataSourceRowIndex(hi.RowHandle)].FullComment);
					if (!string.IsNullOrEmpty(PrintProduct.Inserts[advBandedGridViewPublication.GetDataSourceRowIndex(hi.RowHandle)].FullSection))
						adNotes.Add(PrintProduct.Inserts[advBandedGridViewPublication.GetDataSourceRowIndex(hi.RowHandle)].FullSection);
					if (!string.IsNullOrEmpty(PrintProduct.Inserts[advBandedGridViewPublication.GetDataSourceRowIndex(hi.RowHandle)].Deadline))
						adNotes.Add("Deadline: " + PrintProduct.Inserts[advBandedGridViewPublication.GetDataSourceRowIndex(hi.RowHandle)].DeadlineForOutput);
					if (!string.IsNullOrEmpty(PrintProduct.Inserts[advBandedGridViewPublication.GetDataSourceRowIndex(hi.RowHandle)].Mechanicals))
						adNotes.Add("Mech: " + PrintProduct.Inserts[advBandedGridViewPublication.GetDataSourceRowIndex(hi.RowHandle)].Mechanicals);

					if (hi.Column == gridColumnADRate && adNotes.Count > 0)
					{
						info = new ToolTipControlInfo(new CellToolTipInfo(hi.RowHandle, hi.Column, "cell"), string.Join(", ", adNotes.ToArray())) { ToolTipImage = Resources.AdNoteSmall };
					}
					else if (e.Info != null)
					{
						if (hi.Column == gridColumnColorPricingPercent || hi.Column == gridColumnColorPricingPCI)
							e.Info.Text = "Apply this Color Rate on Line 1, to all Ads in this schedule";
						else if (hi.Column == gridColumnDiscountRate)
							e.Info.Text = "Apply this Discount on Line 1 to all Ads in this schedule";
						else if (hi.Column == gridColumnADRate)
							e.Info.Text = "Add Comments, Sections and Deadlines";
					}
				}
			}
			finally
			{
				e.Info = info;
			}
		}
Example #35
0
        /// <summary>
        /// Handles the GetActiveObjectInfo event of the toolTipController1 control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="DevExpress.Utils.ToolTipControllerGetActiveObjectInfoEventArgs"/> instance containing the event data.</param>
        private void toolTipController1_GetActiveObjectInfo(
            object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
        {
            if (e.SelectedControl == this.grdEpisode)
            {
                var hi = this.grdViewEpisodes.CalcHitInfo(e.ControlMousePosition);
                if (hi.InRowCell)
                {
                    var episode = this.grdViewEpisodes.GetRow(hi.RowHandle) as Episode;

                    var superTip = new SuperToolTip();
                    superTip.Items.AddTitle(episode.CurrentFilenameAndPath);

                    e.Info = new ToolTipControlInfo(hi + " " + hi.Column.Name + " " + hi.RowHandle, string.Empty)
                        {
                           SuperTip = superTip 
                        };
                }
            }
        }
Example #36
0
 /// <summary>
 /// Handles the GetActiveObjectInfo event of the toolTipController1 control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="DevExpress.Utils.ToolTipControllerGetActiveObjectInfoEventArgs"/> instance containing the event data.</param>
 private void toolTipController1_GetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
 {
     if (e.SelectedControl == grdTvTitleList)
     {
         GridHitInfo hi = gridViewTvTitleList.CalcHitInfo(e.ControlMousePosition);
         if (hi.InRowCell)
         {
             var series = gridViewTvTitleList.GetRow(hi.RowHandle) as MasterSeriesListModel;
             e.Info = new ToolTipControlInfo(hi + " " + hi.Column.Name + " " + hi.RowHandle, string.Empty)
                 { SuperTip = TvDBFactory.GetSeriesSuperTip(series.SeriesGuid) };
         }
     }
     else if (e.SelectedControl == grdSeasons)
     {
         GridHitInfo hi = gridViewSeasons.CalcHitInfo(e.ControlMousePosition);
         if (hi.InRowCell)
         {
             var season = gridViewSeasons.GetRow(hi.RowHandle) as Season;
             e.Info = new ToolTipControlInfo(hi + " " + hi.Column.Name + " " + hi.RowHandle, string.Empty) { SuperTip = TvDBFactory.GetSeasonSuperTip(season) };
         }
     }
     else if (e.SelectedControl == grdEpisodes)
     {
         GridHitInfo hi = gridViewEpisodes.CalcHitInfo(e.ControlMousePosition);
         if (hi.InRowCell)
         {
             var episode = gridViewEpisodes.GetRow(hi.RowHandle) as Episode;
             e.Info = new ToolTipControlInfo(hi + " " + hi.Column.Name + " " + hi.RowHandle, string.Empty)
                 {
                     SuperTip = TvDBFactory.GetEpisodeSuperTip(episode)
                 };
         }
     }
 }
Example #37
0
 /// <summary>
 /// Handles the GetActiveObjectInfo event of the toolTipController1 control.
 /// </summary>
 /// <param name="sender">
 /// The source of the event.
 /// </param>
 /// <param name="e">
 /// The <see cref="DevExpress.Utils.ToolTipControllerGetActiveObjectInfoEventArgs"/> instance containing the event data.
 /// </param>
 private void toolTipController1_GetActiveObjectInfo(
     object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
 {
     if (e.SelectedControl == this.picUpdateStatus)
     {
         e.Info = new ToolTipControlInfo
             {
                 Object = this.picUpdateStatus,
                 ToolTipType = ToolTipType.SuperTip,
                 SuperTip = VersionUpdateFactory.UpdateTip
             };
     }
 }
		private void toolTipController_GetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
		{
			ToolTipControlInfo info = null;
			try
			{
				var view = gridControlPrintProducts.GetViewAt(e.ControlMousePosition) as GridView;
				if (view == null) return;
				var hi = view.CalcHitInfo(e.ControlMousePosition);
				if (!hi.InRowCell) return;
				if (hi.Column == gridColumnLogo)
					info = new ToolTipControlInfo(new CellToolTipInfo(hi.RowHandle, hi.Column, "cell"), "Click to change logo");
				else if (hi.Column == gridColumnDelete)
					info = new ToolTipControlInfo(new CellToolTipInfo(hi.RowHandle, hi.Column, "cell"), "Delete this publication");
			}
			finally
			{
				e.Info = info;
			}
		}
Example #39
0
 /// <summary>
 /// Handles the GetActiveObjectInfo event of the toolTipController1 control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="DevExpress.Utils.ToolTipControllerGetActiveObjectInfoEventArgs"/> instance containing the event data.</param>
 private void ToolTipController1_GetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
 {
     GridHitInfo hi = grdViewByTitle.CalcHitInfo(e.ControlMousePosition);
     if (hi.InRowCell)
     {
         var movieModel = grdViewByTitle.GetRow(hi.RowHandle) as MovieModel;
         e.Info = new ToolTipControlInfo(hi + " " + hi.Column.Name + " " + hi.RowHandle, string.Empty)
             {
                 SuperTip = movieModel.GetMovieSuperTip()
             };
     }
 }
Example #40
0
        private void toolTipController1_GetActiveObjectInfo(object sender,
            ToolTipControllerGetActiveObjectInfoEventArgs e)
        {
            var hitInfo = gvDrawings.CalcHitInfo(e.ControlMousePosition);
            if (hitInfo.HitTest != GridHitTest.RowCell)
                return;

            var col = hitInfo.Column;
            var draw = gvDrawings.GetRow(hitInfo.RowHandle) as HierarchyNumberDrawing;
            if (draw == null)
                return;

            var baseDraw = _baseDrawings.FirstOrDefault(x => x.Id == draw.Id);
            if (baseDraw == null)
                return;

            var prop = typeof (HierarchyNumberDrawing).GetProperty(col.FieldName);
            var baseValue = prop.GetValue(baseDraw);

            if (col != colTechRouteId)
            {
                e.Info = new ToolTipControlInfo("?!?!", baseValue?.ToString());
            }
            else
            {
                var techRoute = _techRoutes.FirstOrDefault(x => x.Id == (int?) baseValue);
                if (techRoute != null)
                {
                    e.Info = new ToolTipControlInfo("?!?!", techRoute.Name);
                }
            }
        }
		private void OnTooltipGetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
		{
			if (e.SelectedControl != gridControl) return;
			var view = gridControl.GetViewAt(e.ControlMousePosition) as GridView;
			if (view == null) return;
			var hi = view.CalcHitInfo(e.ControlMousePosition);
			if (!hi.InRowCell) return;
			if (hi.Column != bandedGridColumnFormula) return;
			var record = view.GetRow(hi.RowHandle) as StandalonePackageRecord;
			if (record == null) return;
			e.Info = new ToolTipControlInfo(new CellToolTipInfo(hi.RowHandle, hi.Column, "cell"), record.UseFormula ? "Disable Delivery Formula" : "Enable Delivery Formula");
			e.Info.ImmediateToolTip = true;
			e.Info.Interval = 0;
		}
 private void M_tooltip_controller_GetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
 {
     try
     {
         if (m_list_vi_tri_sai.Count == 0)
         {
             return;
         }
         ToolTipControlInfo info = null;
         //Get the view at the current mouse position
         GridView view = m_grc_hop_dong.GetViewAt(e.ControlMousePosition) as GridView;
         if (view == null) return;
         //Get the view's element information that resides at the current position
         GridHitInfo hi = view.CalcHitInfo(e.ControlMousePosition);
         //Display a hint for row indicator cells
         if (hi.HitTest == GridHitTest.RowCell)
         {
             //An object that uniquely identifies a row indicator cell
             foreach (var item in m_list_vi_tri_sai)
             {
                 if (hi.RowHandle == item.chi_so_hang & hi.Column.VisibleIndex == item.chi_so_cot)
                 {
                     object o = hi.HitTest.ToString() + hi.RowHandle.ToString() + hi.Column.VisibleIndex.ToString();
                     info = new ToolTipControlInfo(o, item.loi_sai);
                 }
             }
         }
         if (hi.HitTest == GridHitTest.Column)
         {
             if (co_ma_nhan_vien_trung & hi.Column.VisibleIndex == 1)
             {
                 object o = hi.HitTest.ToString() + hi.RowHandle.ToString() + hi.Column.VisibleIndex.ToString();
                 info = new ToolTipControlInfo(o, "Mã nhân viên bị trùng");
             }
             if (co_ma_hop_dong_trung & hi.Column.VisibleIndex == 2)
             {
                 object o = hi.HitTest.ToString() + hi.RowHandle.ToString() + hi.Column.VisibleIndex.ToString();
                 info = new ToolTipControlInfo(o, "Mã hợp đồng bị trùng");
             }
         }
         //Supply tooltip information if applicable, otherwise preserve default tooltip (if any)
         if (info != null)
             e.Info = info;
     }
     catch (Exception ve)
     {
         set_init_form_load();
         CSystemLog_301.ExceptionHandle(ve);
     }
 }
 private void toolTipController_GetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
 {
     if (e.Info == null && e.SelectedControl == this.gcServers)
       {
     var hit = this.gvServers.CalcHitInfo(e.ControlMousePosition);
     if (hit.InRowCell && hit.Column == this.colLocation)
     {
       var row = (ServerRow)this.gvServers.GetRow(hit.RowHandle);
       if (row?.GeoInfo != null)
     e.Info = new ToolTipControlInfo(row.EndPoint + "-" + hit.Column.FieldName, row.GeoInfo.ToString());
     }
       }
 }
		private void toolTipController_GetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
		{
			if (e.SelectedControl != gridControl) return;
			var view = gridControl.GetViewAt(e.ControlMousePosition) as GridView;
			if (view == null) return;
			var hitInfo = view.CalcHitInfo(e.ControlMousePosition);
			if (!hitInfo.InRowCell) return;
			var product = advBandedGridView.GetRow(hitInfo.RowHandle) as DigitalProduct;
			if (product == null) return;
			if (hitInfo.Column == gridColumnTarget)
			{
				if (String.IsNullOrEmpty(product.Name))
					e.Info = new ToolTipControlInfo(new CellToolTipInfo(hitInfo.RowHandle, hitInfo.Column, "cell"), "Digital Product Required");
				else if (product.EnableTarget)
				{
					var availableInfo = product.AddtionalInfo.Where(pi => pi.Type == ProductInfoType.Targeting && pi.Selected);
					if (availableInfo.Any())
						e.Info = new ToolTipControlInfo(new CellToolTipInfo(hitInfo.RowHandle, hitInfo.Column, "cell"), String.Join(Environment.NewLine, availableInfo.Select(pi => pi.EditValue))) { ToolTipImage = Resources.TargetButton };
					else
						e.Info = new ToolTipControlInfo(new CellToolTipInfo(hitInfo.RowHandle, hitInfo.Column, "cell"), "Click to add Targeting Options");
				}
				else
					e.Info = new ToolTipControlInfo(new CellToolTipInfo(hitInfo.RowHandle, hitInfo.Column, "cell"), "Targeting Options are not available for this product");
				e.Info.ToolTipPosition = MousePosition;
			}
			else if (hitInfo.Column == gridColumnRichMedia)
			{
				if (String.IsNullOrEmpty(product.Name))
					e.Info = new ToolTipControlInfo(new CellToolTipInfo(hitInfo.RowHandle, hitInfo.Column, "cell"), "Digital Product Required");
				else if (product.EnableRichMedia)
				{
					var availableInfo = product.AddtionalInfo.Where(pi => pi.Type == ProductInfoType.RichMedia && pi.Selected);
					if (availableInfo.Any())
						e.Info = new ToolTipControlInfo(new CellToolTipInfo(hitInfo.RowHandle, hitInfo.Column, "cell"), String.Join(Environment.NewLine, availableInfo.Select(pi => pi.EditValue))) { ToolTipImage = Resources.RichMediaButton };
					else
						e.Info = new ToolTipControlInfo(new CellToolTipInfo(hitInfo.RowHandle, hitInfo.Column, "cell"), "Click to add Rich Media Options");
				}
				else
					e.Info = new ToolTipControlInfo(new CellToolTipInfo(hitInfo.RowHandle, hitInfo.Column, "cell"), "Rich Media Options are not available for this product");
				e.Info.ToolTipPosition = MousePosition;
			}
		}