Пример #1
0
 internal NpmPackageInstallWindow(INpmController controller, NpmOutputViewModel executeVm, DependencyType dependencyType = DependencyType.Standard)
 {
     DataContext       = _vm = new NpmPackageInstallViewModel(executeVm, Dispatcher);
     _vm.NpmController = controller;
     InitializeComponent();
     DependencyComboBox.SelectedIndex = (int)dependencyType;
 }
 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);
        }
Пример #4
0
        public NpmPackageInstallViewModel(
            NpmOutputViewModel executeViewModel,
            Dispatcher dispatcher
            )
        {
            _dispatcher = dispatcher;

            _executeViewModel = executeViewModel;
            _filterTimer      = new Timer(FilterTimer_Elapsed, null, Timeout.Infinite, Timeout.Infinite);
        }
Пример #5
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();
        }
Пример #6
0
        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();
        }