47 lines
1017 B
C#
47 lines
1017 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace WebDoorCreator.Core
|
|
{
|
|
public class ConfigItem
|
|
{
|
|
/// <summary>
|
|
/// Nome dell'item
|
|
/// </summary>
|
|
public string Name { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// Tipo dell'item (es: string, int, double, list...)
|
|
/// </summary>
|
|
public string Type { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// Valore dell'item
|
|
/// </summary>
|
|
public string ValString { get; set; } = "";
|
|
|
|
public int ValInt
|
|
{
|
|
get
|
|
{
|
|
int answ = 0;
|
|
int.TryParse(ValString, out answ);
|
|
return answ;
|
|
}
|
|
}
|
|
public double ValDouble
|
|
{
|
|
get
|
|
{
|
|
double answ = 0;
|
|
double.TryParse(ValString, out answ);
|
|
return answ;
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|