private async Task DisplayNetworkReportAsync(WiFiNetworkReport report)
        {
            rootPage.NotifyUser(string.Format("Network Report Timestamp: {0}", report.Timestamp), NotifyType.StatusMessage);

            ResultCollection.Clear();
            ConcurrentDictionary <string, WiFiNetworkDisplay> dictionary = new ConcurrentDictionary <string, WiFiNetworkDisplay>();

            foreach (var network in report.AvailableNetworks)
            {
                if (!String.IsNullOrEmpty(network.Ssid))
                {
                    var item = new WiFiNetworkDisplay(network, firstAdapter);
                    dictionary.TryAdd(network.Ssid, item);
                }
            }

            var values = dictionary.Values;

            foreach (var item in values)
            {
                /*await*/ item.UpdateAsync();
                if (IsConnected(item.AvailableNetwork))
                {
                    ResultCollection.Insert(0, item);
                    ResultsListView.SelectedItem = ResultsListView.Items[0];
                    ResultsListView.ScrollIntoView(ResultsListView.SelectedItem);
                    SwitchToItemState(item.AvailableNetwork, WifiConnectedState, false);
                }
                else
                {
                    ResultCollection.Add(item);
                }
            }
            ResultsListView.Focus(FocusState.Pointer);
        }
Beispiel #2
0
        private void ShowMolfile_Click(object sender, EventArgs e)
        {
            MolFileViewer tv = new MolFileViewer(new System.Windows.Point(TopLeft.X + Core.Helpers.Constants.TopLeftOffset, TopLeft.Y + Core.Helpers.Constants.TopLeftOffset), _lastMolfile);

            tv.ShowDialog();
            ResultsListView.Focus();
        }
Beispiel #3
0
        private async Task DisplayNetworkReportAsync(WiFiNetworkReport report)
        {
            rootPage.NotifyUser(string.Format("Network Report Timestamp: {0}", report.Timestamp), NotifyType.StatusMessage);

            ResultCollection.Clear();

            foreach (var network in report.AvailableNetworks)
            {
                var item = new WiFiNetworkDisplay(network, firstAdapter);
                /*await*/
                item.UpdateAsync();
                if (IsConnected(network))
                {
                    ResultCollection.Insert(0, item);
                    ResultsListView.SelectedItem = ResultsListView.Items[0];
                    ResultsListView.ScrollIntoView(ResultsListView.SelectedItem);
                    SwitchToItemState(network, WifiConnectedState, false);
                }
                else
                {
                    ResultCollection.Add(item);
                }
            }
            ResultsListView.Focus(FocusState.Pointer);
        }
        private async Task DisplayNetworkReportAsync(WiFiNetworkReport report)
        {
            ResultCollection.Clear();

            foreach (var network in report.AvailableNetworks)
            {
                var item = new WiFiNetworkDisplay(network, firstAdapter);
                /*await*/ item.UpdateAsync();
                if (IsConnected(network))
                {
                    ResultCollection.Insert(0, item);
                    ResultsListView.SelectedItem = ResultsListView.Items[0];
                    ResultsListView.ScrollIntoView(ResultsListView.SelectedItem);
                    SwitchToItemState(network, WifiConnectedState, false);
                }
                else
                {
                    ResultCollection.Add(item);
                }
            }
            ResultsListView.Focus(FocusState.Pointer);
        }
 private void ViewModel_OnSelect(object sender, EventArgs e)
 {
     ResultsListView.ScrollIntoView(ViewModel.SelectedWiFiNetwork);
     SetSelectedItemState(ViewModel.SelectedWiFiNetwork);
     ResultsListView.Focus(FocusState.Pointer);
 }