【新增】 打开本地判分,输入命名空间,进行
This commit is contained in:
@@ -47,11 +47,33 @@ class Program
|
||||
string dbName = context.Request.QueryString["dbName"];
|
||||
string filepath = context.Request.QueryString["filepath"];
|
||||
string fileToOpen = context.Request.QueryString["file"];
|
||||
string openType = context.Request.QueryString["type"];
|
||||
string exePath = context.Request.QueryString["exepath"];
|
||||
string workingDirectory = context.Request.QueryString["workingdirectory"];
|
||||
|
||||
string ip = context.Request.QueryString["ip"];
|
||||
string action = context.Request.Url.AbsolutePath.ToLower();
|
||||
string responseMessage = "";
|
||||
if (action == "/start")
|
||||
if (action == "/openjudgement")
|
||||
{
|
||||
string relativePath = "";
|
||||
if (openType == "1")
|
||||
{
|
||||
string exeName = exePath;
|
||||
relativePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, exeName);
|
||||
}
|
||||
else
|
||||
{
|
||||
var startInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = exePath,
|
||||
WorkingDirectory = workingDirectory, // 必须!
|
||||
UseShellExecute = true // 或 false,根据需要
|
||||
};
|
||||
Process.Start(startInfo);
|
||||
}
|
||||
}
|
||||
else if (action == "/start")
|
||||
{
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user