调整usebuttonclick属性

This commit is contained in:
H 2020-08-26 18:55:28 +08:00
parent b6aee6764f
commit 32eb27dc09
5 changed files with 25 additions and 63 deletions

View File

@ -120,6 +120,9 @@
<metadata name="uiToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="uiToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>52</value>
</metadata>

View File

@ -77,27 +77,6 @@ namespace Sunny.UI
base.OnClick(e);
}
private bool useDoubleClick = false;
[Description("是否启用双击事件"), Category("SunnyUI")]
[DefaultValue(false)]
public bool UseDoubleClick
{
get
{
return useDoubleClick;
}
set
{
if (useDoubleClick != value)
{
useDoubleClick = value;
SetStyle(ControlStyles.StandardDoubleClick, useDoubleClick);
Invalidate();
}
}
}
private bool showTips = false;
[Description("是否显示角标"), Category("SunnyUI")]

View File

@ -105,27 +105,6 @@ namespace Sunny.UI
}
}
private bool _useDoubleClick = false;
[Description("是否启用双击事件"), Category("SunnyUI")]
[DefaultValue(false)]
public bool UseDoubleClick
{
get
{
return _useDoubleClick;
}
set
{
if (_useDoubleClick != value)
{
_useDoubleClick = value;
SetStyle(ControlStyles.StandardDoubleClick, _useDoubleClick);
Invalidate();
}
}
}
protected override void OnPaintFore(Graphics g, GraphicsPath path)
{
//设置按钮标题位置

View File

@ -266,6 +266,27 @@ namespace Sunny.UI
}
}
private bool useDoubleClick = false;
[Description("是否启用双击事件"), Category("SunnyUI")]
[DefaultValue(false)]
public bool UseDoubleClick
{
get
{
return useDoubleClick;
}
set
{
if (useDoubleClick != value)
{
useDoubleClick = value;
//SetStyle(ControlStyles.StandardDoubleClick, useDoubleClick);
//Invalidate();
}
}
}
/// <summary>
/// OnPaint
/// </summary>

View File

@ -137,26 +137,6 @@ namespace Sunny.UI
set => SetRectColor(value);
}
private bool useDoubleClick = false;
[Description("是否启用双击事件"), Category("SunnyUI")]
[DefaultValue(false)]
public bool UseDoubleClick
{
get
{
return useDoubleClick;
}
set
{
if (useDoubleClick != value)
{
useDoubleClick = value;
Invalidate();
}
}
}
protected override void OnClick(EventArgs e)
{
base.OnClick(e);
@ -165,7 +145,7 @@ namespace Sunny.UI
protected override void OnDoubleClick(EventArgs e)
{
if (!useDoubleClick)
if (!UseDoubleClick)
{
base.OnClick(e);
Active = !Active;