Exemple #1
0
        /// <summary>
        /// login return true or false
        /// </summary>
        /// <returns></returns>
        public int Login()
        {
            string a = textBox.Text + '\0';
            string b = passwordBox1.Password + '\0';
            //  string a = "1\0";
            //  string b = "123456\0";
            // 初始化
            int result = DLLimport.Authentication(a, b);

            // int result = DLLimport.test("dd");

            ///调用接口
            return(result);
        }
Exemple #2
0
        /// <summary>
        /// get aiming information
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        private List <string> getInfo(string ID)
        {
            ///接入接口
            DLLimport.Search(ID, h_socket);
            List <string> temp = new List <string>();
            StreamReader  sr   = new StreamReader(@".\phoneNum.txt");

            if (sr == null)
            {
                MessageBox.Show("文件读取异常");
            }
            string nextLine = sr.ReadLine();

            sr.Close();
            temp.Add(nextLine);
            return(temp);
        }