Ejemplo n.º 1
0
 private void MainForm_Load(object sender, EventArgs e)
 {
     ParaLoad();
     LTEUnion.DataLoad(this.listView1, System.Windows.Forms.Application.StartupPath + "\\DetectData.bin");
     COM.ZCTT.AGI.Common.Global.tempClass.HeartBeatCountEvent       += new Class1.HeartBeatCountHandler(HeartBeatCount);
     COM.ZCTT.AGI.Common.Global.tempClass.SendUeInfoToMainFormEvent += new Class1.SendUeInfoToMainFormHandler(UeInfoReceived);
 }
Ejemplo n.º 2
0
 public ImsiBankForm()
 {
     InitializeComponent();
     LTEUnion.DataLoad(this.listView1, System.Windows.Forms.Application.StartupPath + "\\ImsiBankData.bin");
     textBox1.Text    = "1";
     textBox1.Enabled = false;
     Global.tempClass.IBOPERStatusEvent     += new Class1.IBOPERStatusHandler(IbOperStatus);
     Global.tempClass.DetectToImsiBankEvent += new Class1.DetectToImsiBankHandler(DetectToImsiBank);
 }
Ejemplo n.º 3
0
 public CtrlCmdForm()
 {
     InitializeComponent();
     textBox1.Text           = "1";
     textBox1.Enabled        = false;
     comboBox1.SelectedIndex = 0;
     textBox2.Text           = "100";
     comboBox2.SelectedIndex = 1;
     LTEUnion.DataSave(this.listView1, System.Windows.Forms.Application.StartupPath + "\\CtrlCmdForm.bin");
     Global.tempClass.SendPagingPwrToCtrlFormEvent += new Class1.SendPagingPwrToCtrlFormHandler(PagingPwrReceived);
     Global.tempClass.DetectToCtrlCmdEvent         += new Class1.DetectToCtrlCmdHandler(DetectToCtrlCmd);
 }
Ejemplo n.º 4
0
        public DlSniffForm()
        {
            InitializeComponent();
            textBox1.Text    = "1";
            textBox1.Enabled = false;

            textBox3.Text           = "100";
            comboBox1.SelectedIndex = 0;
            checkBox1.Checked       = true;
            Global.tempClass.SendToDlSniffFormEvent += new Class1.SendToDlSniffFormHandler(DlSniffReceived);

            LTEUnion.DataLoad(this.listView1, System.Windows.Forms.Application.StartupPath + "\\DlSniffData.bin");
        }
Ejemplo n.º 5
0
        private void ulEarfcnBox_KeyUp(object sender, KeyEventArgs e)
        {
            String Earfcn = ulEarfcnBox.Text.Trim();
            String Band   = BandTextBox.Text.Trim();

            if (LTEUnion.IsDigitalString(Earfcn) && LTEUnion.IsDigitalString(Band))
            {
                int    band   = Convert.ToUInt16(Band);
                double earfcn = Convert.ToDouble(Earfcn);
                double freq   = COM.ZCTT.AGI.Common.Global.EARFCNToFreq(band, earfcn);
                ulFreqBox.Text = freq.ToString();
            }
        }
Ejemplo n.º 6
0
        private void dlFreqBox_KeyUp(object sender, KeyEventArgs e)
        {
            String Freq = dlFreqBox.Text.Trim();
            String Band = BandTextBox.Text.Trim();

            if (LTEUnion.IsDigitalString(Freq) && LTEUnion.IsDigitalString(Band))
            {
                int    band   = Convert.ToUInt16(Band);
                double freq   = Convert.ToDouble(Freq);
                int    earfcn = COM.ZCTT.AGI.Common.Global.FreqToEARFCN(band, freq);
                dlEarfcnBox.Text = earfcn.ToString();
            }
        }
Ejemplo n.º 7
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (!LTEUnion.IsDigitalString(textBox2.Text))
            {
                MessageBox.Show("请输入正确的定时器间隔!");
            }
            else if (Convert.ToUInt32(textBox2.Text) < 0 || Convert.ToUInt32(textBox2.Text) > 500)
            {
                MessageBox.Show("定时器间隔应为0~500");
            }
            else if (Convert.ToUInt32(textBox2.Text) % 10 != 0)
            {
                MessageBox.Show("定时器间隔应为10的整数倍!");
            }
            else if (Global.GCurrentDevice == "")
            {
                MessageBox.Show("设备未连接!");
            }
            else
            {
                MsgDefine.RecvNewTac NewTac = new MsgDefine.RecvNewTac();
                NewTac.head.head        = 0xffff;
                NewTac.head.pkt_type    = (ushort)MsgDefine.RecvPktType.RECV_NEW_TAC;
                NewTac.head.data_length = (uint)(Marshal.SizeOf(NewTac) - 8);

                NewTac.newSysNo = Convert.ToUInt16(textBox1.Text);
                NewTac.newTimer = Convert.ToUInt16(textBox2.Text);

                int    lengthNewTac   = Marshal.SizeOf(NewTac);
                byte[] dataRecvNewTac = new byte[lengthNewTac];
                IntPtr intptr         = Marshal.AllocHGlobal(lengthNewTac);
                Marshal.StructureToPtr(NewTac, intptr, true);
                Marshal.Copy(intptr, dataRecvNewTac, 0, lengthNewTac);
                Marshal.FreeHGlobal(intptr);
                CustomDataEvtArg dataEvtArg = new CustomDataEvtArg();
                dataEvtArg.deivceName = Global.GCurrentDevice;
                dataEvtArg.data       = dataRecvNewTac;
                for (int i = 0; i < dataRecvNewTac.Length; i++)
                {
                    System.Diagnostics.Debug.WriteLine(dataRecvNewTac[i]);
                }
                Global.tempClass.SendDataToDevice(sender, dataEvtArg);
            }
        }
Ejemplo n.º 8
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (!LTEUnion.IsDigitalString(textBox2.Text))
            {
                MessageBox.Show("请输入正确的EARFCN!");
            }
            else
            {
                MsgDefine.RecvDlRxPara DlSniff = new MsgDefine.RecvDlRxPara();
                DlSniff.head.head        = 0xffff;
                DlSniff.head.pkt_type    = (ushort)MsgDefine.RecvPktType.RECV_DLRX_PARA;
                DlSniff.head.data_length = (uint)(Marshal.SizeOf(DlSniff) - 8);

                DlSniff.dlSysNo = Convert.ToUInt16(textBox1.Text);
                DlSniff.earfcn  = Convert.ToUInt16(textBox2.Text);
                DlSniff.dlFn    = Convert.ToUInt32(textBox3.Text);
                DlSniff.dlRxMod = (byte)(comboBox1.SelectedIndex + 1);
                if (checkBox1.Checked)
                {
                    DlSniff.dlEnable = 1;
                }
                else
                {
                    DlSniff.dlEnable = 0;
                }

                int    lengthDlSniff = Marshal.SizeOf(DlSniff);
                byte[] dataDlSniff   = new byte[lengthDlSniff];
                IntPtr intptr        = Marshal.AllocHGlobal(lengthDlSniff);
                Marshal.StructureToPtr(DlSniff, intptr, true);
                Marshal.Copy(intptr, dataDlSniff, 0, lengthDlSniff);
                Marshal.FreeHGlobal(intptr);
                CustomDataEvtArg dataEvtArg = new CustomDataEvtArg();
                dataEvtArg.deivceName = Global.GCurrentDevice;
                dataEvtArg.data       = dataDlSniff;
                for (int i = 0; i < dataDlSniff.Length; i++)
                {
                    System.Diagnostics.Debug.WriteLine(dataDlSniff[i]);
                }
                Global.tempClass.SendDataToDevice(sender, dataEvtArg);
            }
        }
Ejemplo n.º 9
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (!LTEUnion.IsDigitalString(textBox2.Text))
            {
                MessageBox.Show("请输入正确的寻呼间隔!");
            }
            else if (Convert.ToInt32(textBox2.Text) < 1 || Convert.ToInt32(textBox2.Text) > 255)
            {
                MessageBox.Show("寻呼间隔范围为1~255秒!");
            }
            else if (comboBox2.SelectedIndex == 1 && !LTEUnion.IsIMSI(textBox3.Text))
            {
                MessageBox.Show("请输入正确的15位IMSI!");
            }
            else if (comboBox2.SelectedIndex == 0 && !LTEUnion.IsSTMSI(textBox3.Text))
            {
                MessageBox.Show("请输入正确的10位STMSI!");
            }
            else if (Global.GCurrentDevice == "")
            {
                MessageBox.Show("设备未连接!");
            }
            else
            {
                MsgDefine.RecvCtrlCmd RecvCtrl = new MsgDefine.RecvCtrlCmd();
                RecvCtrl.head.head        = 0xffff;
                RecvCtrl.head.pkt_type    = (ushort)MsgDefine.RecvPktType.RECV_CTRL_CMD;
                RecvCtrl.head.data_length = (uint)(Marshal.SizeOf(RecvCtrl) - 8);

                RecvCtrl.ctrlSysNo        = Convert.ToByte(textBox1.Text);
                RecvCtrl.ctrlCmdType      = (byte)(comboBox1.SelectedIndex + 1);
                RecvCtrl.ctrlCmdPara      = Convert.ToByte(textBox2.Text);
                RecvCtrl.ctrlPagingIDType = (byte)(comboBox2.SelectedIndex + 1);
                if (comboBox2.SelectedIndex == 1)
                {
                    String imsi = "0" + textBox3.Text;
                    RecvCtrl.ctrlImsi = new byte[8];
                    for (int i = 0; i < 8; i++)
                    {
                        RecvCtrl.ctrlImsi[i] = Convert.ToByte(imsi.Substring(i * 2, 2), 16);
                    }
                }
                else if (comboBox2.SelectedIndex == 0)
                {
                    String imsi = "000000" + textBox3.Text;
                    RecvCtrl.ctrlImsi = new byte[8];
                    for (int i = 0; i < 8; i++)
                    {
                        RecvCtrl.ctrlImsi[i] = Convert.ToByte(imsi.Substring(i * 2, 2), 16);
                    }
                }

                int    lengthRecvCtrl = Marshal.SizeOf(RecvCtrl);
                byte[] dataRecvCtrl   = new byte[lengthRecvCtrl];
                IntPtr intptr         = Marshal.AllocHGlobal(lengthRecvCtrl);
                Marshal.StructureToPtr(RecvCtrl, intptr, true);
                Marshal.Copy(intptr, dataRecvCtrl, 0, lengthRecvCtrl);
                Marshal.FreeHGlobal(intptr);
                CustomDataEvtArg dataEvtArg = new CustomDataEvtArg();
                dataEvtArg.deivceName = Global.GCurrentDevice;
                dataEvtArg.data       = dataRecvCtrl;
                for (int i = 0; i < dataRecvCtrl.Length; i++)
                {
                    System.Diagnostics.Debug.WriteLine(dataRecvCtrl[i]);
                }
                Global.tempClass.SendDataToDevice(sender, dataEvtArg);
            }
        }
Ejemplo n.º 10
0
 private void CtrlCmdForm_FormClosed(object sender, FormClosedEventArgs e)
 {
     Device.CtrlCmdFormIsClosed = true;
     LTEUnion.DataSave(this.listView1, System.Windows.Forms.Application.StartupPath + "\\CtrlCmdForm.bin");
 }
Ejemplo n.º 11
0
 private void DlSniffForm_FormClosed(object sender, FormClosedEventArgs e)
 {
     LTEUnion.DataSave(this.listView1, System.Windows.Forms.Application.StartupPath + "\\DlSniffData.bin");
 }
Ejemplo n.º 12
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (!LTEUnion.IsIMSI(textBox2.Text))
            {
                MessageBox.Show("请输入正确的15位IMSI!");
            }
            else if (comboBox1.SelectedIndex < 0 || comboBox1.SelectedIndex > 2)
            {
                MessageBox.Show("请选择操作命令!");
            }
            else if (Global.GCurrentDevice == "")
            {
                MessageBox.Show("设备未连接!");
            }
            else
            {
                switch (comboBox1.SelectedIndex)
                {
                case 0:
                {
                    foreach (ListViewItem item in this.listView1.Items)
                    {
                        if (item.SubItems[0].Text == textBox2.Text)
                        {
                            MessageBox.Show("该IMSI已在库内!");
                            return;
                        }
                    }
                    ListViewItem Item = new ListViewItem(new String[2]);
                    Item.SubItems[0].Text = textBox2.Text;
                    Item.SubItems[1].Text = "正在添加";
                    listView1.Items.Add(Item);
                    IBOperMsg(sender, e);
                    break;
                }

                case 1:
                {
                    foreach (ListViewItem item in this.listView1.Items)
                    {
                        if (item.SubItems[0].Text == textBox2.Text)
                        {
                            item.SubItems[1].Text = "正在删除";
                            IBOperMsg(sender, e);
                            return;
                        }
                    }
                    MessageBox.Show("该IMSI不在库内");
                    break;
                }

                case 2:
                {
                    foreach (ListViewItem item in this.listView1.Items)
                    {
                        item.SubItems[1].Text = "正在清空";
                    }
                    IBOperMsg(sender, e);
                    break;
                }
                }
            }
        }
Ejemplo n.º 13
0
 private void ImsiBankForm_FormClosed(object sender, FormClosedEventArgs e)
 {
     LTEUnion.DataSave(this.listView1, System.Windows.Forms.Application.StartupPath + "\\ImsiBankData.bin");
     //this.Dispose(true);
 }