private void Construct(IAciEventManager eventManager,
                               IAdaptivityService adaptivityService,
                               IConfigProvider configProvider,
                               IWorkflowService workflowService,
                               ITimeTrackingRepository timeTrackingRepo,
                               IBot bot,
                               IBadgeService badgeService,
                               IAudioService audioService,
                               FeedbackActivityFactory factory,
                               FeedbackActivityLibrary library)
        {
            m_ConfigProvider    = configProvider;
            m_EventManager      = eventManager;
            m_AdaptivityService = adaptivityService;
            m_WorkflowService   = workflowService;
            m_TimeTrackingRepo  = timeTrackingRepo;
            m_BadgeService      = badgeService;
            m_Bot             = bot;
            m_Factory         = factory;
            m_ActivityLibrary = library;
            m_AudioService    = audioService;

            m_ConfigProvider?.RegisterClient(this);
            //write default values to config if no config values were loaded
            if (assetsUrl.IsNullOrEmpty())
            {
                m_ConfigProvider?.ClientDirty(this);
            }

            RegisterForEvents();
        }
Пример #2
0
 private void Construct([InjectOptional] IConfigProvider config, IAciEventManager broker)
 {
     m_EventBroker    = broker;
     m_ConfigProvider = config;
     m_ConfigProvider?.RegisterClient(this);
     // to write default values set the client dirty
     m_ConfigProvider?.ClientDirty(this);
 }
Пример #3
0
        private void OnFpsChanged(object fps)
        {
            WebcamProvider target = (WebcamProvider)this.target;

            target.fps = (int)fps;

            if (!Application.isPlaying)
            {
                // ugly, but this is the only way i can think of to get this without zenject in edit mode
                IConfigProvider provider = GameObject.FindObjectOfType <JsonConfigProvider>();
                provider?.RegisterClient(target);
                provider?.ClientDirty(target);
            }
        }
Пример #4
0
        private void OnCameraChanged(object deviceName)
        {
            WebcamProvider target = (WebcamProvider)this.target;

            target.webcamDevice = (deviceName as string);

            if (!Application.isPlaying)
            {
                // ugly, but this is the only way i can think of to get this without zenject in edit mode
                IConfigProvider provider = GameObject.FindObjectOfType <JsonConfigProvider>();
                provider?.RegisterClient(target);
                provider?.ClientDirty(target);
            }
        }
Пример #5
0
        private void OnResolutionChanged(object resolution)
        {
            WebcamProvider target = (WebcamProvider)this.target;

            string[] dimensions = (resolution as string).Split('x');
            target.resolutionWidth  = int.Parse(dimensions[0]);
            target.resolutionHeight = int.Parse(dimensions[1]);

            if (!Application.isPlaying)
            {
                // ugly, but this is the only way i can think of to get this without zenject in edit mode
                IConfigProvider provider = GameObject.FindObjectOfType <JsonConfigProvider>();
                provider?.RegisterClient(target);
                provider?.ClientDirty(target);
            }
        }
Пример #6
0
        private void Construct(IConfigProvider configProvider, INetworkPublisher publisher,
                               IWorkflowService workflowService, SceneItem.Factory sceneItemFactory,
                               ISceneItemRegistry itemRegistry)
        {
            m_ConfigProvider    = configProvider;
            m_INetworkPublisher = publisher;
            m_WorkflowService   = workflowService;
            m_SceneItemFactory  = sceneItemFactory;
            m_ItemRegistry      = itemRegistry;

            m_ConfigProvider?.RegisterClient(this);
            //write default values to config if no config values were loaded
            if (workflowDirectory.IsNullOrEmpty())
            {
                m_ConfigProvider?.ClientDirty(this);
            }
        }
Пример #7
0
        private void Construct(IConfigProvider configProvider, ISceneItemRegistry sceneItemRegistry,
                               StepItem.Factory stepItemFactory, WorkflowData.Factory workflowDataFactory)
        {
            m_ConfigProvider      = configProvider;
            m_SceneItemRegistry   = sceneItemRegistry;
            m_StepFactory         = stepItemFactory;
            m_WorkflowDataFactory = workflowDataFactory;

            m_ConfigProvider?.RegisterClient(this);
            //write default values to config if no config values were loaded
            if (workflowDirectory.IsNullOrEmpty())
            {
                m_ConfigProvider?.ClientDirty(this);
            }

            m_SceneItemRegistry.itemAdded.AddListener(OnSceneItemRegistered);
            m_SceneItemRegistry.itemRemoved.AddListener(OnSceneItemRemoved);
        }
        private void Construct(SceneItemElementViewController.Factory itemElementFactory,
                               SceneItemTemplateDataStorage templateDataStorage,
                               IConfigProvider configProvider)
        {
            m_ItemElementFactory = itemElementFactory;
            m_Storage            = templateDataStorage;
            m_ConfigProvider     = configProvider;
            m_List = GetComponent <ReorderableList>();

            m_ConfigProvider?.RegisterClient(this);
            //write default values to config if no config values were loaded
            if (assetsUrl.IsNullOrEmpty())
            {
                m_ConfigProvider?.ClientDirty(this);
            }

            Refresh();
        }
 public UsbDetectorService(IAciEventManager eventManager, IConfigProvider configProvider)
 {
     m_EventManager = eventManager;
     configProvider.RegisterClient(this);
     configProvider.ClientDirty(this);
 }