void selectionService_SelectionChanged(object sender, EventArgs e)
{
if (!active) return;
//deselect all
comm.JSCall (GeckoFunctions.SelectControl, null, string.Empty);
if (selectionService.SelectionCount == 0) return;
ICollection selections = selectionService.GetSelectedComponents ();
foreach (IComponent comp in selections) {
if (comp is WebFormPage) continue;
Control control = comp as Control;
if (control == null)
throw new InvalidOperationException ("One of the selected components is not a System.Web.UI.Control.");
//select the control
comm.JSCall (GeckoFunctions.SelectControl, null, control.UniqueID);
}
}