12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- using System.Collections.Generic;
- using MECF.Framework.Common.DataCenter;
- using OpenSEMI.ClientBase;
- namespace VirgoUI.Client
- {
- public static class ModuleManager
- {
- /// <summary>
- /// all module need init
- /// </summary>
- public static readonly List<string> ModulesID = new List<string>()
- {
- "EfemRobot","Aligner1","Aligner2","Cooling1","Cooling2","LP1", "LP2"
- };
- public static Dictionary<string, ModuleInfo> ModuleInfos { get; private set; } = new Dictionary<string, ModuleInfo>();
- static ModuleManager()
- {
- bool bInstalledA = (bool)QueryDataClient.Instance.Service.GetConfig("System.PMAIsInstalled");
- if (bInstalledA)
- ModulesID.Add("PMA");
- bool bInstalledB = (bool)QueryDataClient.Instance.Service.GetConfig("System.PMBIsInstalled");
- if (bInstalledB)
- ModulesID.Add("PMB");
- }
- public static void Initialize()
- {
- ModuleInfos.Clear();
- foreach (string moduleID in ModulesID)
- {
- ModuleInfo modInfo = CreateModule(moduleID, true);
- ModuleInfos.Add(moduleID, modInfo);
- }
- }
- private static ModuleInfo CreateModule(string p_modid, bool p_install)
- {
- ModuleInfo m_data;
- if (p_install)
- m_data = new ModuleInfo(p_modid, p_install, VirgoUI.Client.ClientApp.Instance.WaferStatusManager.WaferStatusDic[p_modid], false);
- else
- m_data = new ModuleInfo(p_modid, p_install, null, false);
- return m_data;
- }
- }
- }
|