Пример #1
0
        public static void Main(string[] args)
        {
            PrintWelcome();
            Arguments argParser = new Arguments(args);

            if (argParser["c"] != null)
            {
                _config = new IMAPConfig(argParser["c"]);
            }
            else if (argParser.ArgsDefined(new string[] { "s", "p", "u" }))
            {
                string server   = argParser["s"];
                string username = argParser["u"];
                string password = argParser["p"];
                bool   useSSL   = argParser["ssl"] != null ? true : false;
                _config = new IMAPConfig(server, username, password, useSSL, false, "");
            }
            else
            {
                ColorConsole.WriteLine("\n\n^13:00Invalid parameters specified.\n");
                PrintHelp();
                return;
            }

            bool autoConnect = argParser["auto"] != null;

            _shell = new Shell.IMAPShell(_config, autoConnect);
            _shell.Start();
        }
Пример #2
0
        public static void Main(string[] args)
        {
            PrintWelcome();
            Arguments argParser = new Arguments(args);
            if (argParser["c"] != null)
                _config = new IMAPConfig(argParser["c"]);
            else if (argParser.ArgsDefined(new string[] { "s","p","u"}))
            {
                string server = argParser["s"];
                string username = argParser["u"];
                string password = argParser["p"];
                bool useSSL = argParser["ssl"] != null ? true : false;
                _config = new IMAPConfig(server, username, password, useSSL, false, "");
            }
            else
            {
                ColorConsole.WriteLine("\n\n^13:00Invalid parameters specified.\n");
                PrintHelp();
                return;
            }

            bool autoConnect = argParser["auto"] != null;
            
            _shell = new Shell.IMAPShell(_config, autoConnect);
            _shell.Start();                                    
        }