I need an assignment dialog that is similar to what is built in; some fields will stay and others will be replaced. Recurrence is needed. It seems that I can either create my own dialog or customize the built in dialog. I'm not yet sure which way to go, but the second option seems like less work.
All links I have seen on customizing the built in dialog don't work. Can someone point me to information on doing this?
If I create my own dialogs, will I be able to use the appointment prompting? Or will I need to handle that as well?
I have a related question which may also affect my decision on which method to use. Can the built in appointment and recurrence dialogs be translated? Will they respond to change in culture and language in the operating system?
Thanks!
RoseAquila said:Can the built in appointment and recurrence dialogs be translated? Will they respond to change in culture and language in the operating system?
Thanks. So, are the translations built in? Or do I need to get translations?
Hi Rose,
Could you please clarify the scenario? Are the names of the days and months supposed to change with the user's language selection?
In that case, you could update the CurrentCulture when the user makes the language selection. Set a variable (selectedLanguage) to the user's language selection locale code. Then add the following code to the event that fires when the language selection is changed (for example, OnValueChanged for an UltraCombo).
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo(selectedLanguage);
The form might have to be redrawn at that point.
Elizabeth Albert
Localization Engineer
Hi Elizabeth,
The scenario is that PC has a culture that is specified and the application is not allowed to change it. However, the user can change the language. There is only one tranlsateion per language; there are no current language/culture combinations. When the user chooses a new language, all of the text in the application should change to the new language. The desire is that the days and moths change at that time.
Jsut to complete hte picture, the way I handled other Infragistic translation, is to keep a copy in the application and then assign the application's string to the Infragistics' string using
Infragistics.Win.UltraWinSchedule.
Resources.Customizer.SetCustomizedString().
So, is there a way to translate the days and months without changing the culture?
Thanks,
Rose
Hello Rose,
Thank you for explaining the situation.
You can translate the days and months by using code similar to the following.
private void customizeDaysMonths() { ultraCalendarInfo1.DaysOfWeek[System.DayOfWeek.Monday].LongDescription = "月曜日"; ultraCalendarInfo1.DaysOfWeek[System.DayOfWeek.Monday].ShortDescription = "月"; ultraCalendarInfo1.MonthsOfYear[6].LongDescription = "6 月"; ultraCalendarInfo1.MonthsOfYear[Infragistics.Win. UltraWinSchedule.YearMonthEnum.June].ShortDescription = "6 月";
}
You can set both the LongDescription or ShortDescription of the day or month name. Either the enumeration or the index can be used to set the month name.
I tried this with an UltraMonthViewSingle whose CalendarInfo property was set to ultraCalendarInfo1. I attached a screenshot of what it looked like after calling customizeDaysMonths() in the Form1 constructor.
I hope that this is helpful. Please let me know if there's anything else.
This was very helpful! It works great!
I have 2 other questions.
1) Where can I find some of the text for informational dialog boxes? For instance, I get a message that says "Some months have fewer than xx days. For these months, the occurrence will fall on the last day of the month/" and xx is 30, 31, etc. IT doesn' not seem to be in the WinSchedule resource string file.
2) I know this is the WinForm forum, but I thought you might be able to help. Where do the day and month string for the XamMonthCalendar?
1. The informational dialog boxes should be available in the WinSchedule resource file. I checked the source code that I have access to, and found it under the following key:
LD_P_RecurrenceDialog_PatternDayOfMonthExceeds28
Could you please check for that resource?
"Some months have fewer than {0} days. For these months, the occurrence will fall on the last day of the month."
The {0} is the xx that you referred to.
If this resource is not included in the source code that can be downloaded, I'll follow up with my coworkers to find out why we do not include it.
2. For the XamMonthCalendar, please refer to this post. If you have the same requirements (not to base the names of the days and months on the culture), then that should be submitted as a feature request.
Elizabeth,
For item 1, the string does indeed exist, but it does not even appear in the list of resource strings for WInSchedule. It makes me wonder what other strings I need, but I guess I will just have to find them one at a time.
Thanks for pointing it out.
I will check on item 2 as soon as I can.
Thanks again!