Exemplo n.º 1
0
 public BasicInfoPage(UserFirstUpdate user)
 {
     InitializeComponent();
     _userPivotService = DependencyService.Get <IUserPivotService>();
     _user             = user;
     _helper           = DependencyService.Get <IHelper>();
     App.Configuration.InitialAsync(this);
     NavigationPage.SetHasNavigationBar(this, false);
     _model         = new AccountViewModel();
     BindingContext = _model;
     Initialization();
 }
 public BasicInfoPage(UserFirstUpdate user)
 {
     try
     {
         InitializeComponent();
         _user             = user;
         _userPivotService = DependencyService.Get <IUserPivotService>();
         Init();
     }
     catch (Exception)
     {
         // Comment
     }
 }
Exemplo n.º 3
0
 public AddressPage(UserFirstUpdate user)
 {
     try
     {
         InitializeComponent();
         _user             = user;
         _metaPivotService = DependencyService.Get <IMetaPivotService>();
         _helper           = DependencyService.Get <IHelper>();
         Init();
     }
     catch (Exception)
     {
         // Comment
     }
 }
 public PersonalInfoPage(UserFirstUpdate user)
 {
     try
     {
         InitializeComponent();
         _user                = user;
         _helper              = DependencyService.Get <IHelper>();
         _metaPivotService    = DependencyService.Get <IMetaPivotService>();
         _trackerPivotService = DependencyService.Get <ITrackerPivotService>();
         IsRevised            = false;
         Init();
     }
     catch (Exception ex)
     {
         new ExceptionHandler(TAG, ex);
     }
 }
Exemplo n.º 5
0
 public UploadPhotoPage(UserFirstUpdate user, bool error = false, string message = "")
 {
     InitializeComponent();
     App.Configuration.InitialAsync(this);
     NavigationPage.SetHasNavigationBar(this, false);
     _media = DependencyService.Get <IMedia>();
     _devicePermissionServices = DependencyService.Get <IDevicePermissionServices>();
     _model         = new UploadPhotoViewModel();
     _user          = user;
     BindingContext = _model;
     Initialization();
     _trackerPivotService = DependencyService.Get <ITrackerPivotService>();
     _helper = DependencyService.Get <IHelper>();
     if (error)
     {
         _model.SetActivityResource(showError: true,
                                    errorMessage: string.IsNullOrWhiteSpace(message.Trim())
                 ? message.Trim()
                 : _helper.ReturnMessage(message));
     }
 }
Exemplo n.º 6
0
        private async void UserRedirect()
        {
            _model.SetActivityResource(false, true, busyMessage: TextResources.LoggedInLoadingAccount);
            if (App.CurrentUser?.UserInfo != null)
            {
                await Task.Delay(1);

                var userInfo = App.CurrentUser?.UserInfo;
                var user     = new UserFirstUpdate
                {
                    UserEmail     = userInfo?.UserEmail,
                    UserFirstName = userInfo?.UserFirstName ?? "",
                    UserLastName  = userInfo?.UserLastName ?? "",
                };
                if (userInfo?.UserFirstName?.Trim().Length == 0)
                {
                    App.CurrentApp.MainPage = new BasicInfoPage(user);
                }
                else if (userInfo?.IsMetaExists == false)
                {
                    App.CurrentApp.MainPage = new PersonalInfoPage(user);
                }
                else if (userInfo?.IsAddressExists == false)
                {
                    App.CurrentApp.MainPage = new AddressPage(user);
                }
                else if (userInfo?.IsTrackerExists == false)
                {
                    App.CurrentApp.MainPage = new UploadPhotoPage(user);
                }
                else
                {
                    App.GoToAccountPage(true);
                }
            }
            else
            {
                _model.SetActivityResource();
            }
        }
 public UploadPhotoPage(UserFirstUpdate user, bool error = false, string message = "")
 {
     try
     {
         InitializeComponent();
         _user = user;
         _trackerPivotService = DependencyService.Get <ITrackerPivotService>();
         _media  = DependencyService.Get <IMedia>();
         _helper = DependencyService.Get <IHelper>();
         Init();
         if (error)
         {
             _model.SetActivityResource(showError: true,
                                        errorMessage: string.IsNullOrWhiteSpace(message.Trim())
                     ? message.Trim()
                     : _helper.ReturnMessage(message));
         }
     }
     catch (Exception ex)
     {
         ClientService.WriteLog(null, ex).GetAwaiter();
     }
 }