private void loadPlugins() { pluginList = new BindingList <PluginDescription>(); List <string> osapdFiles = new List <string>(); string[] pluginFile = Directory.GetFiles(osae.APIpath + "\\AddIns", "*.osapd", SearchOption.AllDirectories); osapdFiles.AddRange(pluginFile); foreach (string path in osapdFiles) { if (!string.IsNullOrEmpty(path)) { PluginDescription desc = new PluginDescription(); desc.Deserialize(path); desc.Status = "Stopped"; desc.Enabled = false; List <OSAE.OSAEObject> objs = osae.GetObjectsByType(desc.Type); foreach (OSAE.OSAEObject o in objs) { if (osae.GetObjectPropertyValue(o.Name, "Computer Name").Value == osae.ComputerName || desc.Type == o.Name) { desc.Name = o.Name; if (o.Enabled == 1) { desc.Enabled = true; } desc.Status = o.State.Value; } } pluginList.Add(desc); } } dgLocalPlugins.ItemsSource = pluginList; }