Пример #1
0
        public PopupMenuDrawable()
        {
            Type popupMenuDrawableType = ToolbarTypes.getType("Toolbar.PopupMenuDrawable");

            realPopupMenuDrawable   = Activator.CreateInstance(popupMenuDrawableType, null);
            updateMethod            = ToolbarTypes.getMethod(popupMenuDrawableType, "Update");
            drawMethod              = ToolbarTypes.getMethod(popupMenuDrawableType, "Draw");
            addOptionMethod         = ToolbarTypes.getMethod(popupMenuDrawableType, "AddOption");
            addSeparatorMethod      = ToolbarTypes.getMethod(popupMenuDrawableType, "AddSeparator");
            destroyMethod           = ToolbarTypes.getMethod(popupMenuDrawableType, "Destroy");
            onAnyOptionClickedEvent = ToolbarTypes.getEvent(popupMenuDrawableType, "OnAnyOptionClicked");
        }
Пример #2
0
        internal ButtonTypes(Type iButtonType)
        {
            this.iButtonType = iButtonType;

            textProperty               = ToolbarTypes.getProperty(iButtonType, "Text");
            textColorProperty          = ToolbarTypes.getProperty(iButtonType, "TextColor");
            texturePathProperty        = ToolbarTypes.getProperty(iButtonType, "TexturePath");
            toolTipProperty            = ToolbarTypes.getProperty(iButtonType, "ToolTip");
            visibleProperty            = ToolbarTypes.getProperty(iButtonType, "Visible");
            visibilityProperty         = ToolbarTypes.getProperty(iButtonType, "Visibility");
            effectivelyVisibleProperty = ToolbarTypes.getProperty(iButtonType, "EffectivelyVisible");
            enabledProperty            = ToolbarTypes.getProperty(iButtonType, "Enabled");
            importantProperty          = ToolbarTypes.getProperty(iButtonType, "Important");
            drawableProperty           = ToolbarTypes.getProperty(iButtonType, "Drawable");
            onClickEvent               = ToolbarTypes.getEvent(iButtonType, "OnClick");
            onMouseEnterEvent          = ToolbarTypes.getEvent(iButtonType, "OnMouseEnter");
            onMouseLeaveEvent          = ToolbarTypes.getEvent(iButtonType, "OnMouseLeave");
            destroyMethod              = ToolbarTypes.getMethod(iButtonType, "Destroy");
        }
Пример #3
0
        internal Button(object realButton, ToolbarTypes types)
        {
            this.realButton = realButton;
            this.types = types;

            realClickHandler = attachEventHandler(types.button.onClickEvent, "clicked", realButton);
            realMouseEnterHandler = attachEventHandler(types.button.onMouseEnterEvent, "mouseEntered", realButton);
            realMouseLeaveHandler = attachEventHandler(types.button.onMouseLeaveEvent, "mouseLeft", realButton);
        }