Skip to content

Instantly share code, notes, and snippets.

View guntidheerajkumar's full-sized avatar
💭
Happy

Dheeraj Kumar Gunti guntidheerajkumar

💭
Happy
View GitHub Profile
view.Layer.MaskedCorners = (CoreAnimation.CACornerMask)3;
view.Layer.CornerRadius = 15f;
0: no rounded corners
1: top left
2: top right
3: top left & right (both top corners)
4: bottom left
5: top & bottom left (both left corners)
6: top right & bottom left
public class EncryptDecrypt
{
public (string Key, string IVBase64) InitSymmetricEncryptionKeyIV()
{
var key = GetEncodedRandomString(32); // 256
Aes cipher = CreateCipher(key);
var IVBase64 = Convert.ToBase64String(cipher.IV);
return (key, IVBase64);
}
using System;
using System.Threading.Tasks;
using System.Windows.Input;
using Microsoft.AppCenter.Analytics;
namespace DotnetMobileCommands
{
public class MobileCommand<T> : ICommand
{
private Action _action;
namespace Mobile.Commands
{
public class CustomCommand<T> : ICommand
{
private Action _action;
private Action<object> _newAction;
private string _activityName;
private bool _canExecute;
private readonly Func<T, Task> _executeTask;
public enum PasswordScore
{
Blank = 0,
VeryWeak = 1,
Weak = 2,
Medium = 3,
Strong = 4,
VeryStrong = 5
}
public class Employee
{
public Employee()
{
}
///Primary Key
public int EmpId
{
get;
public interface ILoadingService
{
void Show (string message = "Loading");
void Hide ();
}
[assembly: Xamarin.Forms.Dependency (typeof(LoadingService))]
namespace YOURNAMESPACE.iOS
{
public class LoadingService : ILoadingService
{
public LoadingService ()
{
BTProgressHUD.ForceiOS6LookAndFeel = true;
}
[assembly: Xamarin.Forms.Dependency(typeof(LoadingService))]
namespace YourNameSpace
{
public class LoadingService : ILoadingService
{
public LoadingService()
{
}
#region ILoadingService implementation
public async Task InsertEmployee(EmployeeInfo employee)
{
await Initialize();
await Task.WhenAll(table.InsertAsync(employee));
await SyncEmployees();
}