Until leap is supporting dll’s past 4.0 I’ll be putting out rebuilds of the SDK.
All DLL’s should be located here now.
Share on FacebookUntil leap is supporting dll’s past 4.0 I’ll be putting out rebuilds of the SDK.
All DLL’s should be located here now.
Share on FacebookThis is an updated version of the codeproject project by Meshack Musundi found here : (ConsoleLeapMouse) http://www.codeproject.com/Articles/550336/Leap-Motion-Move-Cursor
Updated version of code with my .net 4.5.1dll’s
Share on Facebookhttps://onedrive.live.com/redir?resid=1C0A3085568F1B39%21142
Point to this instead of 3.5 or 4.0
Enjoy!
Share on FacebookKey phrases: Repeating code on delay, pause without thread sleep, delaying code
c#
Usage: var dir = Directory.GetCurrentDirectory();
var file = SoundByName(sound);
var actual = Path.Combine(dir, file);
SoundPlayer player = new SoundPlayer(actual);
player.Play();
if (milliseconds > 0) { DelayFactory.DelayAction(milliseconds, () => player.Stop()); }
DelayFactory.DelayActionRepeat(milliseconds, () => player.Stop());
Code:
namespace ALineOfCode.Community.AugmentedLibraries.Common.Factory
{
public static class DelayFactory
{
public static void DelayAction(int millisecond, Action action)
{
var timer = new DispatcherTimer();
timer.Tick += delegate
{
DispatcherHelper.CheckBeginInvokeOnUI(async () =>
{
action.Invoke();
timer.Stop();
});
};
timer.Interval = TimeSpan.FromMilliseconds(millisecond);
timer.Start();
}
public static void DelayActionRepeat(int millisecond, Action action)
{
var timer = new DispatcherTimer();
timer.Tick += delegate
{
DispatcherHelper.CheckBeginInvokeOnUI(async () =>
{
action.Invoke();
});
};
timer.Interval = TimeSpan.FromMilliseconds(millisecond);
timer.Start();
}
}
}