Ejemplo n.º 1
0
 private void VerticalHeaderLabel_MouseEnterElement(object sender, Infragistics.Win.UIElementEventArgs e)
 {
     //Debug.WriteLine("Enter Element " + e.Element.GetType().Name);
     if (this.Appearance.Image != null &&
         e.Element is ImageAndTextUIElement.ImageAndTextDependentImageUIElement)
     {
         this._saveCursorImageArea = this.Cursor;
         this.Cursor = Cursors.Hand;
     }
 }
Ejemplo n.º 2
0
        private void grdDataServiceComponent_MouseLeaveElement(object sender, Infragistics.Win.UIElementEventArgs e)
        {
            // if we are not leaving a cell, then don't anything
            if (!(e.Element is CellUIElement))
            {
                return;
            }

            // prevent the timer from ticking again
            _customizedToolTip.StopTimerToolTip();

            // destroy the tooltip
            _customizedToolTip.DestroyToolTip(this);
        }
Ejemplo n.º 3
0
 private void VerticalHeaderLabel_MouseLeaveElement(object sender, Infragistics.Win.UIElementEventArgs e)
 {
     //Debug.WriteLine("Leave Element " + e.Element.GetType().Name);
     if (this.Appearance.Image != null &&
         e.Element is ImageAndTextUIElement.ImageAndTextDependentImageUIElement)
     {
         if (this._saveCursorImageArea != null)
         {
             this.Cursor = this._saveCursorImageArea;
         }
         else
         {
             this.Cursor = Cursors.Default;
         }
         this._saveCursorImageArea = null;
     }
 }
Ejemplo n.º 4
0
            private void aCheckBoxUIElement_ElementClick(Object sender, Infragistics.Win.UIElementEventArgs e)
            {
                // Get the CheckBoxUIElement that was clicked
                CheckBoxUIElement aCheckBoxUIElement = (CheckBoxUIElement)e.Element;

                // Get the Header associated with this particular element
                Infragistics.Win.UltraWinGrid.ColumnHeader aColumnHeader = (Infragistics.Win.UltraWinGrid.ColumnHeader)aCheckBoxUIElement.GetAncestor(typeof(HeaderUIElement)).GetContext(typeof(Infragistics.Win.UltraWinGrid.ColumnHeader));

                // Set the Tag on the Header to the new CheckState
                aColumnHeader.Tag = aCheckBoxUIElement.CheckState;

                // So that we can apply various changes only to the relevant Rows collection that the header belongs to
                HeaderUIElement aHeaderUIElement = aCheckBoxUIElement.GetAncestor(typeof(HeaderUIElement)) as HeaderUIElement;
                RowsCollection  hRows            = aHeaderUIElement.GetContext(typeof(RowsCollection)) as RowsCollection;

                // Raise an event so the programmer can do something when the CheckState changes
                if (_CLICKED != null)
                {
                    _CLICKED(this, new HeaderCheckBoxEventArgs(aColumnHeader, aCheckBoxUIElement.CheckState, hRows));
                }
            }
Ejemplo n.º 5
0
        private void grdDataServiceComponent_MouseEnterElement(object sender, Infragistics.Win.UIElementEventArgs e)
        {
            OperationResult             objOperationResult    = new OperationResult();
            ServiceBL                   oServiceBL            = new ServiceBL();
            List <ServiceComponentList> oServiceComponentList = new List <ServiceComponentList>();
            StringBuilder               Cadena = new StringBuilder();


            // if we are not entering a cell, then don't anything
            if (!(e.Element is CellUIElement))
            {
                return;
            }

            // find the cell that the cursor is over, if any
            UltraGridCell cell = e.Element.GetContext(typeof(UltraGridCell)) as UltraGridCell;

            if (cell != null)
            {
                int categoryId = int.Parse(cell.Row.Cells["i_CategoryId"].Value.ToString());
                oServiceComponentList = oServiceBL.GetServiceComponentByCategoryId(ref objOperationResult, categoryId, _strServicelId);


                if (categoryId != -1)
                {
                    foreach (var item in oServiceComponentList)
                    {
                        Cadena.Append(item.v_ComponentName);
                        Cadena.Append("\n");
                    }

                    _customizedToolTip.AutomaticDelay = 1;
                    _customizedToolTip.AutoPopDelay   = 20000;
                    _customizedToolTip.ToolTipMessage = Cadena.ToString();
                    _customizedToolTip.StopTimerToolTip();
                    _customizedToolTip.StartTimerToolTip();
                }
            }
        }