public DeviceSelectionViewModel(INavigationService navigationService, IDialogService dialogService, IBluetoothLeService bluetoothLeService) { this.navigationService = navigationService; this.dialogService = dialogService; this.bluetoothLeService = bluetoothLeService; BluetoothDevices = new ObservableRangeCollection <IBluetoothDevice>(); }
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); }
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; }