Beispiel #1
0
        void ConnectClientNetwork(object sender, System.EventArgs e)
        {
            UpdateStatus("Connecting to client network", "");
            var network = _availableNetworkListView.SelectedItem as Network;
            var task    = AccessPointHelper.ConnectToClientNetwork(network.Ssid, _clientNetworkPassword.Text);

            task.ContinueWith(t => { HandleException(t.Exception); }, TaskContinuationOptions.OnlyOnFaulted);
        }
Beispiel #2
0
        private void AccessPointHelper_ClientNetworksEnumeratedEvent(string status)
        {
            Device.BeginInvokeOnMainThread(() => {
                HandleState(State.NetworksEnumerated);
                UpdateStatus(null, status);

#if AUTOMATE_FOR_TESTING
                foreach (var n in _AvailableNetworks)
                {
                    if (n.Ssid.Contains(_TestAutomation_NetworkPartial))
                    {
                        AccessPointHelper.ConnectToClientNetwork(n.Ssid.ToString(), _TestAutomation_NetworkPassword);
                        break;
                    }
                }
#endif
            });
        }