static void OnWidgetRemoved(object s, WidgetInfoEventArgs args) { foreach (WidgetInfo c in openWindows.Keys) { if (c.Name == args.WidgetInfo.Name) { CloseWindow(c); return; } } }
static void OnWidgetAdded(object s, WidgetInfoEventArgs args) { OpenWindow(args.WidgetInfo); }