예제 #1
0
    static public void Main(string[] args)
    {
        int verbosity = 0;

        for (int i = 0; i < args.Length; i++)
        {
            if (args[i] == "-v")
            {
                verbosity = 1;
                if (i + 1 < args.Length)
                {
                    try { verbosity = Int32.Parse(args[i + 1]); }
                    catch {}
                }
            }
        }
        NewerMagellan m       = new NewerMagellan(verbosity);
        bool          exiting = false;

        while (!exiting)
        {
            string user_in = System.Console.ReadLine();
            if (user_in == "exit")
            {
                System.Console.WriteLine("stopping");
                m.ShutDown();
                exiting = true;
            }
        }
    }
예제 #2
0
 public static void Main(string[] args)
 {
     int verbosity = 0;
     for(int i=0;i<args.Length;i++){
         if (args[i] == "-v"){
             verbosity = 1;
             if (i+1 < args.Length){
                 try { verbosity = Int32.Parse(args[i+1]); }
                 catch{}
             }
         }
     }
     NewerMagellan m = new NewerMagellan(verbosity);
     bool exiting = false;
     while(!exiting){
         string user_in = System.Console.ReadLine();
         if (user_in == "exit"){
             System.Console.WriteLine("stopping");
             m.ShutDown();
             exiting = true;
         }
     }
 }