New DLL Leap 4.5.1 for 1.0.9.8391

https://onedrive.live.com/redir?resid=1C0A3085568F1B39%21142

Point to this instead of 3.5  or  4.0

Enjoy!

Share on Facebook

How to delay an action or keep on a timed loop C#

Key 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();
}
}
}

Share on Facebook

AL Alerting by Mail/Phone

Share on Facebook

Patient Dashboard for Augmented living.

This is a centralized collection point for staff to know if someone needs assistance and uses the AL software.

patient_Dashboard

In a mobile browser

dashboard_mobile

Share on Facebook

Learn Some basic CSS in 5 minutes –

Sitting on your butt today because of the snow? Learn some basic web code? Take 5 minutes out to understand CSS Classes.

Go to http://jsfiddle.net/ and get a basic understanding for lined CSS (Style sheets).

Below is an example on how to manipulate a web page through styles one in line and one from a Cascading Stylesheet CSS file. See how you can change these and post your picture. (For more properties other than color)

In top left HTML :

<h1 class=”h2-red”>Hi</h1>
<h1 style=”color: green;”>Hi Green</h1>
In top Right CSS
.h2-red
{
color: red;
text-align: center;
}

Note Align can have many

left Left-aligns the heading
right Right-aligns the heading
center Center-aligns the heading
justify The heading is justified to both margins

Try playing around with the code in the .h2-red and the HTML. Post your results.
jsfiddle

Share on Facebook

MVC 5 Crashes on Debug, with the failed DLL :Web App C#

keywords: Internet Explorer IE devenv devenv.exe crash mvc 5 freezes
There are a few fixes out there that didn’t work for me.

I deleted the IISEXPRESS Folder and added _CSRUN_DISABLE_WORKAROUNDS to system environmental variables rebooted etc. No luck (though this has worked for others).

What I had to do to fix: Open Visual Studio in /safemode as administrator. Then add the ASP.NET Web Project to the solution in Visual studio.

Worked first time.  Could be an add-on.

Share on Facebook

Larpferno – code base started. – MonoGame – C# – Win 8.1

Started on the base framework for Items and Player Dwellings. Cabin Raiding rules, House Guards, Material “Enchantability” and the like.

Maintainability index is 93/90/95. Good stuff. – 600 solid lines

larpferno_bak

Share on Facebook

Very simplistic example of Parallel.Foreach – C# – Faster UI

Keywords: WPF Winforms Slow UI C# speed increase

I am a developer by trade and I run into legacy Winform and WPF applications quite a bit.

I went to look for a simplistic Parallel.ForEach Example, and I couldn’t really find one.

In the constructor you will see something like this. Where everything is Synchronous and slow.

Since some of these are SQL calls unless I go the route of using the new SQL Asynchronous features (which would require a bit of real rework). I am going the lazy route:

GetUser();
LoadWeapons();
LoadPlayer();
LoadLastKnownCombatLocation();

First we want to load each into an Action.
var getUser = () => {GetUser()};
var loadWeapons = () => {LoadWeapons()};
var loadPlayer = () => {LoadPlayer()};
var loadLastKnownCombatLocation = () => {LoadLastKnownCombatLocation()};

//Create List (any IEnumerable should work)
var allActions = new List();

//the add can be done in the instantiation using {}’s instead
allActions.Add(getUser);
allActions.Add(loadWeapons);
allActions.Add(loadPlayer);
allActions.Add(loadLastKnownCombatLocation);

Parallel.ForEach(allActions, (e) => e.Invoke());

This is only solid in situations where UI is not dependent on another call first, IE LoadUser() may be needed to LoadPlayer(), You can easily make a parallel for all data pulls then another for all
UI updating.

–Augmented Developer

Share on Facebook

Running Give Camp.. Hope you can make it! April 12-13 2014 Alpharetta

https://www.eventbrite.com/e/microsoft-givecamp-atlanta-2014-tickets-9511768957?ref=enivtefor001&utm_source=eb_email&utm_medium=email&utm_campaign=inviteformal001&utm_term=eventpage

Share on Facebook

Augmented Living using Netflix (Windows 7-8RT C#)

How to use Augmented Living to watch Netflix.

Share on Facebook