예제 #1
0
 public static form_AddinManager GetUniqueForm()
 {
     if (_uniqueForm == null)
     {
         _uniqueForm = new form_AddinManager();
     }
     //
     return(_uniqueForm);
 }
예제 #2
0
 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);
     }
 }
예제 #3
0
 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);
     }
 }
예제 #4
0
 private void OnDisposed(object sender, EventArgs eventArgs)
 {
     _uniqueForm = null;
     _nodesInfo.Clear();
     _nodesInfo = null;
 }
예제 #5
0
 public static void ShowAddinManager()
 {
     form_AddinManager frm = form_AddinManager.GetUniqueForm();
     frm.Show(null);
 }