|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
|
|
|
|
namespace StartServerWPF.Models
|
|
|
|
|
{
|
|
|
|
|
public class ProcessInfo
|
|
|
|
|
{
|
|
|
|
|
private string proName;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 程序路径
|
|
|
|
|
/// </summary>
|
|
|
|
|
[JsonProperty]
|
|
|
|
|
public string ProName
|
|
|
|
|
{
|
|
|
|
|
get { return proName; }
|
|
|
|
|
set { proName = value; }
|
|
|
|
|
}
|
|
|
|
|
private string proTitle;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 程序路径
|
|
|
|
|
/// </summary>
|
|
|
|
|
[JsonProperty]
|
|
|
|
|
public string ProTitle
|
|
|
|
|
{
|
|
|
|
|
get { return proTitle; }
|
|
|
|
|
set { proTitle = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private string proPath;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 程序路径
|
|
|
|
|
/// </summary>
|
|
|
|
|
[JsonProperty]
|
|
|
|
|
public string ProPath
|
|
|
|
|
{
|
|
|
|
|
get { return proPath; }
|
|
|
|
|
set { proPath = value; }
|
|
|
|
|
}
|
|
|
|
|
private string proParams;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 启动参数
|
|
|
|
|
/// </summary>
|
|
|
|
|
[JsonProperty]
|
|
|
|
|
public string ProParams
|
|
|
|
|
{
|
|
|
|
|
get { return proParams; }
|
|
|
|
|
set { proParams = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 配置文件路径
|
|
|
|
|
/// </summary>
|
|
|
|
|
[JsonProperty]
|
|
|
|
|
public string JsonPath { get; set; }
|
|
|
|
|
|
|
|
|
|
private int pid;
|
|
|
|
|
public int Pid
|
|
|
|
|
{
|
|
|
|
|
get { return pid; }
|
|
|
|
|
set { pid = value; }
|
|
|
|
|
}
|
|
|
|
|
private string operationStr = "open";
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 操作,open=打开;edit=编辑;find=搜寻
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string OperationStr
|
|
|
|
|
{
|
|
|
|
|
get { return operationStr; }
|
|
|
|
|
set { operationStr = value; }
|
|
|
|
|
}
|
|
|
|
|
private int showState = 0;
|
|
|
|
|
/// <summary>
|
|
|
|
|
///Deafult:0
|
|
|
|
|
///HIDE 0 隐藏窗体并激活其它窗体;
|
|
|
|
|
///SHOWNORMAL 1 激活并显示一个窗体,假设窗体是最小化或最大化, 将其还原到其原始大小和位置 (同 RESTORE);
|
|
|
|
|
///SHOWMINIMIZED 2 激活窗体并最小化;
|
|
|
|
|
///SHOWMAXIMIZED 3 激活窗体并最大化;
|
|
|
|
|
///SHOWMINNOACTIVATE 4 以近期的大小和位置显示窗体,当前活动窗体保持活动;
|
|
|
|
|
///SHOW 5 激活窗体并显示其当前大小和位置中;
|
|
|
|
|
///MINIMIZE 6 最小化指定窗体并激活系统列表中顶层窗体;
|
|
|
|
|
///SHOWMINNOACTIVE 7 以最小化模式显示窗体,当前活动窗体保持活动;
|
|
|
|
|
///SHOWN 8 以近期的状态显示窗体,当前活动窗体保持活动
|
|
|
|
|
///RESTORE 9 激活窗体并显示,假设窗体是最小化或最大化, 还原到其原始大小和位置 (同SHOWNORMAL)
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int ShowState
|
|
|
|
|
{
|
|
|
|
|
get { return showState; }
|
|
|
|
|
set { showState = value; }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|