Ejemplo n.º 1
0
        void iconSelector_OnIconSelection(object sender, OnIconSelectionEventArgs e)
        {
            OnSmartIconSelectionEventArgs ee = new OnSmartIconSelectionEventArgs(e.ImageList, e.ImageIndex, nowDrawingCellInfo, false);

            View.RaiseOnSmartIconSelection(ee);
            e.ImageIndex = ee.ImageIndex;
        }
Ejemplo n.º 2
0
        protected internal virtual void RaiseOnIconSelection(OnIconSelectionEventArgs e)
        {
            OnIconSelectionEventHandler handler = (OnIconSelectionEventHandler)Events[_onIconSelection];

            if (handler != null)
            {
                handler(GetEventSender(), e);
            }
        }
Ejemplo n.º 3
0
        protected virtual void DrawIcon(ControlGraphicsInfoArgs info)
        {
            CustomIconTextEditViewInfo vi = info.ViewInfo as CustomIconTextEditViewInfo;
            OnIconSelectionEventArgs   e  = new OnIconSelectionEventArgs(vi.ImageList, vi.ImageIndex);

            vi.Item.RaiseOnIconSelection(e);
            if (e.ImageList != null && e.ImageIndex != -1)
            {
                info.Cache.Paint.DrawImage(info.Cache, e.ImageList, e.ImageIndex, vi.IconRect, true);
            }
            else
            {
                info.Graphics.FillRectangle(info.Cache.GetSolidBrush(Color.White), vi.IconRect);
            }
        }
Ejemplo n.º 4
0
        private void customIconTextEdit1_Properties_OnIconSelection(object sender, OnIconSelectionEventArgs e)
        {
            CustomIconTextEdit editor = sender as CustomIconTextEdit;

            if (editor != null)
            {
                if (editor.Enabled)
                {
                    if (editor.ContainsFocus)
                    {
                        e.ImageIndex = 0;
                    }
                    else
                    {
                        e.ImageIndex = 1;
                    }
                }
                else
                {
                    e.ImageIndex = 2;
                }
            }
        }