예제 #1
0
        static void Main(string[] args)
        {
            User n = new User();
            Console.WriteLine("Would you like to query the current domain? Y or N");
            string a = Console.ReadLine();
            if (a=="Y" || a=="y")
            {
            n.username= Environment.UserName;
            Console.WriteLine("What is your password?");
            n.password = Console.ReadLine();
            n.domain = Environment.UserDomainName.ToString().ToLower();
            Console.WriteLine(n.domain);
            Console.WriteLine("Please enter username to query: ");
            n.name = Console.ReadLine();
            try
            {
                n.ConnectionStatus();
                Console.ReadKey();
            }
                catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }

            }
            else {
                    runtime r = new runtime();
                    r.Start();
            }
        }
예제 #2
0
 public void Start()
 {
     User U = new User();
     Console.WriteLine("Please enter preferred domain name: ");
     U.domain = Console.ReadLine();
     Console.WriteLine(U.domain);
     Console.WriteLine("Please enter domain credentials");
     Console.WriteLine("Username: "******"Password: "******"enter username to query: ");
     U.name = Console.ReadLine();
     U.ConnectionStatus();
     Console.ReadKey();
 }