public CheckOutSignatureViewModel(ICloseApplication closeApplication,
                                   INavigationService navigationService, IRepositories repositories)
 {
     _closeApplication  = closeApplication;
     _navigationService = navigationService;
     _repositories      = repositories;
 }
Beispiel #2
0
 public CheckInViewModel(ICloseApplication closeApplication,
                         INavigationService navigationService)
 {
     _closeApplication  = closeApplication;
     _navigationService = navigationService;
     _message           = "Opening camera to scan the QR code.";
 }
Beispiel #3
0
        private void OnTappedExit()
        {
            // Завершаем программу
            Properties.Write(KeyProperties.AutoAuth, "false");
            ICloseApplication app = DependencyService.Get <ICloseApplication>();

            app.Exit();
        }
Beispiel #4
0
        public CheckOutTermsViewModel(ICloseApplication closeApplication,
                                      INavigationService navigationService, IRepositories repositories)
        {
            _closeApplication  = closeApplication;
            _navigationService = navigationService;
            _repositories      = repositories;

            setTermsAndConditions();
        }
Beispiel #5
0
        public CheckInCompleteViewModel(ICloseApplication closeApplication,
                                        INavigationService navigationService, IRepositories repositories)
        {
            _closeApplication  = closeApplication;
            _navigationService = navigationService;
            _repositories      = repositories;

            Status = "Check In in progress. The application will automatically redirect to Check Out page when the process completes successfully.";
        }
 /// <summary>
 /// Do check if permissions granted and request if not. Abort if User denies
 /// </summary>
 private void DoPermissionsCheck()
 {
     // This will abort the app at the start if the WIFI permissions are not given
     Xamarin.Forms.Device.BeginInvokeOnMainThread(async() => {
         if (!await this.CheckPermissions())
         {
             ICloseApplication closeApp = DependencyService.Get <ICloseApplication>();
             await Application.Current.MainPage.DisplayAlert(
                 App.GetText(MsgCode.Error),
                 "Insufficient permissions",
                 App.GetText(MsgCode.Ok));
             closeApp.CloseApp();
         }
     });
 }
Beispiel #7
0
        public LoggingService(
            IRepositories repositories,
            IGatewayService gatewayService,
            IDeviceInfo deviceInfo,
            IReachability reachability,
            ICloseApplication closeApplication)
        {
            _loggedRepository = repositories.LogMessageRepository;
            _gatewayService   = gatewayService;
            _deviceInfo       = deviceInfo;
            _reachability     = reachability;
            _closeApplication = closeApplication;

            _notificationToken = Mvx.Resolve <IMvxMessenger>().Subscribe <Messages.TopLevelExceptionHandlerMessage>(async m =>
                                                                                                                    await this.LogAndCloseAsync(m.TopLevelException)
                                                                                                                    );
        }
Beispiel #8
0
        public CustomerCodeViewModel(IGatewayService gatewayService, IReachability reachability, IDataService dataService, IRepositories repositories, ICustomUserInteraction userInteraction, INavigationService navigationService, ICloseApplication closeApplication)
        {
            _gatewayService    = gatewayService;
            _dataService       = dataService;
            _reachability      = reachability;
            _userInteraction   = userInteraction;
            _navigationService = navigationService;

            _applicationProfileRepository = repositories.ApplicationRepository;
            _customerRepository           = repositories.CustomerRepository;
            _deviceRepository             = repositories.DeviceRepository;
            _driverRepository             = repositories.DriverRepository;
            _safetyProfileRepository      = repositories.SafetyProfileRepository;
            _trailerRepository            = repositories.TrailerRepository;
            _vehicleRepository            = repositories.VehicleRepository;
            _verbProfileRepository        = repositories.VerbProfileRepository;
            _configRepository             = repositories.ConfigRepository;
            _closeApplication             = closeApplication;
        }
Beispiel #9
0
        void ProcessFile(object sender, EventArgs e)
        {
            GoPGP GoPgp = new GoPGP();

            IWorkWithFile WorkFile = DependencyService.Get <IWorkWithFile>();
            string        WayHome  = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);

            int    index      = FilePath.LastIndexOf('\\');
            string PathFolder = FilePath.Substring(0, index);

            Task.Run(() => WorkFile.MoveToAsync(FilePath, WayHome));
            Thread.Sleep(1500);
            WayHome = Option ? GoPgp.DecodeFile(WayHome + "\\" + FileName) : GoPgp.EncodeFile(WayHome + "\\" + FileName);
            Task.Run(() => WorkFile.MoveToAsync(WayHome, PathFolder));
            Thread.Sleep(1500);

            ICloseApplication closer = DependencyService.Get <ICloseApplication>();

            closer?.closeApplication();
        }
Beispiel #10
0
        public PasscodeViewModel(
            IAuthenticationService authenticationService,
            IInfoService infoService,
            ICloseApplication closeApplication,
            IRepositories repositories,
            INavigationService navigationService,
            ILoggingService loggingService,
            IGatewayQueuedService gatewayQueuedService)
        {
            _authenticationService = authenticationService;
            _infoService           = infoService;
            _navigationService     = navigationService;
            _loggingService        = loggingService;

            _repositories            = repositories;
            _currentDriverRepository = repositories.CurrentDriverRepository;
            _closeApplication        = closeApplication;
            _gatewayQueuedService    = gatewayQueuedService;

            Task.Run(() => setCheckInButtonVisibility()).Wait();
        }
Beispiel #11
0
 public CheckOutViewModel(ICloseApplication closeApplication,
                          INavigationService navigationService)
 {
     _closeApplication  = closeApplication;
     _navigationService = navigationService;
 }