Beispiel #1
0
        private async void OnLoad()
        {
            var res = await ShowMessageAsync("Load?", "Are you sure? Load current values to the DataBase", MessageDialogStyle.AffirmativeAndNegative, new MetroDialogSettings
            {
                AnimateShow = false
            });

            if (res == MessageDialogResult.Affirmative)
            {
                if (SelectedSession != null)
                {
                    DataDB.UpdateARFCNListBySession(SelectedSession);
                    ListARFCNs.Clear();
                    foreach (ARFCN arfcn in TransferDB.ARFCNs)
                    {
                        ListARFCNs.Add(arfcn);
                    }
                }
            }
        }
Beispiel #2
0
        private void OnScan()
        {
            ListARFCNs.Clear();
            //TransferDB.ARFCNs.Clear();
            SelectedUnit = Units[0];
            UpdateBand();
            Computer cpu = Computers.FirstOrDefault(c => c.Unit_ID == SelectedUnit.ID);

            if (Scanner.Start(cpu, 1, BroadcastIP, ScannerListenerPort, band, Gain, Speed, sample_rate, 0))
            {
                IsScanVisible   = Visibility.Collapsed;
                IsCancelVisible = Visibility.Visible;
                Cancel.RaiseCanExecuteChanged();
                if (!listenerWorker.IsBusy)
                {
                    listenerWorker.RunWorkerAsync(ScannerListenerPort);
                }
                IsEnabled        = false;
                IsEnabledSession = false;
            }
        }