using System;
using System.IO;

namespace QC.QMine.QMineInterface;

[Serializable]
public class QMineSecurityConfiguration
{
	private static string qmineSecurityConfigPath = Path.Combine(Constants.ApplicationFolderPath, "QMineConfig.bin");

	private bool enableFullQMine;

	public bool EnableFullQMine
	{
		get
		{
			return enableFullQMine;
		}
		set
		{
			enableFullQMine = value;
		}
	}

	public static QMineSecurityConfiguration Load()
	{
		if (File.Exists(qmineSecurityConfigPath))
		{
			QMineSecurityConfiguration qMineSecurityConfiguration = CommonFunctions.Deserialize<QMineSecurityConfiguration>(qmineSecurityConfigPath, SerializationTypes.Binary);
			if (qMineSecurityConfiguration != null)
			{
				return qMineSecurityConfiguration;
			}
			return new QMineSecurityConfiguration();
		}
		return new QMineSecurityConfiguration();
	}
}
