Пример #1
0
        /// <summary>
        ///     Initializes this instance.
        /// </summary>
        internal static void Initialize(string[] args)
        {
            ServiceCore.Initialize(NetUtils.SERVICE_NODE_TYPE_GLOBAL_CHAT_CONTAINER, new NetChatMessageManager(), args);

            ServiceChat.InitLogic();
            ServiceChat.InitNetwork();

            ServiceChat._titleTimer          = new Timer(200);
            ServiceChat._titleTimer.Elapsed += (sender, eventArgs) => Program.UpdateConsoleTitle();
            ServiceChat._titleTimer.Start();

            ServiceChat.Regex = new Regex(@"\s+", RegexOptions.Compiled);

            ServiceChat.Start();
        }
Пример #2
0
        private static void Main(string[] args)
        {
            Console.SetOut(new ConsoleOut());
            Console.SetWindowSize(Program.Width, Program.Height);

            Core.Libs.Colorful.Console.WriteWithGradient(@"
                   __________.__      .__                      _________ __            .___.__        
                   \______   \__|__  _|__| ________________   /   _____//  |_ __ __  __| _/|__| ____  
                    |       _/  \  \/ /  |/ __ \_  __ \__  \  \_____  \\   __\  |  \/ __ | |  |/  _ \ 
                    |    |   \  |\   /|  \  ___/|  | \// __ \_/        \|  | |  |  / /_/ | |  (  <_> )
                    |____|_  /__| \_/ |__|\___  >__|  (____  /_______  /|__| |____/\____ | |__|\____/ 
                           \/                 \/           \/        \/                 \/            
            ", Color.OrangeRed, Color.LimeGreen, 14);

            Console.ForegroundColor = ConsoleColor.White;
            Console.WriteLine(Environment.NewLine);
            ServiceChat.Initialize(args);
            Console.WriteLine(Assembly.GetExecutingAssembly().GetName().Name + " is now starting..." + Environment.NewLine);
            CmdHandler.Initialize();
        }