Esempio n. 1
0
        private void buttonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            if (!radValue.Checked)
            {
                return;
            }
            if (e.Button.IsLeft)
            {
                if (_CurIndex == 0)
                {
                    return;
                }
                _CurIndex--;
            }
            else
            {
                if (_CurIndex == _BindingFixedValue.Count - 1)
                {
                    return;
                }
                _CurIndex++;
            }
            ucEditDateFilter.DateFilterEditType dateFilterType = _BindingFixedValue[_CurIndex];
            getDescription(dateFilterType);

            refreshUserSetting();
        }
Esempio n. 2
0
        private void getDescription(ucEditDateFilter.DateFilterEditType dateFilterType)
        {
            Type                 type = dateFilterType.GetType();
            FieldInfo            fi   = type.GetField(Enum.GetName(type, dateFilterType));
            DescriptionAttribute dna  = (DescriptionAttribute)Attribute.GetCustomAttribute(fi, typeof(DescriptionAttribute));

            this.buttonEdit1.Text = dna.Description;
        }