Ejemplo n.º 1
0
        public void Initialize()
        {
            Settings.Configure();

            HooksSetup.InstallHooks(Any_TextChanged);

            AutoTranslateClient.Configure();

            LoadTranslations();

            // start a thread that will periodically removed unused references
            var t1 = new Thread(RemovedUnusedReferences);

            t1.IsBackground = true;
            t1.Start();

            // start a thread that will periodically save new translations
            var t2 = new Thread(SaveTranslationsLoop);

            t2.IsBackground = true;
            t2.Start();


            // subscribe to text changes
            UGUIHooks.TextAwakened += UguiTextEvents_OnTextAwaken;
            UGUIHooks.TextChanged  += UguiTextEvents_OnTextChanged;
            IMGUIHooks.TextChanged += IMGUITextEvents_GUIContentChanged;
            NGUIHooks.TextChanged  += NGUITextEvents_TextChanged;

            TextMeshProHooks.TextAwakened += TextMeshProHooks_OnTextAwaken;
            TextMeshProHooks.TextChanged  += TextMeshProHooks_OnTextChanged;
        }
Ejemplo n.º 2
0
        public void Initialize()
        {
            Current = this;

            Settings.Configure();

            HooksSetup.InstallHooks(Override_TextChanged);

            AutoTranslateClient.Configure();

            _symbolCheck = TextHelper.GetSymbolCheck(Settings.FromLanguage);

            LoadTranslations();

            // start a thread that will periodically removed unused references
            var t1 = new Thread(RemovedUnusedReferences);

            t1.IsBackground = true;
            t1.Start();

            // start a thread that will periodically save new translations
            var t2 = new Thread(SaveTranslationsLoop);

            t2.IsBackground = true;
            t2.Start();
        }