BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
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.
'You can override this method to provide customized drop lists.
Public Overridable Sub InitLists()
labelList = New ListObjectList()
labelList.Add(New ListObject(0, "None", Color.White))
labelList.Add(New ListObject(1, "Important", Color.FromArgb(255, 128, 64)))
labelList.Add(New ListObject(2, "Business", Color.FromArgb(86, 152, 233)))
labelList.Add(New ListObject(3, "Personal", Color.FromArgb(57, 210, 53)))
labelList.Add(New ListObject(4, "Vacation", Color.FromArgb(199, 198, 182)))
labelList.Add(New ListObject(5, "Must Attend", Color.FromArgb(255, 128, 0)))
labelList.Add(New ListObject(6, "Travel Required", Color.FromArgb(0, 255, 255)))
labelList.Add(New ListObject(7, "Needs Preparation", Color.FromArgb(171, 171, 88)))
labelList.Add(New ListObject(8, "Birthday", Color.FromArgb(186, 117, 255)))
labelList.Add(New ListObject(9, "Anniversary", Color.FromArgb(255, 128, 64)))
labelList.Add(New ListObject(10, "Phone Call", Color.FromArgb(255, 128, 64)))
markerList = New ListObjectList()
markerList.Add(New ListObject(0, "Free", Color.FromArgb(50, Color.RoyalBlue)))
markerList.Add(New ListObject(1, "Tentative", Color.FromArgb(255, 206, 206)))
markerList.Add(New ListObject(2, "Busy", Color.FromArgb(0, 0, 242)))
markerList.Add(New ListObject(3, "Out of Office", Color.FromArgb(128, 0, 64)))
reminderList = New ListObjectList()
reminderList.Add(New ListObject(0, "0 minutes", Color.White))
reminderList.Add(New ListObject(1, "5 minutes", Color.White))
reminderList.Add(New ListObject(2, "10 minutes", Color.White))
reminderList.Add(New ListObject(3, "15 minutes", Color.White))
reminderList.Add(New ListObject(4, "30 minutes", Color.White))
reminderList.Add(New ListObject(5, "1 hour", Color.White))
reminderList.Add(New ListObject(6, "2 hours", Color.White))
reminderList.Add(New ListObject(7, "3 hours", Color.White))
reminderList.Add(New ListObject(8, "4 hours", Color.White))
Me.locationList = New ListObjectList()
locationList.Add(New ListObject(0, "", Color.White))
locationList.Add(New ListObject(1, "RoomB", Color.White))
locationList.Add(New ListObject(2, "RoomC", Color.White))
locationList.Add(New ListObject(3, "RoomD", Color.White))
locationList.Add(New ListObject(4, "RoomE", Color.White))
End Sub
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. |