Пример #1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // always add "engl" language as default
            InterfaceLanguage.AddDefault(new InterfaceLanguage());

            formMain = new frmMain();

            bool   init     = false;
            string rootName = "FOnlineConfigExtension";

            if (DllExtension.Load("FOnlineConfig.dll", rootName))
            {
                init = true;
            }

            if (DllExtension.LoadPattern("FOnlineConfig.*.dll", rootName) > 0)
            {
                init = true;
            }

            if (init)
            {
                DllExtension.Run("OnInit");
            }

            Application.Run(formMain);
        }
Пример #2
0
        private void ChangeLanguage(InterfaceLanguage lang)
        {
            List <Control> controls = new List <Control>();

            controls.Add(this);

            this.GetAllControls(ref controls);

            foreach (Control control in controls)
            {
                if (control.Tag == null)
                {
                    continue;
                }

                control.Translate(lang);
            }

            DllExtension.Run("OnLanguageChange");

            this.RefreshSize();
            this.OnAutoSizeChanged(EventArgs.Empty);
        }