using System.ComponentModel;
using System.Xml.Serialization;

namespace QC.QSPRTreeSchemaLibrary;

public class FolderTestProperties : TestProperties
{
	public const string FOLDER_PROPERTY = "FolderProperty";

	protected bool failed;

	protected bool exception;

	protected bool disableLooping;

	protected bool linkRoot;

	protected string linkLocation = "";

	protected byte[] linkChecksum = new byte[0];

	protected string configLocation = "";

	protected bool saveAsNewSession = true;

	protected string linkSiteTreeID = "";

	protected string linkSiteKey = "";

	protected string linkRegisteredMachine = "";

	protected string linkTreeStringID = "";

	protected long linkTreeID = -1L;

	protected byte[] configChecksum = new byte[0];

	protected bool linkConfigLocationEdited;

	private bool folderForTestLoop;

	private bool setupFolder;

	private bool cleanupFolder;

	private float waitForLogTimeout = 60f;

	[Browsable(false)]
	public override string RealName
	{
		get
		{
			return base.RealName;
		}
		set
		{
			base.RealName = value;
		}
	}

	[Browsable(false)]
	public bool FolderForTestLoop
	{
		get
		{
			return folderForTestLoop;
		}
		set
		{
			folderForTestLoop = value;
		}
	}

	[DefaultValue(false)]
	[Description("Disabling looping runs the folder as if no loops are present.")]
	[Category("Settings")]
	public virtual bool DisableLooping
	{
		get
		{
			return disableLooping;
		}
		set
		{
			disableLooping = value;
		}
	}

	[Browsable(false)]
	[DefaultValue(false)]
	public bool Failed
	{
		get
		{
			return failed;
		}
		set
		{
			failed = value;
		}
	}

	[Browsable(false)]
	[DefaultValue(false)]
	public bool Exception
	{
		get
		{
			return exception;
		}
		set
		{
			exception = value;
		}
	}

	[Browsable(false)]
	public override string BranchOnError
	{
		get
		{
			return base.BranchOnError;
		}
		set
		{
			base.BranchOnError = value;
		}
	}

	[Browsable(false)]
	[DefaultValue(false)]
	public override bool TreatExceptionAsError
	{
		get
		{
			return base.TreatExceptionAsError;
		}
		set
		{
			base.TreatExceptionAsError = value;
		}
	}

	[DefaultValue(false)]
	[Browsable(false)]
	public bool LinkRoot
	{
		get
		{
			return linkRoot;
		}
		set
		{
			linkRoot = value;
		}
	}

	[Browsable(false)]
	public byte[] LinkChecksum
	{
		get
		{
			return linkChecksum;
		}
		set
		{
			linkChecksum = value;
		}
	}

	[Browsable(false)]
	[DefaultValue("")]
	public string LinkLocation
	{
		get
		{
			return linkLocation;
		}
		set
		{
			linkLocation = value;
		}
	}

	[Browsable(false)]
	public string ConfigLocation
	{
		get
		{
			return configLocation;
		}
		set
		{
			configLocation = value;
		}
	}

	[Browsable(false)]
	[DefaultValue(true)]
	public bool SaveAsNewSession
	{
		get
		{
			return saveAsNewSession;
		}
		set
		{
			saveAsNewSession = value;
		}
	}

	[DefaultValue("")]
	[Browsable(false)]
	public string LinkSiteTreeID
	{
		get
		{
			return linkSiteTreeID;
		}
		set
		{
			linkSiteTreeID = value;
		}
	}

	[DefaultValue("")]
	[Browsable(false)]
	public string LinkSiteKey
	{
		get
		{
			return linkSiteKey;
		}
		set
		{
			linkSiteKey = value;
		}
	}

	[Browsable(false)]
	[DefaultValue("")]
	public string LinkRegisteredMachine
	{
		get
		{
			return linkRegisteredMachine;
		}
		set
		{
			linkRegisteredMachine = value;
		}
	}

	[Browsable(false)]
	[DefaultValue("")]
	public string LinkTreeStringID
	{
		get
		{
			return linkTreeStringID;
		}
		set
		{
			linkTreeStringID = value;
		}
	}

	[Browsable(false)]
	[DefaultValue(-1)]
	public long LinkTreeID
	{
		get
		{
			return linkTreeID;
		}
		set
		{
			linkTreeID = value;
		}
	}

	[Browsable(false)]
	public byte[] ConfigChecksum
	{
		get
		{
			return configChecksum;
		}
		set
		{
			configChecksum = value;
		}
	}

	[Browsable(false)]
	[DefaultValue(false)]
	public bool LinkConfigLocationEdited
	{
		get
		{
			return linkConfigLocationEdited;
		}
		set
		{
			linkConfigLocationEdited = value;
		}
	}

	public override long NodeRID
	{
		get
		{
			return base.NodeRID;
		}
		set
		{
			base.NodeRID = value;
			if (value != -1 || base.Scenarios == null)
			{
				return;
			}
			foreach (LoopCondition loopCondition in base.Scenarios.LoopConditions)
			{
				loopCondition.ScenarioID = -1L;
			}
		}
	}

	[Browsable(false)]
	public override string TargetName
	{
		get
		{
			return targetName;
		}
		set
		{
			targetName = value;
		}
	}

	[XmlIgnore]
	[Browsable(false)]
	public override string PostConditionAction
	{
		get
		{
			return base.PostConditionAction;
		}
		set
		{
			base.PostConditionAction = value;
		}
	}

	[Browsable(false)]
	[XmlIgnore]
	public override ConditionMgr PostCondition
	{
		get
		{
			return null;
		}
		set
		{
		}
	}

	[Browsable(false)]
	[XmlAttribute("NodeType")]
	public override string NodeType
	{
		get
		{
			return "FolderProperty";
		}
		set
		{
			base.NodeType = value;
		}
	}

	[DefaultValue(false)]
	[Description("When true, the tests within this folder will set as Tool tests and the tests will run before GoNoGo starts.")]
	[Category("Setup & Cleanup")]
	public virtual bool IsSetupFolder
	{
		get
		{
			return setupFolder;
		}
		set
		{
			if (!IsCleanupFolder || !value)
			{
				setupFolder = value;
				if (setupFolder)
				{
					ToolTest = true;
				}
			}
		}
	}

	[Description("When true, the tests within this folder will not write to the logs or affect the test result.")]
	[DefaultValue(false)]
	[Category("Setup & Cleanup")]
	public virtual bool IsCleanupFolder
	{
		get
		{
			return cleanupFolder;
		}
		set
		{
			if (!IsSetupFolder || !value)
			{
				cleanupFolder = value;
			}
		}
	}

	[Category("Setup & Cleanup")]
	[Description("Maximum amount of time in seconds the cleanup folder will wait for the XmlForDB plugin logs to be written.\n(REQUIRES IsCleanupFolder=TRUE)")]
	[DefaultValue(60f)]
	public virtual float WaitForLogTimeout
	{
		get
		{
			return waitForLogTimeout;
		}
		set
		{
			waitForLogTimeout = value;
		}
	}

	public FolderTestProperties()
	{
	}

	public FolderTestProperties(object ParamColl)
	{
	}
}
