Ooui-tws-port/Ooui/Button.cs

30 lines
583 B
C#
Raw Normal View History

2017-06-12 19:09:09 +00:00
using System;
namespace Ooui
{
2017-06-13 07:03:01 +00:00
public class Button : FormControl
2017-06-12 19:09:09 +00:00
{
2017-06-13 07:51:24 +00:00
string val = "";
public string Value {
get => val;
set => SetProperty (ref val, value, "value");
}
2017-06-14 23:48:42 +00:00
2017-06-15 06:10:58 +00:00
public event EventHandler Clicked {
2017-06-15 07:58:55 +00:00
add => AddEventListener ("click", value);
remove => RemoveEventListener ("click", value);
2017-06-15 06:10:58 +00:00
}
2017-06-14 23:48:42 +00:00
public Button ()
2017-06-15 06:20:51 +00:00
: base ("button")
2017-06-14 23:48:42 +00:00
{
}
public Button (string text)
2017-06-15 06:20:51 +00:00
: this ()
2017-06-14 23:48:42 +00:00
{
Text = text;
}
2017-06-12 19:09:09 +00:00
}
}