码迷,mamicode.com
首页 > 其他好文 > 详细

Devexpress中统一设置字体样式的方法

时间:2019-01-15 11:57:02      阅读:510      评论:0      收藏:0      [点我收藏+]

标签:format   rms   样式   资源文件   default   rtti   oba   printf   资源   

#region 设置默认字体、日期格式、汉化dev
DevExpress.Utils.AppearanceObject.DefaultFont = new System.Drawing.Font("Tahoma", 12);

DevExpress.XtraEditors.WindowsFormsSettings.DefaultFont= new System.Drawing.Font("Tahoma", 12);
DevExpress.XtraEditors.WindowsFormsSettings.DefaultMenuFont = new System.Drawing.Font("Tahoma", 12);
DevExpress.XtraEditors.WindowsFormsSettings.DefaultPrintFont= new System.Drawing.Font("Tahoma", 12);

System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("zh-CHS");//使用DEV汉化资源文件
//设置程序区域语言设置中日期格式
System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo("zh-CHS");
System.Globalization.DateTimeFormatInfo di = (System.Globalization.DateTimeFormatInfo)System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.Clone();
di.DateSeparator = "-";
di.ShortDatePattern = "yyyy-MM-dd";
di.LongDatePattern = "yyyy‘年‘M‘月‘d‘日‘";
di.ShortTimePattern = "H:mm:ss";
di.LongTimePattern = "H‘时‘mm‘分‘ss‘秒‘";
ci.DateTimeFormat = di;
System.Threading.Thread.CurrentThread.CurrentCulture = ci;
#endregion

Devexpress中统一设置字体样式的方法

标签:format   rms   样式   资源文件   default   rtti   oba   printf   资源   

原文地址:https://www.cnblogs.com/DoNetCShap/p/10270687.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!