예제 #1
0
        private void AddToSearchListButton_Click(object sender, EventArgs e)
        {
            foreach (var info in CellSearchAndMonitorUnions.OPCellSearchInfoDic[CSAMForm.OPComboBox.Text])
            {
                string freq   = info.Freq;
                string earfcn = info.Earfcn;
                string pci    = CSAMForm.PCIText.Text.Trim();

                if (String.IsNullOrWhiteSpace(freq) ||
                    String.IsNullOrWhiteSpace(pci))
                {
                    return;
                }
                if (!CellSearchAndMonitorUnions.IsIntOrDoubleString(freq) ||
                    !CellSearchAndMonitorUnions.IsDigitalString(pci))
                {
                    return;
                }

                ListViewItem LVItem = new ListViewItem(new string[10]);

                int index = CSAMForm.CellSearchListView.Items.Count;

                LVItem.SubItems[0].Text = (index + 1).ToString();
                LVItem.SubItems[1].Text = freq;
                LVItem.SubItems[2].Text = earfcn;
                LVItem.SubItems[3].Text = pci;
                LVItem.SubItems[9].Text = CSAMForm.OPComboBox.Text;
                LVItem.Tag = info.Band;

                CSAMForm.CellSearchListView.Items.Add(LVItem);
            }
            CSAMForm.CellMonitorButton.Enabled = true;
        }
예제 #2
0
        private void earfcnBox_KeyUp(object sender, KeyEventArgs e)
        {
            String Earfcn = earfcnBox.Text.Trim();

            if (CellSearchAndMonitorUnions.IsDigitalString(Earfcn))
            {
                int    earfcn = Convert.ToInt32(Earfcn);
                double freq   = Global.EARFCNToFreq(earfcn);
                int    band   = Global.EARFCNToBand(earfcn);
                freqBox.Text     = freq.ToString();
                BandTextBox.Text = band.ToString();
            }
        }
예제 #3
0
        private void freqBox_KeyUp(object sender, KeyEventArgs e)
        {
            String Freq = freqBox.Text.Trim();
            String Band = BandTextBox.Text.Trim();

            if (CellSearchAndMonitorUnions.IsIntOrDoubleString(Freq) && CellSearchAndMonitorUnions.IsDigitalString(Band))
            {
                int    band   = Convert.ToUInt16(Band);
                double freq   = Convert.ToDouble(Freq);
                int    earfcn = Global.FreqToEARFCN(band, freq);
                earfcnBox.Text = earfcn.ToString();
            }
        }