Merge branch 'master' of http://gitee.com/yhuse/SunnyUI
This commit is contained in:
commit
15c857d91c
@ -15,6 +15,8 @@ namespace Sunny.UI
|
||||
private UISymbolButton btnClear;
|
||||
private UIDataGridView dataGridView;
|
||||
|
||||
public event OnComboDataGridViewFilterChanged ComboDataGridViewFilterChanged;
|
||||
|
||||
public UIComboDataGridViewItem()
|
||||
{
|
||||
InitializeComponent();
|
||||
@ -364,6 +366,8 @@ namespace Sunny.UI
|
||||
{
|
||||
table.DefaultView.RowFilter = filter;
|
||||
}
|
||||
|
||||
ComboDataGridViewFilterChanged?.Invoke(this, new UIComboDataGridViewArgs(edtFilter.Text, dataGridView.RowCount));
|
||||
}
|
||||
|
||||
private void btnClear_Click(object sender, System.EventArgs e)
|
||||
|
@ -201,4 +201,23 @@ namespace Sunny.UI
|
||||
itemForm.SetStyle(style);
|
||||
}
|
||||
}
|
||||
|
||||
public delegate void OnComboDataGridViewFilterChanged(object sender, UIComboDataGridViewArgs e);
|
||||
|
||||
public class UIComboDataGridViewArgs : EventArgs
|
||||
{
|
||||
public string FilterText { get; set; }
|
||||
public int FilterCount { get; set; }
|
||||
|
||||
public UIComboDataGridViewArgs()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public UIComboDataGridViewArgs(string filterText, int filterCount)
|
||||
{
|
||||
FilterText = filterText;
|
||||
FilterCount = filterCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -21,6 +21,7 @@
|
||||
* 2022-03-22: V3.1.1 增加自动过滤、单元格双击选中
|
||||
* 2022-04-16: V3.1.3 增加行多选
|
||||
* 2022-06-16: V3.2.0 增加下拉框宽度、高度
|
||||
* 2022-06-19: V3.2.0 增加FilterChanged,输出过滤文字和记录条数
|
||||
******************************************************************************/
|
||||
|
||||
using System;
|
||||
@ -52,6 +53,8 @@ namespace Sunny.UI
|
||||
DropDownHeight = 300;
|
||||
}
|
||||
|
||||
public event OnComboDataGridViewFilterChanged FilterChanged;
|
||||
|
||||
[DefaultValue(500)]
|
||||
[Description("下拉框宽度"), Category("SunnyUI")]
|
||||
public int DropDownWidth { get; set; }
|
||||
@ -70,6 +73,12 @@ namespace Sunny.UI
|
||||
item.Translate();
|
||||
//ItemForm.Show(this);
|
||||
ItemForm.Show(this, new Size(DropDownWidth < Width ? Width : DropDownWidth, DropDownHeight));
|
||||
item.ComboDataGridViewFilterChanged += Item_ComboDataGridViewFilterChanged;
|
||||
}
|
||||
|
||||
private void Item_ComboDataGridViewFilterChanged(object sender, UIComboDataGridViewArgs e)
|
||||
{
|
||||
FilterChanged?.Invoke(this, e);
|
||||
}
|
||||
|
||||
[DefaultValue(typeof(Size), "320, 240"), Description("下拉弹框界面大小"), Category("SunnyUI")]
|
||||
|
@ -29,6 +29,7 @@
|
||||
* 2022-04-20: V3.1.5 不显示标签页时屏蔽左右键
|
||||
* 2022-05-11: V3.1.8 修复屏蔽左右键后其他控件无法使用左右键的问题
|
||||
* 2022-05-17: V3.1.9 修复了一个首页无法关闭的问题
|
||||
* 2022-06-19: V3.2.0 多页面框架关闭页面时执行UIPage的FormClosed事件
|
||||
******************************************************************************/
|
||||
|
||||
using Sunny.UI.Win32;
|
||||
@ -818,6 +819,7 @@ namespace Sunny.UI
|
||||
if (AutoClosePage)
|
||||
{
|
||||
pages[i].Final();
|
||||
pages[i].Close();
|
||||
pages[i].Dispose();
|
||||
pages[i] = null;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user