public static form_AddinManager GetUniqueForm() { if (_uniqueForm == null) { _uniqueForm = new form_AddinManager(); } // return(_uniqueForm); }
public static void InstallAddinManager() { try { // 将上次插件卸载时保存的程序集数据加载进来 form_AddinManager frm = form_AddinManager.GetUniqueForm(); var nodesInfo = AssemblyInfoDllManager.GetInfosFromSettings(); frm.RefreshTreeView(nodesInfo); } catch (Exception ex) { Debug.Print("AddinManager 插件加载时出错: \n\r" + ex.Message + "\n\r" + ex.StackTrace); } }
public static void UninstallAddinManager() { try { form_AddinManager frm = form_AddinManager.GetUniqueForm(); var nodesInfo = frm.NodesInfo; // // 将窗口中加载的程序集数据保存下来 AssemblyInfoDllManager.SaveAssemblyInfosToSettings(nodesInfo); } catch (Exception ex) { Debug.Print("AddinManager 插件关闭时出错: \n\r" + ex.Message + "\n\r" + ex.StackTrace); } }
private void OnDisposed(object sender, EventArgs eventArgs) { _uniqueForm = null; _nodesInfo.Clear(); _nodesInfo = null; }
public static void ShowAddinManager() { form_AddinManager frm = form_AddinManager.GetUniqueForm(); frm.Show(null); }