using System; using System.Device.Location; using System.Windows.Controls; using MahTweets.Mobile.Core; using MahTweets.Mobile.Core.Interfaces; using MahTweets.Mobile.FourSquarePlugin.ViewModels; using MahTweets.Mobile.FourSquarePlugin.Views; namespace MahTweets.Mobile.FourSquarePlugin { public class FourSquare : IKnowWhereYouAre { private readonly Func _setupViewModelFactory; public Credential Credentials { get; set; } public FourSquare(Func setupViewModelFactory) { _setupViewModelFactory = setupViewModelFactory; } public string Name { get { return "FourSquare"; } } public string Protocol { get { return "foursquare"; } } public static Action OnSuccess { get; set; } public static Action OnFailure { get; set; } public Action ShowDialog { get; set; } public Uri DarkIcon { get { return new Uri("/MahTweets.Mobile.FourSquarePlugin;component/Resources/4sq.png", UriKind.RelativeOrAbsolute); } } public Uri LightIcon { get { return new Uri("/MahTweets.Mobile.FourSquarePlugin;component/Resources/4sq.png", UriKind.RelativeOrAbsolute); } } public void Setup(Action onSuccess, Action onError) { OnSuccess = onSuccess; OnFailure = onError; var setup = new FourSquareSetupView() { DataContext = _setupViewModelFactory() }; ShowDialog(setup); } public void Connect() { } public void Disconnect() { } public void NewLocationUpdate(string text, string id, GeoCoordinate location) { } } }