using Api.Framework; using Api.Framework.Enums; using Api.Framework.SDK; using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; using UI.Framework.Forms; namespace FLSystem.Forms { public partial class plugin_manage : DevExpress.XtraEditors.XtraUserControl { public plugin_manage() { InitializeComponent(); } private void plugin_manage_Load(object sender, EventArgs e) { List list = new List(); var _list = PluginClient.Plugins.ToArray(); foreach (Plugin item in _list) { #region 显示的插件,不显示的continue了 if (ApiClient.ShowPluginList != null) { if (!item.FilePath.ToLower().Contains("\\main.dll")) { var flag = ApiClient.ShowPluginList.FirstOrDefault(f => item.FilePath.Contains(f)); if (string.IsNullOrWhiteSpace(flag)) { item.Stop(); continue; } } } #endregion list.Add(new plugin_control(item)); } this.Invoke(new Action(() => { try { this.AddContrals(list.ToArray()); } catch (Exception) { } })); } } }