public void ForeachWidget <T> (WidgetAction <T> action) where T : class { for (int i = 0; i < notebook.NPages; i++) { GtkUtilities.ForeachWidget(notebook.GetNthPage(i) as Container, action); } }
GetStandardValues(ITypeDescriptorContext context) { List <string> names = new List <string>(); WidgetAction a = (WidgetAction)context.Instance; foreach (HostSurface hs in HostSurface.hostSurfaces) { Uitlity.GetWidgetNamesByActionType(hs.formDesignerHost.Container.Components, a.Action, names); } names.Sort(); return(new StandardValuesCollection(names.ToArray())); }
public static void ForeachWidget <T> (Container container, WidgetAction <T> action) where T : class { if (container == null) { return; } foreach (Widget child in container.Children) { T widget = child as T; if (widget != null) { action(widget); } else { Container child_container = child as Container; if (child_container != null) { ForeachWidget <T> (child_container, action); } } } }
protected override bool Matches(WidgetAction action) => action.GetType() == GetType();
protected override bool InterferesWith(WidgetAction action) => action.GetType() == GetType();
public TriggerWidgetAction(string nameof_eventhandler, WidgetAction action) { NameofEventHandler = nameof_eventhandler; Action = action; }
public void ForEach(WidgetAction action) { foreach (Widget widget in widgets) { action(widget); } }
protected override bool Matches(WidgetAction action) => throw new NotImplementedException();
protected override bool InterferesWith(WidgetAction action) => throw new NotImplementedException();
protected override bool Matches(WidgetAction action) => action is SpinCube;
protected override bool InterferesWith(WidgetAction action) => false;