ui/wpf/UIcore/Toolkit.cs

Sat, 05 Dec 2020 17:50:22 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sat, 05 Dec 2020 17:50:22 +0100
changeset 163
b70e2a77dea0
parent 82
0cdb8089a29f
permissions
-rw-r--r--

refactore document system to support document trees

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;

namespace UI
{
    public class EventCallback
    {
        public IntPtr Object;
        public Action<IntPtr> Action;

        public EventCallback(IntPtr uiobj, Action<IntPtr> action)
        {
            Object = uiobj;
            Action = action;
        }

        public void Callback(object sender, RoutedEventArgs a)
        {
            Action.Invoke(Object);
        }
    }
}

mercurial