|
@@ -70,6 +70,13 @@ namespace KdanCommon.CMSCollection
|
|
return _settingList.FirstOrDefault(s => s.SettingName == settingId);
|
|
return _settingList.FirstOrDefault(s => s.SettingName == settingId);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public async Task<List<ViewerEventBarSetting>> GetPdfEventBarSettings()
|
|
|
|
+ {
|
|
|
|
+ await LoadSettings();
|
|
|
|
+ lock (settingLock)
|
|
|
|
+ return _settingList.Where(s => s is ViewerEventBarSetting).Select(s => s as ViewerEventBarSetting).ToList();
|
|
|
|
+ }
|
|
|
|
+
|
|
public async Task<List<WindowsCardSetting>> GetCardSettings()
|
|
public async Task<List<WindowsCardSetting>> GetCardSettings()
|
|
{
|
|
{
|
|
await LoadSettings();
|
|
await LoadSettings();
|
|
@@ -131,10 +138,13 @@ namespace KdanCommon.CMSCollection
|
|
{
|
|
{
|
|
var jsonString = await result.Content.ReadAsStringAsync();
|
|
var jsonString = await result.Content.ReadAsStringAsync();
|
|
var response = JsonTool.DeserializeJSON<ViewerEventBarSettingResponse>(jsonString);
|
|
var response = JsonTool.DeserializeJSON<ViewerEventBarSettingResponse>(jsonString);
|
|
- if (response != null && response.Data != null && response.Data.Length > 0)
|
|
|
|
|
|
+ if (response != null && response.Data != null)
|
|
{
|
|
{
|
|
- lock (settingLock)
|
|
|
|
- _settingList.Add(response.Data[0]);
|
|
|
|
|
|
+ for (int i = 0; i < response.Data.Length; i++)
|
|
|
|
+ {
|
|
|
|
+ lock (settingLock)
|
|
|
|
+ _settingList.Add(response.Data[i]);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|