Exemplo n.º 1
0
 /// <summary>
 /// Constructs a new AreaPane with the specified parent, Area, and layout.
 /// </summary>
 /// <param name="parent">The parent control for the Area </param>
 /// <param name="Area">The Area in which to layout objects </param>
 /// <param name="layout">The layout manager to use </param>
 public AreaPane(Control parent, Rectangle Area, ILayoutManager layout)
     : base(parent)
 {
     this.Area = Area;
     this.LayoutManager = layout;
     BoxedControl.HandleCreated += new EventHandler(show);
 }
Exemplo n.º 2
0
 //Guid tenentId
 public ValidatePickList()
 {
     this._picklistManager    = new PicklistManager();
     this._IValidationService = new ValidationService();
     this._iMetadataManager   = new MetadataManager();
     this._iILayoutManager    = new LayoutManager();
 }
Exemplo n.º 3
0
 public TestServices With(
     IAssetLoader assetLoader              = null,
     IFocusManager focusManager            = null,
     IInputManager inputManager            = null,
     Func <IKeyboardDevice> keyboardDevice = null,
     ILayoutManager layoutManager          = null,
     IRuntimePlatform platform             = null,
     IRenderer renderer = null,
     IPlatformRenderInterface renderInterface = null,
     IRenderLoop renderLoop = null,
     IStandardCursorFactory standardCursorFactory = null,
     IStyler styler      = null,
     Func <Styles> theme = null,
     IPlatformThreadingInterface threadingInterface = null,
     IWindowImpl windowImpl = null,
     IWindowingPlatform windowingPlatform = null)
 {
     return(new TestServices(
                assetLoader: assetLoader ?? AssetLoader,
                focusManager: focusManager ?? FocusManager,
                inputManager: inputManager ?? InputManager,
                keyboardDevice: keyboardDevice ?? KeyboardDevice,
                layoutManager: layoutManager ?? LayoutManager,
                platform: platform ?? Platform,
                renderer: renderer ?? Renderer,
                renderInterface: renderInterface ?? RenderInterface,
                renderLoop: renderLoop ?? RenderLoop,
                standardCursorFactory: standardCursorFactory ?? StandardCursorFactory,
                styler: styler ?? Styler,
                theme: theme ?? Theme,
                threadingInterface: threadingInterface ?? ThreadingInterface,
                windowImpl: windowImpl ?? WindowImpl,
                windowingPlatform: windowingPlatform ?? WindowingPlatform));
 }
        public CompoundElementPartHandler(ICompoundElementService CompoundElementService,
            ILayoutManager layoutManager) {

            OnCreated<CompoundElementPart>((context, part) => { CompoundElementService.ResetCache(); });
            OnUpdated<CompoundElementPart>((context, part) => { CompoundElementService.ResetCache(); });
            OnRemoved<CompoundElementPart>((context, part) => { CompoundElementService.ResetCache(); });

            OnUpdated<CompoundElementPart>((context, part) => {

                var layoutPart = part.As<LayoutPart>();
                if (layoutPart == null) return;

                var elements = layoutManager.LoadElements(layoutPart).Flatten();
                var elementIdentifiers = new List<string>();
                foreach (var element in elements.Flatten())
                {
                    var elementIdentifier = element.GetIdentifier();
                    // identifier isn't exists
                    // identifier is the same as the another (elements are copies of each other)
                    if (elementIdentifier == null || elementIdentifiers.Contains(elementIdentifier))
                    {
                        element.SetIdentifier(Guid.NewGuid().ToString());
                    }
                    elementIdentifiers.Add(elementIdentifier);
                }
            });
        }
Exemplo n.º 5
0
 public TenantController(IManageTenant manageTenant, IMetadataManager iMetadataManager, ILayoutManager iILayoutManager, IManagerEntitySecurity managerEntitySecurity)
 {
     _manageTenant          = manageTenant;
     _iMetadataManager      = iMetadataManager;
     _iILayoutManager       = iILayoutManager;
     _managerEntitySecurity = managerEntitySecurity;
 }
Exemplo n.º 6
0
 public TestServices(
     IAssetLoader assetLoader              = null,
     IFocusManager focusManager            = null,
     IInputManager inputManager            = null,
     Func <IKeyboardDevice> keyboardDevice = null,
     ILayoutManager layoutManager          = null,
     IRuntimePlatform platform             = null,
     IRenderer renderer = null,
     IPlatformRenderInterface renderInterface = null,
     IRenderLoop renderLoop = null,
     IStandardCursorFactory standardCursorFactory = null,
     IStyler styler      = null,
     Func <Styles> theme = null,
     IPlatformThreadingInterface threadingInterface = null,
     IWindowImpl windowImpl = null,
     IWindowingPlatform windowingPlatform = null)
 {
     AssetLoader           = assetLoader;
     FocusManager          = focusManager;
     InputManager          = inputManager;
     KeyboardDevice        = keyboardDevice;
     LayoutManager         = layoutManager;
     Platform              = platform;
     Renderer              = renderer;
     RenderInterface       = renderInterface;
     RenderLoop            = renderLoop;
     StandardCursorFactory = standardCursorFactory;
     Styler             = styler;
     Theme              = theme;
     ThreadingInterface = threadingInterface;
     WindowImpl         = windowImpl;
     WindowingPlatform  = windowingPlatform;
 }
Exemplo n.º 7
0
 public TestServices With(
     IAssetLoader assetLoader = null,
     IInputManager inputManager = null,
     ILayoutManager layoutManager = null,
     IPclPlatformWrapper platformWrapper = null,
     IPlatformRenderInterface renderInterface = null,
     IStandardCursorFactory standardCursorFactory = null,
     IStyler styler = null,
     Func<Styles> theme = null,
     IPlatformThreadingInterface threadingInterface = null,
     IWindowImpl windowImpl = null,
     IWindowingPlatform windowingPlatform = null)
 {
     return new TestServices(
         assetLoader: assetLoader ?? AssetLoader,
         inputManager: inputManager ?? InputManager,
         layoutManager: layoutManager ?? LayoutManager,
         platformWrapper: platformWrapper ?? PlatformWrapper,
         renderInterface: renderInterface ?? RenderInterface,
         standardCursorFactory: standardCursorFactory ?? StandardCursorFactory,
         styler: styler ?? Styler,
         theme: theme ?? Theme,
         threadingInterface: threadingInterface ?? ThreadingInterface,
         windowImpl: windowImpl ?? WindowImpl,
         windowingPlatform: windowingPlatform ?? WindowingPlatform);
 }
        private static async Task ValidateBaseMockLayout(ILayoutManager manager)
        {
            Assert.IsTrue(await manager.VerifyLayoutAsync(true), "Verification failed");
            Layout layout = manager.Layout;

            ValidateMockLayout(layout);
        }
        public async Task TimeZoneTest()
        {
            var dateTimeOffset = new DateTimeOffset(2015, 04, 16, 12, 34, 22, 627, new TimeSpan());

            ((MockApiConnection)ServiceManager.ApiConnction).LayoutFile = "mock/datetime_layout.json";
            ILayoutManager manager = ServiceManager.LayoutManager;

            Assert.IsTrue(await manager.VerifyLayoutAsync(true), "Verification failed");
            Layout         layout = manager.Layout;
            ResolvedAction action = layout.ResolvedActions.FirstOrDefault(a => a.BeaconAction.Uuid == "9ded63644e424d758b0218f7c70f2473");

            //"2015-04-16T12:34:22.627+0000"
            Assert.AreEqual(dateTimeOffset, action.Timeframes[0].Start.Value, "1 timeslot not correct");


            action = layout.ResolvedActions.FirstOrDefault(a => a.BeaconAction.Uuid == "3f30be2605524f82a9bf0ccb4a81618f");
            //"2015-04-16T14:34:22.627+0200"
            Assert.AreEqual(dateTimeOffset, action.Timeframes[0].Start.Value, "2 timeslot not correct");


            action = layout.ResolvedActions.FirstOrDefault(a => a.BeaconAction.Uuid == "312a8594e07542bd814ecdd17f76538e");
            //"2015-04-16T14:34:22.627"
            Assert.AreEqual(dateTimeOffset, action.Timeframes[0].Start.Value, "3 timeslot not correct");


            action = layout.ResolvedActions.FirstOrDefault(a => a.BeaconAction.Uuid == "312a8594e07542bd814ecsdd17f76538e");
            //"2015-04-16T14:34:22"
            Assert.AreEqual(new DateTimeOffset(2015, 04, 16, 12, 34, 22, new TimeSpan()), action.Timeframes[0].Start.Value, "4 timeslot not correct");


            action = layout.ResolvedActions.FirstOrDefault(a => a.BeaconAction.Uuid == "312a8594e0754asd2bd814ecsdd17f76538e");
            //"14:34:22"
            Assert.AreEqual(new DateTimeOffset(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 12, 34, 22, new TimeSpan()), action.Timeframes[0].Start.Value, "5 timeslot not correct");
        }
Exemplo n.º 10
0
        public GraphicGroup(String name, int x, int y, int width, int height, ILayoutManager layout)
			: base(name, x, y, width, height)
		{
            fAutoGrow = true;
			fLayoutManager = layout;
			fChildList = new List<IGraphic>();
        }
Exemplo n.º 11
0
 public TestServices(
     IAssetLoader assetLoader = null,
     IFocusManager focusManager = null,
     IInputManager inputManager = null,
     Func<IKeyboardDevice> keyboardDevice = null,
     ILayoutManager layoutManager = null,
     IPclPlatformWrapper platformWrapper = null,
     IPlatformRenderInterface renderInterface = null,
     IStandardCursorFactory standardCursorFactory = null,
     IStyler styler = null,
     Func<Styles> theme = null,
     IPlatformThreadingInterface threadingInterface = null,
     IWindowImpl windowImpl = null,
     IWindowingPlatform windowingPlatform = null)
 {
     AssetLoader = assetLoader;
     FocusManager = focusManager;
     InputManager = inputManager;
     KeyboardDevice = keyboardDevice;
     LayoutManager = layoutManager;
     PlatformWrapper = platformWrapper;
     RenderInterface = renderInterface;
     StandardCursorFactory = standardCursorFactory;
     Styler = styler;
     Theme = theme;
     ThreadingInterface = threadingInterface;
     WindowImpl = windowImpl;
     WindowingPlatform = windowingPlatform;
 }
Exemplo n.º 12
0
 public PluginController(
     ILayoutManager layoutManager,
     IViewComponentSelector viewComponentSelector
     )
 {
     this._layoutManager         = layoutManager;
     this._viewComponentSelector = viewComponentSelector;
 }
Exemplo n.º 13
0
 public Startup(ISkinManager skinManager, ILayoutManager layoutManager, ITvStoreSelector storeSelector,
                IDialogManager dialogManager)
 {
     _skinManager   = skinManager;
     _layoutManager = layoutManager;
     _storeSelector = storeSelector;
     _dialogManager = dialogManager;
 }
Exemplo n.º 14
0
 public LayoutController(ILogger <LayoutController> logger,
                         ILayoutRepository layoutRepository,
                         ILayoutManager layoutManager)
 {
     _layoutManager    = layoutManager;
     _layoutRepository = layoutRepository;
     _logger           = logger;
 }
Exemplo n.º 15
0
        public GraphicWindow(string title, int x, int y, int width, int height)
			:base(title,x,y,width,height)
		{
			fActiveGraphic = null;
			//fMouseTrackerGraphic = null;
            fChildList = new List<IGraphic>();
            fLayoutManager = LayoutManager.Empty;
        }
Exemplo n.º 16
0
        private static void UpdateLayoutCallback(ILayoutManager manager)
        {
            ContextLayoutManager layoutManager = manager as ContextLayoutManager;

            if (layoutManager != null && !layoutManager._isDead)
            {
                layoutManager.UpdateLayout();
            }
        }
Exemplo n.º 17
0
        private void LayoutControlsIfRequired(ViewSettings viewSettings, WindowsFormView winFormView)
        {
            ILayoutManager layoutManager = LayoutManagerFactory.Create(viewSettings.Name);

            if (layoutManager != null)
            {
                layoutManager.LayoutControls(winFormView);
            }
        }
Exemplo n.º 18
0
        private static void UpdateLayoutBackground(ILayoutManager manager)
        {
            ContextLayoutManager layoutManager = manager as ContextLayoutManager;

            if (layoutManager != null)
            {
                layoutManager.NeedsRecalc();
            }
        }
Exemplo n.º 19
0
        private static void UpdateLayoutCallback(ILayoutManager manager)
        {
            ContextLayoutManager contextLayoutManager = manager as ContextLayoutManager;

            if (contextLayoutManager == null || contextLayoutManager._isDead)
            {
                return;
            }
            contextLayoutManager.UpdateLayout();
        }
Exemplo n.º 20
0
        public EntityController(IEntityResourceManager iEntityResourceManager, ILayoutManager iILayoutManager, IMetadataManager iMetadataManager, IJsonMessage iJsonMessage, IInitilizeManager initilizeManager, IInsertHelper iEntityQueryManagerV1)
        {
            _iEntityResourceManager = iEntityResourceManager;
            _iILayoutManager        = iILayoutManager;
            _iMetadataManager       = iMetadataManager;
            _iJsonMessage           = iJsonMessage;
            _initilizeManager       = initilizeManager;

            _iEntityQueryManagerV1 = iEntityQueryManagerV1;
        }
 public TableOverlayManagerSut(
     IPokerRoomInfoLocator pokerRoomInfoLocator,
     ILayoutManager layoutManager,
     ISeatMapper seatMapper,
     IOverlayToTableAttacher overlayToTableAttacher,
     ITableOverlayViewModel tableOverlay,
     ITableOverlayWindowManager tableOverlayWindow)
     : base(pokerRoomInfoLocator, layoutManager, seatMapper, overlayToTableAttacher, tableOverlay, tableOverlayWindow)
 {
 }
Exemplo n.º 22
0
 public FormController(
     INotifier notifier,
     ILayoutManager layoutManager,
     IFormService formService)
 {
     _notifier      = notifier;
     _layoutManager = layoutManager;
     _formService   = formService;
     T      = NullLocalizer.Instance;
     Logger = NullLogger.Instance;
 }
Exemplo n.º 23
0
 public RelationController(IEntityResourceManager iEntityResourceManager, ILayoutManager iILayoutManager, IMetadataManager iMetadataManager, IJsonMessage iJsonMessage,
                           IInitilizeManager initilizeManager,
                           IRelationManager iRelationManager
                           )
 {
     _iEntityResourceManager = iEntityResourceManager;
     _iILayoutManager        = iILayoutManager;
     _iMetadataManager       = iMetadataManager;
     _iJsonMessage           = iJsonMessage;
     _initilizeManager       = initilizeManager;
     _iRelationManager       = iRelationManager;
 }
Exemplo n.º 24
0
 public SimpleGUILayer(DeviceInterface devIf, Point position, Size dimensions)
 {
     this.devIf          = devIf;
     device              = devIf.Device;
     this.position       = position;
     this.dimensions     = dimensions;
     enabled             = true;
     visible             = true;
     itemsList           = new List <GUILayerItem>();
     itemsLayout         = new QuadTree <GUILayerItem>(dimensions.Width, dimensions.Height);
     checkedOutResources = new List <ISharableResource>();
     layoutManager       = new LayoutManager();
 }
Exemplo n.º 25
0
        /// <summary>
        /// Creates a layout manager for the view.
        /// </summary>
        /// <param name="view">The view whose configuration information contains the layout manager settings.</param>
        /// <returns>A layout manager.</returns>
        public static ILayoutManager Create(string view)
        {
            ILayoutManager layoutManager = null;

            ObjectTypeSettings typeSettings = UIPConfiguration.Config.GetLayoutManagerSettings(view);

            if (typeSettings != null)
            {
                layoutManager = (ILayoutManager)GenericFactory.Create(typeSettings);
            }

            return(layoutManager);
        }
Exemplo n.º 26
0
        public void TestInit()
        {
            _processRepository = Mock.Create<IProcessMetadataRepository>(Behavior.Loose);
            _dtm = Mock.Create<IDynamicTypeManager>(Behavior.Loose);
            _filterManager = Mock.Create<IFilterManager>(Behavior.Loose);
            _filterMetadataFactory = Mock.Create<IFilterMetadataFactory>(Behavior.Loose);
            _layoutManager = Mock.Create<ILayoutManager>(Behavior.Loose);
            _layoutMetadataFactory = Mock.Create<ILayoutMetadataFactory>(Behavior.Loose);

            _processMetadata = CreateProcess(ProcessName);
            Mock.Arrange(() => _processMetadata.SupportsStates).Returns(true);
            Mock.Arrange(() => _processRepository.GetProcessMetadata(ProcessName)).Returns(_processMetadata);
        }
        public async Task TestValidInvalidateLayout()
        {
            ILayoutManager manager = ServiceManager.LayoutManager;

            await ValidateBaseMockLayout(manager);

            await manager.InvalidateLayout();

            Assert.IsFalse(manager.IsLayoutValid, "Layout still valid");
            Assert.IsNull(manager.Layout, "Layout still exists");
            Assert.IsTrue(await manager.VerifyLayoutAsync(true), "Verification failed");
            Assert.IsTrue(manager.IsLayoutValid, "Layout still invalid");
        }
Exemplo n.º 28
0
        public LayoutController(
            IContentManager contentManager, 
            ILayoutManager layoutManager, 
            ILayoutModelMapper mapper,
            IOrchardServices orchardServices) {

            _contentManager = contentManager;
            _layoutManager = layoutManager;
            _mapper = mapper;
            Services = orchardServices;

            T = NullLocalizer.Instance;
        }
Exemplo n.º 29
0
        public LayoutEditorFactory(
            ILayoutModelMapper mapper, 
            ILayoutManager layoutManager, 
            IElementManager elementManager, 
            IElementDisplay elementDisplay, 
            IShapeDisplay shapeDisplay) {

            _mapper = mapper;
            _layoutManager = layoutManager;
            _elementManager = elementManager;
            _elementDisplay = elementDisplay;
            _shapeDisplay = shapeDisplay;
        }
Exemplo n.º 30
0
 public SimpleGUILayer(DeviceInterface devIf, Point position, Size dimensions)
 {
     this.devIf = devIf;
     device = devIf.Device;
     this.position = position;
     this.dimensions = dimensions;
     enabled = true;
     visible = true;
     itemsList = new List<GUILayerItem>();
     itemsLayout = new QuadTree<GUILayerItem>(dimensions.Width, dimensions.Height);
     checkedOutResources = new List<ISharableResource>();
     layoutManager = new LayoutManager();
 }
Exemplo n.º 31
0
        public LayoutController(
            IContentManager contentManager,
            ILayoutManager layoutManager,
            ILayoutModelMapper mapper,
            ITomeltServices tomeltServices)
        {
            _contentManager = contentManager;
            _layoutManager  = layoutManager;
            _mapper         = mapper;
            Services        = tomeltServices;

            T = NullLocalizer.Instance;
        }
Exemplo n.º 32
0
 public DocumentMenuItem(IDocument doc, string previousId, ILayoutManager layoutManager)
 {
     m_doc              = doc;
     Header             = doc.Title;
     ID                 = Guid.NewGuid().ToString();
     InsertRelativeToID = previousId;
     BeforeOrAfter      = RelativeDirection.After;
     if (layoutManager.IsActive(doc))
     {
         IsChecked = true;
     }
     m_layoutManager = layoutManager;
 }
 public LayoutEditorFactory(
     ILayoutModelMapper mapper,
     ILayoutManager layoutManager,
     IElementManager elementManager,
     IElementDisplay elementDisplay,
     IShapeDisplay shapeDisplay)
 {
     _mapper         = mapper;
     _layoutManager  = layoutManager;
     _elementManager = elementManager;
     _elementDisplay = elementDisplay;
     _shapeDisplay   = shapeDisplay;
 }
Exemplo n.º 34
0
 public static void Clear()
 {
     if (ReadOnlyForTests)
     {
         return;
     }
     _apiConnction    = null;
     _beaconScanner   = null;
     _layoutManager   = null;
     _storageService  = null;
     _settingsManager = null;
     _locationService = null;
     ReadOnlyForTests = false;
 }
 public SettingManager(ILogger <SettingManager> logger,
                       ILanguageManager languageManager,
                       ILayoutManager layoutManager,
                       IPageRepository pageRepository,
                       ISiteSettingRepository siteSettingRepository,
                       IThemeManager themeManager)
 {
     _logger                = logger;
     _languageManager       = languageManager;
     _layoutManager         = layoutManager;
     _pageRepository        = pageRepository;
     _siteSettingRepository = siteSettingRepository;
     _themeManager          = themeManager;
 }
Exemplo n.º 36
0
 public TableOverlayManager(
     IPokerRoomInfoLocator pokerRoomInfoLocator,
     ILayoutManager layoutManager,
     ISeatMapper seatMapper,
     IOverlayToTableAttacher overlayToTableAttacher,
     ITableOverlayViewModel tableOverlay,
     ITableOverlayWindowManager tableOverlayWindow)
 {
     _pokerRoomInfoLocator   = pokerRoomInfoLocator;
     _layoutManager          = layoutManager;
     _seatMapper             = seatMapper;
     _overlayToTableAttacher = overlayToTableAttacher;
     _tableOverlay           = tableOverlay;
     _tableOverlayWindow     = tableOverlayWindow;
 }
 public FormController(
     INotifier notifier,
     ILayoutManager layoutManager,
     IFormService formService,
     ITokenizer tokenizer,
     IClock clock)
 {
     _notifier      = notifier;
     _layoutManager = layoutManager;
     _formService   = formService;
     _tokenizer     = tokenizer;
     _clock         = clock;
     T      = NullLocalizer.Instance;
     Logger = NullLogger.Instance;
 }
Exemplo n.º 38
0
        public void TestInit()
        {
            _dynamicTypeManager = Mock.Create<IDynamicTypeManager>(Behavior.Loose);
            _filterManager = Mock.Create<IFilterManager>(Behavior.Loose);
            _layoutManager = Mock.Create<ILayoutManager>(Behavior.Loose);
            _searchUtils = Mock.Create<ISearchUtils>(Behavior.Loose);
            _processMetadataRepository = Mock.Create<IProcessMetadataRepository>(Behavior.Loose);
            _filterDescriptorFactory = Mock.Create<IFilterDescriptorFactory>(Behavior.Loose);
            _metricsManager = Mock.Create<IMetricsManager>(Behavior.Loose);
            _kpiManager = Mock.Create<IKPIManager>(Behavior.Loose);
            _filterRepository = Mock.Create<IFilterRepository>(Behavior.Loose);

            _processMetadata = Mock.Create<IProcessMetadata>(Behavior.Loose);
            Mock.Arrange(() => _processMetadata.Name).Returns(ProcessName);
            Mock.Arrange(() => _processMetadataRepository.GetProcessMetadata(ProcessName)).Returns(_processMetadata);
        }
Exemplo n.º 39
0
        /// <summary>
        /// Implementation of the <see cref="IDisposable"/> pattern
        /// </summary>
        /// <param name="disposing">True if this object is being disposed, false if it is being finalized</param>
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                ParentDesktopObject = null;

                if (_toolSet != null)
                {
                    _toolSet.Dispose();
                    _toolSet = null;
                }

                StopLoadingPriors();
                StopPrefetching();

                if (_physicalWorkspace != null)
                {
                    _physicalWorkspace.Dispose();
                    _physicalWorkspace = null;
                }

                if (_logicalWorkspace != null)
                {
                    _logicalWorkspace.Dispose();
                    _logicalWorkspace = null;
                }

                if (_studyTree != null)
                {
                    _studyTree.Dispose();
                    _studyTree = null;
                }

                if (_layoutManager != null)
                {
                    _layoutManager.Dispose();
                    _layoutManager = null;
                }

                if (ExtensionData != null)
                {
                    ExtensionData.Dispose();
                    ExtensionData = null;
                }
            }
        }
        public EditUsersViewModel(IMapper mapper,
                                  IDialogManager dialogManager,
                                  ILayoutManager layoutManager,
                                  IConfigurationService configurationService,
                                  IEventAggregator eventAggregator)
        {
            DisplayName           = Translations.EditUsers;
            _dialogManager        = dialogManager;
            _mapper               = mapper;
            _configurationService = configurationService;
            _eventAggregator      = eventAggregator;
            _layoutManager        = layoutManager;

            Users = new BindableCollection <User>(configurationService.Configurations.Select(c => new User {
                Configuration = c
            }));
        }
Exemplo n.º 41
0
        internal static ILayoutManager Create(LayoutManagerCreationParameters creationParameters)
        {
            ILayoutManager layoutManager = null;

            if (creationParameters == LayoutManagerCreationParameters.Extended)
            {
                try
                {
                    layoutManager = (ILayoutManager) new LayoutManagerExtensionPoint().CreateExtension();
                }
                catch (NotSupportedException e)
                {
                    Platform.Log(LogLevel.Debug, e);
                }
            }

            return(layoutManager ?? new LayoutManager());
        }
Exemplo n.º 42
0
        public LayoutPartHandler(
            IRepository<LayoutPartRecord> repository, 
            ILayoutManager layoutManager, 
            IContentManager contentManager, 
            IContentPartDisplay contentPartDisplay, 
            IShapeDisplay shapeDisplay, 
            ILayoutSerializer serializer) {

            _layoutManager = layoutManager;
            _contentManager = contentManager;
            _contentPartDisplay = contentPartDisplay;
            _shapeDisplay = shapeDisplay;
            _serializer = serializer;

            Filters.Add(StorageFilter.For(repository));
            OnPublished<LayoutPart>(UpdateTemplateClients);
            OnIndexing<LayoutPart>(IndexLayout);
        }
Exemplo n.º 43
0
        public LayoutPartHandler(ILayoutManager layoutManager, ILayoutContentMapService layoutContentMapService)
        {
            _layoutManager = layoutManager;
            _layoutContentMapService = layoutContentMapService;

            OnUpdated<LayoutPart>((context, part) => {

                var elements = _layoutManager.LoadElements(part).Flatten();
                var contentItemIds = elements
                    .Where(e => e is ContentItem)
                    .Cast<ContentItem>()
                    .SelectMany(c => c.ContentItemIds)
                    .ToList();

                _layoutContentMapService.LayoutPartUpdated(part.Id, contentItemIds);
            });

            OnRemoved<LayoutPart>((context, part) =>
            {
                _layoutContentMapService.LayoutPartRemoved(part.Id);
            });
        }
        public LayoutPartHandler(
            IRepository<LayoutPartRecord> repository, 
            ILayoutManager layoutManager, 
            IContentManager contentManager, 
            IContentPartDisplay contentPartDisplay, 
            IShapeDisplay shapeDisplay, 
            ILayoutSerializer serializer,
            IStaticHttpContextScopeFactory staticHttpContextScopeFactory,
            IAliasService aliasService) {

            _layoutManager = layoutManager;
            _contentManager = contentManager;
            _contentPartDisplay = contentPartDisplay;
            _shapeDisplay = shapeDisplay;
            _serializer = serializer;
            _staticHttpContextScopeFactory = staticHttpContextScopeFactory;
            _aliasService = aliasService;

            Filters.Add(StorageFilter.For(repository));
            OnPublished<LayoutPart>(UpdateTemplateClients);
            OnIndexing<LayoutPart>(IndexLayout);
        }
 public FormDesignerEntityEventsHandler(ILayoutManager layoutManager) {
     _layoutManager = layoutManager;
 }
Exemplo n.º 46
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SearchCommand"/> class.
        /// </summary>
        /// <param name="process">
        /// The process metadata.
        /// </param>
        /// <param name="dynamicTypeManager">
        /// The dynamic type manager.
        /// </param>
        /// <param name="filterManager">
        /// The filter manager.
        /// </param>
        /// <param name="layoutManager">
        /// The layout manager.
        /// </param>
        /// <param name="searchUtils">
        /// The search utils.
        /// </param>
        /// <param name="filterDescriptorFactory">
        /// The filter descriptor factory.
        /// </param>
        /// <param name="metricsManager">
        /// The metrics manager.
        /// </param>
        /// <param name="kpiManager">
        /// The KPI manager.
        /// </param>
        /// <param name="filterRepository">
        /// The filter repository.
        /// </param>
        public SearchCommand(
            IProcessMetadata process,
            IDynamicTypeManager dynamicTypeManager,
            IFilterManager filterManager,
            ILayoutManager layoutManager,
            ISearchUtils searchUtils,
            IFilterDescriptorFactory filterDescriptorFactory,
            IMetricsManager metricsManager,
            IKPIManager kpiManager,
            IFilterRepository filterRepository)
        {
            if (process == null)
                throw new ArgumentNullException("process");

            if (dynamicTypeManager == null)
                throw new ArgumentNullException("dynamicTypeManager");

            if (filterManager == null)
                throw new ArgumentNullException("filterManager");

            if (layoutManager == null)
                throw new ArgumentNullException("layoutManager");

            if (searchUtils == null)
                throw new ArgumentNullException("searchUtils");

            if (filterDescriptorFactory == null)
                throw new ArgumentNullException("filterDescriptorFactory");

            if (metricsManager == null)
                throw new ArgumentNullException("metricsManager");

            if (kpiManager == null)
                throw new ArgumentNullException("kpiManager");

            if (filterRepository == null)
                throw new ArgumentNullException("filterRepository");

            _dynamicTypeManager = dynamicTypeManager;
            _filterManager = filterManager;
            _layoutManager = layoutManager;
            _searchUtils = searchUtils;
            _filterDescriptorFactory = filterDescriptorFactory;
            _metricsManager = metricsManager;
            _kpiManager = kpiManager;
            _filterRepository = filterRepository;

            _process = process;
        }
Exemplo n.º 47
0
        public SearchUtils(
            IProcessMetadataRepository processMetadataRepository,
            IDynamicTypeManager dynamicTypeManager,
            IFilterManager filterManager,
            IFilterMetadataFactory filterMetadataFactory,
            ILayoutManager layoutManager,
            ILayoutMetadataFactory layoutMetadataFactory)
        {
            if (processMetadataRepository == null)
                throw new ArgumentNullException("processMetadataRepository");

            if (dynamicTypeManager == null)
                throw new ArgumentNullException("dynamicTypeManager");

            if (filterManager == null)
                throw new ArgumentNullException("filterManager");

            if (filterMetadataFactory == null)
                throw new ArgumentNullException("filterMetadataFactory");

            if (layoutManager == null)
                throw new ArgumentNullException("layoutManager");

            if (layoutMetadataFactory == null)
                throw new ArgumentNullException("layoutMetadataFactory");

            _processMetadataRepository = processMetadataRepository;
            _dynamicTypeManager = dynamicTypeManager;
            _filterManager = filterManager;
            _filterMetadataFactory = filterMetadataFactory;
            _layoutManager = layoutManager;
            _layoutMetadataFactory = layoutMetadataFactory;
        }
Exemplo n.º 48
0
 public LayoutSettingsHooks(ILayoutSerializer serializer, ILayoutManager layoutManager) {
     _serializer = serializer;
     _layoutManager = layoutManager;
 }
Exemplo n.º 49
0
 public TestServices With(
     IAssetLoader assetLoader = null,
     IFocusManager focusManager = null,
     IInputManager inputManager = null,
     Func<IKeyboardDevice> keyboardDevice = null,
     ILayoutManager layoutManager = null,
     IRuntimePlatform platform = null,
     IRenderer renderer = null,
     IPlatformRenderInterface renderInterface = null,
     IRenderLoop renderLoop = null,
     IStandardCursorFactory standardCursorFactory = null,
     IStyler styler = null,
     Func<Styles> theme = null,
     IPlatformThreadingInterface threadingInterface = null,
     IWindowImpl windowImpl = null,
     IWindowingPlatform windowingPlatform = null)
 {
     return new TestServices(
         assetLoader: assetLoader ?? AssetLoader,
         focusManager: focusManager ?? FocusManager,
         inputManager: inputManager ?? InputManager,
         keyboardDevice: keyboardDevice ?? KeyboardDevice,
         layoutManager: layoutManager ?? LayoutManager,
         platform: platform ?? Platform,
         renderer: renderer ?? Renderer,
         renderInterface: renderInterface ?? RenderInterface,
         renderLoop: renderLoop ?? RenderLoop,
         standardCursorFactory: standardCursorFactory ?? StandardCursorFactory,
         styler: styler ?? Styler,
         theme: theme ?? Theme,
         threadingInterface: threadingInterface ?? ThreadingInterface,
         windowImpl: windowImpl ?? WindowImpl,
         windowingPlatform: windowingPlatform ?? WindowingPlatform);
 }
Exemplo n.º 50
0
 public DocumentMenuItem(IDocument doc, string previousId, ILayoutManager layoutManager)
 {
     m_doc = doc;
     Header = doc.Title;
     ID = Guid.NewGuid().ToString();
     InsertRelativeToID = previousId;
     BeforeOrAfter = RelativeDirection.After;
     if (layoutManager.IsActive(doc))
     {
         IsChecked = true;
     }
     m_layoutManager = layoutManager;
 }
Exemplo n.º 51
0
 public void TestInit()
 {
     _processRepository = Mock.Create<IProcessMetadataRepository>(Behavior.Loose);
     _utils = Mock.Create<IUtils>(Behavior.Loose);
     _layoutManager = Mock.Create<ILayoutManager>(Behavior.Loose);
 }
Exemplo n.º 52
0
		internal ViewerSetupHelper(ILayoutManager layoutManager, IPriorStudyFinder priorStudyFinder)
		{
			LayoutManager = layoutManager;
			PriorStudyFinder = priorStudyFinder;
		}
Exemplo n.º 53
0
        public LayoutController(IContentManager contentManager, ILayoutManager layoutManager, ILayoutModelMapper mapper) {

            _contentManager = contentManager;
            _layoutManager = layoutManager;
            _mapper = mapper;
        }
Exemplo n.º 54
0
 /// <summary>
 /// Constructs a new ResizeablePane with the specified parent, Area, and layout.
 /// </summary>
 /// <param name="parent">The parent control for the Area </param>
 /// <param name="Area">The Area in which to layout objects </param>
 /// <param name="layout">The layout manager to use </param>
 public ResizeablePane(Control parent, Rectangle Area, ILayoutManager layout)
     : base(parent, Area, layout)
 {
     BoxedControl.Resize += new EventHandler(resize);
 }
 /// <summary>
 /// Constructs with the provided graph painter and a default layout manager.
 /// </summary>
 public IOGraphViewportPainter(IOGraphPainter graphPainter)
 {
     _graph = null;
     _layoutManager = new DepthLayoutManager();
     _graphPainter = graphPainter;
 }
Exemplo n.º 56
0
 public static void Clear()
 {
     if (ReadOnlyForTests)
     {
         return;
     }
     _apiConnction = null;
     _beaconScanner = null;
     _layoutManager = null;
     _storageService = null;
     _settingsManager = null;
     _locationService = null;
     ReadOnlyForTests = false;
 }
 public FormDesignerFieldEventsHandler(ILayoutManager layoutManager) {
     _layoutManager = layoutManager;
 }
 /// <summary>
 /// Constructs with the provided graph painter and layout manager.
 /// </summary>
 public IOGraphViewportPainter(IOGraphPainter graphPainter, ILayoutManager layoutManager)
 {
     _graph = null;
     _layoutManager = layoutManager;
     _graphPainter = graphPainter;
 }
Exemplo n.º 59
0
        public LayoutRepository(
            IProcessMetadataRepository processRepository,
            IUtils utils,
            ILayoutManager layoutManager)
        {
            if (processRepository == null)
                throw new ArgumentNullException("processRepository");

            if (utils == null)
                throw new ArgumentNullException("utils");

            if (layoutManager == null)
                throw new ArgumentNullException("layoutManager");

            _processRepository = processRepository;
            _utils = utils;
            _layoutManager = layoutManager;
        }