Shuxia Ning
2024-08-07 554694000f4d7ffc231a23e7ff429595c254ceaa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using DevExpress.XtraEditors;
 
namespace IStation.Win
{
    public static class TokenEditExtend
    {
        /// <summary>
        /// 初始化默认设置
        /// </summary>
        /// <param name="rhs"></param>
        /// <param name="SeparatorChar"></param>
        public static void InitDefaultSettings(this TokenEdit rhs, char SeparatorChar = ',')
        {
            rhs.Properties.ShowDropDown = true;
            rhs.Properties.DropDownRowCount = 5;
            rhs.Properties.CheckMode = TokenEditCheckMode.Default;
            rhs.Properties.MaxExpandLines = 5;
            rhs.Properties.PopupPanelOptions.ShowPopupPanel = true;
            rhs.Properties.PopupPanelOptions.Location = TokenEditPopupPanelLocation.BelowToken;
            rhs.Properties.ShowRemoveTokenButtons = false;
            rhs.Properties.PopupSizeable = false;
            rhs.Properties.TokenGlyphLocation = TokenEditGlyphLocation.Left;
            rhs.Properties.EditValueSeparatorChar = SeparatorChar;
            rhs.Properties.AutoHeightMode = TokenEditAutoHeightMode.RestrictedExpand;
            rhs.ShowPopup();
        }
    }
}