public void ChangeLanguage(CultureInfo cultureInfo) { // Must Delete All Entity Configuration, bacause it demande with language ConfigEntity x = ConfigEntity.CreateConfigEntity(typeof(User)); x.Dispose(); // Change Gwin CultureInfo Instance GwinApp.Instance.CultureInfo = cultureInfo; if (cultureInfo.TwoLetterISOLanguageName == "ar") { GwinApp.Instance.user.Language = GwinApp.Languages.ar; } if (cultureInfo.TwoLetterISOLanguageName == "fr") { GwinApp.Instance.user.Language = GwinApp.Languages.fr; } // Change Thread CultureInfo Instance Thread.CurrentThread.CurrentCulture = cultureInfo; Thread.CurrentThread.CurrentUICulture = cultureInfo; this.Reload(); // ReLoad Applicaton Interface //instance.FormApplication.Reload(); //[Role] Restart must be after Language change, for Set Application Name Title after // Initialize Form GwinApp.Restart(); }
public void DisposeTest() { ConfigEntity configEntity = ConfigEntity.CreateConfigEntity(typeof(Role)); Assert.AreEqual(configEntity.Dispose(), true); }