Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            const string logDataPath = "..\\..\\..\\CLIENT\\INSPECTOR.txt";

            CLogIn.load(logDataPath);

            while (true)
            {
                string input = Console.ReadLine();
                if (input != null)
                {
                    string[] words = input.Split(' ');

                    string id  = words[0];
                    string pwd = words[1];
                    //Console.WriteLine("id:{0} pwd:{1}", id, pwd);
                    bool test = CLogIn.doLogIn(id, pwd);
                    if (test)
                    {
                        Console.WriteLine("LOGIN SUCCESS");
                        break;
                    }
                    else
                    {
                        Console.WriteLine("LOGIN FAIL");
                    }
                }
            }
            //Console.ReadKey();
        }
Ejemplo n.º 2
0
        public static void processLogIn()
        {
            while (true)
            {
                string input = Console.ReadLine();
                if (input != null)
                {
                    string[] words = input.Split(' ');

                    string id  = words[0];
                    string pwd = words[1];

                    if (CLogIn.isCollect(id, pwd))
                    {
                        CLogIn.doLogIn(id);
                        break;
                    }
                    else
                    {
                        Console.WriteLine("LOGIN FAIL");
                    }
                }
            }
        }