78 lines
2.7 KiB
C#
78 lines
2.7 KiB
C#
|
namespace COP.Info
|
|||
|
{
|
|||
|
public class ExcelTableInfo
|
|||
|
{
|
|||
|
public string? FilePath { get; set; } = string.Empty;
|
|||
|
public string? DocumentTitle { get; set; } = string.Empty;
|
|||
|
public List<object>? Data { get; set; } = new();
|
|||
|
public Dictionary<string, (List<string>, List<int>)> Properties = new();
|
|||
|
|
|||
|
public ExcelTableInfo(string filePath, string documentTitle, List<object> data, Dictionary<string, (List<string>, List<int>)>? properties)
|
|||
|
{
|
|||
|
FilePath = filePath;
|
|||
|
DocumentTitle = documentTitle;
|
|||
|
Data = data;
|
|||
|
Properties = properties;
|
|||
|
}
|
|||
|
public void addDictionary(string name, string property, int height)
|
|||
|
{
|
|||
|
if (Properties.ContainsKey(name))
|
|||
|
{
|
|||
|
Properties[name].Item1.Add(property);
|
|||
|
Properties[name].Item2.Add(height);
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
Properties.Add(name, (new List<string>(), new List<int>()));
|
|||
|
Properties[name].Item1.Add(property);
|
|||
|
Properties[name].Item2.Add(height);
|
|||
|
}
|
|||
|
}
|
|||
|
public void addDictionaryAlone(string item, int height)
|
|||
|
{
|
|||
|
|
|||
|
Properties.Add(item, (new List<string>(), new List<int>()));
|
|||
|
Properties[item].Item1.Add(item);
|
|||
|
Properties[item].Item2.Add(height);
|
|||
|
|
|||
|
}
|
|||
|
/*public string FilePath { get; set; } = string.Empty;
|
|||
|
public string DocumentTitle { get; set; } = string.Empty;
|
|||
|
public List<MergeInfo> MergeInfo;
|
|||
|
public List<string>? HeaderTitles;
|
|||
|
public List<object>? Data;
|
|||
|
public Dictionary<string, (List<string>, List<int>)> Headers { get; set; }
|
|||
|
public void addDictionary(string name, string header, int height)
|
|||
|
{
|
|||
|
if (headers.ContainsKey(name))
|
|||
|
{
|
|||
|
headers[name].Item1.Add(header);
|
|||
|
headers[name].Item2.Add(height);
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
headers.Add(name, (new List<string>(), new List<int>()));
|
|||
|
headers[name].Item1.Add(header);
|
|||
|
headers[name].Item2.Add(height);
|
|||
|
}
|
|||
|
}
|
|||
|
public void addDictionaryAlone(string header, int height)
|
|||
|
{
|
|||
|
|
|||
|
headers.Add(header, (new List<string>(), new List<int>()));
|
|||
|
headers[header].Item1.Add(header);
|
|||
|
headers[header].Item2.Add(height);
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
public ExcelTableInfo(string filePath, string documentTitle, List<MergeInfo> mergeInfo, List<string> headerTitles, List<object> data)
|
|||
|
{
|
|||
|
FilePath = filePath;
|
|||
|
DocumentTitle = documentTitle;
|
|||
|
MergeInfo = mergeInfo;
|
|||
|
HeaderTitles = headerTitles;
|
|||
|
Data = data;
|
|||
|
}*/
|
|||
|
}
|
|||
|
}
|