using System;
using System.Reflection;
using System.Windows;
using System.Windows.Markup;
using QC.QMSLPhone;
using QRCT_modem_RF_Debug_tool;

namespace QFDT;

public partial class AboutBox : Window, IComponentConnector
{
	public AboutBox(string powerSupplyVersion, string sgVersion, string saVersion)
	{
		InitializeComponent();
		Version version = Assembly.GetAssembly(typeof(App)).GetName().Version;
		SoftwareList.Items.Add("DebugTool: " + version.ToString());
		Version version2 = Assembly.GetAssembly(typeof(Phone)).GetName().Version;
		SoftwareList.Items.Add("Phone.NET: " + version2.ToString());
		SoftwareList.Items.Add("QMSL Version: " + version2.ToString());
		Version version3 = Assembly.GetAssembly(typeof(PowerAction)).GetName().Version;
		SoftwareList.Items.Add("modem UI: " + version3.ToString());
		if (powerSupplyVersion.Length > 0)
		{
			SoftwareList.Items.Add("PowerSupply Version " + powerSupplyVersion);
		}
		if (sgVersion.Length > 0)
		{
			SoftwareList.Items.Add("SigGen Version " + sgVersion);
		}
		if (saVersion.Length > 0)
		{
			SoftwareList.Items.Add("SA Version " + saVersion);
		}
	}

	private void OK_Click(object sender, RoutedEventArgs e)
	{
		Close();
	}
}
