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
//Make XHR request to post picture | |
function postPic(pic) { | |
if (Titanium.Network.NETWORK_NONE) { | |
var a = Titanium.UI.createAlertDialog({ | |
title:'We\'re Sorry...', | |
message:'Snapost cannot detect a network connection. Are you connected to the internet?' | |
}); | |
} | |
else { | |
var query = 'https://twitpic.com/api/uploadAndPost'; |
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.Text; | |
using MonoTouch.UIKit; | |
using MonoTouch.Foundation; | |
using MonoTouch.Dialog; | |
using System.Net; | |
namespace MIX10 | |
{ |
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.Linq; | |
using System.Collections.Generic; | |
using MonoTouch.Dialog; | |
using MonoTouch.UIKit; | |
using System.Text; | |
using System.Drawing; | |
namespace MIX10 | |
{ |
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 MultilineEntryElement : Element, IElementSizing { | |
public string Value; | |
static NSString ekey = new NSString ("EntryElement"); | |
bool isPassword; | |
UITextView entry; | |
string placeholder; | |
static UIFont font = UIFont.BoldSystemFontOfSize (17); | |
/// <summary> |
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 ImageElement : Element { | |
// The original ImageElement didn't scale the picture that was displayed as the thumbnail properly | |
// this code probably needs lots of refactoring but I needed a quick solution. | |
public UIImage Value; | |
static RectangleF rect = new RectangleF (0, 0, dimx, dimy); | |
static NSString ikey = new NSString ("ikey"); | |
UIImage scaled; | |
// Apple leaks this one, so share across all. |
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 HtmlElement : Element { | |
public string Url; | |
static NSString hkey = new NSString ("HtmlElement"); | |
UIWebView web; | |
UIToolbar toolbar; | |
UIBarButtonItem forward; | |
UIBarButtonItem back; | |
UIBarButtonItem refresh; | |
UIBarButtonItem actionbutton; | |
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 EntryElement : Element { | |
/// <summary> | |
/// The value of the EntryElement | |
/// </summary> | |
public string Value; | |
/// <summary> | |
/// The type of keyboard used for input, you can change | |
/// this to use this for numeric input, email addressed, | |
/// urls, phones. |
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
if (KeyboardType == UIKeyboardType.NumberPad) | |
{ | |
NSNotificationCenter.DefaultCenter.AddObserver ( | |
"UIKeyboardDidShowNotification", (notification) => { | |
UIButton doneButton = new UIButton(new RectangleF(0, 163, 106, 53)); | |
doneButton.ButtonType = UIButtonType.Custom; | |
doneButton.SetTitle("Done", UIControlState.Normal); | |
UIWindow window = UIApplication.SharedApplication.Windows[0]; | |
UIView keyboardView; | |
foreach(var v in window.Subviews) |
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
if (KeyboardType == UIKeyboardType.NumberPad) | |
{ | |
NSNotificationCenter.DefaultCenter.AddObserver ( | |
"UIKeyboardDidShowNotification", (notification) => { | |
UIButton doneButton = new UIButton(new RectangleF(0, 163, 106, 53)); //{ButtonType = UIButtonType.Custom}; | |
//doneButton.SetTitle("Done", UIControlState.Normal); | |
doneButton.SetImage(UIImage.FromFile("DoneUp.png"), UIControlState.Normal); | |
doneButton.SetImage(UIImage.FromFile("DoneDown.png"), UIControlState.Highlighted); | |
doneButton.AdjustsImageWhenHighlighted = false; |
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
if (KeyboardType == UIKeyboardType.NumberPad) | |
{ | |
NSNotificationCenter.DefaultCenter.AddObserver ( | |
"UIKeyboardDidShowNotification", (notification) => { | |
UIButton doneButton = new UIButton(new RectangleF(0, 163, 106, 53)); //{ButtonType = UIButtonType.Custom}; | |
//doneButton.SetTitle("Done", UIControlState.Normal); | |
doneButton.SetImage(UIImage.FromFile("DoneUp.png"), UIControlState.Normal); | |
doneButton.SetImage(UIImage.FromFile("DoneDown.png"), UIControlState.Highlighted); | |
doneButton.AdjustsImageWhenHighlighted = false; |
OlderNewer