Example #1
0
        List <Model.Data.PluginInfoItem> GetPluginInfoFrom(
            Dictionary <string, VgcApis.Models.Interfaces.IPlugin> pluginList)
        {
            if (pluginList.Count <= 0)
            {
                return(new List <Model.Data.PluginInfoItem>());
            }

            var enabledList = GetCurEnabledPluginFileNames();
            var infos       = new List <Model.Data.PluginInfoItem>();

            foreach (var item in pluginList)
            {
                var plugin     = item.Value;
                var filename   = item.Key;
                var pluginInfo = new Model.Data.PluginInfoItem
                {
                    filename    = filename,
                    name        = plugin.Name,
                    version     = plugin.Version,
                    description = plugin.Description,
                    isUse       = enabledList.Contains(filename),
                };
                infos.Add(pluginInfo);
            }
            return(infos);
        }
Example #2
0
 public PluginInfoUI(Model.Data.PluginInfoItem pluginInfo)
 {
     curInfo = pluginInfo;
     InitializeComponent();
     lbFilename.Text    = pluginInfo.name + " v" + pluginInfo.version;
     lbDescription.Text = pluginInfo.description;
     chkIsUse.Checked   = pluginInfo.isUse;
 }