This file contains 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 System; | |
using System.Collections.Generic; | |
using Android.App; | |
using Android.Views; | |
using Android.Widget; | |
namespace ContentControls { | |
public class AutoAdapter : ArrayAdapter, IFilterable | |
{ | |
LayoutInflater inflater; |
This file contains 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 System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using MonoTouch.Foundation; | |
using MonoTouch.UIKit; | |
namespace ColorControl { | |
// The UIApplicationDelegate for the application. This class is responsible for launching the | |
// User Interface of the application, as well as listening (and optionally responding) to |
This file contains 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 AppleTileSource : TileSource { | |
public AppleTileSource() { | |
Name = "Apple"; | |
FileExtension = ".jpg"; | |
} | |
public override string GetTileUrl(TileName name) { | |
return string.Format("http://gsp2.apple.com/tile?api=1&style=slideshow&layers=default&lang=de_DE&z={0}&x={1}&y={2}&v=9", | |
name.Zoom, | |
name.X, name.Y); | |
} |
This file contains 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
[Export("connection:didWriteData:totalBytesWritten:expectedTotalBytes:")] | |
public void DidWriteData (NSUrlConnection connection, long bytesWrittenA, int totalBytesWrittenA, int totalBytesWrittenB, int expectedTotalBytesA, int expectedTotalBytesB) { | |
Console.WriteLine ("bytesWrittenA:"+bytesWrittenA); | |
// Console.WriteLine ("bytesWrittenB:"+bytesWrittenB); | |
Console.WriteLine ("totalBytesWrittenA:"+totalBytesWrittenA); | |
Console.WriteLine ("totalBytesWrittenB:"+totalBytesWrittenB); | |
Console.WriteLine ("expectedTotalBytesA:"+expectedTotalBytesA); | |
Console.WriteLine ("expectedTotalBytesB:"+expectedTotalBytesB); | |
} |
This file contains 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
THE OBJECTIVE-C | |
- (void)connection:(NSURLConnection *)connection didWriteData:(long long)bytesWritten totalBytesWritten:(long long)totalBytesWritten expectedTotalBytes:(long long)expectedTotalBytes | |
THE MT BINDING | |
[Export("connection:didWriteData:totalBytesWritten:expectedTotalBytes:")] | |
public void DidWriteData (NSUrlConnection connection, long bytesWritten, long totalBytesWritten, long expectedTotalBytes) { |
This file contains 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 Android.App; | |
using Android.OS; | |
using Android.Widget; | |
namespace Demo | |
{ | |
[Activity(Label = "HelloWorld", MainLauncher = true)] | |
public class HelloWorldActivity : Activity | |
{ | |
int count = 0; |
This file contains 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
/* | |
* ORIGINAL (JAVA) CODE LICENCE | |
* | |
* Copyright (C) 2010 Neil Davies | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 |
This file contains 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 System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using Android.App; | |
using Android.Content; | |
using Android.OS; | |
using Android.Runtime; | |
using Android.Views; |
This file contains 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 System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using Android.App; | |
using Android.Content; | |
using Android.OS; | |
using Android.Runtime; | |
using Android.Views; |
This file contains 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 MonoTouch.Foundation; | |
using MonoTouch.CoreLocation; | |
using MonoTouch.ObjCRuntime; | |
using System; | |
/// <summary> | |
/// Helper class intended SOLELY to provide access to | |
/// CLLocationManager:locationServicesEnabled | |
/// that works on MonoTouch versions 2.x and 3.x (iOS3 and iOS4) | |
/// </summary> | |
/// <remarks> |