using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RyLine
{
    public class Init
    {
        public static void Run(string[] args)
        {
            if (args.Length == 1)
            {
                RyCode.RunCodeLine(args[0]);
            }
            else if (args.Length > 1)
            {
                if (args[0] == "SetAutoRun" && args.Length == 4)
                { ryCommon.ryStart.SetAutoRun(true, args[1], "\"" + args[2] + "\"" + " " + args[3]); }
                else if (args[0] == "DelAutoRun" && args.Length == 2)
                { ryCommon.ryStart.SetAutoRun(false, args[1]); }
                else if (args[0] == "Hosts" && args.Length == 2)
                {
                    if (System.IO.File.Exists(args[1]))
                    {
                        ryCommon.Hosts.AddHosts(ryCommon.RyFiles.ReadAllText(args[1]));
                    }
                }
            }
        }
    }
}
