Change Settings and About pages
Added Media tab in About Language and notifications settings
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
|
||||
namespace PlantBox.Client.Converters
|
||||
{
|
||||
class JsonCultureInfoConverter : JsonConverter
|
||||
{
|
||||
public override bool CanConvert(Type objectType)
|
||||
{
|
||||
return objectType == typeof(CultureInfo) ? true : false;
|
||||
}
|
||||
|
||||
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
|
||||
{
|
||||
var c = new CultureInfo((string)reader.Value);
|
||||
return c;
|
||||
}
|
||||
|
||||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
{
|
||||
var culture = (CultureInfo)value;
|
||||
|
||||
writer.WriteValue(culture.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user