void OnChecked(object sender, RoutedEventArgs e) { try { PluginDescription pd = (PluginDescription)dgLocalPlugins.SelectedItem; osae.AddToLog("checked: " + pd.Name, true); if (wcfObj.State == CommunicationState.Opened) { Thread thread = new Thread(() => messageHost("plugin", "ENABLEPLUGIN|" + pd.Name + "|True")); thread.Start(); osae.AddToLog("Sending message: " + "ENABLEPLUGIN|" + pd.Name + "|True", true); if (myService.Status == ServiceControllerStatus.Running) { foreach (PluginDescription plugin in pluginList) { if (plugin.Name == pd.Name && plugin.Name != null) { plugin.Status = "Starting..."; } } } } OSAE.OSAEObject obj = osae.GetObjectByName(pd.Name); osae.ObjectUpdate(obj.Name, obj.Name, obj.Description, obj.Type, obj.Address, obj.Container, 1); } catch (Exception ex) { osae.AddToLog("Error enabling plugin: " + ex.Message, true); } }