コード例 #1
0
ファイル: VMMainPage.cs プロジェクト: Satur01/MapaEcobici
        public VMMainPage(ILocalizationService localizationService, IPhoneCallService phoneCallService, MapItemsModel mapsItemModel, IVibrationService vibrationService, IAvailabilityService availabilityService, IConnectionManager connectionManager)
        {
            _localizationService = localizationService;
            _phoneCallService = phoneCallService;
            _mapsItemModel = mapsItemModel;
            _vibrationService = vibrationService;
            _availabilityService = availabilityService;
            _connectionManager = connectionManager;

            _dispatcherTimerChronometer = new DispatcherTimer { Interval = new TimeSpan(0, 0, 0, 1) };
            _dispatcherTimerChronometer.Tick += _dispatcherTimer_Tick;

            var dispatcherTimerAvailability = new DispatcherTimer()
            {
                Interval = new TimeSpan(0, 0, 0, 30)
            };
            dispatcherTimerAvailability.Tick += _dispatcherTimerAvailability_Tick;
            dispatcherTimerAvailability.Start();

            _mapsItemModel.GetNearMapItemsCompleted += GetNearMapItemsCompleted;

            _localizationService.Geolocator.PositionChanged += _geolocator_PositionChanged;

            SetCurrentPositionAsync();
            ZoomLevel = 15;

            _lazyPhoneCallCommand = new Lazy<DelegateCommand>(() => new DelegateCommand(PhoneCallCommandExecute));

            _lazyGetNearStationsCommand = new Lazy<DelegateCommand>(() => new DelegateCommand(GetNearStationsCommandExecute));

            _lazyStartChronometerCommand = new Lazy<DelegateCommand>(() => new DelegateCommand(StartChronometerCommandExecute));
        }
コード例 #2
0
ファイル: HIPApi.cs プロジェクト: VStark/hip-http-api
 public HIPApi(ILoggingService logging = null, ISystemService system = null, ISwitchService switchService = null, IIOService io = null, IPhoneCallService phoneCall = null, ICameraService camera = null, IDisplayService display = null, IAudioService audio = null, IEmailService email = null)
 {
     _logging   = logging;
     _system    = system;
     _switch    = switchService;
     _io        = io;
     _phoneCall = phoneCall;
     _camera    = camera;
     _display   = display;
     _audio     = audio;
     _email     = email;
 }
コード例 #3
0
        private void CheckingRepositoriesAndServices()
        {
            _incidentXrmRepository = _repositoryNinjectFactory.IncidentXrmRepository();
            if (_incidentXrmRepository == null)
            {
                throw new NullReferenceException("IncidentXrmRepository is null");
            }

            _sqlService = _internalServiceFactory.SqlService();
            if (_sqlService == null)
            {
                throw new NullReferenceException("SqlService is null");
            }

            _incidentService = _internalServiceFactory.IncidentService();
            if (_incidentService == null)
            {
                throw new NullReferenceException("IncidentService is null");
            }

            _systemUserService = _internalServiceFactory.SystemUserService();
            if (_systemUserService == null)
            {
                throw new NullReferenceException("SystemUserService is null");
            }

            _phoneCallService = _internalServiceFactory.PhoneCallService();
            if (_phoneCallService == null)
            {
                throw new NullReferenceException("PhoneCallService is null");
            }

            _emailService = _internalServiceFactory.EmailService();
            if (_emailService == null)
            {
                throw new NullReferenceException("EmailService is null");
            }

            _annotationService = _internalServiceFactory.AnnotationService();
            if (_annotationService == null)
            {
                throw new NullReferenceException("AnnotationService is null");
            }
        }
コード例 #4
0
 public HomeController(IPhoneCallService phoneCallService)
 {
     _phoneCallService = phoneCallService;
 }
コード例 #5
0
 public PhoneController(IContactService contactService, IPhoneCallService phoneCallService)
 {
     this.contactService   = contactService;
     this.phoneCallService = phoneCallService;
 }