分享

DotNetBar MessageBoxEx 显示中文 显示office2007风格

 junshuai103 2015-09-19
复制代码
  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;
            }
        }
复制代码

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多