本文整理汇总了C#中System.Collections.Specialized.NameValueCollection.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# System.Collections.Specialized.NameValueCollection.ToString方法的具体用法?C# System.Collections.Specialized.NameValueCollection.ToString怎么用?C# System.Collections.Specialized.NameValueCollection.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Collections.Specialized.NameValueCollection
的用法示例。
在下文中一共展示了System.Collections.Specialized.NameValueCollection.ToString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadOptions
public async void LoadOptions()
{
IncPlaces = Properties.Settings.Default.IncPlacesOptionCalender;
IncPrimaryContact = Properties.Settings.Default.IncPrimaryContactOptionCalender;
IncStatus = Properties.Settings.Default.IncStatusOptionCalender;
IncEmail = Properties.Settings.Default.IncEmailOptionCalender;
IncTelNumbers = Properties.Settings.Default.IncTelNumbersOptionCalender;
IncChanges = Properties.Settings.Default.IncChangesOptionCalender;
IncStartTime = Properties.Settings.Default.IncStartTimeOptionCalender;
IncEventDate = Properties.Settings.Default.IncEventDateOptionCalender;
CalendarEventTypes =new System.Collections.Specialized.NameValueCollection(Properties.Settings.Default.CalendarEventTypes);
var types = await _adminDataUnit.EventTypesRepository.GetAllAsync();
_allEventTypes = new List<EventTypeModel>(types.OrderBy(x => x.Name).Select(x => new EventTypeModel(x)));
var isExist = !string.IsNullOrEmpty(CalendarEventTypes.ToString());
if (!isExist)
{
foreach (var type in _allEventTypes)
{
CalendarEventTypes = new System.Collections.Specialized.NameValueCollection();
CalendarEventTypes.Add("EventType" + type.EventType.ID, "true");
}
}
else
{
foreach (var type in _allEventTypes)
{
var propEventType = CalendarEventTypes["EventType" + type.EventType.ID];
if (propEventType == null)
CreateProperty(type.EventType.ID);
}
}
RefreshEventTypes();
}