mirror of
https://github.com/netchx/netch.git
synced 2026-05-03 22:25:50 +08:00
Add WindowsJobAPI
This commit is contained in:
@@ -70,6 +70,7 @@ namespace Netch.Controllers
|
||||
|
||||
Instance.StartInfo.Arguments = argument;
|
||||
Instance.Start();
|
||||
Global.Job.AddProcess(Instance);
|
||||
|
||||
if (priority != ProcessPriorityClass.Normal)
|
||||
Instance.PriorityClass = priority;
|
||||
|
||||
@@ -7,6 +7,7 @@ using System.Windows.Forms;
|
||||
using Netch.Forms;
|
||||
using Netch.Models;
|
||||
using Netch.Models.Modes;
|
||||
using WindowsJobAPI;
|
||||
|
||||
namespace Netch
|
||||
{
|
||||
@@ -22,6 +23,8 @@ namespace Netch
|
||||
/// </summary>
|
||||
public static Setting Settings = new();
|
||||
|
||||
public static readonly JobObject Job = new();
|
||||
|
||||
/// <summary>
|
||||
/// 用于存储模式
|
||||
/// </summary>
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
<PackageReference Include="WindowsFirewallHelper" Version="2.1.4.81" />
|
||||
<PackageReference Include="System.ServiceProcess.ServiceController" Version="6.0.0" />
|
||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="6.0.0" />
|
||||
<PackageReference Include="WindowsJobAPI" Version="5.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user