Example #1
0
        public ConnectToFoxPage(IBluetoothDevicesLister bluetoothDevicesLister,
                                IBluetoothCommunicator bluetoothCommunicator)
        {
            this.bluetoothDevicesLister             = bluetoothDevicesLister;
            connectToFoxModel.BluetoothCommunicator = bluetoothCommunicator;

            InitializeComponent();

            BindingContext = connectToFoxModel;

            UpdateDevicesList();
        }
Example #2
0
        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);
        }