* UIComboDataGridView: 修改拼写错误,FilterColomnName改为FilterColumnName
This commit is contained in:
parent
db276173e5
commit
cbdf2f1db3
Binary file not shown.
Binary file not shown.
2
SunnyUI.Demo/Controls/FButton.Designer.cs
generated
2
SunnyUI.Demo/Controls/FButton.Designer.cs
generated
@ -755,7 +755,6 @@ namespace Sunny.UI.Demo
|
||||
this.uiButton13.RectSelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(184)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.uiButton13.Size = new System.Drawing.Size(100, 35);
|
||||
this.uiButton13.Style = Sunny.UI.UIStyle.Red;
|
||||
this.uiButton13.StyleCustomMode = true;
|
||||
this.uiButton13.TabIndex = 76;
|
||||
this.uiButton13.Text = "Red";
|
||||
this.uiButton13.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
@ -878,7 +877,6 @@ namespace Sunny.UI.Demo
|
||||
this.uiButton4.ShowFocusLine = true;
|
||||
this.uiButton4.Size = new System.Drawing.Size(100, 35);
|
||||
this.uiButton4.Style = Sunny.UI.UIStyle.Red;
|
||||
this.uiButton4.StyleCustomMode = true;
|
||||
this.uiButton4.TabIndex = 64;
|
||||
this.uiButton4.Text = "Red";
|
||||
this.uiButton4.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
|
2
SunnyUI.Demo/Controls/FCombobox.Designer.cs
generated
2
SunnyUI.Demo/Controls/FCombobox.Designer.cs
generated
@ -510,7 +510,7 @@ namespace Sunny.UI.Demo
|
||||
this.uiComboDataGridView1.DropDownStyle = Sunny.UI.UIDropDownStyle.DropDownList;
|
||||
this.uiComboDataGridView1.FillColor = System.Drawing.Color.White;
|
||||
this.uiComboDataGridView1.FillColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
|
||||
this.uiComboDataGridView1.FilterColomnName = null;
|
||||
this.uiComboDataGridView1.FilterColumnName = null;
|
||||
this.uiComboDataGridView1.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiComboDataGridView1.Location = new System.Drawing.Point(386, 292);
|
||||
this.uiComboDataGridView1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
|
@ -45,7 +45,7 @@ namespace Sunny.UI.Demo
|
||||
|
||||
uiComboDataGridView1.ShowFilter = true;
|
||||
uiComboDataGridView1.DataGridView.DataSource = dt;
|
||||
uiComboDataGridView1.FilterColomnName = "Column1"; //不设置则全部列过滤
|
||||
uiComboDataGridView1.FilterColumnName = "Column1"; //不设置则全部列过滤
|
||||
}
|
||||
|
||||
private void UiComboDataGridView1_SelectIndexChange(object sender, int index)
|
||||
|
@ -47,7 +47,7 @@ namespace Sunny.UI
|
||||
set => panel.Visible = value;
|
||||
}
|
||||
|
||||
public string FilterColomnName { get; set; }
|
||||
public string FilterColumnName { get; set; }
|
||||
|
||||
public UIDataGridView DataGridView => dataGridView;
|
||||
|
||||
@ -299,9 +299,9 @@ namespace Sunny.UI
|
||||
}
|
||||
else
|
||||
{
|
||||
if (FilterColomnName.IsValid())
|
||||
if (FilterColumnName.IsValid())
|
||||
{
|
||||
string str = FilterColomnName + " like '%" + edtFilter.Text + "%'";
|
||||
string str = FilterColumnName + " like '%" + edtFilter.Text + "%'";
|
||||
filter = str;
|
||||
}
|
||||
else
|
||||
|
@ -49,7 +49,7 @@ namespace Sunny.UI
|
||||
|
||||
private void UIComboDataGridView_ButtonClick(object sender, EventArgs e)
|
||||
{
|
||||
item.FilterColomnName = FilterColomnName;
|
||||
item.FilterColumnName = FilterColumnName;
|
||||
item.ShowFilter = ShowFilter;
|
||||
ItemForm.Size = ItemSize;
|
||||
item.ShowButtons = true;
|
||||
@ -104,6 +104,6 @@ namespace Sunny.UI
|
||||
}
|
||||
|
||||
[DefaultValue(null)]
|
||||
public string FilterColomnName { get; set; }
|
||||
public string FilterColumnName { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -92,16 +92,6 @@ namespace Sunny.UI
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 自定义主题风格
|
||||
/// </summary>
|
||||
[DefaultValue(false)]
|
||||
[Description("获取或设置可以自定义主题风格"), Category("SunnyUI")]
|
||||
public bool StyleCustomMode
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 是否在设计期
|
||||
/// </summary>
|
||||
@ -249,13 +239,31 @@ namespace Sunny.UI
|
||||
get;
|
||||
}
|
||||
|
||||
protected UIStyle _style = UIStyle.Blue;
|
||||
|
||||
/// <summary>
|
||||
/// 主题样式
|
||||
/// </summary>
|
||||
[DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")]
|
||||
public UIStyle Style
|
||||
{
|
||||
get => _style;
|
||||
set => SetStyle(value);
|
||||
}
|
||||
|
||||
protected void SetStyleCustom(bool needRefresh = true)
|
||||
{
|
||||
_styleCustomMode = true;
|
||||
if (needRefresh) Invalidate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置主题样式
|
||||
/// </summary>
|
||||
/// <param name="style">主题样式</param>
|
||||
public void SetStyle(UIStyle style)
|
||||
{
|
||||
if (!style.IsCustom())
|
||||
if (!StyleCustomMode && !_style.IsCustom())
|
||||
{
|
||||
SetStyleColor(style.Colors());
|
||||
Invalidate();
|
||||
@ -264,6 +272,29 @@ namespace Sunny.UI
|
||||
_style = style;
|
||||
}
|
||||
|
||||
private bool _styleCustomMode;
|
||||
|
||||
/// <summary>
|
||||
/// 自定义主题风格
|
||||
/// </summary>
|
||||
[DefaultValue(false)]
|
||||
[Description("获取或设置可以自定义主题风格"), Category("SunnyUI")]
|
||||
public bool StyleCustomMode
|
||||
{
|
||||
get => _styleCustomMode;
|
||||
set
|
||||
{
|
||||
if (_styleCustomMode != value)
|
||||
{
|
||||
_styleCustomMode = value;
|
||||
if (!_styleCustomMode)
|
||||
{
|
||||
SetStyle(_style);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置主题样式颜色
|
||||
/// </summary>
|
||||
@ -296,18 +327,6 @@ namespace Sunny.UI
|
||||
rectSelectedColor = rectColor;
|
||||
}
|
||||
|
||||
protected UIStyle _style = UIStyle.Blue;
|
||||
|
||||
/// <summary>
|
||||
/// 主题样式
|
||||
/// </summary>
|
||||
[DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")]
|
||||
public UIStyle Style
|
||||
{
|
||||
get => _style;
|
||||
set => SetStyle(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 是否鼠标移上
|
||||
/// </summary>
|
||||
@ -942,12 +961,6 @@ namespace Sunny.UI
|
||||
}
|
||||
}
|
||||
|
||||
protected void SetStyleCustom(bool needRefresh = true)
|
||||
{
|
||||
_style = UIStyle.Custom;
|
||||
if (needRefresh) Invalidate();
|
||||
}
|
||||
|
||||
/// <summary>引发 <see cref="E:System.Windows.Forms.Control.GotFocus" /> 事件。</summary>
|
||||
/// <param name="e">包含事件数据的 <see cref="T:System.EventArgs" />。</param>
|
||||
protected override void OnGotFocus(EventArgs e)
|
||||
|
Loading…
x
Reference in New Issue
Block a user