You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.3 KiB

1 year ago
  1. using static Microsoft.Maui.Controls.Button.ButtonContentLayout;
  2. using static Microsoft.Maui.Controls.Button;
  3. using GMCabsDriverAssistantSolution.ViewModels;
  4. namespace GMCabsDriverAssistantSolution.Views;
  5. public partial class CouponsV2Page : ContentPage
  6. {
  7. #region Fields
  8. private readonly CouponsV2ViewModel _viewModel;
  9. #endregion
  10. #region Constructor
  11. [Obsolete]
  12. public CouponsV2Page()
  13. {
  14. InitializeComponent();
  15. BindingContext = _viewModel = new CouponsV2ViewModel(this);
  16. if (Device.RuntimePlatform == Device.iOS)
  17. {
  18. BackButton.ContentLayout = new ButtonContentLayout(ImagePosition.Left, 10);
  19. NextButton.ContentLayout = new ButtonContentLayout(ImagePosition.Right, 10);
  20. }
  21. else if (Device.RuntimePlatform == Device.Android)
  22. {
  23. BackButton.ContentLayout = new ButtonContentLayout(ImagePosition.Left, -100);
  24. NextButton.ContentLayout = new ButtonContentLayout(ImagePosition.Right, -100);
  25. }
  26. }
  27. #endregion
  28. #region Methods
  29. protected override void OnAppearing()
  30. {
  31. base.OnAppearing();
  32. _viewModel.OnAppearing();
  33. }
  34. private async void OnCouponHistoryViewClicked(object sender, EventArgs e)
  35. {
  36. await Navigation.PushAsync(new CouponHistoryPage(), true);
  37. }
  38. #endregion
  39. }