Пример #1
0
 public EventsManagerParametersTab(EventsManagerWindow parent,
                                   EventsManagerAuthProvider authProvider,
                                   EventsManagerEnvironmentProvider environmentProvider,
                                   EventsManagerDataProvider <DDNAEventManagerEvent> eventProvider,
                                   ParameterProvider parameterProvider)
 {
     _parent              = parent;
     _authProvider        = authProvider;
     _environmentProvider = environmentProvider;
     _eventProvider       = eventProvider;
     _parameterProvider   = parameterProvider;
     _parameterCreator    = new EventsManagerParameterCreator();
     _parameterCreator.OnParameterCreated += ParameterCreated;
     _parameterCreator.OnCreationFailed   += ParameterCreationFailed;
     _listScrollPosition = Vector2.zero;
 }
Пример #2
0
        public EventsManagerEventsTab(EventsManagerWindow parent,
                                      EventsManagerAuthProvider authProvider,
                                      EventsManagerEnvironmentProvider environmentProvider,
                                      EventProvider eventProvider,
                                      ParameterProvider parameterProvider)
        {
            _parent              = parent;
            _authProvider        = authProvider;
            _environmentProvider = environmentProvider;
            _eventProvider       = eventProvider;
            _parameterProvider   = parameterProvider;
            _eventEditor         = new EventsManagerEventEditor(parent);

            _eventEditor.OnEventCreated        += EventCreated;
            _eventEditor.OnEventCreationFailed += EventCreationFailed;

            ClearSelectedEvent();
        }
Пример #3
0
        private void OnEnable()
        {
            _authProvider        = new EventsManagerAuthProvider(this);
            _environmentProvider = new EventsManagerEnvironmentProvider();
            _eventProvider       = new EventProvider();
            _parameterProvider   = new ParameterProvider();

            _environmentProvider.OnResponseArrived += ProviderResponseArrived;
            _eventProvider.OnResponseArrived       += ProviderResponseArrived;
            _parameterProvider.OnResponseArrived   += ProviderResponseArrived;

            _eventsTab     = new EventsManagerEventsTab(this, _authProvider, _environmentProvider, _eventProvider, _parameterProvider);
            _parametersTab = new EventsManagerParametersTab(this, _authProvider, _environmentProvider, _eventProvider, _parameterProvider);

            titleContent = new GUIContent(WINDOW_TITLE);

            _authProvider.LoadCacheToken();

            if (EditorPrefs.HasKey(EDITOR_PREFS_API_KEY))
            {
                _apiKey = EditorPrefs.GetString(EDITOR_PREFS_API_KEY);
            }
        }