Exemplo n.º 1
0
        public FormLink()
        {
            InitializeComponent();

            // remember for search thread
            thisForm = this;
            DevCtrl  = new devicectrl(this);

            // open bluetooth manager
            DevCtrl.m_hBt = DevCtrl.BthCreate();

            DevCtrl.varProc = threadSearchProcCallback;

            // list active comports
            selectedport = (int)DevCtrl.DevGetDefaultPort();
            ListActiveComports();
        }
Exemplo n.º 2
0
        private void button3_Click(object sender, EventArgs e)
        {
            // dislink first
            if (R900APP.UHFAPI_IsOpen())
            {
                DislinkReader();
            }

            // invoke bind window
            formLink = new FormLink();

            formLink.ShowDialog();

            if (!R900APP.UHFAPI_IsOpen())
            {
                FormDialog formDlg = new FormDialog();
                formDlg.Message = "Please Wait ...";
                formDlg.Show();
                Application.DoEvents();

                // link R900 for control
                LinkReader();

                formDlg.Close();
                Application.DoEvents();
            }

            if (R900APP.UHFAPI_IsOpen())
            {
                R900_alive = true;

                label3.Text      = "On Line";
                label3.ForeColor = Color.Green;
            }
            else
            {
                R900_alive = false;

                label3.Text      = "Off Line";
                label3.ForeColor = Color.Red;
            }
        }
Exemplo n.º 3
0
        public FormLink()
        {
            InitializeComponent();

            // remember for search thread
            thisForm = this;
            DevCtrl = new devicectrl(this);

            // open bluetooth manager
            DevCtrl.m_hBt = DevCtrl.BthCreate();

            DevCtrl.varProc = threadSearchProcCallback;

            // list active comports
            selectedport = (int)DevCtrl.DevGetDefaultPort();
            ListActiveComports();
        }
Exemplo n.º 4
0
        private void button3_Click(object sender, EventArgs e)
        {
            // dislink first
            if (R900APP.UHFAPI_IsOpen())
                DislinkReader();

            // invoke bind window
            formLink = new FormLink();

            formLink.ShowDialog();

            if (!R900APP.UHFAPI_IsOpen())
            {
                FormDialog formDlg = new FormDialog();
                formDlg.Message = "Please Wait ...";
                formDlg.Show();
                Application.DoEvents();

                // link R900 for control
                LinkReader();

                formDlg.Close();
                Application.DoEvents();
            }

            if (R900APP.UHFAPI_IsOpen())
            {
                R900_alive = true;

                label3.Text = "On Line";
                label3.ForeColor = Color.Green;
            }
            else
            {
                R900_alive = false;

                label3.Text = "Off Line";
                label3.ForeColor = Color.Red;
            }
        }