Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
141111 | Nov 24,2018 01:21 PM UTC | Nov 29,2018 09:10 AM UTC | WinForms | 7 |
![]() |
Tags: ScheduleControl |
Hi,
Can anybody be so kind to help me out with the issue
that I have with localization of Appointment Form which is part of the Schedule
control? As you can see from the picture shown I would like to localize the
part inside the red square.
But I don't know how to actually implement it. Can
anybody help me with the implementation? Maybe you have some example (visual
basic) that may help me out?
Thanks!
Public Overrides Sub InitLists()
MyBase.InitLists()
_list = New ListObjectList From {
New ListObject(0, Resource1.RecurrenceLabelNone, Color.Black),
New ListObject(1, Resource1.RecurrenceLabelImportant, Color.Red),
… |
Dim scheduleProvider As ArrayListDataProvider
scheduleProvider = New CustomArrayListDataProvider With {.MasterList = New ArrayListAppointmentList(), .FileName = "default.XML"}
Me.scheduleControl1.DataSource = scheduleProvider |
Public Shared Function LoadCustomXml(ByVal filename As String) As CustomArrayListDataProvider
Dim customArrayListDataProvider As CustomArrayListDataProvider = Nothing
Dim s As Stream = File.OpenRead(filename)
Try
Dim serializer As New XmlSerializer(GetType(CustomArrayListDataProvider))
customArrayListDataProvider = TryCast(serializer.Deserialize(s), CustomArrayListDataProvider)
If customArrayListDataProvider IsNot Nothing Then
customArrayListDataProvider.MasterList = New ArrayListAppointmentList()
If customArrayListDataProvider.MasterListArray IsNot Nothing AndAlso customArrayListDataProvider.MasterListArray.GetLength(0) > 0 Then
customArrayListDataProvider.MasterList.GetList().AddRange(customArrayListDataProvider.MasterListArray)
End If
If customArrayListDataProvider.RecurringListArray IsNot Nothing AndAlso customArrayListDataProvider.RecurringListArray.GetLength(0) > 0 Then
CType(customArrayListDataProvider.RecurringList, ArrayListAppointmentList).GetList().AddRange(customArrayListDataProvider.RecurringListArray)
End If
End If
Finally
s.Close()
End Try
Return customArrayListDataProvider
End Function
Public Overrides Sub SaveXML(ByVal fileName As String)
PreprocessListsBeforeWrite()
Dim serializer As New XmlSerializer(GetType(CustomArrayListDataProvider))
Dim writer As TextWriter = New StreamWriter(fileName)
serializer.Serialize(writer, Me)
writer.Close()
End Sub |
I have a question regarding the use of XML file when I operate with a big data quantity. Is it reliable to use XML file or maybe is MS Access database better choice? If that is the case, do I get a conflict with localization like in previous cases with XML data file? |
No, you will not get the conflict. You will get the localized text when you use the CustomArrayListDataProvider to save in database. You need to write your own logics to save/load from database
Refer the following Forum to work with database and ScheduleControl,
|
After all changes in the code this highlighted part stays untranslated |
At present the Start and End time cannot be localized. We have logged an improvement feature to implement the ability to localize the remaining text in the Schedule Appointment Form and it will be available in any of our upcoming releases. |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.