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 static class RestSharpExtensions | |
{ | |
public static Task<RestResponse<T>> ExecuteAsync<T>(this IRestClient client, IRestRequest request) where T : new() | |
{ | |
return client.ExecuteAsync<T>(request, CancellationToken.None); | |
} | |
public static Task<RestResponse<T>> ExecuteAsync<T>(this IRestClient client, IRestRequest request, CancellationToken token) where T : new() | |
{ |
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.IO; | |
using System.Net; | |
using System.Text; | |
using System.Threading; | |
using ServiceStack.Common.Web; | |
using ServiceStack.Logging; | |
using ServiceStack.ServiceHost; | |
using ServiceStack.Text; | |
using ServiceStack.ServiceClient.Web; |
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; | |
namespace Epoch | |
{ | |
public class Epoch | |
{ | |
static readonly DateTime epochStart = new DateTime(1970, 1, 1, 0, 0, 0); | |
static readonly DateTimeOffset epochDateTimeOffset = new DateTimeOffset(1970, 1, 1, 0, 0, 0, TimeSpan.Zero); | |
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 interface IRemove | |
{ | |
ICommand RemoveCommand { get; } | |
} |
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 static UIImage ScaleImage(UIImage image, int maxSize) | |
{ | |
UIImage res; | |
using (CGImage imageRef = image.CGImage) | |
{ | |
CGImageAlphaInfo alphaInfo = imageRef.AlphaInfo; | |
CGColorSpace colorSpaceInfo = CGColorSpace.CreateDeviceRGB(); | |
if (alphaInfo == CGImageAlphaInfo.None) |
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
void initCameraView(){ | |
NSError error = null; | |
captureSession = new AVCaptureSession(){ | |
SessionPreset=AVCaptureSession.Preset640x480 | |
}; | |
var device = AVCaptureDevice.DefaultDeviceWithMediaType(AVMediaType.Video); | |
var deviceInput = AVCaptureDeviceInput.FromDevice(device,out error); | |
if(error!=null){ | |
displayErrorOnMainQueueWithMessage(error,"Unable to setup capture"); | |
return; |
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 MonoTouch.Foundation; | |
using System.Drawing; | |
namespace TwinCoders.Utils | |
{ | |
public abstract partial class ParentViewController | |
{ |
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 TextViewImeActionBinding : MvxAndroidTargetBinding | |
{ | |
private bool subscribed; | |
private ICommand _command; | |
protected TextView TextView | |
{ | |
get { return Target as TextView; } | |
} |
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
/// <summary> | |
/// Author: softlion (softlion@softlion.com) | |
/// </summary> | |
/// <remarks> | |
/// Thanks to: Stuart Lodge | |
/// </remarks> | |
public class MvxRadioGroupSelectedIndexBinding : MvxAndroidTargetBinding | |
{ | |
bool stopListeningCheckChanged = 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
<TextView | |
local:MvxBind="Text PasswordConfirm; ImeAction RegisterCommand" | |
android:textAppearance="?android:attr/textAppearanceLarge" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:hint="Password" | |
android:inputType="textPassword" | |
android:imeOptions="actionSend" /> |
OlderNewer