public ConnectToFoxPage(IBluetoothDevicesLister bluetoothDevicesLister, IBluetoothCommunicator bluetoothCommunicator) { this.bluetoothDevicesLister = bluetoothDevicesLister; connectToFoxModel.BluetoothCommunicator = bluetoothCommunicator; InitializeComponent(); BindingContext = connectToFoxModel; UpdateDevicesList(); }
public MainPage(IBluetoothDevicesLister bluetoothDevicesLister, IBluetoothCommunicator bluetoothCommunicator, IPacketsProcessor packetsProcessor) { InitializeComponent(); var connectToFoxPage = new ConnectToFoxPage(bluetoothDevicesLister, bluetoothCommunicator); var foxSettingsPage = new FoxSettingsPage(bluetoothCommunicator, packetsProcessor); btnConnectToFox.Clicked += (s, e) => Navigation.PushModalAsync(connectToFoxPage); btnFoxSettings.Clicked += (s, e) => Navigation.PushModalAsync(foxSettingsPage); }