mirror of
https://onedev.site.tesses.net/tytd2025
synced 2026-02-09 01:55:46 +00:00
First commit
This commit is contained in:
27
Tesses.YouTubeDownloader/src/Event.tcross
Normal file
27
Tesses.YouTubeDownloader/src/Event.tcross
Normal file
@@ -0,0 +1,27 @@
|
||||
class TYTD.Event {
|
||||
private _events = [];
|
||||
|
||||
public operator+(e)
|
||||
{
|
||||
if (!_events.Contains(e))
|
||||
{
|
||||
this._events.Add(e);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public operator-(e)
|
||||
{
|
||||
this._events.Remove(e);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public Invoke($$args)
|
||||
{
|
||||
each(var e : this._events)
|
||||
{
|
||||
e.Call(args);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user