示例#1
0
		public static void Main (string[] args)
		{
			//Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);
			AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;

			var c = new Chatter ();
			c.Start ();

			string line;
			while ((line = Console.ReadLine ()) != "exit") {
				var cmdargs = line.Split(' ');
				if (cmdargs [0] == "link") {
					Console.WriteLine ("Connecting to {0}", cmdargs [1]);
					c.Link (cmdargs [1]);
				}
				Console.Write ("> ");
			}
		}
示例#2
0
        public static void Main(string[] args)
        {
            //Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);
            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;

            var c = new Chatter();

            c.Start();

            string line;

            while ((line = Console.ReadLine()) != "exit")
            {
                var cmdargs = line.Split(' ');
                if (cmdargs [0] == "link")
                {
                    Console.WriteLine("Connecting to {0}", cmdargs [1]);
                    c.Link(cmdargs [1]);
                }
                Console.Write("> ");
            }
        }