public MakeViewModel() { PackageName = _("Enter-Package-Name-Placeholder"); Languages = new ObservableCollection <CultureInfo>( CultureInfo.GetCultures(CultureTypes.AllCultures)); SelectedLanguage = CultureInfo.CurrentCulture; MakeBackup = true; ForceOverride = false; WithTranslation = true; ExportCommand = new RelayCommand(Export); PackUpCommand = new RelayCommand(PackUp); packageManageService = Localizer.Localizer.Kernel.Get <IPackageManageService>(); packageExportService = Localizer.Localizer.Kernel.Get <IPackageExportService>(); packagePackService = Localizer.Localizer.Kernel.Get <IPackagePackService>(); packageSaveService = Localizer.Localizer.Kernel.Get <IPackageSaveService>(); packageUpdateService = Localizer.Localizer.Kernel.Get <IPackageUpdateService>(); fileSaveService = Localizer.Localizer.Kernel.Get <IFileSaveService>(); sourcePackageLoadServiceService = Localizer.Localizer.Kernel.Get <SourcePackageLoadService <Package> >(); fileLoadService = Localizer.Localizer.Kernel.Get <IFileLoadService>(); }
public DeleteAccountService( IEntityRepository <AccountDelete> accountDeleteRepository, IEntityRepository <PackageDelete> packageDeleteRepository, IEntityRepository <PackageDeprecation> deprecationRepository, IEntityRepository <User> userRepository, IEntityRepository <Scope> scopeRepository, IEntitiesContext entitiesContext, IPackageService packageService, IPackageUpdateService packageUpdateService, IPackageOwnershipManagementService packageOwnershipManagementService, IReservedNamespaceService reservedNamespaceService, ISecurityPolicyService securityPolicyService, IAuthenticationService authService, ISupportRequestService supportRequestService, IEditableFeatureFlagStorageService featureFlagService, IAuditingService auditingService, ITelemetryService telemetryService) { _accountDeleteRepository = accountDeleteRepository ?? throw new ArgumentNullException(nameof(accountDeleteRepository)); _packageDeleteRepository = packageDeleteRepository ?? throw new ArgumentNullException(nameof(packageDeleteRepository)); _deprecationRepository = deprecationRepository ?? throw new ArgumentNullException(nameof(deprecationRepository)); _userRepository = userRepository ?? throw new ArgumentNullException(nameof(userRepository)); _scopeRepository = scopeRepository ?? throw new ArgumentNullException(nameof(scopeRepository)); _entitiesContext = entitiesContext ?? throw new ArgumentNullException(nameof(entitiesContext)); _packageService = packageService ?? throw new ArgumentNullException(nameof(packageService)); _packageUpdateService = packageUpdateService ?? throw new ArgumentNullException(nameof(packageUpdateService)); _packageOwnershipManagementService = packageOwnershipManagementService ?? throw new ArgumentNullException(nameof(packageOwnershipManagementService)); _reservedNamespaceService = reservedNamespaceService ?? throw new ArgumentNullException(nameof(reservedNamespaceService)); _securityPolicyService = securityPolicyService ?? throw new ArgumentNullException(nameof(securityPolicyService)); _authService = authService ?? throw new ArgumentNullException(nameof(authService)); _supportRequestService = supportRequestService ?? throw new ArgumentNullException(nameof(supportRequestService)); _featureFlagService = featureFlagService ?? throw new ArgumentNullException(nameof(featureFlagService)); _auditingService = auditingService ?? throw new ArgumentNullException(nameof(auditingService)); _telemetryService = telemetryService ?? throw new ArgumentNullException(nameof(telemetryService)); }
public BackgroundPackageUpdateTask(IPackageUpdateService packageUpdateService, IPackagingSourceManager packagingSourceManager, IBackgroundPackageUpdateStatus backgroundPackageUpdateStatus) { _packageUpdateService = packageUpdateService; _packagingSourceManager = packagingSourceManager; _backgroundPackageUpdateStatus = backgroundPackageUpdateStatus; }
public BackgroundPackageUpdateTask(IPackageUpdateService packageUpdateService, IPackagingSourceManager packagingSourceManager, IBackgroundPackageUpdateStatus backgroundPackageUpdateStatus) { _packageUpdateService = packageUpdateService; _packagingSourceManager = packagingSourceManager; _backgroundPackageUpdateStatus = backgroundPackageUpdateStatus; }
public PackageVulnerabilityService( IEntitiesContext entitiesContext, IPackageUpdateService packageUpdateService, ILogger <PackageVulnerabilityService> logger) { _entitiesContext = entitiesContext ?? throw new ArgumentNullException(nameof(entitiesContext)); _packageUpdateService = packageUpdateService ?? throw new ArgumentNullException(nameof(packageUpdateService)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public ExtensionDisplayEventHandler(IBackgroundPackageUpdateStatus backgroundPackageUpdateStatus, IPackagingSourceManager packagingSourceManager, IPackageUpdateService packageUpdateService) { _backgroundPackageUpdateStatus = backgroundPackageUpdateStatus; _packagingSourceManager = packagingSourceManager; _packageUpdateService = packageUpdateService; T = NullLocalizer.Instance; }
public ExtensionDisplayEventHandler(IBackgroundPackageUpdateStatus backgroundPackageUpdateStatus, IPackagingSourceManager packagingSourceManager, IPackageUpdateService packageUpdateService) { _backgroundPackageUpdateStatus = backgroundPackageUpdateStatus; _packagingSourceManager = packagingSourceManager; _packageUpdateService = packageUpdateService; T = NullLocalizer.Instance; }
public PackageDeprecationService( IEntitiesContext entitiesContext, IPackageUpdateService packageUpdateService, ITelemetryService telemetryService, IAuditingService auditingService) { _entitiesContext = entitiesContext ?? throw new ArgumentNullException(nameof(entitiesContext)); _packageUpdateService = packageUpdateService ?? throw new ArgumentNullException(nameof(packageUpdateService)); _telemetryService = telemetryService ?? throw new ArgumentNullException(nameof(telemetryService)); _auditingService = auditingService ?? throw new ArgumentNullException(nameof(auditingService)); }
public GalleryUpdatesController( ShellSettings shellSettings, IOrchardServices services, IPackagingSourceManager packagingSourceManager, IPackageUpdateService packageUpdateService, IBackgroundPackageUpdateStatus backgroundPackageUpdateStatus, IShapeFactory shapeFactory) { _shellSettings = shellSettings; _packagingSourceManager = packagingSourceManager; _packageUpdateService = packageUpdateService; _backgroundPackageUpdateStatus = backgroundPackageUpdateStatus; Services = services; Shape = shapeFactory; T = NullLocalizer.Instance; Logger = NullLogger.Instance; }
public GalleryUpdatesController( ShellSettings shellSettings, IOrchardServices services, IPackagingSourceManager packagingSourceManager, IPackageUpdateService packageUpdateService, IBackgroundPackageUpdateStatus backgroundPackageUpdateStatus, IShapeFactory shapeFactory) { _shellSettings = shellSettings; _packagingSourceManager = packagingSourceManager; _packageUpdateService = packageUpdateService; _backgroundPackageUpdateStatus = backgroundPackageUpdateStatus; Services = services; Shape = shapeFactory; T = NullLocalizer.Instance; Logger = NullLogger.Instance; }
public MainWindow() { Button AddButton(string text, string tooltip, MouseEvent action) { var button = new Button { Text = text, Tooltip = tooltip, Dock = DockStyle.Left }; button.MouseClick += action; _menuBar.Content.Controls.Add(button); return(button); } loading = true; pkgManager = Localizer.Kernel.Get <IPackageManageService>(); sourcePackageLoadServiceService = Localizer.Kernel.Get <SourcePackageLoad <DataModel.Default.Package> >(); packedPackageLoadServiceService = Localizer.Kernel.Get <PackedPackageLoad <DataModel.Default.Package> >(); packageExportService = Localizer.Kernel.Get <IPackageExportService>(); packageSaveService = Localizer.Kernel.Get <IPackageSaveService>(); packageUpdateService = Localizer.Kernel.Get <IPackageUpdateService>(); fileLoadService = Localizer.Kernel.Get <IFileLoadService>(); fileSaveService = Localizer.Kernel.Get <IFileSaveService>(); packageBrowserService = Localizer.Kernel.Get <IPackageBrowserService>(); downloadManagerService = Localizer.Kernel.Get <IDownloadManagerService>(); pkgManager.PackageGroups = new ObservableCollection <IPackageGroup>(); Size = new Point(800, 340); Position = new Point(40, 200); Titlebar.Text = _("PackageManage"); Titlebar.Button.MouseClick += (sender, args) => Visible = false; Resizable = true; _menuBar = new Panel { Dock = DockStyle.Top, Size = new Point(0, 30) }; Controls.Add(_menuBar); AddButton(_("Reload"), _("ReloadDesc"), (sender, args) => { if (args.Button == 0) { LoadPackages(); } }); var refreshBtn = AddButton(_("RefreshOnline"), _("RefreshOnlineDesc"), (sender, args) => { if (args.Button == 0) { RefreshOnlinePackages(sender); } }); AddButton(_("OpenFolder"), _("OpenFolderDesc"), (sender, args) => { if (args.Button == 0) { Process.Start($"file://{Path.Combine(Environment.CurrentDirectory, "Localizer")}"); } }); AddButton(_("Export"), _("ExportDesc"), (sender, args) => { if (args.Button == 0) { Export(false); } }); AddButton(_("ExportWithTranslation"), _("ExportWithTranslationDesc"), (sender, args) => { if (args.Button == 0) { Export(true); } }); _split = new SplitContainer { Margin = new Margin(0, 10, 0, 0), Dock = DockStyle.Fill }; _split.SplitButton.Style = "button"; _split.SplitFrame1.AutoSize = AutoSize.Horizontal; _split.SplitFrame2.AutoSize = AutoSize.Horizontal; Controls.Add(_split); _split.SplitFrame1.Controls.Add(_modList); _modList.SelectedItemChanged += (sender, value) => RefreshPkgList(); _split.SplitFrame2.Controls.Add(_pkgList); RefreshModList(); LoadPackages().ContinueWith(_ => RefreshOnlinePackages(refreshBtn)); }