Exemplo n.º 1
0
        private void Rg_ClientLIst_MouseClick(object sender, MouseEventArgs e)
        {
            if (e.Button != MouseButtons.Right)
            {
                return;
            }

            var temp = (sender as DevExpress.XtraEditors.RadioGroup);

            RadioGroupViewInfo cInfo = (RadioGroupViewInfo)temp.GetViewInfo();

            for (int i = 0; i < temp.Properties.Items.Count; i++)
            {
                Rectangle rC = ((RadioGroupItemViewInfo)cInfo.ItemsInfo[i]).CaptionRect;
                Rectangle rG = ((RadioGroupItemViewInfo)cInfo.ItemsInfo[i]).GlyphRect;

                if (rC.Contains(e.Location) || rG.Contains(e.Location))
                {
                    string temp_des = temp.Properties.Items[i].Description;

                    if (dict_tp.ContainsKey(temp_des))
                    {
                        dict_tp[temp_des].PageVisible = true;
                    }
                    break;
                }
            }
        }
Exemplo n.º 2
0
        protected override void DrawRadioGroupItems(ControlGraphicsInfoArgs info)
        {
            RadioGroupViewInfo vi = info.ViewInfo as RadioGroupViewInfo;

            foreach (RadioGroupItemViewInfo itemInfo in vi.ItemsInfo)
            {
                itemInfo.Cache = info.Cache;
                try
                {
                    CustomDrawEventArgs            e    = new CustomDrawEventArgs(info.Graphics, itemInfo, vi.RadioPainter, false);
                    RepositoryItemCustomRadioGroup item = vi.Item as RepositoryItemCustomRadioGroup;
                    item.RaiseCustomDrawItem(e);
                    if (!e.Handled)
                    {
                        vi.RadioPainter.DrawObject(itemInfo);
                    }
                    if (itemInfo.Focused)
                    {
                        ControlPaint.DrawFocusRectangle(info.Graphics, vi.GetFocusRect(itemInfo));
                    }
                }
                finally
                {
                    itemInfo.Cache = null;
                }
            }
        }
        private void rdbtnWPAddStopDevNon_MouseUp(object sender, MouseEventArgs e)
        {
            RadioGroup         radioGroup = sender as RadioGroup;
            RadioGroupViewInfo viewInfo   = radioGroup.GetViewInfo() as RadioGroupViewInfo;

            if (viewInfo.GetItemIndexByPoint(e.Location) == viewInfo.SelectedIndex)
            {
                radioGroup.SelectedIndex = -1;
                viewInfo.HitIndex        = -1;
            }
        }