35 lines
1.1 KiB
C#
35 lines
1.1 KiB
C#
using System;
|
||
using System.Windows.Forms;
|
||
|
||
namespace RyLine
|
||
{
|
||
static class Program
|
||
{
|
||
/// <summary>
|
||
/// 应用程序的主入口点。
|
||
/// </summary>
|
||
[STAThread]
|
||
static void Main(string[] args)
|
||
{
|
||
Application.EnableVisualStyles();
|
||
Application.SetCompatibleTextRenderingDefault(false);
|
||
// 修改 EWX_SHUTDOWN 或者 EWX_LOGOFF, EWX_REBOOT等实现不同得功能。
|
||
// 在XP下可以看到帮助信息,以得到不同得参数
|
||
// SHUTDOWN /?
|
||
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]); }
|
||
}
|
||
//shoutdown.DoExitWin(shoutdown.EWX_SHUTDOWN + shoutdown.EWX_FORCE);
|
||
//Application.Run(new Form1());
|
||
}
|
||
}
|
||
}
|