mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-30 05:34:06 +02:00
20 lines
486 B
C#
20 lines
486 B
C#
using System;
|
|
using System.Windows.Forms;
|
|
using TweetDck.Core.Controls;
|
|
|
|
namespace TweetDck.Core.Utils.Notification{
|
|
sealed class CallbackBridge{
|
|
private readonly Control owner;
|
|
private readonly Action safeCallback;
|
|
|
|
public CallbackBridge(Control owner, Action safeCallback){
|
|
this.owner = owner;
|
|
this.safeCallback = safeCallback;
|
|
}
|
|
|
|
public void Trigger(){
|
|
owner.InvokeSafe(safeCallback);
|
|
}
|
|
}
|
|
}
|