protected override void doOnEnable()
    {
        if (isLaunchedForFistTime)
        {
            newScaleVideo = new Vector3(
                0,
                0,
                whoIsCallMe.DesktopItemCaller.transform.localScale.z
                );
            contextualMenuManager = DesktopRootReferenceManager.getInstance().contextualMenuManager;

            Transform dialogItem = transform.Find("InputWidth");
            if (dialogItem)
            {
                inputWidth = dialogItem.gameObject.GetComponent <InputField>();
            }

            dialogItem = transform.Find("InputHeight");
            if (dialogItem)
            {
                inputHeight = dialogItem.gameObject.GetComponent <InputField>();
            }

            dialogItem = transform.Find("isProporcionalList");
            if (dialogItem)
            {
                isProporcionalList = dialogItem.gameObject.GetComponent <Dropdown>();
            }
        }
    }
 protected override void doOnEnable()
 {
     if (isLaunchedForFistTime)
     {
         contextualMenuManager = DesktopRootReferenceManager.getInstance().contextualMenuManager;
     }
 }
示例#3
0
        public ExcelTemplateManager([Import] ExcelApplication excelApplication,
                                    [Import] ContextualMenuManager contextualMenuManager,
                                    [Import] ExcelDecoratorsManager excelDecoratorsManager,
                                    [Import] EventExcelCallbacksManager eventCallbacksManager,
                                    [Import] BindingTemplateManager bindingTemplateManager)
        {
            if (excelApplication == null)
            {
                throw new EtkException("'ExcelBindingTemplateManager' initialization: the 'application' parameter is mandatory");
            }

            ExcelApplication            = excelApplication;
            CallbacksManager            = eventCallbacksManager;
            this.excelDecoratorsManager = excelDecoratorsManager;
            this.contextualMenuManager  = contextualMenuManager;
            this.bindingTemplateManager = bindingTemplateManager;

            // Create the notify property manager .
            ExcelNotifyPropertyManager = new ExcelNotifyPropertyManager(ExcelApplication);
            // Create the template contextual menus manager.
            //@@templateContextualMenuManager = new TemplateContextualMenuManager(contextualMenuManager);
            // Declare the contextual menus activators for the template views.
            contextualMenuManager.OnContextualMenusRequested += ManageViewsContextualMenu;

            sortSearchAndFilterMenuManager = new SortSearchAndFilterMenuManager();

            eventCallbacksManager.RegisterSpecificCallBack();
        }
示例#4
0
 protected override void doOnEnable()
 {
     if (isLaunchedForFistTime)
     {
         contextualMenuManager = DesktopRootReferenceManager.getInstance().contextualMenuManager;
         nameFile = transform.Find("InputNameFile").gameObject.GetComponent <InputField>();
     }
 }
        void LocalInit()
        {
            menu = null;
            m_ContextualMenuManager = null;

            if (triggerEvent != null)
            {
                triggerEvent.Dispose();
                triggerEvent = null;
            }
        }
        protected override void Init()
        {
            base.Init();
            menu = null;
            m_ContextualMenuManager = null;

            if (triggerEvent != null)
            {
                triggerEvent.Dispose();
                triggerEvent = null;
            }
        }
示例#7
0
        public TemplateContextualMenuManager(ContextualMenuManager contextualMenuManager)
        {
            this.contextualMenuManager = contextualMenuManager;

            // Create the contextual menu instances.
            Assembly assembly = Assembly.GetExecutingAssembly();

            using (TextReader textReader = new StreamReader(assembly.GetManifestResourceStream("Etk.Excel.Resources.TemplateManagerUpdateDeleteContextualMenu.xml")))
            {
                string menuXml = textReader.ReadToEnd();
                manageTemplateMenu = null;//ùùmanageTemplateMenu = ContextualMenuFactory.CreateInstance(menuXml);
            }

            // Declare the contextual menus activators.
            contextualMenuManager.OnContextualMenusRequested += ManageTemplateManagerContextualMenu;
        }
    void OnEnable()
    {
        whoIsCallMe = DesktopRootReferenceManager.getInstance().contextualMenuManager.whoIsCallMe;
        if (colorSelectedItem == Color.clear)
        {
            menu = DesktopRootReferenceManager.getInstance().contextualMenuManager;
            colorSelectedItem   = menu.colorSelectedItem;
            colorUnselectedItem = menu.colorUnselectedItem;
        }

        if (sRenderer == null)
        {
            sRenderer = GetComponent <SpriteRenderer>();
        }
        sRenderer.color = colorUnselectedItem;
        this.doOnEnable();
    }
    protected override void doOnEnable()
    {
        if (isLaunchedForFistTime)
        {
            contextualMenuManager = DesktopRootReferenceManager.getInstance().contextualMenuManager;
            folderListDropdown    = transform.Find("DropdownFolder").gameObject.GetComponent <Dropdown>();
        }
        List <Dropdown.OptionData> newOptions = filterNewOptions(
            folderListDropdown.options,
            DesktopRootReferenceManager.getInstance().CurrentDesktopShowed.allFoldersNames
            );

        if (newOptions.Count > 0)
        {
            folderListDropdown.AddOptions(newOptions);
            folderListDropdown.RefreshShownValue();
        }
    }
示例#10
0
        public static ContextualMenuPopulateEvent GetPooled(EventBase triggerEvent, DropdownMenu menu, IEventHandler target, ContextualMenuManager menuManager)
        {
            ContextualMenuPopulateEvent e = GetPooled(triggerEvent);

            if (triggerEvent != null)
            {
                triggerEvent.Acquire();
                e.triggerEvent = triggerEvent;

                IMouseEvent mouseEvent = triggerEvent as IMouseEvent;
                if (mouseEvent != null)
                {
                    e.modifiers          = mouseEvent.modifiers;
                    e.mousePosition      = mouseEvent.mousePosition;
                    e.localMousePosition = mouseEvent.mousePosition;
                    e.mouseDelta         = mouseEvent.mouseDelta;
                    e.button             = mouseEvent.button;
                    e.clickCount         = mouseEvent.clickCount;
                }
                else
                {
                    IPointerEvent pointerEvent = triggerEvent as IPointerEvent;
                    if (pointerEvent != null)
                    {
                        e.modifiers          = pointerEvent.modifiers;
                        e.mousePosition      = pointerEvent.position;
                        e.localMousePosition = pointerEvent.position;
                        e.mouseDelta         = pointerEvent.deltaPosition;
                        e.button             = pointerEvent.button;
                        e.clickCount         = pointerEvent.clickCount;
                    }
                }

                IMouseEventInternal mouseEventInternal = triggerEvent as IMouseEventInternal;
                if (mouseEventInternal != null)
                {
                    ((IMouseEventInternal)e).triggeredByOS = mouseEventInternal.triggeredByOS;
                }
                else
                {
                    IPointerEventInternal pointerEventInternal = triggerEvent as IPointerEventInternal;
                    if (pointerEventInternal != null)
                    {
                        ((IMouseEventInternal)e).triggeredByOS = pointerEventInternal.triggeredByOS;
                    }
                }
            }

            e.target = target;
            e.menu   = menu;
            e.m_ContextualMenuManager = menuManager;

            return(e);
        }
        public static ContextualMenuPopulateEvent GetPooled(EventBase triggerEvent, DropdownMenu menu, IEventHandler target, ContextualMenuManager menuManager)
        {
            ContextualMenuPopulateEvent e = GetPooled();

            if (triggerEvent != null)
            {
                triggerEvent.Acquire();
                e.triggerEvent = triggerEvent;

                IMouseEvent mouseEvent = triggerEvent as IMouseEvent;
                if (mouseEvent != null)
                {
                    e.modifiers          = mouseEvent.modifiers;
                    e.mousePosition      = mouseEvent.mousePosition;
                    e.localMousePosition = mouseEvent.mousePosition;
                    e.mouseDelta         = mouseEvent.mouseDelta;
                    e.button             = mouseEvent.button;
                    e.clickCount         = mouseEvent.clickCount;
                }

                IMouseEventInternal mouseEventInternal = triggerEvent as IMouseEventInternal;
                if (mouseEventInternal != null)
                {
                    ((IMouseEventInternal)e).hasUnderlyingPhysicalEvent = mouseEventInternal.hasUnderlyingPhysicalEvent;
                }
            }

            e.target = target;
            e.menu   = menu;
            e.m_ContextualMenuManager = menuManager;

            return(e);
        }
示例#12
0
 public void Dispose()
 {
     contextualMenuManager.OnContextualMenusRequested -= ManageTemplateManagerContextualMenu;
     contextualMenuManager = null;
 }