namespace GameLibrary.Framework{
using System;
using Caliburn.PresentationFramework;
using Microsoft.Practices.ServiceLocation;
public class BusyResult : IResult
{
private readonly bool _isBusy;
public BusyResult(bool isBusy)
{
_isBusy = isBusy;
}
public void Execute(IRoutedMessageWithOutcome message, IInteractionNode handlingNode)
{
var shell = ServiceLocator.Current.GetInstance<IShell>();
shell.IsBusy = _isBusy;
Completed(this, null);
}
public event Action<IResult, Exception> Completed = delegate { };
}
}
|