在启动项Program添加代码
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
LocalizationKeys.LocalizeString += LocalizationKeys_LocalizeString;
Application.Run(new FormMain());
}
static void LocalizationKeys_LocalizeString(object sender, LocalizeEventArgs e)
{
if (e.Key == DevComponents.DotNetBar.LocalizationKeys.MessageBoxCancelButton)
{
e.LocalizedValue = “取消”;
e.Handled = true;
}
if (e.Key == DevComponents.DotNetBar.LocalizationKeys.MessageBoxNoButton)
{
e.LocalizedValue = “取消”;
e.Handled = true;
}
if (e.Key == DevComponents.DotNetBar.LocalizationKeys.MessageBoxOkButton)
{
e.LocalizedValue = “确定”;
e.Handled = true;
}
if (e.Key == DevComponents.DotNetBar.LocalizationKeys.MessageBoxYesButton)
{
e.LocalizedValue = “确定”;
e.Handled = true;
}
if (e.Key == DevComponents.DotNetBar.LocalizationKeys.MonthCalendarClearButtonText)
{
e.LocalizedValue = “清除”;
e.Handled = true;
}
if (e.Key == DevComponents.DotNetBar.LocalizationKeys.MonthCalendarTodayButtonText)
{
e.LocalizedValue = “今天”;
e.Handled = true;
}
if (e.Key == DevComponents.DotNetBar.LocalizationKeys.TimeSelectorHourLabel)
{
e.LocalizedValue = “时”;
e.Handled = true;
}
if (e.Key == DevComponents.DotNetBar.LocalizationKeys.TimeSelectorMinuteLabel)
{
e.LocalizedValue = “分”;
e.Handled = true;
}
if (e.Key == DevComponents.DotNetBar.LocalizationKeys.TimeSelectorClearButton)
{
e.LocalizedValue = “清除”;
e.Handled = true;
}
if (e.Key == DevComponents.DotNetBar.LocalizationKeys.TimeSelectorOkButton)
{
e.LocalizedValue = “确定”;
e.Handled = true;
}
}
不需要设置其他什么属性
https://download.csdn.net/download/Fluoxetines/13183387
MessageBoxEx显示中文
最新推荐文章于 2022-09-29 12:15:36 发布