public Dictionary<string, string> CheckForStyleFile(string username)
{
StyleModel defaultStyle = new()
{
BackgroundColor = "#000000",
BorderColor = "#24de45",
FontColor = "#CDCDCD"
};
Dictionary<string, string> defaultDict = new();
defaultDict.Add("background", defaultStyle.BackgroundColor);
defaultDict.Add("border", defaultStyle.BorderColor);
defaultDict.Add("font", defaultStyle.FontColor);
try
{
if (!File.Exists(_stylesFile))
{
var data = JsonSerializer.Serialize(defaultDict);
File.AppendAllText(_stylesFile, data);
return defaultDict;
}
else
{
if (username.Length == 0)
{
return defaultDict;
}
}
}
}
public Dictionary<string, string> CheckForStyleFile(string username)
{
StyleModel defaultStyle = new()
{
BackgroundColor = "#000000",
BorderColor = "#24de45",
FontColor = "#CDCDCD"
};
Dictionary<string, string> defaultDict = new();
defaultDict.Add("background", defaultStyle.BackgroundColor);
defaultDict.Add("border", defaultStyle.BorderColor);
defaultDict.Add("font", defaultStyle.FontColor);
try
{
if (!File.Exists(_stylesFile))
{
var data = JsonSerializer.Serialize(defaultDict);
File.AppendAllText(_stylesFile, data);
return defaultDict;
}
else
{
if (username.Length == 0)
{
return defaultDict;
}
}
}
}