コード例 #1
0
ファイル: HomeController.cs プロジェクト: 18151239085/mytb
        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));
        }
コード例 #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);
        }