mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DatItemKV] Add more stuff to it
This commit is contained in:
@@ -9,6 +9,8 @@ namespace SabreTools.Helper
|
|||||||
// Private instance variables
|
// Private instance variables
|
||||||
private string _name;
|
private string _name;
|
||||||
private NameValueCollection _attributes;
|
private NameValueCollection _attributes;
|
||||||
|
private NameValueCollection _machineAttributes;
|
||||||
|
private NameValueCollection _machineElements;
|
||||||
|
|
||||||
// Public instance variables
|
// Public instance variables
|
||||||
public string Name
|
public string Name
|
||||||
@@ -39,6 +41,8 @@ namespace SabreTools.Helper
|
|||||||
{
|
{
|
||||||
_name = name;
|
_name = name;
|
||||||
_attributes = new NameValueCollection();
|
_attributes = new NameValueCollection();
|
||||||
|
_machineAttributes = new NameValueCollection();
|
||||||
|
_machineElements = new NameValueCollection();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Comparison methods
|
// Comparison methods
|
||||||
@@ -135,5 +139,47 @@ namespace SabreTools.Helper
|
|||||||
{
|
{
|
||||||
return _attributes.GetValues(index);
|
return _attributes.GetValues(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void MachineAttributesAdd(string name, string value)
|
||||||
|
{
|
||||||
|
_machineAttributes.Add(name, value);
|
||||||
|
}
|
||||||
|
public string MachineAttributesGet(string name)
|
||||||
|
{
|
||||||
|
return _attributes.Get(name);
|
||||||
|
}
|
||||||
|
public string MachineAttributesGet(int index)
|
||||||
|
{
|
||||||
|
return _attributes.Get(index);
|
||||||
|
}
|
||||||
|
public string[] MachineAttributesGetValues(string name)
|
||||||
|
{
|
||||||
|
return _attributes.GetValues(name);
|
||||||
|
}
|
||||||
|
public string[] MachineAttributesGetValues(int index)
|
||||||
|
{
|
||||||
|
return _attributes.GetValues(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void MachineElementsAdd(string name, string value)
|
||||||
|
{
|
||||||
|
_machineAttributes.Add(name, value);
|
||||||
|
}
|
||||||
|
public string MachineElementsGet(string name)
|
||||||
|
{
|
||||||
|
return _attributes.Get(name);
|
||||||
|
}
|
||||||
|
public string MachineElementsGet(int index)
|
||||||
|
{
|
||||||
|
return _attributes.Get(index);
|
||||||
|
}
|
||||||
|
public string[] MachineElementsGetValues(string name)
|
||||||
|
{
|
||||||
|
return _attributes.GetValues(name);
|
||||||
|
}
|
||||||
|
public string[] MachineElementsGetValues(int index)
|
||||||
|
{
|
||||||
|
return _attributes.GetValues(index);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user