MyTimeClock/Source/MyTimeClock/RyLine/Init.cs
鑫Intel 094d1f9d50 ### 2021-10-16更新
------
#### TimeClock    V1.0.2110.1601
- *.[新增]便笺新增靠边隐藏功能。
2021-10-16 16:21:23 +08:00

33 lines
1008 B
C#

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]));
}
}
}
}
}
}