【新增】 打开本地判分,输入命名空间,进行

This commit is contained in:
MSI\letre
2025-07-07 09:29:07 +08:00
parent fb9891168a
commit 2fe6e73ddc

View File

@@ -47,11 +47,33 @@ class Program
string dbName = context.Request.QueryString["dbName"]; string dbName = context.Request.QueryString["dbName"];
string filepath = context.Request.QueryString["filepath"]; string filepath = context.Request.QueryString["filepath"];
string fileToOpen = context.Request.QueryString["file"]; 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 ip = context.Request.QueryString["ip"];
string action = context.Request.Url.AbsolutePath.ToLower(); string action = context.Request.Url.AbsolutePath.ToLower();
string responseMessage = ""; 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")
{ {