Пример #1
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;
            }
        }
Пример #2
0
        public static FormLink formLink;     // han 2011.2.12

        public Form1()
        {
            InitializeComponent();

            //this.WindowState = FormWindowState.Maximized;

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

            // show this form
            Show();
            Application.DoEvents();

            FormDialog formDlg = new FormDialog();

            formDlg.Message = "Please Wait ...";
            formDlg.Show();
            Application.DoEvents();

            R900APP = new UHFAPI_NET.UHFAPI_NET();

            // link R900 for control
            LinkReader();

            if (R900_alive)
            {
                label3.Text      = "On Line";
                label3.ForeColor = Color.Green;
            }

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

            // han 2011.2.7 // invoke inventory window
            // han 2011.2.7 formInventory = new FormInventory();
            // han 2011.2.7 formInventory.ShowDialog();

            // han 2011.2.7 DislinkReader();
            // Application.Exit();
        }
Пример #3
0
        public Form1()
        {
            InitializeComponent();

            //this.WindowState = FormWindowState.Maximized;

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

            // show this form
            Show();
            Application.DoEvents();

            FormDialog formDlg = new FormDialog();
            formDlg.Message = "Please Wait ...";
            formDlg.Show();
            Application.DoEvents();

            R900APP = new UHFAPI_NET.UHFAPI_NET();

            // link R900 for control
            LinkReader();

            if (R900_alive)
            {
                label3.Text = "On Line";
                label3.ForeColor = Color.Green;

            }

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

            // han 2011.2.7 // invoke inventory window
            // han 2011.2.7 formInventory = new FormInventory();
            // han 2011.2.7 formInventory.ShowDialog();

            // han 2011.2.7 DislinkReader();
            // Application.Exit();
        }
Пример #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;
            }
        }