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
private bool _initialView = true; | |
protected void LoadStyles() | |
{ | |
if (!_initialView) | |
return; | |
_initialView = false; |
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
<Application.Resources> | |
<ResourceDictionary> | |
<Style x:Key="BackgroundImageStyle" TargetType="Image"> | |
<Setter Property="Aspect" Value="AspectFill" /> | |
<Setter Property="Source" Value="Background.jpg" /> | |
</Style> | |
</ResourceDictionary> | |
</Application.Resources> | |
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 SQLite_iOS : ISQLite | |
{ | |
private SQLiteConnectionWithLock _conn; | |
public SQLite_iOS () | |
{ | |
} | |
private string GetDatabasePath () | |
{ |
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 SQLite_Android : ISQLite | |
{ | |
private SQLiteConnectionWithLock _conn; | |
public SQLite_Android() | |
{ | |
} | |
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 SQLite_WinPhone : ISQLite | |
{ | |
private static SQLiteConnectionWithLock _conn; | |
public SQLite_WinPhone() { } | |
private static Object _connectionLock = new Object(); | |
private string DatabaseName = "DatabaseName.db3"; |
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 ISQLite { | |
void CloseConnection(); | |
SQLiteAsyncConnection GetAsyncConnection(); | |
void DeleteDatabase(); | |
} |
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 partial class BindablePicker : Picker | |
{ | |
public BindablePicker() | |
{ | |
InitializeComponent(); | |
this.SelectedIndexChanged += OnSelectedIndexChanged; | |
} | |
public static BindableProperty ItemsSourceProperty = |
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
var uniqueKey = System.Guid.NewGuid().ToString(); | |
var model = SimpleIoc.Default.GetInstance<LoginModel>(uniqueKey); | |
// Must remmeber to cleanup, otherwise all new instances are cached | |
SimpleIoc.Default.Unregister(uniqueKey); |
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 string Username | |
{ | |
get | |
{ | |
return _model.Username; | |
} | |
set | |
{ | |
_model.Username = value; |
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
private LoginModel _model = null; | |
public LoginModel Model | |
{ | |
get | |
{ | |
return _model; | |
} | |
set | |
{ | |
if (value != _model) |