示例#1
0
        static void ExecuteInternal(IFileTabManager fileTabManager, Lazy <IInMemoryModuleManager> inMemoryModuleManager, ModuleVM vm, bool newTab)
        {
            if (vm == null)
            {
                return;
            }

            if (GoToModuleModulesCtxMenuCommand.ShowErrorIfDynamic(inMemoryModuleManager, vm.Module))
            {
                GoToModuleModulesCtxMenuCommand.GoToFile(fileTabManager, inMemoryModuleManager.Value.LoadFile(vm.Module, true), newTab);
            }
        }
示例#2
0
        static void ExecuteInternal(ModuleVM vm, bool newTab)
        {
            if (vm == null)
            {
                return;
            }

            if (GoToModuleModulesCtxMenuCommand.ShowErrorIfDynamic(vm.Module))
            {
                GoToModuleModulesCtxMenuCommand.GoToFile(InMemoryModuleManager.Instance.LoadFile(vm.Module, true), newTab);
            }
        }
示例#3
0
        static void ExecuteInternal(IDocumentTabService documentTabService, Lazy <IInMemoryModuleService> inMemoryModuleService, ModuleVM vm, bool newTab)
        {
            if (vm == null)
            {
                return;
            }

            if (GoToModuleModulesCtxMenuCommand.ShowErrorIfDynamic(inMemoryModuleService, vm.Module))
            {
                GoToModuleModulesCtxMenuCommand.GoToFile(documentTabService, inMemoryModuleService.Value.LoadDocument(vm.Module, true), newTab);
            }
        }
示例#4
0
        public override void Execute(ModulesCtxMenuContext context)
        {
            bool canShowDlgBox = true;

            foreach (var vm in context.SelectedItems)
            {
                var  mod = vm.Module;
                bool res = GoToModuleModulesCtxMenuCommand.ShowErrorIfDynamic(inMemoryModuleManager, mod, canShowDlgBox);
                if (!res)
                {
                    canShowDlgBox = false;
                }
                if (res)
                {
                    moduleLoader.Value.LoadModule(vm.Module, canLoadDynFile: true, isAutoLoaded: false);
                }
            }
        }