Ejemplo n.º 1
0
 public AppLanguageChangedMessage(
     object sender,
     AppLanguageType appLanguage,
     bool restartActivity) : base(sender)
 {
     NewLanguage     = appLanguage;
     RestartActivity = restartActivity;
 }
Ejemplo n.º 2
0
        public void SetLanguage(AppLanguageType appLanguage, bool restartActivity = true)
        {
            string lang = appLanguage == AppLanguageType.English
                ? "en"
                : "es";

            CurrentLanguage = new CultureInfo(lang);
            //let all ViewModels that are active know that the culture has changed
            _messenger.Publish(new AppLanguageChangedMessage(this, appLanguage, restartActivity));
        }
Ejemplo n.º 3
0
        public void SetLanguage(AppLanguageType appLanguage, bool notifyAllVms = false)
        {
            string lang = appLanguage == AppLanguageType.English
                ? "en"
                : "es";

            CurrentLanguage = new CultureInfo(lang);
            //let all ViewModels that are active know, that the culture has changed
            if (notifyAllVms)
            {
                _messenger.Publish(new AppLanguageChangedMessage(this, appLanguage));
            }
        }
Ejemplo n.º 4
0
 public AppLanguageChangedMessage(object sender, AppLanguageType appLanguage) : base(sender)
 {
     NewLanguage = appLanguage;
 }