static void OnSelectionChanged(object s, ComponentEventArgs args) { if (args.Component == null) { return; } WidgetInfo wi = Project.GetWidget(args.Component.Name); if (wi != null && IsWindowOpen(wi)) { OpenWindow(wi); } }
void OnProjectReloaded(object s, EventArgs args) { rootWidget.Changed -= OnChanged; rootWidget = gproject.GetWidget(name); if (rootWidget != null) { rootWidget.Changed += OnChanged; } }