using System.Collections;

namespace QC.SmartMatchApp;

public class LanguageDetails
{
	public enum Language
	{
		ENGLISH,
		CHINESE
	}

	public const int TXT_START = 1;

	public const int TXT_QUIT = 2;

	public const int TXT_RESUME = 3;

	public const int TXT_PASSED = 4;

	public const int TXT_FAILED = 5;

	public const int TXT_ERROR_CODE = 6;

	public const int TXT_ERROR_STRING = 7;

	public const int TXT_RUNNING = 9;

	public const int TXT_STANDBY = 10;

	private Hashtable englishData = new Hashtable();

	private Hashtable chineseData = new Hashtable();

	private Hashtable currentLangData;

	private Language currentLang;

	public Language CurrentLanguage
	{
		get
		{
			return currentLang;
		}
		set
		{
			currentLang = value;
			if (currentLang == Language.ENGLISH)
			{
				currentLangData = englishData;
			}
			else
			{
				currentLangData = chineseData;
			}
		}
	}

	public LanguageDetails()
	{
		AddToEnglishData();
		AddToChineseData();
		currentLangData = englishData;
	}

	private void AddToEnglishData()
	{
		englishData.Add(1, "START");
		englishData.Add(2, "STOP");
		englishData.Add(3, "RESUME");
		englishData.Add(4, "PASSED");
		englishData.Add(5, "FAILED");
		englishData.Add(6, "Error Code");
		englishData.Add(7, "Error String");
		englishData.Add(9, "RUNNING");
		englishData.Add(10, "STANDBY");
	}

	private void AddToChineseData()
	{
		chineseData.Add(1, "开始");
		chineseData.Add(2, "退出");
		chineseData.Add(3, "重新测试");
		chineseData.Add(4, "通过计数");
		chineseData.Add(5, "失败计数");
		chineseData.Add(6, "错误码");
		chineseData.Add(7, "错误码说明");
		chineseData.Add(9, "运行");
		chineseData.Add(10, "等待开始");
	}

	public string GetData(int key)
	{
		return currentLangData[key].ToString();
	}
}
