mirror of
https://gitee.com/AntdUI/AntdUI.git
synced 2026-03-22 13:40:44 +08:00
60 lines
2.3 KiB
C#
60 lines
2.3 KiB
C#
// COPYRIGHT (C) Tom. ALL RIGHTS RESERVED.
|
|
// THE AntdUI PROJECT IS AN WINFORM LIBRARY LICENSED UNDER THE Apache-2.0 License.
|
|
// LICENSED UNDER THE Apache License, VERSION 2.0 (THE "License")
|
|
// YOU MAY NOT USE THIS FILE EXCEPT IN COMPLIANCE WITH THE License.
|
|
// YOU MAY OBTAIN A COPY OF THE LICENSE AT
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING, SOFTWARE
|
|
// DISTRIBUTED UNDER THE LICENSE IS DISTRIBUTED ON AN "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
// SEE THE LICENSE FOR THE SPECIFIC LANGUAGE GOVERNING PERMISSIONS AND
|
|
// LIMITATIONS UNDER THE License.
|
|
// GITEE: https://gitee.com/AntdUI/AntdUI
|
|
// GITHUB: https://github.com/AntdUI/AntdUI
|
|
// CSDN: https://blog.csdn.net/v_132
|
|
// QQ: 17379620
|
|
|
|
using System.Windows.Forms;
|
|
|
|
namespace Demo.Controls
|
|
{
|
|
public partial class Collapse : UserControl
|
|
{
|
|
Form form;
|
|
public Collapse(Form _form)
|
|
{
|
|
form = _form;
|
|
InitializeComponent();
|
|
}
|
|
private void collapse1_ButtonClickChanged(object sender, AntdUI.CollapseButtonClickEventArgs e)
|
|
{
|
|
AntdUI.Notification.info(form, e.Parent.Text, e.Value.Text, AntdUI.TAlignFrom.Top, Font);
|
|
}
|
|
|
|
private void edit1_TextChanged(object sender, AntdUI.CollapseEditChangedEventArgs e)
|
|
{
|
|
if (string.IsNullOrEmpty(e.Value == null ? string.Empty : e.Value.ToString())) return;
|
|
AntdUI.Notification.info(form, e.Parent.Text, e.Value.ToString(), AntdUI.TAlignFrom.Top, Font);
|
|
}
|
|
|
|
private void CollapseGroupButton11_CustomInputEdit(object sender, AntdUI.CollapseCustomInputEditEventArgs e)
|
|
{
|
|
AntdUI.Select select = new AntdUI.Select()
|
|
{
|
|
TabIndex = 0,
|
|
PrefixSvg = "DiffOutlined",
|
|
PlaceholderText = "Ë÷Òý",
|
|
};
|
|
select.Items.AddRange(new object[] { 100, 200, 300, 400, 500 });
|
|
e.Edit = select;
|
|
}
|
|
|
|
private void switchButton_CheckedChanged(object sender, AntdUI.CollapseSwitchCheckedChangedEventArgs e)
|
|
{
|
|
AntdUI.Notification.info(form, e.Parent.Text, e.Checked ? e.Value.CheckedText : e.Value.UnCheckedText, AntdUI.TAlignFrom.Top, Font);
|
|
}
|
|
}
|
|
|
|
} |