Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.82 KB | None | 0 0
  1. public MainPage()
  2. {
  3. InitializeComponent();
  4. try
  5. {
  6. dataService = new DataService();
  7. AtualizaDados();
  8. }
  9. catch(Exception ex)
  10. {
  11. string erro = ex.Message;
  12. }
  13. }
  14.  
  15. protected override void OnAppearing()
  16. {
  17. base.OnAppearing();
  18. try
  19. {
  20. lblTipoVenda.Text = "Tipo de Venda:";
  21. lblVencimento.Text = "Vencimento:";
  22. lblJuros.Text = "Juros:";
  23. lblEntrada.Text = "Entrada:";
  24. lblAcrescimo.Text = "Acréscimo:";
  25. lblDesconto.Text = "Desconto:";
  26. btnItens.IsEnabled = false;
  27.  
  28. AtualizaDados();
  29. }
  30. catch (Exception ex)
  31. {
  32. string erro = ex.Message;
  33. }
  34. }
  35.  
  36. private async void AtualizaDados()
  37. {
  38. try
  39. {
  40. lib = await dataService.GetLiberaAsync();
  41. listaLibera.ItemsSource = lib.OrderBy(item => item.Cliente).ToList();
  42. }
  43. catch(Exception ex)
  44. {
  45. string erro = ex.Message;
  46. }
  47. }
  48.  
  49. public class CrossPushNotificationListener : IPushNotificationListener
  50. {
  51. public CrossPushNotificationListener()
  52. {
  53. }
  54.  
  55. public void OnError(string message, DeviceType deviceType)
  56. {
  57.  
  58. }
  59.  
  60. public void OnMessage(JObject values, DeviceType deviceType)
  61. {
  62.  
  63. }
  64.  
  65. public void OnRegistered(string token, DeviceType deviceType)
  66. {
  67.  
  68. }
  69.  
  70. public void OnUnregistered(DeviceType deviceType)
  71. {
  72.  
  73. }
  74.  
  75. public bool ShouldShowNotification()
  76. {
  77. return true;
  78. }
  79. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement