Class MachiningToolHouse
Tool House.
public class MachiningToolHouse : Dictionary<int, IMachiningTool>, IDictionary<int, IMachiningTool>, ICollection<KeyValuePair<int, IMachiningTool>>, IReadOnlyDictionary<int, IMachiningTool>, IReadOnlyCollection<KeyValuePair<int, IMachiningTool>>, IEnumerable<KeyValuePair<int, IMachiningTool>>, IDictionary, ICollection, IEnumerable, IDeserializationCallback, ISerializable, IMakeXmlSource
- Inheritance
-
MachiningToolHouse
- Implements
- Inherited Members
- Extension Methods
Constructors
MachiningToolHouse()
Ctor.
public MachiningToolHouse()
MachiningToolHouse(XElement, string, string)
Ctor.
public MachiningToolHouse(XElement src, string baseDirectory, string relFile)
Parameters
src
XElementXML
baseDirectory
stringBase directory path for resolving relative paths
relFile
stringRelative file path
Properties
XName
Name for XML IO.
public static string XName { get; }
Property Value
Methods
CreateStickMillingTool()
Create a new Tool for UI. The tool ID is 1 if no tool existed; otherwise, the tool ID is the max tool ID plus 1.
public KeyValuePair<int, StickMachiningTool> CreateStickMillingTool()
Returns
- KeyValuePair<int, StickMachiningTool>
the generated tool id and the generated tool
MakeXmlSource(string, string)
Creates an XML representation of the object. This method may also generate additional resources such as related files.
public XElement MakeXmlSource(string baseDirectory, string relFile)
Parameters
baseDirectory
stringThe base directory for resolving relative paths
relFile
stringThe relative file path for the XML source
Returns
- XElement
An XML element representing the object's state
SetToolId(int, IMachiningTool)
the function Typically used if the tool has already in the tool house.
public void SetToolId(int toolId, IMachiningTool millingTool)
Parameters
toolId
intmillingTool
IMachiningTool
Exceptions
- ArgumentException
throw if
toolId
has already existed.