Exemple #1
0
        public IActionResult Index()
        {
            IList <tzb>    tz  = tzbRepository.GetNewsList(1, 10);
            IList <attach> pic = attachRepository.GetPicList();
            zh             top = new zh();

            top.tzb    = tz;
            top.attach = pic;
            return(View(top));
        }
Exemple #2
0
        public static void Localize(string lang = "en")
        {
            var lan = GetCurrentByType("Language");

            Application.Current.Resources.MergedDictionaries.Remove(lan);

            switch (lang)
            {
            case "zh":
                lan = new zh();
                break;

            default:
                lan = new en();
                break;
            }
            Application.Current.Resources.MergedDictionaries.Add(lan);
        }