Exemplo n.º 1
0
        public void ManageModules(DependencyType dependencyType = DependencyType.Standard, bool isGlobal = false)
        {
            CheckNotDisposed();

            if (NpmController.RootPackage == null)
            {
                NpmController.Refresh();
                if (NpmController.RootPackage == null)
                {
                    MessageBox.Show(String.Format("Unable to parse {0} from your project.  Please fix any errors and try again.", NodejsConstants.PackageJsonFile));
                    return;
                }
            }

            using (var executeVm = new NpmOutputViewModel(NpmController))
                using (var manager = new NpmPackageInstallWindow(NpmController, executeVm, dependencyType, isGlobal)) {
                    manager.Owner = System.Windows.Application.Current.MainWindow;
                    manager.ShowModal();
                }
            ReloadHierarchy();
        }
Exemplo n.º 2
0
        public void ManageModules(DependencyType dependencyType = DependencyType.Standard)
        {
            CheckNotDisposed();

            if (NpmController.RootPackage == null)
            {
                NpmController.Refresh();
                if (NpmController.RootPackage == null)
                {
                    MessageBox.Show(SR.GetString(SR.NodeModulesCouldNotParsePackageJsonErrorMessageText, NodejsConstants.PackageJsonFile));
                    return;
                }
            }

            using (var executeVm = new NpmOutputViewModel(NpmController))
                using (var manager = new NpmPackageInstallWindow(NpmController, executeVm, dependencyType)) {
                    manager.Owner = System.Windows.Application.Current.MainWindow;
                    manager.ShowModal();
                }
            ReloadHierarchy();
        }