Beispiel #1
0
        public void LoadAddinManager() // This method can have any name
        {
            form_AddinManager frm = form_AddinManager.GetUniqueForm();

            if (_addinManagerFirstLoaded)
            {
                // 将上次插件卸载时保存的程序集数据加载进来
                var nodesInfo = AssemblyInfoDllManager.GetInfosFromSettings();
                frm.RefreshTreeView(nodesInfo);
                //
                _addinManagerFirstLoaded = false;
            }
            else
            {
            }
            // 先清空以前已经选择的对象集合
            SetImpliedSelection();

            frm.WindowState = FormWindowState.Normal; // 取消其最小化
            if (!frm.Visible)
            {
                frm.Show(null);
                // Application.ShowModelessDialog(null, frm);
                //Application.ShowModalDialog(frm);
            }
        }
Beispiel #2
0
 void IExtensionApplication.Terminate()
 {
     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);
     }
 }
Beispiel #3
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);
     }
 }
Beispiel #4
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);
     }
 }
Beispiel #5
0
 void IExtensionApplication.Terminate()
 {
     try
     {
         form_AddinManager frm = form_AddinManager.GetUniqueForm();
         var nodesInfo         = frm.NodesInfo;
         var count             = nodesInfo.Count;
         if (!_hasValidNodesInfoSaved)
         {
             AssemblyInfoDllManager.SaveAssemblyInfosToSettings(nodesInfo);
             if (count > 0)
             {
                 _hasValidNodesInfoSaved = true;
             }
         }
         //
     }
     catch (Exception ex)
     {
         Debug.Print("AddinManager 插件关闭时出错: \n\r" + ex.Message + "\n\r" + ex.StackTrace);
     }
 }