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.Dialog; | |
using MonoTouch.Foundation; | |
using MonoTouch.UIKit; | |
namespace MobileAgent | |
{ | |
public class AddCarDialogViewController : BaseDetailDialogViewController |
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 bool UploadProjects(BaseSyncProgress syncProgress) | |
{ | |
// then map the pending TS's, and insert | |
bool res = true; | |
try | |
{ | |
List<PendingProject> projects = new List<PendingProject>(); | |
Util.Log("Creating pending contacts"); | |
int count = 1; |
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
CLLocationManager locationManager = null; | |
public void GetForCurrentLocation (double distance, Action<List<Marker>, int> OnRegionUpdate) | |
{ | |
if (CLLocationManager.LocationServicesEnabled) | |
{ | |
if (locationManager == null) | |
{ |
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
GIST #1: | |
Many: | |
/v2/tasks | |
{ "tasks":[ | |
{ | |
"path":"/v2/tasks/1", | |
"project":"/v2/projects/1", |
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
Section loginSection = new Section(); | |
var loginButton = new BTButtonElement("Settings", BTButtonElement.Green); | |
loginButton.Tapped += delegate { | |
AppLauncher.Instance.SetupLoginDialog(this.ParentViewController, true, delegate { | |
DataSource.Instance.RefreshRegisteredViewControllers(); | |
}); | |
}; | |
loginSection.Add(loginButton); |
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
[Ignore] | |
public UIImage ExpenseImage | |
{ | |
get | |
{ | |
string basePath = Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.MyDocuments), "expenseimages"); | |
if (!Directory.Exists(basePath)) Directory.CreateDirectory(basePath); | |
string filename = Path.Combine (basePath, string.Format("{0}.jpg", Id)); | |
if (File.Exists(filename)) | |
{ |
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 partial class AppDelegate : UIApplicationDelegate | |
{ | |
// class-level declarations | |
UIWindow window; | |
OwenViewController viewController; | |
ALAssetsLibrary lib; | |
UIImage image; | |
NSDictionary dict = new NSDictionary (); | |
// | |
// This method is invoked when the application has loaded and is ready to run. In this |
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.AssetsLibrary; | |
namespace Owen | |
{ | |
// The UIApplicationDelegate for the application. This class is responsible for launching the |
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
var content = new StringBuilder(); | |
content.AppendFormat("status={0}", OAuth.PercentEncode(tweetText)); | |
var stringContent = content.ToString(); | |
System.Net.ServicePointManager.Expect100Continue = false; | |
var client = new WebClient(); | |
Uri uri = new Uri("http://twitter.com/statuses/update.json"); | |
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
// | |
// OAuth framework for TweetStation | |
// | |
// Author; | |
// Miguel de Icaza ([email protected]) | |
// | |
// Possible optimizations: | |
// Instead of sorting every time, keep things sorted | |
// Reuse the same dictionary, update the values | |
// |