ayy lmao
This commit is contained in:
parent
abbe94a72c
commit
3b1afdf2c0
92 changed files with 23248 additions and 0 deletions
157
CatalogLib/PicSettings.cs
Normal file
157
CatalogLib/PicSettings.cs
Normal file
|
|
@ -0,0 +1,157 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CatalogLib
|
||||
{
|
||||
public class PicSettings
|
||||
{
|
||||
//TODO: Singleton
|
||||
|
||||
private Dictionary<string, object> _settingsDict = new Dictionary<string, object>();
|
||||
|
||||
|
||||
public PicSettings()
|
||||
{
|
||||
SetDefaults();
|
||||
}
|
||||
|
||||
public void Set(string key, object value)
|
||||
{
|
||||
if (_settingsDict.ContainsKey(key))
|
||||
{
|
||||
_settingsDict[key] = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
_settingsDict.Add(key,value);
|
||||
}
|
||||
}
|
||||
|
||||
public bool Exists(string key)
|
||||
{
|
||||
return _settingsDict.ContainsKey(key);
|
||||
}
|
||||
|
||||
public int GetInt(string key)
|
||||
{
|
||||
return _settingsDict.ContainsKey(key) ? (int) _settingsDict[key] : 0;
|
||||
}
|
||||
|
||||
public string GetString(string key)
|
||||
{
|
||||
return _settingsDict.ContainsKey(key) ? (string) _settingsDict[key] : string.Empty;
|
||||
}
|
||||
|
||||
public bool GetBool(string key)
|
||||
{
|
||||
return _settingsDict.ContainsKey(key) && (bool) _settingsDict[key];
|
||||
}
|
||||
|
||||
public void SetBool(string key, bool value)
|
||||
{
|
||||
if (_settingsDict.ContainsKey(key))
|
||||
{
|
||||
_settingsDict[key] = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
_settingsDict.Add(key, value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public object GetObject(string key)
|
||||
{
|
||||
return _settingsDict.ContainsKey(key) ? _settingsDict[key] : null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void SetDefaults()
|
||||
{
|
||||
Set("dirSorgente",string.Empty);
|
||||
Set("dirDestinazione",string.Empty);
|
||||
Set("dirAggiornaSottodirectory", false);
|
||||
Set("dirCreaSottoCartelle",false);
|
||||
//Set();
|
||||
}
|
||||
|
||||
public bool Grassetto
|
||||
{
|
||||
get { return GetBool("Grassetto"); }
|
||||
set { SetBool("Grassetto", value);}
|
||||
}
|
||||
|
||||
public string IlFont //todo
|
||||
{
|
||||
get { return GetString(""); }
|
||||
set { }
|
||||
}
|
||||
|
||||
public bool TestoMin //todo
|
||||
{
|
||||
get { return false; }
|
||||
set { }
|
||||
}
|
||||
|
||||
public bool AggTempoGaraMin //todo
|
||||
{
|
||||
get { return false; }
|
||||
set { }
|
||||
}
|
||||
|
||||
public bool UsaTempoGaraTestoApplicare //todo
|
||||
{
|
||||
get { return false; }
|
||||
set { }
|
||||
}
|
||||
|
||||
public bool AggNumTempMin //todo
|
||||
{
|
||||
get { return false; }
|
||||
set { }
|
||||
}
|
||||
|
||||
public bool CreaMiniature //todo
|
||||
{
|
||||
get { return false; }
|
||||
set { }
|
||||
}
|
||||
|
||||
public bool AggiungiScritteMiniature
|
||||
{
|
||||
get { return false; }
|
||||
set { }
|
||||
}
|
||||
|
||||
public string Suffisso
|
||||
{
|
||||
get { return string.Empty; }
|
||||
set { }
|
||||
}
|
||||
|
||||
public string Codice
|
||||
{
|
||||
get { return null; }
|
||||
set {}
|
||||
}
|
||||
|
||||
public int Trasparenza
|
||||
{
|
||||
get { return 0; }
|
||||
}
|
||||
|
||||
public bool Posizione
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue