Exemple #1
0
 private void calib_Click(object sender, RoutedEventArgs e)
 {
     iscalib = !iscalib;
     if (iscalib)
     {
         calib.Content = "Cancle";
         RF_DataAnalysis.Begin_RadioSend_Calibration(SoftID);
         //calib.IsEnabled = false;
         bindb.IsEnabled   = false;
         bBegin.IsEnabled  = false;
         bEnd.IsEnabled    = false;
         bBlink.IsEnabled  = false;
         bInit.IsEnabled   = false;
         wificon.IsEnabled = false;
     }
     else
     {
         calib.Content = "Calibration";
         RF_DataAnalysis.Stop_RadioSend();
         //calib.IsEnabled = true;
         bindb.IsEnabled   = true;
         bBegin.IsEnabled  = true;
         bEnd.IsEnabled    = true;
         bBlink.IsEnabled  = true;
         bInit.IsEnabled   = true;
         wificon.IsEnabled = true;
     }
 }
Exemple #2
0
 private void radiate_Click(object sender, RoutedEventArgs e)
 {
     isradiate = !isradiate;
     if (isradiate)
     {
         radiate.Content = "Cancle";
         RF_DataAnalysis.Begin_RadioSend_Search(SoftID);
         calib.IsEnabled   = false;
         bindb.IsEnabled   = false;
         bBegin.IsEnabled  = false;
         bEnd.IsEnabled    = false;
         bBlink.IsEnabled  = false;
         bInit.IsEnabled   = false;
         wificon.IsEnabled = false;
     }
     else
     {
         radiate.Content = "Radiate";
         RF_DataAnalysis.Stop_RadioSend();
         calib.IsEnabled   = true;
         bindb.IsEnabled   = true;
         bBegin.IsEnabled  = true;
         bEnd.IsEnabled    = true;
         bBlink.IsEnabled  = true;
         bInit.IsEnabled   = true;
         wificon.IsEnabled = true;
     }
 }
Exemple #3
0
        private void OpenCOM_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (!ComPort.ComisOpen())
                {
                    string strcom = comboBox.Items[comboBox.SelectedIndex].ToString();
                    if (strcom != "")
                    {
                        if (ComPort.OpenCOM(strcom))
                        {
                            OpenCOM.Content    = "CloseCOM";
                            comboBox.IsEnabled = false;
                            bBegin.IsEnabled   = true;
                            bEnd.IsEnabled     = true;
                            bBlink.IsEnabled   = true;
                            bInit.IsEnabled    = true;
                            radiate.IsEnabled  = true;
                            bindb.IsEnabled    = true;
                            wificon.IsEnabled  = true;
                        }
                        else
                        {
                            MessageBox.Show("Can not Open");
                        }
                    }
                }
                else
                {
                    ComPort.CloseCOM();
                    radiate.IsEnabled  = false;
                    OpenCOM.Content    = "OpenCOM";
                    comboBox.IsEnabled = true;
                    bBegin.IsEnabled   = false;
                    bEnd.IsEnabled     = false;
                    bBlink.IsEnabled   = false;
                    bInit.IsEnabled    = false;

                    bindname.IsEnabled = true;
                    bindb.Content      = "Bind";

                    radiate.Content   = "Radiate";
                    bindb.IsEnabled   = false;
                    wificon.IsEnabled = false;
                    RF_DataAnalysis.Stop_RadioSend();
                }
            }
            catch
            {
                MessageBox.Show("Can not Open");
            }
        }
Exemple #4
0
 private void wificon_Click(object sender, RoutedEventArgs e)
 {
     iswifibutton = !iswifibutton;
     if (iswifibutton)
     {
         SQLite_InitData init = new SQLite_InitData();
         init.init_Group       = group.Text;
         init.init_WIFI        = wifi.Text;
         init.init_PASS        = pass.Text;
         init.init_IP          = ip.Text;
         init.init_port        = port.Text;
         init.init_Server_IP   = serverip.Text;
         init.init_Server_Port = porttext.Text;
         SQLite_RW.SetData(init);
         wificon.Content   = "Cancle..";
         calib.IsEnabled   = false;
         radiate.IsEnabled = false;
         bindb.IsEnabled   = false;
         bBegin.IsEnabled  = false;
         bEnd.IsEnabled    = false;
         bBlink.IsEnabled  = false;
         bInit.IsEnabled   = false;
         ip.IsEnabled      = false;
         port.IsEnabled    = false;
         wifi.IsEnabled    = false;
         pass.IsEnabled    = false;
         RF_DataAnalysis.Begin_RadioSend_WIFI(SoftID, wifi.Text, pass.Text, ip.Text, port.Text);
     }
     else
     {
         wificon.Content   = "Server";
         calib.IsEnabled   = true;
         radiate.IsEnabled = true;
         bindb.IsEnabled   = true;
         bBegin.IsEnabled  = true;
         bEnd.IsEnabled    = true;
         bBlink.IsEnabled  = true;
         bInit.IsEnabled   = true;
         ip.IsEnabled      = true;
         port.IsEnabled    = true;
         wifi.IsEnabled    = true;
         pass.IsEnabled    = true;
         RF_DataAnalysis.Stop_RadioSend();
     }
 }
Exemple #5
0
        private void SingleEndEvent(object sender, RoutedEventArgs e)
        {
            SoftUI_Thread.ServerListUI select = listView.SelectedItem as SoftUI_Thread.ServerListUI;
            if (select == null)
            {
                return;
            }

            RF_DataAnalysis.SingleSend_End(SoftID, select.ID);
            //foreach (var item in ListeningThread.DeviceList_Thread)
            //{
            //    if(item.ipaddress == select.IPAddress)
            //    {
            //        //byte[] send = WIFI_Protocol.Construct_Data_Packet(new Protocol_Keyword_Function.TransData_Struct(Protocol_Keyword_Function.Protocol_Keyword.State_EndRecording, new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, new byte[] { }));
            //        //item.Ser.Send(send);
            //        RF_DataAnalysis.SingleSend_End(SoftID, select.ID);
            //        break;
            //    }
            //}


            //MessageBox.Show(select.ID);
        }
Exemple #6
0
 private void bInit_Click(object sender, RoutedEventArgs e)
 {
     RF_DataAnalysis.CastSend_Init(SoftID, FS.Text, GADFS.Text, textBox12.Text);
 }
Exemple #7
0
 private void bEnd_Click(object sender, RoutedEventArgs e)
 {
     RF_DataAnalysis.CastSend_End(SoftID);
 }