/// <summary> /// /// </summary> /// <param name="accountsService"></param> /// <param name="projectsService"></param> /// <param name="templateService"></param> /// <param name="cacheManager"></param> public BaseManager(IAccountsService accountsService, IProjectsService projectsService, ITemplatesService templateService, ICacheManager cacheManager) { AccountsService = accountsService; ProjectsService = projectsService; TemplatesService = templateService; CacheManager = cacheManager; }
public TemplateCardViewModel(DocumentTemplateModel model, INavigationService navigator, ITemplatesService templatesService, ITelemetryService telemetryService) { _navigator = navigator ?? throw new ArgumentNullException(nameof(navigator)); _templatesService = templatesService; _telemetryService = telemetryService; Model = model; }
public DispatchController( IUsersService usersService, IActionLogsService actionLogsService, IDepartmentsService departmentsService, IUserProfileService userProfileService, IUserStateService userStateService, IUnitsService unitsService, ICallsService callsService, IDepartmentGroupsService departmentGroupsService, IPersonnelRolesService personnelRolesService, ICustomStateService customStateService, IGeoLocationProvider geoLocationProvider, ICqrsProvider cqrsProvider, IDepartmentSettingsService departmentSettingsService, ITemplatesService templatesService ) { _usersService = usersService; _actionLogsService = actionLogsService; _departmentsService = departmentsService; _userProfileService = userProfileService; _userStateService = userStateService; _unitsService = unitsService; _callsService = callsService; _departmentGroupsService = departmentGroupsService; _personnelRolesService = personnelRolesService; _customStateService = customStateService; _geoLocationProvider = geoLocationProvider; _cqrsProvider = cqrsProvider; _departmentSettingsService = departmentSettingsService; _templatesService = templatesService; }
/// <summary> /// /// </summary> /// <param name="itemsRepository"></param> /// <param name="mappingRepository"></param> /// <param name="itemsService"></param> /// <param name="mappingManager"></param> /// <param name="importManager"></param> /// <param name="accountsService"></param> /// <param name="projectsService"></param> /// <param name="templateService"></param> /// <param name="cacheManager"></param> /// <param name="gcAccountSettings"></param> public UpdateManager( IItemsRepository itemsRepository, IMappingRepository mappingRepository, IItemsService itemsService, IMappingManager mappingManager, IImportManager importManager, IAccountsService accountsService, IProjectsService projectsService, ITemplatesService templateService, ICacheManager cacheManager, GCAccountSettings gcAccountSettings) : base(accountsService, projectsService, templateService, cacheManager) { ItemsRepository = itemsRepository; MappingRepository = mappingRepository; ItemsService = itemsService; MappingManager = mappingManager; ImportManager = importManager; GcAccountSettings = gcAccountSettings; }
public AccountSettingManager(IAccountsService accountsService, IProjectsService projectsService, ITemplatesService templateService, ICacheManager cacheManager) : base(accountsService, projectsService, templateService, cacheManager) { _accountsRepository = new AccountsRepository(); }
/// <summary> /// /// </summary> public TestConnectionManager( IAccountsService accountsService, IProjectsService projectsService, ITemplatesService templateService, ICacheManager cacheManager) : base(accountsService, projectsService, templateService, cacheManager) { }
public void OpenCategoriesTemplatesManager(ITemplatesService ts) { var tManager = new TemplatesManager <Categories, Category> (ts.CategoriesTemplateProvider, new CategoriesTemplateEditorWidget(ts)); tManager.TransientFor = mainWindow as Gtk.Window; tManager.Show(); }
public TestConnectionManager( IAccountsService accountsService, IProjectsService projectsService, ITemplatesService templateService, ICacheManager cacheManager, GCAccountSettings gcAccountSettings) : base(accountsService, projectsService, templateService, cacheManager, gcAccountSettings) { }
/// <summary> /// /// </summary> /// <param name="accountsService"></param> /// <param name="projectsService"></param> /// <param name="templateService"></param> /// <param name="cacheManager"></param> public BaseManager(IAccountsService accountsService, IProjectsService projectsService, ITemplatesService templateService, ICacheManager cacheManager, GCAccountSettings gcAccountSettings) { AccountsService = accountsService; ProjectsService = projectsService; TemplatesService = templateService; GcAccountSettings = gcAccountSettings; CacheManager = cacheManager; }
public StandardJavaScriptExtensionPackage( LoggerService logger, ITemplatesService templates, IJSonSerializerService jSonSerializer) { _logger = logger; _templates = templates; _jSonSerializer = jSonSerializer; }
public ProjectsManager(Project openedProject, IDatabase DB, ITemplatesService ts) { this.Build(); this.openedProject = openedProject; this.projectdetails.Use = ProjectType.EditProject; this.DB = DB; Fill(); projectdetails.Edited = false; projectdetails.TemplatesService = ts; }
public ActionResult GetTemplate([FromServices] ITemplatesService templatesService, [FromRoute] string id) { if (string.IsNullOrWhiteSpace(id)) { return(BadRequest()); } var template = templatesService.GetTemplate(id); return(File(template, "application/json")); }
public DocumentsPageViewModel(ITemplatesService templatesService, INavigationService navigationService, ITelemetryService telemetryService, IDocumentService documentService, ISnackbarMessageQueue messageQueue) : base(navigationService) { _templatesService = templatesService ?? throw new ArgumentNullException(nameof(templatesService)); _navigationService = navigationService ?? throw new ArgumentNullException(nameof(navigationService)); _telemetryService = telemetryService ?? throw new ArgumentNullException(nameof(telemetryService)); _documentService = documentService ?? throw new ArgumentNullException(nameof(documentService)); _messageQueue = messageQueue ?? throw new ArgumentNullException(nameof(messageQueue)); }
public ImportManager( IItemsRepository itemsRepository, IMappingRepository mappingRepository, IItemsService itemsService, IAccountsService accountsService, IProjectsService projectsService, ITemplatesService templateService, ICacheManager cacheManager, GCAccountSettings gcAccountSettings) : base(accountsService, projectsService, templateService, cacheManager, gcAccountSettings) { ItemsRepository = itemsRepository; MappingRepository = mappingRepository; ItemsService = itemsService; }
public MappingManager( IMappingRepository mappingRepository, IAccountsService accountsService, IProjectsService projectsService, ITemplatesService templateService, IItemsService itemService, ICacheManager cacheManager, GCAccountSettings accountSettings) : base(accountsService, projectsService, templateService, cacheManager) { AccountSettings = accountSettings; MappingRepository = mappingRepository; ItemService = itemService; TemplateService = templateService; }
/// <summary> /// Unpackages the template file and adds a new template in the db. /// </summary> /// <exception cref="ValidationException">Throws a ValidationException if the posted file is not valid or the application does not have access rights.</exception> public static void Add(Template template, Stream packageStream, HttpContextBase context, ITemplatesService service) { string baseDirectory = null; if (packageStream == null) { throw new ArgumentNullException("postedStream"); } try { if (packageStream.Length > 1024 * 1024 * 3) { throw new ValidationException(new ValidationError("postedFile", ValidationErrorType.MaxLength)); } var cache = new CacheWrapper(context); if (cache.Template != null && template.Key != null && cache.Template.Name.ToUpper() == template.Key.ToUpper()) { throw new ValidationException(new ValidationError("postedFile", ValidationErrorType.DuplicateNotAllowed)); } service.AddOrUpdate(template); baseDirectory = Config.General.TemplateFolderPathFull(template.Key); SaveFilesToDrive(baseDirectory, packageStream); PrepareTemplateBody(baseDirectory + "\\template.html", UrlHelper.GenerateContentUrl(Config.General.TemplateFolderPath(template.Key) + "/", context), context); ChopTemplateFile(baseDirectory + "\\template.html"); } catch (ValidationException) { //Delete the folder if (baseDirectory != null) { try { SafeIO.Directory_Delete(baseDirectory, true); } catch (UnauthorizedAccessException) { } } if (template.Id > 0) { service.Delete(template.Id); } throw; } }
public MappingManager( IMappingRepository mappingRepository, IAccountsService accountsService, IProjectsService projectsService, ITemplatesService templateService, IItemsService itemService, ICacheManager cacheManager, ILogger logger, GCAccountSettings accountSettings) : base(accountsService, projectsService, templateService, cacheManager, accountSettings) { MappingRepository = mappingRepository; ItemService = itemService; Log = logger ?? new NullLogger(); TemplateService = templateService; }
public ActionResult GetTemplateThumbnail([FromServices] ITemplatesService templatesService, [FromRoute] string id) { if (string.IsNullOrWhiteSpace(id)) { return(BadRequest()); } try { var thumbnail = templatesService.GetTemplateThumbnail(id); return(Json(thumbnail)); } catch (Exception) { return(NoContent()); } }
/// <summary> /// /// </summary> /// <param name="itemsRepository"></param> /// <param name="mappingRepository"></param> /// <param name="itemsService"></param> /// <param name="accountsService"></param> /// <param name="projectsService"></param> /// <param name="templateService"></param> /// <param name="cacheManager"></param> /// <param name="logger"></param> /// <param name="gcAccountSettings"></param> public UpdateManager( IItemsRepository itemsRepository, IMappingRepository mappingRepository, IItemsService itemsService, IAccountsService accountsService, IProjectsService projectsService, ITemplatesService templateService, ICacheManager cacheManager, ILogger logger, GCAccountSettings gcAccountSettings) : base(accountsService, projectsService, templateService, cacheManager, gcAccountSettings) { ItemsRepository = itemsRepository; MappingRepository = mappingRepository; ItemsService = itemsService; Log = logger ?? new NullLogger(); }
/// <summary> /// Unpackages the template file posted and adds a new template in the db. /// </summary> /// <exception cref="ValidationException">Throws a ValidationException if the posted file is not valid or the application does not have access rights.</exception> public static void Add(Template template, HttpPostedFileBase postedFile, HttpContextBase context, bool useDefaultName, ITemplatesService service) { if (postedFile == null) { throw new ValidationException(new ValidationError("postedFile", ValidationErrorType.NullOrEmpty)); } if (useDefaultName) { template.Key = SafeIO.Path_GetFileNameWithoutExtension(postedFile.FileName); } if (SafeIO.Path_GetExtension(postedFile.FileName) != ".zip") { throw new ValidationException(new ValidationError("postedFile", ValidationErrorType.FileFormat)); } Add(template, postedFile.InputStream, context, service); }
public CategoriesTemplateEditorWidget(ITemplatesService ts) : base(ts.CategoriesTemplateProvider) { hkList = new List <HotKey>(); categoriestreeview = new CategoriesTreeView(); categoriestreeview.CategoryClicked += this.OnCategoryClicked; categoriestreeview.CategoriesSelected += this.OnCategoriesSelected; CurrentPage = 0; FirstPageName = Catalog.GetString("Categories"); AddBackgroundsSelectionWidget(); AddTreeView(categoriestreeview); gameUnitsEditor = new GameUnitsEditor(); if (Config.UseGameUnits) { AddPage(gameUnitsEditor, "Game phases"); } this.ts = ts; }
Project NewProject(IDatabase db, Project project, ProjectType type, ITemplatesService tps, List <LongoMatch.Common.Device> devices, out CaptureSettings captureSettings) { NewProjectDialog npd = new NewProjectDialog(); npd.TransientFor = mainWindow as Gtk.Window; npd.Use = type; npd.TemplatesService = tps; npd.Project = project; if (type == ProjectType.CaptureProject) { npd.Devices = devices; } int response = npd.Run(); while (true) { if (response != (int)ResponseType.Ok) { project = null; break; } else if (npd.Project == null) { InfoMessage(Catalog.GetString("Please, select a video file.")); response = npd.Run(); } else { project = npd.Project; break; } } if (type == ProjectType.CaptureProject || type == ProjectType.URICaptureProject) { captureSettings = npd.CaptureSettings; } else { captureSettings = new CaptureSettings(); } npd.Destroy(); return(project); }
public TemplatesController(ITemplatesService service) { _service = service; }
public Project EditFakeProject(IDatabase db, Project project, ITemplatesService ts) { CaptureSettings captureSettings = new CaptureSettings(); return NewProject(db, project, ProjectType.EditProject, ts, null, out captureSettings); }
/// <summary> /// Extract all template packages inside the path /// </summary> /// <exception cref="DirectoryNotFoundException"></exception> /// <exception cref="UnauthorizedAccessException"></exception> /// <exception cref="ValidationException">Throws a ValidationException if the posted file is not valid or the application does not have access rights.</exception> public static int AddDefaultTemplates(string path, HttpContextBase context, ITemplatesService service) { var templatesLength = 0; var files = SafeIO.Directory_GetFiles(path, "*.zip"); foreach (var fileName in files) { var template = new Template(); template.Key = SafeIO.Path_GetFileNameWithoutExtension(fileName); template.Description = "Default"; using (var file = new FileStream(fileName, FileMode.Open, FileAccess.Read)) { TemplateHelper.Add(template, file, context, service); } } templatesLength = files.Length; return templatesLength; }
public ActionResult GetTemplatesList([FromServices] ITemplatesService templatesService) { var templatesList = templatesService.GetTemplatesList(); return(Json(templatesList)); }
public TemplatesController(ITemplatesService templateService) { _service = templateService; }
public GetTestingsHandler(IMessageService messageService, ITemplatesService templatesService) { _messageService = messageService; _templatesService = templatesService; }
public SearchService(IUnitOfWork unitOfWork, TemplatesService templateService) { _unitOfWork = unitOfWork; _templateService = templateService; }
public void OpenCategoriesTemplatesManager(ITemplatesService ts) { var tManager = new TemplatesManager<Categories, Category> (ts.CategoriesTemplateProvider, new CategoriesTemplateEditorWidget(ts)); tManager.TransientFor = mainWindow as Gtk.Window; tManager.Show(); }
public void OpenProjectsManager(Project openedProject, IDatabase db, ITemplatesService ts) { Gui.Dialog.ProjectsManager pm = new Gui.Dialog.ProjectsManager(openedProject, db, ts); pm.TransientFor = mainWindow as Gtk.Window; pm.Show(); }
public static TemplateState GetTemplateState(HttpContextBase context, int? id, ITemplatesService service) { TemplateState template = null; Template t = null; if (id != null) { t = service.Get(id.Value); } else { //Gets the current template code from db t = service.GetCurrent(); } if (t != null) { //Get all the files in the directory template = new TemplateState(t.Key); template.Id = t.Id; string[] fileNameList = SafeIO.Directory_GetFiles(Config.General.TemplateFolderPathFull(template.Name), "*.part.*.html"); foreach (string fileName in fileNameList) { template.Items.Add(new TemplateState.TemplateItem(SafeIO.File_ReadAllText(fileName))); } } return template; }
Project NewProject(IDatabase db, Project project, ProjectType type, ITemplatesService tps, List<LongoMatch.Common.Device> devices, out CaptureSettings captureSettings) { NewProjectDialog npd = new NewProjectDialog(); npd.TransientFor = mainWindow as Gtk.Window; npd.Use = type; npd.TemplatesService = tps; npd.Project = project; if(type == ProjectType.CaptureProject) npd.Devices = devices; int response = npd.Run(); while(true) { if(response != (int)ResponseType.Ok) { break; } else if(npd.Project == null) { InfoMessage(Catalog.GetString("Please, select a video file.")); response=npd.Run(); } else { project = npd.Project; break; } } if (type == ProjectType.CaptureProject) captureSettings = npd.CaptureSettings; else captureSettings = new CaptureSettings(); npd.Destroy(); return project; }
public TemplatesController(ITemplatesService templatesService) { _templatesService = templatesService; }
public EditCategoryDialog(ITemplatesService ts) { this.Build(); timenodeproperties2.HotKeyChanged += OnHotKeyChanged; timenodeproperties2.LoadSubcategories(ts); }
public Project NewFileProject(IDatabase db, ITemplatesService ts) { CaptureSettings captureSettings = new CaptureSettings(); return NewProject(db, null, ProjectType.FileProject, ts, null, out captureSettings); }
public TemplatesController(TemplatesService templateService, ApplicationUserManager userManager) : base(userManager) { _templatesService = templateService; }
public Project NewCaptureProject(IDatabase db, ITemplatesService ts, List<LongoMatch.Common.Device> devices, out CaptureSettings captureSettings) { return NewProject(db, null, ProjectType.CaptureProject, ts, devices, out captureSettings); }
public void LoadSubcategories(ITemplatesService ts) { subcategoriesProvider = ts.SubCategoriesTemplateProvider; LoadSubcategories(ts.PlayerSubcategories); }
public TemplatesController(ITemplatesService templatesService, ICallsService callsService) { _templatesService = templatesService; _callsService = callsService; }
public TemplatesController(ITemplatesService templatesService, IApplicationUsersService usersService) { this.templates = templatesService; this.users = usersService; }
public static TemplateState GetCurrentTemplateState(HttpContextBase context, ITemplatesService service) { return GetTemplateState(context, null, service); }
public TemplatesController(ITemplatesService templatesService) { this.templates = templatesService; }