public GenerationMenuWidget(Window parent, IElement referer, Bus bus, string busName) { if (referer.Data != null) { MenuItem path = new MenuItem("Call " + referer.Name + "..."); ObjectPath p = new ObjectPath(referer.Parent.Parent.Path); if (!referer.Data.IsProperty) { path.Activated += delegate { MethodInvokeDialog diag = new MethodInvokeDialog (parent, bus, busName, p, referer); while (diag.Run () == (int)ResponseType.None); diag.Destroy(); }; } else { path.Activated += delegate { PropertyInvokeDialog diag = new PropertyInvokeDialog (parent, bus, busName, p, referer); while (diag.Run () == (int)ResponseType.None); diag.Destroy(); }; } this.Append(path); path.ShowAll(); } }
public GenerationMenuWidget(Window parent, IElement referer, Bus bus, string busName) { if (referer.Data != null) { MenuItem path = new MenuItem("Call " + referer.Name + "..."); ObjectPath p = new ObjectPath(referer.Parent.Parent.Path); if (!referer.Data.IsProperty) { path.Activated += delegate { MethodInvokeDialog diag = new MethodInvokeDialog(parent, bus, busName, p, referer); while (diag.Run() == (int)ResponseType.None) { ; } diag.Destroy(); }; } else { path.Activated += delegate { PropertyInvokeDialog diag = new PropertyInvokeDialog(parent, bus, busName, p, referer); while (diag.Run() == (int)ResponseType.None) { ; } diag.Destroy(); }; } this.Append(path); path.ShowAll(); } }