Exemple #1
0
        public void RegisterActions()
        {
            if (m_MenuManager == null)
            {
                m_MenuManager = MenuActionManager.Instance;
            }
            m_MenuManager.Clear();
            m_MenuManager.LoadAssemblyActions(WinUtils.AppPath() + "\\bvwin_common.dll");
            string[] files = Directory.GetFiles((WinUtils.AppPath()), "eidss*.dll");
            foreach (string file in files)
            {
                m_MenuManager.LoadAssemblyActions(file);
            }
            m_MenuManager.LoadAssemblyActions(WinUtils.AppPath() + "\\eidss.main.exe");

            RegisterDefaultActions();
            m_MenuManager.DisplayActions();
            if (m_TranslationButton != null)
            {
                m_TranslationButton.RefreshPopupMenu();
            }
        }
Exemple #2
0
        public void LoadAssemblyActionsTest()
        {
            MenuActionManager target = Init();

            MenuActionManager.Instance = target;
            IMenuAction action = target.FindAction("MenuExit");

            Assert.IsNull(action);
            string assemblyName = Utils.GetAssemblyLocation(Assembly.GetAssembly(GetType()));

            target.LoadAssemblyActions(assemblyName);
            action = target.FindAction("MenuExit");
            Assert.IsNotNull(action);
        }