Skip to content

Instantly share code, notes, and snippets.

View Redth's full-sized avatar
🏠
Working from home

Jonathan Dick Redth

🏠
Working from home
View GitHub Profile
using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
namespace MonoDroid.CustomList
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:id="@+id/widget28"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
xmlns:android="http://schemas.android.com/apk/res/android"
>
<ListView
android:id="@+id/listView"
@Redth
Redth / gist:806566
Created February 1, 2011 20:11
MonoTouch HTTPS Post
using System;
using MonoTouch.Foundation;
using MonoTouch.CoreFoundation;
using MonoTouch.UIKit;
using MonoTouch.ObjCRuntime;
namespace MyProject
{
public class Http
{
@Redth
Redth / Google-3-legged-oauth-csharp.cs
Created June 1, 2011 17:16
Google 3-Legged OAuth C#
/*
* Google OAuth 3-Legged for C#
*
* Author: Redth
* Date: June 1, 2011
*
* This class if for Authenticating to Google via 3-Legged OAuth
*
* Example Use:
*
@Redth
Redth / sms-contacts-xamarin.mobile-mono-for-android.cs
Created December 9, 2011 01:55
Send SMS to Contact using Xamarin.Mobile in Mono for Android!
void button_Click(object sender, EventArgs e)
{
//Create a new intent for choosing a contact
var contactPickerIntent = new Intent(Intent.ActionPick,
Android.Provider.ContactsContract.Contacts.ContentUri);
//Start the contact picker expecting a result
// with the resultCode '101'
StartActivityForResult(contactPickerIntent, 101);
}
@Redth
Redth / ZxingViewController.cs
Created July 2, 2012 17:01
ZXING MonoTouch ZxingViewController
using System;
using System.Collections;
using System.Runtime.InteropServices;
using MonoTouch.UIKit;
using MonoTouch.CoreFoundation;
using MonoTouch.AVFoundation;
using MonoTouch.CoreVideo;
using MonoTouch.CoreMedia;
using com.google.zxing;
using com.google.zxing.common;
@Redth
Redth / Detect-iPhone-5.cs
Created September 13, 2012 15:31
Blog-Post-MonoTouch-iPhone5-01
public static bool IsTall
{
get { return UIScreen.MainScreen.Bounds.Height >= (1136 / 2); }
}
@Redth
Redth / Load-iPhone5-Assets.cs
Created September 13, 2012 15:32
Blog-Post-MonoTouch-iPhone5-02
static UIImage tableViewBackgroundImage = null;
public static UIImage TableViewBackgroundImage
{
get
{
if (tableViewBackgroundImage == null)
tableViewBackgroundImage = IsTall
? UIImage.FromFile("Images/[email protected]")
: UIImage.FromFile("Images/TableViewBackground.png");
@Redth
Redth / CodeShareReport.cs
Created November 27, 2012 18:05 — forked from praeclarum/CodeShareReport.cs
Computes the code share stats for the iCircuit project
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using System.IO;
namespace CodeShareReport
{
class App
using System.Drawing;
using System;
using MonoTouch.UIKit;
using MonoTouch.CoreGraphics;
using System.Runtime.InteropServices;
namespace ZXing
{
public partial class RGBLuminanceSource