public DeviceSelectionViewModel(INavigationService navigationService, IDialogService dialogService, IBluetoothLeService bluetoothLeService)
        {
            this.navigationService  = navigationService;
            this.dialogService      = dialogService;
            this.bluetoothLeService = bluetoothLeService;

            BluetoothDevices = new ObservableRangeCollection <IBluetoothDevice>();
        }
Ejemplo n.º 2
0
        public MainViewModel(INavigationService navigationService, IDialogService dialogService, IBluetoothLeService bluetoothLeService)
        {
            this.navigationService  = navigationService;
            this.dialogService      = dialogService;
            this.bluetoothLeService = bluetoothLeService;

            exposureTimeOptions = new ObservableCollection <ExposureTime>(ExposureTime.Times);
            exposureTime        = exposureTimeOptions.FirstOrDefault(e => e.Milliseconds == 8);
        }
Ejemplo n.º 3
0
        public MainPage()
        {
            InitializeComponent();
            NavigationPage.SetBackButtonTitle(this, "Back");

            viewModel          = App.ServiceLocator.MainViewModel;
            bluetoothLeService = SimpleIoc.Default.GetInstance <IBluetoothLeService>();

            BindingContext = viewModel;
        }
        public ConfigurationViewModel(IDialogService dialogService, IBluetoothLeService bluetoothLeService)
        {
            this.dialogService      = dialogService;
            this.bluetoothLeService = bluetoothLeService;

            exposureTimeOptions = new ObservableCollection <ExposureTime>(ExposureTime.Times);
            directionOptions    = new ObservableCollection <SliderDirection>(Enum.GetValues(typeof(SliderDirection)).Cast <SliderDirection>());

            // Set defaults
            exposureTime  = exposureTimeOptions.FirstOrDefault(e => e.Milliseconds == 8);
            direction     = directionOptions.FirstOrDefault();
            totalSteps    = 10000;
            numberOfShots = 10;
            Interval      = 5;
        }