internal NpmPackageInstallWindow(INpmController controller, NpmOutputViewModel executeVm, DependencyType dependencyType = DependencyType.Standard) { DataContext = _vm = new NpmPackageInstallViewModel(executeVm, Dispatcher); _vm.NpmController = controller; InitializeComponent(); DependencyComboBox.SelectedIndex = (int)dependencyType; }
public NpmPackageInstallViewModel( NpmOutputViewModel executeViewModel, Dispatcher dispatcher ) { _dispatcher = dispatcher; _executeViewModel = executeViewModel; _filterTimer = new Timer(FilterTimer_Elapsed, null, Timeout.Infinite, Timeout.Infinite); }
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(); }
public void ManageModules(DependencyType dependencyType = DependencyType.Standard) { CheckNotDisposed(); if (NpmController.RootPackage == null) { NpmController.Refresh(); if (NpmController.RootPackage == null) { MessageBox.Show(string.Format(CultureInfo.CurrentCulture, Resources.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(); }