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; | |
using MonoTouch.Dialog; | |
using System.Threading.Tasks; | |
namespace RadioButtonSample |
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; | |
using MonoTouch.Dialog; | |
using System.Threading.Tasks; | |
namespace RadioButtonSample |
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
// Prepare the data. | |
var dataText = data.ToString(); | |
var byteArray = dataText.ToByteArray(); | |
// Setup the web-request. | |
var req = WebRequest.Create(url); | |
req.Method = "PUT"; | |
req.ContentType = "Content-Type: application/json; charset=utf-8"; | |
req.ContentLength = byteArray.Length; | |
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
/* | |
Copyright 2012, Mu. | |
MIT License. | |
http://www.opensource.org/licenses/mit-license.php/ | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the 'Software'), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
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
/* | |
Copyright 2012, Mu. | |
MIT License. | |
http://www.opensource.org/licenses/mit-license.php/ | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the 'Software'), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
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
private void EnsureInvokedOnMainThread(Action action) | |
{ | |
if (IsMainThread()) | |
{ | |
action(); | |
return; | |
} | |
this.BeginInvokeOnMainThread(() => action()); | |
} |
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 MonoTouch.Foundation; | |
namespace Core | |
{ | |
public class Foo : NSObject, IDisposable | |
{ | |
public Foo() | |
{ | |
} |
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 FooCell : UITableViewCell | |
{ | |
public const string KEY = "FooKey"; | |
public event EventHandler<EventArgs> Tapped; | |
public FooCell() : base(UITableViewCellStyle.Subtitle, KEY) | |
{ | |
} | |
public override void TouchesEnded(NSSet touches, UIEvent evt) |
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 MonoTouch.UIKit; | |
using System.Drawing; | |
namespace Core.Controls | |
{ | |
public class DatePicker | |
{ | |
#region Head |
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
describe 'spying stuff', -> | |
models = null | |
resource = null | |
beforeEach -> | |
# Fakes - just for writing the sample test. | |
# You'd use the real methods under test of course. | |
models = | |
Item: | |
findRoot: () -> console.log 'findRoot Called', err, item | |
NewerOlder