using System.ComponentModel;

namespace QC.QSPRTreeSchemaLibrary;

public class ScriptProperties : TestProperties
{
	private string debugWindowName = "Script Log";

	private string workingDirectory = "";

	private bool useShellExecute;

	private bool redirectStandardOutput = true;

	private bool createNoWindow = true;

	private bool exitAfterStart;

	private string verb = "";

	[Category("Script Settings")]
	[Description("Name of the debug window.")]
	public string DebugWindowName
	{
		get
		{
			return debugWindowName;
		}
		set
		{
			debugWindowName = value.Trim();
		}
	}

	[Description("Set to True for getting standard output from the script.")]
	[Category("Script Settings")]
	[DefaultValue(true)]
	public bool RedirectStandardOutput
	{
		get
		{
			return redirectStandardOutput;
		}
		set
		{
			redirectStandardOutput = value;
			if (redirectStandardOutput)
			{
				useShellExecute = false;
			}
		}
	}

	[Description("Sets and Gets the working directory of the script")]
	[DefaultValue("")]
	[Category("Script Settings")]
	public string WorkingDirectory
	{
		get
		{
			return workingDirectory;
		}
		set
		{
			workingDirectory = value;
		}
	}

	[Category("Script Settings")]
	[Description("Set to True for running scripts. No RedirectStandard Output")]
	[DefaultValue(false)]
	public bool UseShellExecute
	{
		get
		{
			return useShellExecute;
		}
		set
		{
			useShellExecute = value;
			if (useShellExecute)
			{
				redirectStandardOutput = false;
			}
		}
	}

	[Category("Script Settings")]
	[Description("open, print, perl etc. The Action set up in the 'Folder Options\\File Types' in the Windows Explorer")]
	[DefaultValue("")]
	public string Verb
	{
		get
		{
			return verb;
		}
		set
		{
			verb = value;
		}
	}

	[Description("False means  to create a window and run the App.")]
	[DefaultValue(true)]
	[Category("Script Settings")]
	public bool CreateNoWindow
	{
		get
		{
			return createNoWindow;
		}
		set
		{
			createNoWindow = value;
		}
	}

	[DefaultValue(false)]
	[Description("QSPR continues running after starting the script. QSPR does not wait till the script ends")]
	[Category("Script Settings")]
	public bool ExitAfterStart
	{
		get
		{
			return exitAfterStart;
		}
		set
		{
			exitAfterStart = value;
		}
	}
}
