예제 #1
0
        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();
            }
        }
예제 #2
0
        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();
            }
        }