This file contains hidden or 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
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 |
This file contains hidden or 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 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); | |
} |
This file contains hidden or 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.Windows.Input; | |
using Microsoft.AppCenter.Analytics; | |
namespace DotnetMobileCommands | |
{ | |
public class MobileCommand<T> : ICommand | |
{ | |
private Action _action; |
This file contains hidden or 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
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; |
This file contains hidden or 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 enum PasswordScore | |
{ | |
Blank = 0, | |
VeryWeak = 1, | |
Weak = 2, | |
Medium = 3, | |
Strong = 4, | |
VeryStrong = 5 | |
} |
This file contains hidden or 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 Employee | |
{ | |
public Employee() | |
{ | |
} | |
///Primary Key | |
public int EmpId | |
{ | |
get; |
This file contains hidden or 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 ILoadingService | |
{ | |
void Show (string message = "Loading"); | |
void Hide (); | |
} |
This file contains hidden or 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
[assembly: Xamarin.Forms.Dependency (typeof(LoadingService))] | |
namespace YOURNAMESPACE.iOS | |
{ | |
public class LoadingService : ILoadingService | |
{ | |
public LoadingService () | |
{ | |
BTProgressHUD.ForceiOS6LookAndFeel = true; | |
} |
This file contains hidden or 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
[assembly: Xamarin.Forms.Dependency(typeof(LoadingService))] | |
namespace YourNameSpace | |
{ | |
public class LoadingService : ILoadingService | |
{ | |
public LoadingService() | |
{ | |
} | |
#region ILoadingService implementation |
This file contains hidden or 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 async Task InsertEmployee(EmployeeInfo employee) | |
{ | |
await Initialize(); | |
await Task.WhenAll(table.InsertAsync(employee)); | |
await SyncEmployees(); | |
} |
NewerOlder