示例#1
0
 public PackageManagerWindowPane(IRPackageManager packageManager, ISearchControlProvider searchControlProvider, ICoreShell coreShell)
 {
     _packageManager        = packageManager;
     _searchControlProvider = searchControlProvider;
     _coreShell             = coreShell;
     Caption = Resources.PackageManagerWindowCaption;
 }
示例#2
0
 public PackageManagerWindowPane(IRPackageManager packageManager, ISearchControlProvider searchControlProvider, IServiceContainer services) : base(services)
 {
     _packageManager        = packageManager;
     _searchControlProvider = searchControlProvider;
     BitmapImageMoniker     = KnownMonikers.Package;
     Caption = Resources.PackageManagerWindowCaption;
 }
示例#3
0
 public RPackageManagerViewModel(IRPackageManager packageManager, ICoreShell coreShell)
 {
     _packageManager            = packageManager;
     _coreShell                 = coreShell;
     _availableAndInstalledLock = new BinaryAsyncLock();
     _items = new BatchObservableCollection <object>();
     Items  = new ReadOnlyObservableCollection <object>(_items);
 }
示例#4
0
 public PackageManagerWindowPane(IRPackageManager packageManager, ISearchControlProvider searchControlProvider, IRSettings settings, ICoreShell coreShell)
 {
     _packageManager        = packageManager;
     _searchControlProvider = searchControlProvider;
     _settings          = settings;
     _coreShell         = coreShell;
     BitmapImageMoniker = KnownMonikers.Package;
     Caption            = Resources.PackageManagerWindowCaption;
 }
 public RPackageManagerVisualComponent(IRPackageManager packageManager, IVisualComponentContainer<IRPackageManagerVisualComponent> container, ISearchControlProvider searchControlProvider, IRSettings settings, ICoreShell coreShell) {
     _viewModel = new RPackageManagerViewModel(packageManager, settings, coreShell);
     Container = container;
     Controller = null;
     var control = new PackageManagerControl {
         DataContext = _viewModel,
     };
     Control = control;
     var searchControlSettings = new SearchControlSettings {
         SearchCategory = SearchCategory,
         MinWidth = (uint)control.SearchControlHost.MinWidth,
         MaxWidth = uint.MaxValue
     };
     _searchControl = searchControlProvider.Create(control.SearchControlHost, _viewModel, searchControlSettings);
 }
示例#6
0
        public RPackageManagerVisualComponent(IRPackageManager packageManager, IVisualComponentContainer <IRPackageManagerVisualComponent> container, ISearchControlProvider searchControlProvider, IRSettings settings, ICoreShell coreShell)
        {
            _viewModel = new RPackageManagerViewModel(packageManager, settings, coreShell);
            Container  = container;
            var control = new PackageManagerControl {
                DataContext = _viewModel,
            };

            Control = control;
            var searchControlSettings = new SearchControlSettings {
                SearchCategory = SearchCategory,
                MinWidth       = (uint)control.SearchControlHost.MinWidth,
                MaxWidth       = uint.MaxValue
            };

            _searchControl = searchControlProvider.Create(control.SearchControlHost, _viewModel, searchControlSettings);
        }
示例#7
0
        public RPackageManagerViewModel(IRPackageManager packageManager, IRSession session, IRSettings settings, ICoreShell coreShell)
        {
            _packageManager         = packageManager;
            _session                = session;
            _settings               = settings;
            _coreShell              = coreShell;
            _selectedTab            = SelectedTab.None;
            _availablePackages      = new List <IRPackageViewModel>();
            _installedPackages      = new List <IRPackageViewModel>();
            _loadedPackages         = new List <IRPackageViewModel>();
            _availableLock          = new BinaryAsyncLock();
            _installedAndLoadedLock = new BinaryAsyncLock();
            _items         = new BatchObservableCollection <object>();
            _errorMessages = new Queue <string>();
            Items          = new ReadOnlyObservableCollection <object>(_items);

            _session.Mutated += RSessionMutated;
        }
        public RPackageManagerViewModel(IRPackageManager packageManager, IRSettings settings, ICoreShell coreShell) {
            _packageManager = packageManager;
            _settings = settings;
            _coreShell = coreShell;
            _selectedTab = Tab.None;
            _availablePackages = new List<IRPackageViewModel>();
            _installedPackages = new List<IRPackageViewModel>();
            _loadedPackages = new List<IRPackageViewModel>();
            _availableLock = new BinaryAsyncLock();
            _installedAndLoadedLock = new BinaryAsyncLock();
            _items = new BatchObservableCollection<object>();
            _errorMessages = new ErrorMessageCollection(this);
            Items = new ReadOnlyObservableCollection<object>(_items);

            _packageManager.AvailablePackagesInvalidated += AvailablePackagesInvalidated;
            _packageManager.InstalledPackagesInvalidated += InstalledPackagesInvalidated;
            _packageManager.LoadedPackagesInvalidated += LoadedPackagesInvalidated;
        }
示例#9
0
        public RPackageManagerViewModel(IRPackageManager packageManager, IRSettings settings, ICoreShell coreShell)
        {
            _packageManager         = packageManager;
            _settings               = settings;
            _coreShell              = coreShell;
            _selectedTab            = Tab.None;
            _availablePackages      = new List <IRPackageViewModel>();
            _installedPackages      = new List <IRPackageViewModel>();
            _loadedPackages         = new List <IRPackageViewModel>();
            _availableLock          = new BinaryAsyncLock();
            _installedAndLoadedLock = new BinaryAsyncLock();
            _items         = new BatchObservableCollection <object>();
            _errorMessages = new ErrorMessageCollection(this);
            Items          = new ReadOnlyObservableCollection <object>(_items);

            _packageManager.AvailablePackagesInvalidated += AvailablePackagesInvalidated;
            _packageManager.InstalledPackagesInvalidated += InstalledPackagesInvalidated;
            _packageManager.LoadedPackagesInvalidated    += LoadedPackagesInvalidated;
        }
示例#10
0
        public RPackageManagerViewModel(IRPackageManager packageManager, IServiceContainer services)
        {
            _packageManager = packageManager;
            _services       = services;
            _settings       = services.GetService <IRSettings>();
            _mainThread     = services.MainThread();

            _selectedTab            = Tab.None;
            _availablePackages      = new List <IRPackageViewModel>();
            _installedPackages      = new List <IRPackageViewModel>();
            _loadedPackages         = new List <IRPackageViewModel>();
            _availableLock          = new BinaryAsyncLock();
            _installedAndLoadedLock = new BinaryAsyncLock();
            _items         = new BatchObservableCollection <object>();
            _errorMessages = new ErrorMessageCollection(this);
            Items          = new ReadOnlyObservableCollection <object>(_items);

            _packageManager.AvailablePackagesInvalidated += AvailablePackagesInvalidated;
            _packageManager.InstalledPackagesInvalidated += InstalledPackagesInvalidated;
            _packageManager.LoadedPackagesInvalidated    += LoadedPackagesInvalidated;
        }
        public RPackageManagerVisualComponent(IRPackageManager packageManager, IVisualComponentContainer <IRPackageManagerVisualComponent> container, ISearchControlProvider searchControlProvider, IServiceContainer services)
        {
            Container = container;
            var control = new PackageManagerControl(services);

            Control = control;

            var infoBarProvider = services.GetService <IInfoBarProvider>();
            var infoBar         = infoBarProvider.Create(control.InfoBarControlHost);

            _viewModel = new RPackageManagerViewModel(packageManager, infoBar, services);

            var searchControlSettings = new SearchControlSettings {
                SearchCategory = SearchCategory,
                MinWidth       = (uint)control.SearchControlHost.MinWidth,
                MaxWidth       = uint.MaxValue
            };

            _searchControl = searchControlProvider.Create(control.SearchControlHost, _viewModel, searchControlSettings);

            control.DataContext = _viewModel;
        }
示例#12
0
 public static IRPackageManagerVisualComponent GetOrCreateVisualComponent(this IRPackageManager pm, IRPackageManagerVisualComponentContainerFactory factory, int id = 0)
 => ((IRPackageManagerVisual)pm).GetOrCreateVisualComponent(factory, id);
示例#13
0
 public IVisualComponentContainer <IRPackageManagerVisualComponent> GetOrCreate(IRPackageManager packageManager, IRSession session, int instanceId = 0)
 {
     return(GetOrCreate(instanceId, i => new PackageManagerWindowPane(packageManager, session, _searchControlProvider, RToolsSettings.Current, VsAppShell.Current)));
 }
        public IVisualComponentContainer <IRPackageManagerVisualComponent> GetOrCreate(IRPackageManager packageManager, IRSession session, int instanceId = 0)
        {
            var workflow = _workflowProvider.GetOrCreate();

            if (workflow.ActiveWindow == null)
            {
                VsAppShell.Current.DispatchOnUIThread(() => workflow.GetOrCreateVisualComponent(_componentContainerFactory).DoNotWait());
            }
            return(GetOrCreate(instanceId, i => new PackageManagerWindowPane(packageManager, session, _searchControlProvider, RToolsSettings.Current, VsAppShell.Current)));
        }
 public IVisualComponentContainer <IRPackageManagerVisualComponent> GetOrCreate(IRPackageManager packageManager, int instanceId = 0)
 {
     return(GetOrCreate(instanceId, i => new PackageManagerWindowPane(packageManager, _searchControlProvider, _coreShell.Services)));
 }
 public IVisualComponentContainer <IRPackageManagerVisualComponent> GetOrCreate(IRPackageManager packageManager, int instanceId = 0)
 => GetOrCreate(instanceId, container => new RPackageManagerVisualComponent(packageManager, container, _searchControlProvider, _settings, _coreShell));
示例#17
0
 public IVisualComponentContainer <IRPackageManagerVisualComponent> GetOrCreate(IRPackageManager packageManager, int instanceId)
 {
     return(GetOrCreate(instanceId, i => new PackageManagerWindowPane(packageManager, _searchControlProvider, VsAppShell.Current)));
 }