调整usebuttonclick属性
This commit is contained in:
parent
b6aee6764f
commit
32eb27dc09
@ -120,6 +120,9 @@
|
|||||||
<metadata name="uiToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="uiToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>17, 17</value>
|
<value>17, 17</value>
|
||||||
</metadata>
|
</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">
|
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>52</value>
|
<value>52</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
@ -77,27 +77,6 @@ namespace Sunny.UI
|
|||||||
base.OnClick(e);
|
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;
|
private bool showTips = false;
|
||||||
|
|
||||||
[Description("是否显示角标"), Category("SunnyUI")]
|
[Description("是否显示角标"), Category("SunnyUI")]
|
||||||
|
@ -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)
|
protected override void OnPaintFore(Graphics g, GraphicsPath path)
|
||||||
{
|
{
|
||||||
//设置按钮标题位置
|
//设置按钮标题位置
|
||||||
|
@ -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>
|
/// <summary>
|
||||||
/// OnPaint
|
/// OnPaint
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -137,26 +137,6 @@ namespace Sunny.UI
|
|||||||
set => SetRectColor(value);
|
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)
|
protected override void OnClick(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnClick(e);
|
base.OnClick(e);
|
||||||
@ -165,7 +145,7 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
protected override void OnDoubleClick(EventArgs e)
|
protected override void OnDoubleClick(EventArgs e)
|
||||||
{
|
{
|
||||||
if (!useDoubleClick)
|
if (!UseDoubleClick)
|
||||||
{
|
{
|
||||||
base.OnClick(e);
|
base.OnClick(e);
|
||||||
Active = !Active;
|
Active = !Active;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user