DevExpress WinForm 控件汉化方法 代码(五)

本文详细介绍了如何对DevExpress WinForm控件进行汉化,包括创建自定义SchedulerLocalizer类,覆盖Language和GetLocalizedString方法,以及生成CASE语句的查询方法,帮助将控件的字符串资源翻译为中文。
摘要由CSDN通过智能技术生成

(14)XtraScheduler.Localization.SchedulerLocalizer


Imports System.Resources
Imports System.Reflection
Imports DevExpress.XtraScheduler.Localization


Public Class XLocallizerScheduler
    Inherits DevExpress.XtraScheduler.Localization.SchedulerLocalizer
    Public Overrides ReadOnly Property Language() As String
        Get
            Return "Chinese"
        End Get
    End Property
    Public Overrides Function GetLocalizedString(ByVal id As DevExpress.XtraScheduler.Localization.SchedulerStringId) As String
        Dim ret As String = ""
        Select Case id
            Case SchedulerStringId.Abbr_Day : Return "日"   'day
            Case SchedulerStringId.Abbr_Days : Return "日"   'days
            Case SchedulerStringId.Abbr_DaysShort : Return "d"   'd
            Case SchedulerStringId.Abbr_Hour : Return "小时"   'hour
            Case SchedulerStringId.Abbr_Hours : Return "小时"   'hours
            Case SchedulerStringId.Abbr_HoursShort : Return "h"   'h
            Case SchedulerStringId.Abbr_Minute : Return "分钟"   'minute
            Case SchedulerStringId.Abbr_Minutes : Return "分钟"   'minutes
            Case SchedulerStringId.Abbr_MinutesShort1 : Return "m"   'm
            Case SchedulerStringId.Abbr_MinutesShort2 : Return "min"   'min
            Case SchedulerStringId.Abbr_Month : Return "月"   'month
            Case SchedulerStringId.Abbr_Months : Return "月"   'months
            Case SchedulerStringId.Abbr_Week : Return "周"   'week
            Case SchedulerStringId.Abbr_Weeks : Return "周"   'weeks
            Case SchedulerStringId.Abbr_WeeksShort : Return "w"   'w
            Case SchedulerStringId.Abbr_Year : Return "年"   'year
            Case SchedulerStringId.Abbr_Years : Return "年"   'years
            Case SchedulerStringId.Appointment_EndContinueText : Return "到 {0}"   'To {0}
            Case SchedulerStringId.Appointment_StartContinueText : Return "从 {0}"   'From {0}
            Case SchedulerStringId.AppointmentLabel_Anniversary : Return "周年纪念日"   'Anniversary
            Case SchedulerStringId.AppointmentLabel_Birthday : Return "生日"   'Birthday
            Case SchedulerStringId.AppointmentLabel_Business : Return "商务"   'Business
            Case SchedulerStringId.AppointmentLabel_Important : Return "重要"   'Important
            Case SchedulerStringId.AppointmentLabel_MustAttend : Return "必须出席"   'Must Attend
            Case SchedulerStringId.AppointmentLabel_NeedsPreparation : Return "需要准备"   'Needs Preparation
            Case SchedulerStringId.AppointmentLabel_None : Return "没有"   'None
            Case SchedulerStringId.AppointmentLabel_Personal : Return "个人"   'Personal
            Case SchedulerStringId.AppointmentLabel_PhoneCall : Return "电话"   'Phone Call
            Case SchedulerStringId.AppointmentLabel_TravelRequired : Return "要求旅游"   'Travel Required
            Case SchedulerStringId.AppointmentLabel_Vacation : Return "假期"   'Vacation
            Case SchedulerStringId.Caption_10Minutes : Return "10 分钟"   '10 Minutes
            Case SchedulerStringId.Caption_15Minutes : Return "15 分钟"   '15 Minutes
            Case SchedulerStringId.Caption_20Minutes : Return "20 分钟"   '20 Minutes
            Case SchedulerStringId.Caption_30Minutes : Return "30 分钟"   '30 Minutes
            Case SchedulerStringId.Caption_5Minutes : Return "5 分钟"   '5 Minutes
            Case SchedulerStringId.Caption_60Minutes : Return "60 分钟"   '60 Minutes
            Case SchedulerStringId.Caption_6Minutes : Return "6 分钟"   '6 Minutes
            Case SchedulerStringId.Caption_AllDay : Return "全天"   'All day
            Case SchedulerStringId.Caption_AllResources : Return "所有资源"   'All resources
            Case SchedulerStringId.Caption_Appointment : Return "{0} - 日程安排"   '{0} - Appointment
            Case SchedulerStringId.Caption_AppointmentDependencyTypeFinishToFinish : Return "完成-完成 (FF)"   'Finish-to-finish (FF)
            Case SchedulerStringId.Caption_AppointmentDependencyTypeFinishToStart : Return "完成-开始 (FS)"   'Finish-to-start (FS)
            Case SchedulerStringId.Caption_AppointmentDependencyTypeStartToFinish : Return "开始-完成 (SF)"   'Start-to-finish (SF)
            Case SchedulerStringId.Caption_AppointmentDependencyTypeStartToStart : Return "开始-启动 (SS)"   'Start-to-start (SS)
            Case SchedulerStringId.Caption_Busy : Return "忙碌"   'Busy
            Case SchedulerStringId.Caption_CalendarDetailsPrintStyle : Return "日历风格"   'Calendar Details Style
            Case SchedulerStringId.Caption_CheckMappings : Return "检查映射"   'Check Mappings
            Case SchedulerStringId.Caption_ColorConverterBlackAndWhite : Return "单色"   'Black And White
            Case SchedulerStringId.Caption_ColorConverterFullColor : Return "全色"   'Full Color
            Case SchedulerStringId.Caption_ColorConverterGrayScale : Return "灰度色标"   'Gray Scale
            Case SchedulerStringId.Caption_DailyPrintStyle : Return "日风格"   'Daily Style
            Case SchedulerStringId.Caption_DayViewDescription : Return "切换到天视图。最详细的视图的特定一天预约。"   'Switches to Day view. The most detailed view of appointments for a specific day(s).
            Case SchedulerStringId.Caption_DecreaseVisibleResourcesCount : Return "减少可见资源数目"   'Decrease visible resources count
            Case SchedulerStringId.Caption_EmptyResource : Return "(Any)"   '(Any)
            Case SchedulerStringId.Caption_Event : Return "{0} - 事件"   '{0} - Event
            Case SchedulerStringId.Caption_FirstVisibleResources : Return "第一次"   'First
            Case SchedulerStringId.Caption_Free : Return "空闲"   'Free
            Case SchedulerStringId.Caption_GanttViewDescription : Return "转化为甘特图视图. 根据时间部署约会."   'Switch to Gantt View. Project management view that shows appointments and their dependencies in relation to time.
            Case SchedulerStringId.Caption_GroupByDate : Return "日期"   'Date
            Case SchedulerStringId.Caption_GroupByDateDescription : Return "按日期进行分组"   'Group by dates
            Case SchedulerStringId.Caption_GroupByNone : Return "无"   'None
            Case SchedulerStringId.Caption_GroupByNoneDescription : Return "无人组"   'Group by none
            Case SchedulerStringId.Caption_GroupByResourceDescription : Return "由资源组"   'Group by resources
            Case SchedulerStringId.Caption_GroupByResources : Return "资源"   'Resources
            Case SchedulerStringId.Caption_IncreaseVisibleResourcesCount : Return "增加可见资源数目"   'Increase visible resources count
            Case SchedulerStringId.Caption_LastVisibleResources : Return "最后"   'Last
            Case SchedulerStringId.Caption_MappingsValidation : Return "映射验证"   'Mappings Validation
            Case SchedulerStringId.Caption_MappingsWizard : Return "映射向导..."   'Mappings Wizard...
            Case SchedulerStringId.Caption_MemoPrintStyle : Return "备忘录风格"   'Memo Style
            Case SchedulerStringId.Caption_ModifyAppointmentDependencyMappingsTransactionDescription : Return "修改约会依存关系映射"   'Modify Appointment Dependency Mappings
            Case SchedulerStringId.Caption_ModifyAppointmentDependencyStorageTransactionDescription : Return "修改 AppointmentDependency 存储"   'Modify AppointmentDependency Storage
            Case SchedulerStringId.Caption_ModifyAppointmentMappingsTransactionDescription : Return "修改约会映射"   'Modify Appointment Mappings
            Case SchedulerStringId.Caption_ModifyAppointmentStorageTransactionDescription : Return "修改存储约会"   'Modify Appointment Storage
            Case SchedulerStringId.Caption_ModifyResourceMappingsTransactionDescription : Return "修改资源映射"   'Modify Resource Mappings
            Case SchedulerStringId.Caption_ModifyResourceStorageTransactionDescription : Return "修改资源存储"   'Modify Resource Storage
            Case SchedulerStringId.Caption_MonthlyPrintStyle : Return "月风格"   'Monthly Style
            Case SchedulerStringId.Caption_MonthViewDescription : Return "切换到月 (多周) 视图。日历视图用于长期的计划。"   'Switches to Month (Multi-Week) view. Calendar view useful for long-term plans.
            Case SchedulerStringId.Caption_NAppointmentsAreSelected : Return "{0} 日程安排已经选定"   '{0} appointments are selected
            Case SchedulerStringId.Caption_NextAppointment : Return "下一个约会"   'Next Appointment
            Case SchedulerStringId.Caption_NextVisibleResources : Return "下一步"   'Next
            Case SchedulerStringId.Caption_NextVisibleResourcesPage : Return "下页"   'Next Page
            Case SchedulerStringId.Caption_NoneRecurrence : Return "(none)"   '(none)
            Case SchedulerStringId.Caption_OnScreenResources : Return "屏幕上的资源"   'OnScreen resources
            Case SchedulerStringId.Caption_OutOfOffice : Return "不在办公室"   'Out Of Office
            Case SchedulerStringId.Caption_PleaseSeeAbove : Return "请看上面"   'Please see above
            Case SchedulerStringId.Caption_PrevAppointment : Return "上一个约会"   'Previous Appointment
            Case SchedulerStringId.Caption_PrevVisibleResources : Return "上一页"   'Previous
            Case SchedulerStringId.Caption_PrevVisibleResourcesPage : Return "前一页"   'Previous Page
            Case SchedulerStringId.Caption_ReadOnly : Return "[只读]"   ' [Read only]
            Case SchedulerStringId.Caption_Recurrence : Return "循环:"   'Recurrence:
            Case SchedulerStringId.Caption_RecurrenceEndTime : Return "结束时间:"   'End:
            Case SchedulerStringId.Caption_RecurrenceLocation : Return "地点:"   'Location:
            Case SchedulerStringId.Caption_RecurrencePattern : Return "循环模式:"   'Recurrence Pattern:
            Case SchedulerStringId.Caption_RecurrenceShowTimeAs : Return "显示时间为:"   'Show Time As:
            Case SchedulerStringId.Caption_RecurrenceStartTime : Return "起始时间:"   'Start:
            Case SchedulerStringId.Caption_RecurrenceSubject : Return "主题:"   'Subject:
            Case SchedulerStringId.Caption_Reminder : Return "{0} 提醒者"   '{0} Reminder
            Case SchedulerStringId.Caption_Reminders : Return "{0} 提醒者"   '{0} Reminders
            Case SchedulerStringId.Caption_ResourceAll : Return "(All)"   '(All)
            Case SchedulerStringId.Caption_ResourceNone : Return "(None)"   '(None)
            Case SchedulerStringId.Caption_SetupAppointmentDependencyStorage : Return "设置依赖项存储"   'Setup Dependency Storage
            Case SchedulerStringId.Caption_SetupAppointmentMappings : Return "安装程序任命映射"   'Setup Appointment Mappings
            Case SchedulerStringId.Caption_SetupAppointmentStorage : Return "安装程序任命存储"   'Setup Appointment Storage
            Case SchedulerStringId.Caption_SetupDependencyMappings : Return "安装程序依赖项映射"   'Setup Dependency Mappings
            Case SchedulerStringId.Caption_SetupResourceMappings : Return "设置资源映射"   'Setup Resource Mappings
            Case SchedulerStringId.Caption_SetupResourceStorage : Return "设置资源的存储"   'Setup Resource Storage
            Case SchedulerStringId.Caption_ShadingApplyToAllDayArea : Return "全天范围"   'All Day Area
            Case SchedulerStringId.Caption_ShadingApplyToAppointments : Return "日程安排"   'Appointments
            Case SchedulerStringId.Caption_ShadingApplyToAppointmentStatuses : Return "日程安排状态"   'Appointment statuses
            Case SchedulerStringId.Caption_ShadingApplyToCells : Return "单元"   'Cells
            Case SchedulerStringId.Caption_ShadingApplyToHeaders : Return "头部"   'Headers
            Case SchedulerStringId.Caption_ShadingApplyToTimeRulers : Return "时间标尺"   'Time Rulers
            Case SchedulerStringId.Caption_SplitAppointment : Return "拆分"   'Split
            Case SchedulerStringId.Caption_StartTime : Return "开始时间: {0}"   'Start time: {0}
            Case SchedulerStringId.Caption_Tentative : Return "暂时"   'Tentative
            Case SchedulerStringId.Caption_TimelineViewDescription : Return "切换到时间线视图。绘制时间的任命。"   'Switches to Timeline view. Plots appointments in relation to time.
            Case SchedulerStringId.Caption_TrifoldPrintStyle : Return "三重风格 Style"   'Tri-fold Style
            Case SchedulerStringId.Caption_UntitledAppointment : Return "无标题"   'Untitled
            Case SchedulerStringId.Caption_VisibleResources : Return "可见资源"   'Visible resources
            Case SchedulerStringId.Caption_WeekDaysEveryDay : Return "日"   'Day
            Case SchedulerStringId.Caption_WeekDaysWeekendDays : Return "周末"   'Weekend day
            Case SchedulerStringId.Caption_WeekDaysWorkDays : Return "周日"   'Weekday
            Case SchedulerStringId.Caption_WeeklyPrintStyle : Return "周风格"   'Weekly Style
            Case SchedulerStringId.Captio

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值