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.Linq; | |
using Xamarin.Forms; | |
using System.Collections.Generic; | |
namespace MeuDB | |
{ | |
public class AcessoDados : IDisposable | |
{ | |
private SQLite.Net.SQLiteConnection _conexao; |
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
sing System; | |
using SQLite.Net.Attributes; | |
namespace MeuDB | |
{ | |
public class Contato | |
{ | |
[PrimaryKey, AutoIncrement] | |
public int Id { | |
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
using System; | |
using SQLite.Net.Interop; | |
namespace MeuDB | |
{ | |
public interface IConfig | |
{ | |
string DiretorioDB { get; } | |
ISQLitePlatform Plataforma { 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
<?xml version="1.0" encoding="UTF-8"?> | |
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="MeuDB.MyPage"> | |
<ContentPage.Content> | |
<StackLayout Padding="30" Spacing="30"> | |
<Entry x:Name="Nome" Placeholder="Nome"></Entry> | |
<Entry x:Name="Email" Placeholder="Email" Keyboard="Email"></Entry> | |
<Entry x:Name="Telefone" Placeholder="Telefone" Keyboard="Telephone"></Entry> | |
<Button x:Name="Salvar" Text="Salvar" Clicked="SalvarClicked"></Button> |
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.Collections.Generic; | |
using Xamarin.Forms; | |
namespace MeuDB | |
{ | |
public partial class MyPage : ContentPage | |
{ | |
public MyPage () |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="MyListViewCellApp.MainView"> | |
<TabbedPage.Children> | |
<ContentPage Title="TextCell" Padding="0, 20, 0, 0"> | |
<ContentPage.Content> | |
<StackLayout> | |
<ListView ItemsSource="{Binding Items}"> | |
<ListView.ItemTemplate> | |
<DataTemplate> |
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.Collections.ObjectModel; | |
using System.ComponentModel; | |
namespace MyListViewCellApp | |
{ | |
public class ViewModel | |
{ | |
public ObservableCollection<Item> Items { | |
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
//Esse código é apenas para demonstração da funcionalidade do ChangeCanExecute | |
public class ViewModelBase : INotifyPropertyChanged | |
{ | |
public event PropertyChangedEventHandler PropertyChanged; | |
public void Notify(string propertyName) | |
{ | |
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); | |
} | |
} |
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
git remote add upstream https://github.com/andrebaltieri/FluentValidator.git | |
git fetch upstream | |
git checkout master | |
git rebase upstream/master |
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 sealed class BotActivityLogger : Microsoft.Bot.Builder.History.IActivityLogger | |
{ | |
public async Task LogAsync(IActivity activity) | |
{ | |
var message = activity.AsMessageActivity(); | |
var text = message.Text; | |
} | |
} | |
[BotAuthentication] |