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
public static ObservableCollection<T> ToObservableCollection<T>(this IEnumerable<T> enumerable) | |
{ | |
var col = new ObservableCollection<T>(); | |
foreach (var cur in enumerable) | |
{ | |
col.Add(cur); | |
} | |
return col; | |
} |
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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
CancellationTokenSource cts = new CancellationTokenSource(); | |
Console.CancelKeyPress += (s, e) => | |
{ | |
e.Cancel = true; | |
cts.Cancel(); | |
}; |
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 Xamarin.Forms; | |
using App.Android; | |
[assembly: Dependency (typeof (BaseUrl_Android))] | |
namespace App.Android | |
{ | |
public class BaseUrl_Android : IBaseUrl | |
{ | |
public string 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
private static bool UserInFrozenRole(IPluginExecutionContext context, IOrganizationService organizationService, IEnumerable<string> settingRoles) | |
{ | |
var jjQuery = new QueryExpression() | |
{ | |
EntityName = "role", | |
ColumnSet = new ColumnSet("name"), | |
LinkEntities = | |
{ | |
new LinkEntity | |
{ |
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.Threading.Tasks; | |
using System.Security.Cryptography; | |
using System.Text; | |
using System.IO; | |
using System.Net; | |
using System.Collections.Generic; | |
namespace XamarinStore | |
{ |
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 System.Text; | |
using Android.App; | |
using Android.Content; | |
using Android.OS; | |
using Android.Runtime; | |
using Android.Views; |
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 readonly BindableProperty FoobarProperty=BindableProperty.Create<YourClass, bool>( p => p.Foobar, false ); | |
public bool Foobar | |
{ | |
get | |
{ | |
return (bool)GetValue(FoobarProperty); | |
} | |
set | |
{ |
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
Copyright (c) 2012 Rizal Almashoor | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE |
OlderNewer