Ejemplo n.º 1
0
        public InstallJPackage(InstallJPackageView view)
        {
            _view = view;

            InitializeComponent();

            DataContext = view;

            _textBox.Focus();
        }
Ejemplo n.º 2
0
        private int InstallNewPackage()
        {
            var view = new InstallJPackageView();
            var window = new InstallJPackage(view);
            var res = window.ShowDialog();
            if (res != null && res.Value) {
                var psi = MakePipCommand("install " + view.Name);

                // don't process events while we're installing, we'll
                // rescan once we're done
                BeginPackageChange();

                ProjectMgr.EnqueueVirtualEnvRequest(
                    psi,
                    "Installing " + view.Name,
                    "Successfully installed " + view.Name,
                    "Failed to install " + view.Name,
                    PackageChangeDone,
                    PackageChangeDone
                );

            }
            return VSConstants.S_OK;
        }