Esempio n. 1
0
        private void ShowInfo(int selectedIndex)
        {
            if (selectedIndex > accessPoints.ToArray().Length || accessPoints.ToArray().Length == 0)
            {
                Console.Write("\r\nIndex out of bounds");
                return;
            }
            AccessPoint selectedAP = accessPoints.ToList()[selectedIndex];

            richTextBox1.Text = selectedAP.ToString();
        }
Esempio n. 2
0
        static void ShowInfo()
        {
            var accessPoints = List();

            Console.Write("\r\nEnter the index of the network you wish to see info about: ");

            int selectedIndex = int.Parse(Console.ReadLine());

            if (selectedIndex > accessPoints.ToArray().Length || accessPoints.ToArray().Length == 0)
            {
                Console.Write("\r\nIndex out of bounds");
                return;
            }
            AccessPoint selectedAP = accessPoints.ToList()[selectedIndex];

            Console.WriteLine("\r\n{0}\r\n", selectedAP.ToString());
        }
Esempio n. 3
0
        private async Task connect(AccessPoint ap, string password)
        {
            ap.DeleteProfile();
            bool        str = false;
            AuthRequest ar  = new AuthRequest(ap);

            ar.Password = password;
            try
            {
                str = await Task.Run(() => ap.Connect(ar));

                //str = ap.Connect(ar);
            }
            catch
            {
            }
            Console.WriteLine(ap.ToString() + ar.Password + str);
            if (str)
            {
                Environment.Exit(0);
            }
        }