Table of Contents

Class MachiningToolHouse

Namespace
Hi.Machining
Assembly
HiMech.dll

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 XElement

XML

baseDirectory string

Base directory path for resolving relative paths

relFile string

Relative file path

Properties

XName

Name for XML IO.

public static string XName { get; }

Property Value

string

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 string

The base directory for resolving relative paths

relFile string

The 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 int
millingTool IMachiningTool

Exceptions

ArgumentException

throw if toolId has already existed.