using System.IO;
using System.Reflection;
using System.Windows;
using System.Windows.Threading;

namespace QC.QMine.QMineInterface;

public static class Constants
{
	private static Window mainWindow = null;

	private static QMineModes qMineMode = QMineModes.GUI;

	private static string qMineDataPath = "c:\\Qualcomm\\QMine";

	private static bool enableFullQmine;

	public static Window MainWindow
	{
		get
		{
			return mainWindow;
		}
		set
		{
			mainWindow = value;
		}
	}

	public static Dispatcher MainWindowDispatcher
	{
		get
		{
			if (MainWindow != null)
			{
				return MainWindow.Dispatcher;
			}
			return null;
		}
	}

	public static QMineModes QMineMode
	{
		get
		{
			return qMineMode;
		}
		set
		{
			qMineMode = value;
		}
	}

	public static string QMineDataPath
	{
		get
		{
			return qMineDataPath;
		}
		set
		{
			qMineDataPath = value;
		}
	}

	public static string PluginsFolderPath => Path.Combine(ApplicationFolderPath, "..\\QMinePlugins");

	public static string ApplicationFolderPath => Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

	public static string PluginSettingsMainConfigPath => Path.Combine(QMineDataPath, "QMinePluginSettings.config");

	public static bool EnableFullQmine
	{
		get
		{
			return enableFullQmine;
		}
		set
		{
			enableFullQmine = value;
		}
	}

	public static int MaxLimitForCommandLineArgs => 32699;

	public static string TempFolderPath => Path.Combine(CommonFunctions.GetQMineTemporaryDirectoryPath(), "Run");

	public static string CommandLineModeLogFolderPath => Path.Combine(CommonFunctions.GetQMineTemporaryDirectoryPath(), "Logs");

	public static string CommandLineModeConfigfileArg => "-qmineconfig";

	public static string CommandLineModeQueryPlugin => "-queryplugin";

	public static string CommandLineModeResultPlugin => "-resultplugin";

	public static string CommandLineHelpFilePath => Path.Combine(ApplicationFolderPath, "QMine-CommandLineHelp.pdf");
}
