* UISwitch:更新了Click判断事件。
This commit is contained in:
parent
3f100fd419
commit
3317cb65ae
Binary file not shown.
BIN
Bin/SunnyUI.dll
BIN
Bin/SunnyUI.dll
Binary file not shown.
2
SunnyUI.Demo/Controls/FButton.Designer.cs
generated
2
SunnyUI.Demo/Controls/FButton.Designer.cs
generated
@ -946,6 +946,8 @@
|
||||
this.uiSwitch1.Size = new System.Drawing.Size(75, 29);
|
||||
this.uiSwitch1.TabIndex = 45;
|
||||
this.uiSwitch1.Text = "uiSwitch1";
|
||||
this.uiSwitch1.ValueChanged += new Sunny.UI.UISwitch.OnValueChanged(this.uiSwitch1_ValueChanged);
|
||||
this.uiSwitch1.Click += new System.EventHandler(this.uiSwitch1_Click);
|
||||
//
|
||||
// uiLine4
|
||||
//
|
||||
|
@ -17,5 +17,15 @@ namespace Sunny.UI.Demo
|
||||
{
|
||||
uiButton10.Selected = !uiButton10.Selected;
|
||||
}
|
||||
|
||||
private void uiSwitch1_ValueChanged(object sender, bool value)
|
||||
{
|
||||
Console.WriteLine(uiSwitch1.Active);
|
||||
}
|
||||
|
||||
private void uiSwitch1_Click(object sender, EventArgs e)
|
||||
{
|
||||
Console.WriteLine(uiSwitch1.Active);
|
||||
}
|
||||
}
|
||||
}
|
@ -159,16 +159,16 @@ namespace Sunny.UI
|
||||
|
||||
protected override void OnClick(EventArgs e)
|
||||
{
|
||||
base.OnClick(e);
|
||||
Active = !Active;
|
||||
base.OnClick(e);
|
||||
}
|
||||
|
||||
protected override void OnDoubleClick(EventArgs e)
|
||||
{
|
||||
if (!UseDoubleClick)
|
||||
{
|
||||
base.OnClick(e);
|
||||
Active = !Active;
|
||||
base.OnClick(e);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user