public class DevExpressXtraEditorsLocalizationCHS:DevExpress.XtraEditors.Controls.Localizer { public override string GetLocalizedString(DevExpress.XtraEditors.Controls.StringId id) { switch (id) { case DevExpress.XtraEditors.Controls.StringId.OK: return "确定"; case DevExpress.XtraEditors.Controls.StringId.XtraMessageBoxYesButtonText: return "是"; case DevExpress.XtraEditors.Controls.StringId.XtraMessageBoxAbortButtonText: return "放弃"; case DevExpress.XtraEditors.Controls.StringId.XtraMessageBoxCancelButtonText: return "取消"; case DevExpress.XtraEditors.Controls.StringId.XtraMessageBoxIgnoreButtonText: return "忽略"; case DevExpress.XtraEditors.Controls.StringId.XtraMessageBoxNoButtonText: return "否"; case DevExpress.XtraEditors.Controls.StringId.XtraMessageBoxOkButtonText: return "确定"; case DevExpress.XtraEditors.Controls.StringId.XtraMessageBoxRetryButtonText: return "重试"; case DevExpress.XtraEditors.Controls.StringId.TextEditMenuCopy: return "复制(Y)"; case DevExpress.XtraEditors.Controls.StringId.TextEditMenuCut: return "剪切(C)"; case DevExpress.XtraEditors.Controls.StringId.TextEditMenuDelete: return "删除"; case DevExpress.XtraEditors.Controls.StringId.TextEditMenuPaste: return "粘贴"; case DevExpress.XtraEditors.Controls.StringId.TextEditMenuSelectAll: return "全选"; case DevExpress.XtraEditors.Controls.StringId.TextEditMenuUndo: return "撤消"; } return base.GetLocalizedString(id); } }
=========================================================
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
DevExpress.XtraEditors.Controls.Localizer.Active = new DevExpressXtraEditorsLocalizationCHS();
if (Properties.Settings.Default.SkinName != null)
{
DevExpress.LookAndFeel.UserLookAndFeel.Default.SkinName = Properties.Settings.Default.SkinName;
}
DevExpress.Skins.SkinManager.EnableFormSkins();
DevExpress.LookAndFeel.LookAndFeelHelper.ForceDefaultLookAndFeelChanged();
frmLogin login = new frmLogin();
if (login.ShowDialog() == DialogResult.OK)
{
Application.Run(new frmMain());
}
}