예제 #1
0
 public UbicationsViewModel()
 {
     instance          = this;
     apiService        = new ApiService();
     dialogService     = new DialogService();
     geolocatorService = new GeolocatorService();
 }
예제 #2
0
 public EmergencysViewModel()
 {
     this.apiService   = new ApiService();
     geolocatorService = new GeolocatorService();
     this.saveCurrentPosittion();
     //this.escribirBaseDatos(2);
 }
예제 #3
0
        public EditTimeViewModel(Time time)
        {
            editTime = time;

            apiService        = new ApiService();
            dialogService     = new DialogService();
            navigationService = new NavigationService();
            geolocatorService = new GeolocatorService();
            Projects          = new ObservableCollection <ProjectItemViewModel>();
            Activities        = new ObservableCollection <ActivityItemViewModel>();

            urlAPI        = Application.Current.Resources["URLAPI"].ToString();
            mainViewModel = MainViewModel.GetInstance();
            employee      = mainViewModel.Employee;

            LoadPickers();
            //AsyncHelpers.RunSync(() => LoadPickers());

            //Activity = time.Activity;
            //ActivityId = time.ActivityId;
            //DateRegistered = time.DateRegistered;
            DateReported = time.DateReported;
            //EmployeeId = time.EmployeeId;
            FromString = time.From.ToString().Substring(10, 6);
            //Project = time.Project;
            //ProjectId = time.ProjectId;
            Remarks = time.Remarks;
            //TimeId = time.TimeId;
            ToString = time.To.ToString().Substring(10, 6);

            IsEnabled = true;
        }
예제 #4
0
 public DriverPage()
 {
     InitializeComponent();
     geolocatorService = new GeolocatorService();
     MoveToCurrentLocation();
     //Task.Run(async () => backgroundThread());
 }
예제 #5
0
        public UbicationsView()
        {
            InitializeComponent();

            geolocatorService = new GeolocatorService();

            MoveMapToCurrentPosition();
        }
예제 #6
0
        public LocationPage()
        {
            InitializeComponent();
            geolocatorService = new GeolocatorService();
            apiService        = new ApiService();
            dialogService     = new DialogService();

            MoveToCurrentLocation();
        }
예제 #7
0
        public StartTripPage()
        {
            InitializeComponent();
            _instance          = this;
            _geolocatorService = new GeolocatorService();

            _startTripPageVM = new StartTripPageViewModel();
            BindingContext   = _startTripPageVM;
        }
 public DriverViewModel()
 {
     apiService        = new ApiService();
     dialogService     = new DialogService();
     Rutas             = new ObservableCollection <Route>();
     geolocatorService = new GeolocatorService();
     IsEnabledStart    = true;
     IsEnabledEnd      = false;
     GetRutas();
 }
 public SearchItemDetailViewModel()
 {
     navigationService = new NavigationService();
     settingsService   = new SettingsService();
     dialogService     = new DialogService();
     apiService        = new ApiService();
     geolocatorService = new GeolocatorService();
     dataService       = new DataService();
     IsBusy            = false;
     IsEnabled         = !IsBusy;
     searchParkForm    = new SearchParkForm();
     ImageSource       = "search.png";
 }
예제 #10
0
        //private DelegateCommand _getAddressCommand;
        //private DelegateCommand _startTripCommand;

        public StartTripPageViewModel()
        {
            //_navigationService = navigationService;
            _geolocatorService  = new GeolocatorService();
            _apiService         = new ApiService();
            _tripDetailsRequest = new TripDetailsRequest {
                TripDetails = new List <TripDetailRequest>()
            };
            //Title = Languages.StartTrip;
            ButtonLabel = "Languages.StartTrip";
            IsEnabled   = true;
            LoadSourceAsync();
        }
예제 #11
0
        public CustomerItemViewModel()
        {
            navigationService = new NavigationService();
            geolocatorService = new GeolocatorService();
            dialogService     = new DialogService();
            dataService       = new DataService();
            apiService        = new ApiService();
            netService        = new NetService();
            Departments       = new ObservableCollection <DepartmentItemViewModel>();
            Cities            = new ObservableCollection <CityItemViewModel>();

            LoadDepartments();
            LoadCities();
        }
예제 #12
0
        public HomePage()
        {
            _insideApi         = new ApiService();        //TODO: Use DI
            _geolocatorService = new GeolocatorService(); //TODO: Use DI
            InitializeComponent();
            OnInitAsync();

            // This is a callback to get a parking who was created in create parkingviewmodel and show it in the map.
            MessagingCenter.Subscribe <ParkingModel>(this, Messages.NewParkingCreated, newParking =>
            {
                var pos = new Position(double.Parse(newParking.Latitude), double.Parse(newParking.Longitude));
                CreatePin(pos, newParking);
            });
        }
예제 #13
0
        public NewTimeViewModel()
        {
            apiService        = new ApiService();
            dialogService     = new DialogService();
            navigationService = new NavigationService();
            geolocatorService = new GeolocatorService();

            IsEnabled    = true;
            Until        = DateTime.Now;
            DateReported = DateTime.Now;

            Projects   = new ObservableCollection <ProjectItemViewModel>();
            Activities = new ObservableCollection <ActivityItemViewModel>();
            LoadPickers();
        }
예제 #14
0
        public CustomerItemViewModel()
        {
            //--> Services
            navigationService = new NavigationService();
            netService        = new NetService();
            dataService       = new DataService();
            apiService        = new ApiService();
            geoLocatorService = new GeolocatorService();

            dialogService = new DialogService();
            //--> Listas
            Departments = new ObservableCollection <DepartmentItemViewModel>();
            Cities      = new ObservableCollection <CityItemViewModel>();

            //->Loading bindable pickers
            LoadDepartment();
            LoadCity();
        }
예제 #15
0
        public MainPage(VentasItemViewModel ventasItemViewModel)
        {
            InitializeComponent();
            apiServices   = new ApiServices();
            mainViewModel = MainViewModel.Getinstance();

            for (int c = 0; c < mainViewModel.relVentasPdcto.Count; c++)
            {
                ProductList = ProductList + mainViewModel.relVentasPdcto[c].ProductoNombre.ToUpper() + " - " + mainViewModel.relVentasPdcto[c].ProductoCantidad + "\n";
            }
            geolocatorService     = new GeolocatorService();
            NombreCliente.Text    = "Client: " + mainViewModel.Venta.NombreCliente.ToUpper();
            DireccionCliente.Text = "Address: " + mainViewModel.Venta.Direccion;
            EmailCliente.Text     = "eMail: " + mainViewModel.Venta.Correo;
            TelefonoCliente.Text  = "Contact phone: " + mainViewModel.Venta.TelefonoCLiente;

            MoveMapToCurrentPosition();
        }
        public PedidoViewModel(Pedido_ pedido)
        {
            this.apiService           = new ApiService();
            this.pedido               = pedido;
            this.ImageSource          = "ic_search_image.png";
            this.ImageSourceTwo       = "ic_search_image.png";
            this.ImageSourceThree     = "ic_search_image.png";
            this.ImageSourceFour      = "ic_search_image.png";
            this.ImageSourceSignature = "ic_search_image.png";
            this.IsEnabled            = false;
            this.IsEnabledSave        = false;
            this.geolocation          = new GeolocatorService();

            //Se establecen vacias las cadenas que guardarán base64 de las imagenes de evidencia
            this.imgEv1Base64   = "";
            this.imgEv2Base64   = "";
            this.imgEv3Base64   = "";
            this.imgEv4Base64   = "";
            this.imgFirmaBase64 = "";
        }
예제 #17
0
        public ParkItemViewModel()
        {
            busyIndicator     = new SfBusyIndicator();
            ImageSource       = "icon";
            dialogService     = new DialogService();
            navigationService = new NavigationService();
            geolocatorService = new GeolocatorService();
            apiService        = new ApiService();
            dataService       = new DataService();
            settingsService   = new SettingsService();
            //netService = new NetService();

            TypeParkings = new List <TypeParking>();
            LoadTypeUsers();


            LoadColor();

            IsBusy    = false;
            IsEnabled = true;
        }
예제 #18
0
 public MainPage()
 {
     InitializeComponent();
     _geolocatorService = new GeolocatorService();
 }