This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static GeoCoordinate AddMetersToGeoCoordinate(GeoCoordinate current, double metersH, double metersV) | |
{ | |
return new GeoCoordinate(current.Latitude + (metersH / (111111)), current.Longitude + (metersV / (111111 * Math.Cos(current.Latitude)))); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var filter = new HttpBaseProtocolFilter(); | |
#if DEBUG | |
// ******************* | |
// IGNORING CERTIFACTE PROBLEMS | |
// ******************* | |
filter.IgnorableServerCertificateErrors.Add(ChainValidationResult.IncompleteChain); | |
filter.IgnorableServerCertificateErrors.Add(ChainValidationResult.Expired); | |
filter.IgnorableServerCertificateErrors.Add(ChainValidationResult.Untrusted); | |
filter.IgnorableServerCertificateErrors.Add(ChainValidationResult.InvalidName); | |
// ******************* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AssociationUriMapper : UriMapperBase | |
{ | |
public override Uri MapUri([NotNull] Uri uri) | |
{ | |
var op = (Application.Current as App).ShareOperation; | |
if (op != null) | |
{ | |
var link = op.Data.GetWebLinkAsync().GetResults(); | |
return new Uri("/Views/AddedView.xaml?Uri=" + HttpUtility.UrlEncode(link.ToString()), UriKind.Relative); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type AppStoreData = JsonProvider<"http://itunes.apple.com/search?term=LEMA&entity=software&country=CZ"> | |
let searchAppStore (term:string) (country:string) = | |
let data = http (sprintf "http://itunes.apple.com/search?term=%s&entity=software&country=%s" term country) | |
let res = AppStoreData.Parse data | |
res.Results | |
|> Seq.map (fun x-> {Name=x.TrackName; Package=x.BundleId; IconUrl=x.ArtworkUrl60; StoreUrl = ""}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
cls | |
"tools\nuget\nuget.exe" "install" "FAKE" "-OutputDirectory" "tools" "-ExcludeVersion" | |
"tools\FAKE\tools\Fake.exe" build.fsx | |
pause |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Address book wrapper | |
/// Needs address book permissions to work | |
/// </summary> | |
public class AddressBookService : IAddressBookService | |
{ | |
/// <summary> | |
/// Gets a list of contacts in device address book | |
/// </summary> | |
/// <returns>List of contact</returns> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected override PhoneApplicationFrame CreatePhoneApplicationFrame() | |
{ | |
var frame = new PhoneApplicationFrame { Margin = new Thickness(0, -1, 0, 0) }; | |
return frame; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void SetupMockIAP() | |
{ | |
MockIAP.Init(); | |
MockIAP.RunInMockMode(true); | |
MockIAP.SetListingInformation(1, "en-us", "A description", "1", "TestApp"); | |
// Add some more items manually. | |
ProductListing p = new ProductListing | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using MockIAPLib; | |
using Store = MockIAPLib; | |
namespace YourAPP | |
{ | |
/// <summary> | |
/// Service for mocking in-app purchases in debug mode | |
/// </summary> | |
public class MockWindowsPhoneStoreService: IWindowsPhoneStoreService |