コード例 #1
0
        private void SaveUpdateValidate(Area area, ILayoutService ls, ISeatService ss)
        {
            var lsAll = ls.GetAll();
            var ssAll = ss.GetAll();
            var all   = GetAll();

            if (!(from x in lsAll
                  where x.Id == area.LayoutId
                  select x).Any())
            {
                throw new Exception("No such layout");
            }

            var areaLowerSet = from x in all
                               where x.LayoutId == area.LayoutId &&
                               (x.CoordX < area.CoordX ||
                                x.CoordY < area.CoordY)
                               select x;

            if (areaLowerSet.Any())
            {
                foreach (var v in areaLowerSet.ToList())
                {
                    var seatSet = from x in ssAll where x.AreaId == v.Id select x;
                    if (seatSet.Any())
                    {
                        if (v.CoordX + seatSet.Max(x => x.Row) > area.CoordX ||
                            v.CoordY + seatSet.Max(x => x.Number) > area.CoordY)
                        {
                            throw new Exception("Area coords out of range");
                        }
                    }
                }
            }
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AddNewPageCommand" /> class.
 /// </summary>
 /// <param name="LayoutService">The layout service.</param>
 /// <param name="cmsConfiguration">The CMS configuration.</param>
 /// <param name="accessControlService">The access control service.</param>
 /// <param name="securityService">The security service.</param>
 public AddNewPageCommand(ILayoutService LayoutService, ICmsConfiguration cmsConfiguration, IAccessControlService accessControlService, ISecurityService securityService)
 {
     layoutService             = LayoutService;
     this.cmsConfiguration     = cmsConfiguration;
     this.accessControlService = accessControlService;
     this.securityService      = securityService;
 }
コード例 #3
0
 public HomeController(ILayoutService layoutService,
                       IClientHomeService clientHomeService,
                       IPostService postService,
                       IDetailUserTypeService detailUser,
                       IHaveSendQuestionService haveSendQuesService,
                       IPostTypeService postTypeService,
                       ICommentService commentOfPost,
                       IPostVoteDetailService postVoteDetailService,
                       IDetailUserTypeService detailUserType,
                       ICommentVoteDetailService commentVoteDetailService,
                       IToiecGroupService fbService,
                       IEventService eventService
                       )
     : base(layoutService)
 {
     _clientHomeService        = clientHomeService;
     _postService              = postService;
     _detailUserTypeService    = detailUser;
     _haveSendQuesService      = haveSendQuesService;
     _postTypeService          = postTypeService;
     _commentOfPost            = commentOfPost;
     _postVoteDetailService    = postVoteDetailService;
     _detailUserType           = detailUserType;
     _commentVoteDetailService = commentVoteDetailService;
     _fbService    = fbService;
     _eventService = eventService;
     initChatBotMenu();
 }
コード例 #4
0
ファイル: LayoutService.cs プロジェクト: OFark/Compressarr
 public Worker(ILayoutService parent, string message)
 {
     _parent          = parent;
     _parent.Message  = new MarkupString($"&nbsp;&nbsp;&nbsp;{message}&hellip;");
     _parent.Spinning = true;
     _parent.RaiseChange();
 }
コード例 #5
0
ファイル: ServiceFactory.cs プロジェクト: xbadcode/Rubezh
		public static void Initialize(ILayoutService layoutService, ISecurityService securityService)
		{
			ServiceFactoryBase.SecurityService = SecurityService = securityService;
			Layout = layoutService;
			ContentService = new ContentService("Monitor");
			DragDropService = new DragDropService();
		}
コード例 #6
0
 public StatisticsController(ILayoutService layoutService,
                             IClientStatisticsService clientStatisticsService
                             )
     : base(layoutService)
 {
     _clientStatisticsService = clientStatisticsService;
 }
コード例 #7
0
        public ActionResult LoadLayoutList(bool isHorizontal)
        {
            ILayoutService layoutService = DependencyUtils.Resolve <ILayoutService>();
            var            layoutList    = layoutService.Get(a => a.isHorizontal == isHorizontal).ToList();
            var            layoutVMs     = new List <Models.LayoutVM>();

            if (layoutList != null)
            {
                foreach (var item in layoutList)
                {
                    var l = new Models.LayoutVM
                    {
                        LayoutID     = item.LayoutID,
                        Title        = item.Title,
                        isHorizontal = item.isHorizontal,
                        Description  = item.Description,
                        URL          = item.URL,
                    };
                    layoutVMs.Add(l);
                }
            }
            //return layoutVMs;
            return(Json(new
            {
                LayoutVMs = layoutVMs,
            }, JsonRequestBehavior.AllowGet));
        }
コード例 #8
0
        public object ProvideValue(IServiceProvider serviceProvider)
        {
            if (s_layoutService == null)
            {
                s_layoutService = DependencyService.Get <ILayoutService>();
            }

            if (s_layoutService == null)
            {
                System.Diagnostics.Debug.WriteLine("ScaledGridLength has no ILayoutService!");

                var tc = new GridLengthTypeConverter();
                return(tc.ConvertFromInvariantString(Length));
            }

            if (Length == "*")
            {
                return(GridLength.Star);
            }
            else if (Length == "Auto")
            {
                return(GridLength.Auto);
            }
            else
            {
                double d;
                if (double.TryParse(Length, out d))
                {
                    return(new GridLength(s_layoutService.GetScaledDouble(d)));
                }

                throw new Exception("Unable to convert to GridLength: " + Length);
            }
        }
コード例 #9
0
 public GamesFeedViewModel(
     INavigationManager navigationManager,
     ILayoutService layoutService)
 {
     _navigationManager = navigationManager;
     _layoutService     = layoutService;
 }
コード例 #10
0
        public ActionResult LoadLayout(int layoutId)
        {
            ILayoutService layoutService = DependencyUtils.Resolve <ILayoutService>();
            string         layoutSrc     = "";

            layoutSrc = layoutService.Get(a => a.LayoutID == layoutId).FirstOrDefault()?.LayoutSrc;
            return(PartialView(layoutSrc));
        }
コード例 #11
0
 public LayoutCmsController(ILayoutService service)
 {
     if (!SecurityHelper.IsAdmin())
     {
         throw new UnauthorizedAccessException();
     }
     _layoutService = service;
 }
コード例 #12
0
 public FriendController(ILayoutService layoutService,
                         IClientFriendService friendService,
                         IApplicationUserService applicationUserService
                         )
     : base(layoutService)
 {
     _friendService          = friendService;
     _applicationUserService = applicationUserService;
 }
コード例 #13
0
        public UserReport(
            ParametrosReport p_ParametrosReport,
            ILayoutService p_LayoutService,
            IUserService p_UserService

            ) : base(p_ParametrosReport, p_LayoutService)
        {
            _userService = p_UserService;
        }
コード例 #14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GetPagesListCommand" /> class.
 /// </summary>
 /// <param name="categoryService">The category service.</param>
 /// <param name="configuration">The configuration.</param>
 /// <param name="languageService">The language service.</param>
 /// <param name="accessControlService">The access control service.</param>
 /// <param name="layoutService">The layout service.</param>
 public GetPagesListCommand(ICategoryService categoryService, ICmsConfiguration configuration,
                            ILanguageService languageService, IAccessControlService accessControlService, ILayoutService layoutService)
 {
     this.configuration        = configuration;
     this.categoryService      = categoryService;
     this.languageService      = languageService;
     this.accessControlService = accessControlService;
     this.layoutService        = layoutService;
 }
コード例 #15
0
 public CalendarController(ILayoutService layoutService,
                           IClientCalendarService clientCalendarService,
                           IEventService eventService
                           )
     : base(layoutService)
 {
     _clientCalendarService = clientCalendarService;
     _eventService          = eventService;
 }
コード例 #16
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GetPagePropertiesCommand" /> class.
 /// </summary>
 /// <param name="tagService">The tag service.</param>
 /// <param name="categoryService">The category service.</param>
 /// <param name="optionService">The option service.</param>
 /// <param name="cmsConfiguration">The CMS configuration.</param>
 /// <param name="layoutService">The layout service.</param>
 public GetPagePropertiesCommand(ITagService tagService, ICategoryService categoryService, IOptionService optionService,
                                 ICmsConfiguration cmsConfiguration, ILayoutService layoutService)
 {
     this.tagService       = tagService;
     this.categoryService  = categoryService;
     this.optionService    = optionService;
     this.cmsConfiguration = cmsConfiguration;
     this.layoutService    = layoutService;
 }
コード例 #17
0
ファイル: ServiceFactory.cs プロジェクト: hjlfmy/Rubezh
 public static void Initialize(ILayoutService ILayoutService, ISecurityService ISecurityService)
 {
     Events = new EventAggregator();
     ResourceService = new ResourceService();
     Layout = ILayoutService;
     SecurityService = ISecurityService;
     LoginService = new LoginService(ClientType.Monitor, "Оперативная задача. Авторизация.");
     SubscribeEvents();
 }
コード例 #18
0
ファイル: ServiceFactory.cs プロジェクト: saeednazari/Rubezh
		public static void Initialize(ILayoutService ILayoutService, ISecurityService ISecurityService)
		{
			ServiceFactoryBase.Events = Events = new EventAggregator();
			ServiceFactoryBase.SecurityService = SecurityService = ISecurityService;
			ResourceService = new ResourceService();
			Layout = ILayoutService;
			LoginService = new LoginService(ClientType.Monitor, "Оперативная задача. Авторизация.");
			ContentService = new ContentService("Monitor");
		}
コード例 #19
0
ファイル: ServiceFactory.cs プロジェクト: xbadcode/Rubezh
		public static void Initialize(ILayoutService layoutService, IValidationService validationService)
		{
			SaveService = new SaveService();
			Layout = layoutService;
			ValidationService = validationService;
			ContentService = new ContentService("Administrator");
			DragDropService = new DragDropService();
			RibbonService = new RibbonService();
		}
コード例 #20
0
ファイル: ServiceFactory.cs プロジェクト: hjlfmy/Rubezh
 public static void Initialize(ILayoutService ILayoutService, IProgressService IProgressService, IValidationService IValidationService)
 {
     SaveService = new SaveService();
     Events = new EventAggregator();
     ResourceService = new ResourceService();
     Layout = ILayoutService;
     ProgressService = IProgressService;
     ValidationService = IValidationService;
     LoginService = new LoginService(ClientType.Administrator, "Администратор. Авторизация");
 }
コード例 #21
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GetPagePropertiesCommand" /> class.
 /// </summary>
 /// <param name="tagService">The tag service.</param>
 /// <param name="categoryService">The category service.</param>
 /// <param name="optionService">The option service.</param>
 /// <param name="cmsConfiguration">The CMS configuration.</param>
 /// <param name="layoutService">The layout service.</param>
 /// <param name="fileUrlResolver">The file URL resolver.</param>
 public GetPagePropertiesCommand(ITagService tagService, ICategoryService categoryService, IOptionService optionService,
                                 ICmsConfiguration cmsConfiguration, ILayoutService layoutService, IMediaFileUrlResolver fileUrlResolver)
 {
     this.tagService       = tagService;
     this.categoryService  = categoryService;
     this.optionService    = optionService;
     this.cmsConfiguration = cmsConfiguration;
     this.layoutService    = layoutService;
     this.fileUrlResolver  = fileUrlResolver;
 }
コード例 #22
0
 public DefaultUntranslatedPageListService(ICategoryService categoryService, 
     ICmsConfiguration configuration, 
     ILanguageService languageService, 
     IAccessControlService accessControlService, 
     ILayoutService layoutService, 
     IUnitOfWork unitOfWork,
     IRepository repository)
     : base(categoryService, configuration, languageService, accessControlService, layoutService, unitOfWork)
 {
     this.repository = repository;
 }
コード例 #23
0
 public DefaultRootApiOperations(ITagsService tags, ITagService tag, IVersionService version, ILayoutsService layouts, ILayoutService layout,
                                 ICategoriesService categories, ICategoryService category)
 {
     Tags       = tags;
     Tag        = tag;
     Categories = categories;
     Category   = category;
     Version    = version;
     Layouts    = layouts;
     Layout     = layout;
 }
コード例 #24
0
 public IndexModel(
     ILogger <IndexModel> logger,
     IConfiguration configuration,
     ClientIntegratorDbContext dbContext,
     ILayoutService layoutService)
 {
     this.logger        = logger;
     this.configuration = configuration;
     this.dbContext     = dbContext;
     this.layoutService = layoutService;
 }
コード例 #25
0
 public DefaultRootApiOperations(ITagsService tags, ITagService tag, IVersionService version, ILayoutsService layouts, ILayoutService layout,
     ICategoriesService categories, ICategoryService category)
 {
     Tags = tags;
     Tag = tag;
     Categories = categories;
     Category = category;
     Version = version;
     Layouts = layouts;
     Layout = layout;
 }
コード例 #26
0
 public SubFundsController(
     IEntityService service,
     ILayoutService layoutService,
     SharedLocalizationService sharedLocalizer,
     IUserRepository <UserSubFundColumn> repository)
 {
     this.service         = service;
     this.layoutService   = layoutService;
     this.sharedLocalizer = sharedLocalizer;
     this.repository      = repository;
 }
コード例 #27
0
 public NotificationController(ILayoutService layoutService,
                               IClientNotificationService friendService,
                               IApplicationUserService applicationUserService,
                               INotificationService notificationService
                               )
     : base(layoutService)
 {
     _friendService          = friendService;
     _applicationUserService = applicationUserService;
     _notificationService    = notificationService;
 }
コード例 #28
0
 public DefaultPageListService(ICategoryService categoryService, ICmsConfiguration configuration,
     ILanguageService languageService, IAccessControlService accessControlService, ILayoutService layoutService,
     IUnitOfWork unitOfWork)
 {
     this.configuration = configuration;
     this.categoryService = categoryService;
     this.languageService = languageService;
     this.accessControlService = accessControlService;
     this.layoutService = layoutService;
     this.unitOfWork = unitOfWork;
 }
コード例 #29
0
 public DefaultPageListService(ICategoryService categoryService, ICmsConfiguration configuration,
                               ILanguageService languageService, IAccessControlService accessControlService, ILayoutService layoutService,
                               IUnitOfWork unitOfWork)
 {
     this.configuration        = configuration;
     this.categoryService      = categoryService;
     this.languageService      = languageService;
     this.accessControlService = accessControlService;
     this.layoutService        = layoutService;
     this.unitOfWork           = unitOfWork;
 }
コード例 #30
0
 public DefaultUntranslatedPageListService(ICategoryService categoryService,
                                           ICmsConfiguration configuration,
                                           ILanguageService languageService,
                                           IAccessControlService accessControlService,
                                           ILayoutService layoutService,
                                           IUnitOfWork unitOfWork,
                                           IRepository repository)
     : base(categoryService, configuration, languageService, accessControlService, layoutService, unitOfWork)
 {
     this.repository = repository;
 }
コード例 #31
0
 public YourAccountController(ILayoutService layoutService,
                              IApplicationUserService applicationUserService,
                              IClientFriendService friendService,
                              IClientNotificationService notificationService)
     : base(layoutService)
 {
     _applicationUserService = applicationUserService;
     UserManager             = new UserManager <ApplicationUser>(new ApplicationUserStore(new ApplicationDbContext()));
     _friendService          = friendService;
     _notificationService    = notificationService;
 }
コード例 #32
0
ファイル: HomeController.cs プロジェクト: yunusaslanhan/CMS
        public HomeController(IDistributedCache distributedCache, ILayoutService layoutService, IPostServices postServices, IMainPageServices mainPageServices, IHostingEnvironment e, ILayoutApiClient layoutApiClient, IPostApiClient postApiClient, IMainPageApiClient mainPageApiClient)
        {
            _distributedCache = distributedCache;
            _layoutService    = layoutService;
            _postServices     = postServices;
            _mainPageServices = mainPageServices;
            he = e;

            _layoutApiClient   = layoutApiClient;
            _postApiClient     = postApiClient;
            _mainPageApiClient = mainPageApiClient;
        }
コード例 #33
0
ファイル: PageController.cs プロジェクト: haoyk/ZKEACMS.Core
 public PageController(IPageService service,
                       ICookie cookie,
                       IZoneService zoneService,
                       ILayoutService layoutService,
                       IWidgetBasePartService widgetService)
     : base(service)
 {
     _cookie        = cookie;
     _zoneService   = zoneService;
     _layoutService = layoutService;
     _widgetService = widgetService;
 }
コード例 #34
0
 public LayoutAdminController(
     IOrchardServices services,
     IContentManager contentManager,
     ILayoutService layoutService,
     IShapeFactory shapeFactory)
 {
     Services        = services;
     _contentManager = contentManager;
     _layoutService  = layoutService;
     T     = NullLocalizer.Instance;
     Shape = shapeFactory;
 }
コード例 #35
0
 public LayoutTemplatePartDriver(
     ILayoutService layoutService,
     IStylesheetService stylesheetService,
     IContentDefinitionManager contentDefinitionManager,
     IContentManager contentManager)
 {
     _layoutService            = layoutService;
     _stylesheetService        = stylesheetService;
     _contentDefinitionManager = contentDefinitionManager;
     _contentManager           = contentManager;
     T = NullLocalizer.Instance;
 }
コード例 #36
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AddNewPageCommand" /> class.
 /// </summary>
 /// <param name="LayoutService">The layout service.</param>
 /// <param name="cmsConfiguration">The CMS configuration.</param>
 /// <param name="securityService">The security service.</param>
 /// <param name="optionService">The option service.</param>
 /// <param name="masterPageService">The master page service.</param>
 /// <param name="repository">The repository.</param>
 /// <param name="languageService">The language service.</param>
 public AddNewPageCommand(ILayoutService LayoutService, ICmsConfiguration cmsConfiguration,
                          ISecurityService securityService, IOptionService optionService,
                          IMasterPageService masterPageService, IRepository repository, ILanguageService languageService)
 {
     layoutService          = LayoutService;
     this.cmsConfiguration  = cmsConfiguration;
     this.securityService   = securityService;
     this.optionService     = optionService;
     this.masterPageService = masterPageService;
     this.repository        = repository;
     this.languageService   = languageService;
 }
コード例 #37
0
 public LearningController(ILayoutService layoutService,
                           IClientLearningService clientLearningService,
                           IDetailOurWordService detailOutWordService,
                           IDictCacheService dictCache,
                           IToiecGroupService toiecService
                           )
     : base(layoutService)
 {
     _clientLearningService = clientLearningService;
     _detailOutWordService  = detailOutWordService;
     _dictCache             = dictCache;
     _toiecService          = toiecService;
 }
コード例 #38
0
 public DictionaryController(ILayoutService layoutService,
                             IClientDictionaryService clientDictionaryService,
                             IDetailOurWordService detailOutWordService,
                             IDictCacheService dictCache,
                             IEventService eventService
                             )
     : base(layoutService)
 {
     _clientDictionaryService = clientDictionaryService;
     _detailOutWordService    = detailOutWordService;
     _dictCache    = dictCache;
     _eventService = eventService;
 }
コード例 #39
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GetUntranslatedPagesListCommand" /> class.
 /// </summary>
 /// <param name="categoryService">The category service.</param>
 /// <param name="configuration">The configuration.</param>
 /// <param name="languageService">The language service.</param>
 /// <param name="accessControlService">The access control service.</param>
 /// <param name="layoutService">The layout service.</param>
 public GetUntranslatedPagesListCommand(ICategoryService categoryService, ICmsConfiguration configuration, 
     ILanguageService languageService, IAccessControlService accessControlService, ILayoutService layoutService)
     : base(categoryService, configuration, languageService, accessControlService, layoutService)
 {
 }
コード例 #40
0
ファイル: LayoutsService.cs プロジェクト: Steinerd/BetterCMS
 public LayoutsService(IRepository repository, ILayoutService layoutService)
 {
     this.repository = repository;
     this.layoutService = layoutService;
 }