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
[Checkbox] | |
public bool TestBool | |
{ | |
get { return _testBool; } | |
set | |
{ | |
_testBool = value; | |
_testBool2 = !value; | |
if (PropertyChanged != null) |
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 System; | |
using MonoTouch.UIKit; | |
using System.Drawing; | |
using MonoMobile.MVVM; | |
namespace TileFlood | |
{ | |
public class GameUIController : UIViewController | |
{ | |
private readonly GameGridViewController _grid; |
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 void FizzBuzz(int number) | |
{ | |
// return FizzBuzz if Divisible by three and five | |
if(number % 3 == 0 && number % 5 == 0) | |
return "FizzBuzz"; | |
return number; | |
} | |
public void FizzBuzz(int number) | |
{ |
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 UIImage Crop(UIImage image, RectangleF section) | |
{ | |
// Start context. | |
UIGraphics.BeginImageContext(section.Size); | |
var ctx = UIGraphics.GetCurrentContext(); | |
// Clear the image with red. | |
ctx.SetRGBFillColor(255, 255, 255, 255); | |
ctx.FillRect(new RectangleF(new PointF(0, 0), section.Size)); |
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 override void HandleResult (FBRequest request, NSDictionary dict) | |
{ | |
var data = (NSArray)dict.ObjectForKey(new NSString("data")); | |
for(uint i = 0; i < 6; ++i) | |
{ | |
var objDict = (NSMutableDictionary)Runtime.GetNSObject(data.ValueAt(i)); | |
var name = objDict.ObjectForKey(new NSString("name")); | |
Console.WriteLine(name.ToString()); | |
} |
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 override void ViewDidLoad () | |
{ | |
base.ViewDidLoad (); | |
Console.WriteLine("ViewDidLoad"); | |
UIImage image = UIImage.FromFile("ProfilePicture.jpg"); | |
UIImageView imageView = new UIImageView(image); | |
scrollView.AddSubview(imageView); |
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 DownloadFeed() | |
{ | |
string pipeUrl = "http://pipes.yahooapis.com/pipes/pipe.run?_id=4rBri9Ef3RG8CEGLLe2fWQ&_render=rss&feedUrl="; | |
string feedUrl = "http://feeds.feedburner.com/follesoe"; | |
string url = string.Concat(pipeUrl, HttpUtility.UrlEncode(feedUrl)); | |
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(new Uri(url)); | |
request.BeginGetResponse(<span class="kwrd">new</span> AsyncCallback(ResponseHandler), request); | |
} |
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
function SelectItem(orderID) | |
{ | |
window.external.SelectItem(orderID); | |
} | |
public void SelectItem(string orderID) | |
{ | |
int id = Convert.ToInt32(orderID); | |
foreach (ListViewItem li in listOrders.Items) | |
{ |
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
function LoadOrders(jsonOrders) | |
{ | |
var orders = eval(jsonOrders); | |
for(var i = 0; i < orders.length; ++i) | |
{ | |
var order = orders[i]; | |
var shape = new VEShape(VEShapeType.Pushpin, | |
new VELatLong(order.Customer.Location.Latitude, | |
order.Customer.Location.Longitude)); | |
shape.SetTitle(order.Customer.Name); |
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
string json = orders.ToJSON(); | |
webBrowser.Document.InvokeScript("LoadOrders", new string[] { json }); |