Ejemplo n.º 1
0
        public FirstViewModel(
            INavigationService navigationService,
            ILogger logger,
            ITestRepository testRepository,
            IPlatformService platformService,
            IMessagingService messagingService,
            IConnectivityHelper connectivityHelper,
            IDialogService dialogService,
            IAppAnalyticsProvider appAnalyticProvider) : base(navigationService, logger)
        {
            _testRepository       = testRepository;
            _platformService      = platformService;
            _messagingService     = messagingService;
            _connectivityHelper   = connectivityHelper;
            _dialogService        = dialogService;
            _appAnalyticsProvider = appAnalyticProvider;

            OkCancelAlertResponse = false;
            OSVersion             = $"{_platformService.OsVersion.Major}.{_platformService.OsVersion.Minor}.{_platformService.OsVersion.Build}";
            IsConnected           = connectivityHelper.IsConnected;
            logger.Verbose("First ViewModel", null, new[] { LoggerConstants.UiAction });
            logger.Verbose("OS Version", new { OSVersion }, new[] { LoggerConstants.UiAction });
            ShowDialog           = new Command(DisplayProgressDialog);
            DisplayCancelAlert   = new Command(DisplayAlertWithCancleButton);
            DisplayOkCancelAlert = new Command(DisplayAlertWithOkCancleButton);
            ShowModalPopupDialog = new Command(ShowModalPopup);
            CrashAppCommand      = new Command(() => { throw new Exception("Test Exception to crash app"); });
        }
Ejemplo n.º 2
0
        public FirstViewModel(
            INavigationService navigationService,
            ILogger logger,
            ITestRepository testRepository,
            IPlatformService platformService,
            IMessagingService messagingService,
            IConnectivityHelper connectivityHelper,
            IDialogService dialogService,
            IAppAnalyticsProvider appAnalyticProvider,
            IFileSystemHelper fileSystemHelper,
            IEncryptionProvider encryptionProvider) : base(navigationService, logger)
        {
            _testRepository       = testRepository;
            _platformService      = platformService;
            _messagingService     = messagingService;
            _connectivityHelper   = connectivityHelper;
            _dialogService        = dialogService;
            _appAnalyticsProvider = appAnalyticProvider;
            _fileSystemHelper     = fileSystemHelper;
            _encryptionProvider   = encryptionProvider;
            _sSIDName             = _platformService.SsidName;
            _wifiName             = _platformService.WifiName;

            OkCancelAlertResponse = false;
            OSVersion             = $"{_platformService.OsVersion.Major}.{_platformService.OsVersion.Minor}.{_platformService.OsVersion.Build}";
            IsConnected           = connectivityHelper.IsConnected;
            NetworkStatus         = _connectivityHelper.NetworkStatus;

            logger.Verbose("First ViewModel", null, new[] { LoggerConstants.UiAction });
            logger.Verbose("OS Version", new { OSVersion }, new[] { LoggerConstants.UiAction });

            ShowDialog           = new Command(DisplayProgressDialog);
            DisplayCancelAlert   = new Command(DisplayAlertWithCancleButton);
            DisplayOkCancelAlert = new Command(DisplayAlertWithOkCancleButton);
            ShowModalPopupDialog = new Command(ShowModalPopup);
            CrashAppCommand      = new Command(() => { throw new Exception("Test Exception to crash app"); });
            EncryptCommand       = new Command(EncryptText);
            DecryptCommand       = new Command(DecryptText);

            Logger.Verbose($"Current Folder Path : {_fileSystemHelper.GetCurrentDirectlyPath()}");
        }