Beispiel #1
0
        public void Initialize(ApplicationStartupHandler handler, IDIContext container)
        {
            _container           = container ?? throw new ArgumentNullException(nameof(container));
            _memoryReaderManager = new FFXIVMemoryManager(container);

            _container.Register <IMemoryReaderManager>((c, p) => _memoryReaderManager);
        }
Beispiel #2
0
        public void Initialize(ApplicationStartupHandler handler, IDIContext container)
        {
            _container     = container ?? throw new ArgumentNullException(nameof(container));
            _configManager = _container.Resolve <IConfigManager>();
            _memoryManager = _container.Resolve <IMemoryReaderManager>();
            var actorManager = _container.Resolve <IActorManager>();

            var resourceBundle        = _container.Resolve <ILocaleManager>().GetResourceBundle("autotranslate");
            var autotranslateProvider = new AutotranslateProvider(resourceBundle);

            _chatManager = new ChatManager(autotranslateProvider, actorManager);

            _configManager.AddPropertyChangeListener("behaviour.chat.updateInterval", true, true, ConfigManager_UpdateChatInterval);
            _configManager.AddPropertyChangeListener("behaviour.channel", true, true, ConfigManager_UpdateChannelProperties);
            _configManager.AddPropertyChangeListener("behaviour.segment", true, true, ConfigManager_UpdateFormaterProperties);
            _configManager.AddPropertyChangeListener("behaviour.groups", true, true, ConfigManager_UpdateTriggerGroupProperties);
            _configManager.AddPropertyChangeListener("behaviour.mentions", true, true, ConfigManager_UpdateMentions);
            _configManager.AddPropertyChangeListener("behaviour.chat.autodetectEmoteInSay", true, true, ConfigManager_UpdateAutodetectProperties);
            _configManager.AddPropertyChangeListener("behaviour.language", true, true, ConfigManager_UpdateLanguage);
            _configManager.AddPropertyChangeListener("behaviour.rangefilter", true, true, ConfigManager_UpdateRangeFilter);
            _configManager.AddPropertyChangeListener("behaviour.mentions.userCanTriggerMention", true, true, ConfigManager_UpdateUserMentionProperties);

            _configManager.AddPropertyChangeListener("behaviour.chattabs.data", true, true, ConfigManager_UpdateVisibleChannel);
            _configManager.AddPropertyChangeListener("behaviour.chattabs.data", true, true, ConfigManager_UpdateUpdateRangeFilterActive);

            _container.Register <IChatManager>((c, p) => _chatManager);

            _updater = new IndependendBackgroundWorker();
            _updater.Start(UpdateJob);
        }
Beispiel #3
0
        public void Initialize(ApplicationStartupHandler handler, IDIContext container)
        {
            _container = container ?? throw new ArgumentNullException(nameof(container));

            var uiManager = _container.Resolve <IUIManager>();
            var overlay   = uiManager.GetUIElement <CefOverlayForm>(AppModuleChatOverlay.OverlayUIId);

            _browserAPIManager = new BrowserAPIManager(overlay, uiManager.UISynchronizer);
            _container.Register <IBrowserAPIManager>((c, p) => _browserAPIManager);
        }
        public void Initialize(ApplicationStartupHandler handler, IDIContext container)
        {
            _container = container ?? throw new ArgumentNullException(nameof(container));

            var synchronizer   = _container.Resolve <IUISynchronizer>();
            var hotkeyRegister = new OSLevelHotkeyRegister(synchronizer);

            _hotkeyManager = new HotkeyManager(hotkeyRegister);

            _container.Register <IHotkeyManager>((c, _) => _hotkeyManager);
        }
        public void Initialize(ApplicationStartupHandler handler, IDIContext container)
        {
            _container     = container ?? throw new ArgumentNullException(nameof(container));
            _configManager = _container.Resolve <IConfigManager>();
            _memoryManager = _container.Resolve <IMemoryReaderManager>();

            _actorManager = new ActorManager();
            _updater      = new IndependendBackgroundWorker();

            _configManager.AddPropertyChangeListener("behaviour.actor.updateInterval", true, true, ConfigManager_UpdateChatInterval);
            _configManager.AddPropertyChangeListener("behaviour.actor.active", true, true, ConfigManager_UpdateRangeFilter);

            _container.Register <IActorManager>((c, p) => _actorManager);
        }
Beispiel #6
0
        public void Initialize(ApplicationStartupHandler handler, IDIContext container)
        {
            _container     = container ?? throw new ArgumentNullException(nameof(container));
            _configManager = _container.Resolve <IConfigManager>();

            _localeManager = new LocaleManager();
            _configManager.AddPropertyChangeListener("behaviour.language", true, true, ConfigManager_UpdateLanguage);

            //update ui thread
            _localeManager.OnLocaleChange += (s, e) =>
            {
                _container.Resolve <IUISynchronizer>().RunSync(() =>
                {
                    CultureInfo.DefaultThreadCurrentCulture   = e.Locale;
                    CultureInfo.DefaultThreadCurrentUICulture = e.Locale;
                    Thread.CurrentThread.CurrentCulture       = e.Locale;
                    Thread.CurrentThread.CurrentUICulture     = e.Locale;
                    Resources.Culture      = e.Locale;
                    WebUIResources.Culture = e.Locale;
                });
            };

            _container.Register <ILocaleManager>((c, p) => _localeManager);
        }