Ejemplo n.º 1
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (processing_ongoing)
            {
                return;
            }
            int val = 0;

            try
            {
                val = Modem_Controller.signal_strength();
            }
            catch (Exception c)
            {
                return;
            }
            if (val == -1)
            {
                return;
            }
            if (val > 31)
            {
                val = 31;
            }
            if (val < 0)
            {
                val = 0;
            }
            progressBar1.Value = val;
            label3.Text        = (-113 + (val * 2)).ToString() + "dBm";
        }
Ejemplo n.º 2
0
        public Form1()
        {
            InitializeComponent();
            if (Modem_Controller.init_modem() == false)
            {
                MessageBox.Show("Failed to find any modem . Please try again.");
                Application.Exit();
            }
            //MessageBox.Show(Modem_Controller.get_modem_info());
            richTextBox1.Text = "Device Info :\n\n" + Modem_Controller.get_modem_info();
            load_ussd_commands();

            //Modem_Controller.signal_strength();
            richTextBox2.Text = " Abdullah Al Mamun\n [email protected]\n 01812133471";
        }
Ejemplo n.º 3
0
        void bw_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            if (processing_ongoing == false)
            {
                return;
            }
            string msg = "";

            msg = (string)e.Result;
            msg = Modem_Controller.decode_ussd_message(msg);

            richTextBox1.Text = msg;
            store_new_command();
            textBox1.Clear();

            load_ussd_commands();
            processing_ongoing = false;
            button1.Text       = "Send";
        }
Ejemplo n.º 4
0
 void bw_DoWork(object sender, DoWorkEventArgs e)
 {
     e.Result = Modem_Controller.send_ussd((string)e.Argument);
 }