コード例 #1
0
        /// <summary>
        /// 這函式是使用非同步方式檢查 MCCLManager 內,所有的 MCCL Function 回傳值
        /// </summary>
        /// <param name="returnValue"></param>

        #region 控制器
        public static void ConnectEMPZ()
        {
            string ip = "192.168.0.2";

            byte[] tmp     = Encoding.ASCII.GetBytes(ip);
            int    cardInx = 0;
            int    QQ      = MCCL.MCC_Init(ref tmp[0], ref cardInx, 8);

            if (QQ < 0)
            {
                MessageBox.Show("Connect Error!");
                return;
            }
            else
            {
                MessageBox.Show(tmp[0].ToString());
            }
        }
コード例 #2
0
        public void ConnectController()
        {
            byte[] tmp    = Encoding.ASCII.GetBytes(this.ControllerIP);
            int    result = MCCL.MCC_Init(ref tmp[0], ref cardIndex, 8);

            if (result < 0)
            {
                Debug.WriteLine("Connect Error");
            }
            else if (result > 0)
            {
                Debug.WriteLine("Connect Sucessful");
            }
            else
            {
                Debug.WriteLine("result =" + result.ToString());
            }
        }