45 lines
1.5 KiB
C#
45 lines
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Xml.Linq;
|
|
|
|
namespace UnvisableComponents
|
|
{
|
|
public class ExcelInfo<T> where T: class
|
|
{
|
|
private string path;
|
|
private string title;
|
|
private List<T> dates;
|
|
private Dictionary<string, (List<string>, List<int>)> fields = new Dictionary<string, (List<string>, List<int>)>();
|
|
public string Path { get { return path; } set { path = value; } }
|
|
public string Title { get { return title; } set { title = value; } }
|
|
public List<T> Dates { get { return dates; } set { dates = value; } }
|
|
public Dictionary<string, (List<string>, List<int>)> Filds { get { return fields; } }
|
|
public void addDictionary(string name, string field, int height)
|
|
{
|
|
if (fields.ContainsKey(name))
|
|
{
|
|
fields[name].Item1.Add(field);
|
|
fields[name].Item2.Add(height);
|
|
}
|
|
else
|
|
{
|
|
fields.Add(name, (new List<string>(), new List<int>()));
|
|
fields[name].Item1.Add(field);
|
|
fields[name].Item2.Add(height);
|
|
}
|
|
}
|
|
public void addDictionaryAlone(string field, int height)
|
|
{
|
|
|
|
fields.Add(field, (new List<string>(), new List<int>()));
|
|
fields[field].Item1.Add(field);
|
|
fields[field].Item2.Add(height);
|
|
|
|
}
|
|
public ExcelInfo() { }
|
|
}
|
|
}
|