using System;
using System.Collections.Generic;
using System.Linq;

namespace QC.QMSCT;

public class MULTIDUT_RF_UPDATER : TechnologyInformationControlUpdater
{
	private const string NAME = "MULTIDUT_RF";

	public static string MULTIPLEX_MANAGER_CONFIG_FILE = "MULTIPLEX_MANAGER_CONFIG_FILE";

	private MULTIDUT_RF control;

	public string TechnologyName => "MULTIDUT_RF";

	public MULTIDUT_RF_UPDATER(MULTIDUT_RF ctrl)
	{
		control = ctrl;
	}

	public void checkParameter(ref Dictionary<string, string> validaddinfo, ref string validcustconf, ref bool paramchanged)
	{
		paramchanged = false;
		if (!validaddinfo.Keys.Contains(MULTIPLEX_MANAGER_CONFIG_FILE))
		{
			string value = ((!Environment.Is64BitOperatingSystem) ? "C:\\Program Files\\Qualcomm\\QDART\\Databases\\MultiplexManagerConfigFile.xml" : "C:\\Program Files (x86)\\Qualcomm\\QDART\\Databases\\MultiplexManagerConfigFile.xml");
			validaddinfo.Add(MULTIPLEX_MANAGER_CONFIG_FILE, value);
			paramchanged = true;
		}
	}

	public void updateParameter(Dictionary<string, string> techGV, string custconf)
	{
		control.textbox_MultiplexManagerConfigFile.Text = techGV[MULTIPLEX_MANAGER_CONFIG_FILE];
	}
}
