Class WorkPieceModule
Represents a type that holds a test item and a measure cycle.
Implements
Inherited Members
Namespace: Loehnert.Lisrt.TypeAndResult.LisrtModule
Assembly: Loehnert.Lisrt.TypeAndResult.dll
Syntax
public class WorkPieceModule : LisrtModule, INotifyPropertyChangedEx, ILisrtModule, INotifyPropertyChanged, IHasServiceView
Constructors
WorkPieceModule(TypeDataModule, String)
Initializes a new instance of the WorkPieceModule class. Calls the WorkPieceModule(TypeDataModule, String, Station, IShell, Uri) without a station (null) and gets the IShell by IoC. Gets the Uri for the icon by IoC, with the IconContractName.
Declaration
public WorkPieceModule(TypeDataModule typeDataModule, string name)
Parameters
Type | Name | Description |
---|---|---|
TypeDataModule | typeDataModule | The ILisrtModule that contains the type data. |
String | name | Name of the module. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when |
System.ArgumentNullException | Thrown when |
WorkPieceModule(TypeDataModule, String, Station)
Initializes a new instance of the WorkPieceModule class. Calls the WorkPieceModule(TypeDataModule, String, Station, IShell, Uri) and gets the IShell by IoC. Gets the Uri for the icon by IoC, with the IconContractName.
Declaration
public WorkPieceModule(TypeDataModule typeDataModule, string name, Station station)
Parameters
Type | Name | Description |
---|---|---|
TypeDataModule | typeDataModule | The ILisrtModule that contains the type data. |
String | name | Name of the module. |
Station | station | Test bench station. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when |
System.ArgumentNullException | Thrown when |
WorkPieceModule(TypeDataModule, String, Station, IShell, Uri)
Initializes a new instance of the WorkPieceModule class.
Declaration
public WorkPieceModule(TypeDataModule typeDataModule, string name, Station station, IShell shell, Uri icon = null)
Parameters
Type | Name | Description |
---|---|---|
TypeDataModule | typeDataModule | The ILisrtModule that contains the type data. |
String | name | Name of the module. |
Station | station | Test bench station. |
IShell | shell | Shell for the service window. |
Uri | icon | Icon for the module tree. null for a default icon. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when |
System.ArgumentNullException | Thrown when |
Fields
IconContractName
Contract name for a custom module tree icon. Must be an Uri to an image, icon or XAML file.
Declaration
public const string IconContractName = "WorkPieceIcon"
Field Value
Type | Description |
---|---|
String |
Properties
Icon
Gets the icon for the module.
Declaration
public override Uri Icon { get; }
Property Value
Type | Description |
---|---|
Uri |
Overrides
Station
Gets or sets the station.
Declaration
public Station Station { get; set; }
Property Value
Type | Description |
---|---|
Station |
TreeItem
Gets the tree item view model.
Declaration
public override ITreeItem TreeItem { get; }
Property Value
Type | Description |
---|---|
ITreeItem |
Overrides
WorkPiece
Gets or sets the work piece.
Declaration
[AlsoNotifyFor("Icon")]
public WorkPiece WorkPiece { get; set; }
Property Value
Type | Description |
---|---|
WorkPiece |
Methods
GetNewMeasureCycle()
Gets a new measure cycle and adds them to the WorkPiece.
Declaration
public MeasureCycle GetNewMeasureCycle()
Returns
Type | Description |
---|---|
MeasureCycle | The new measure cycle. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when WorkPiece, Station or TypeData (from the TypeDataModule, given with the constructor) is null. |
RemoveWorkPiece()
Removes the current test item.
Declaration
public WorkPiece RemoveWorkPiece()
Returns
Type | Description |
---|---|
WorkPiece | The removed test item. |
SetWorkPiece(String)
Sets the test item with a new WorkPiece.
Declaration
public void SetWorkPiece(string serialNumber)
Parameters
Type | Name | Description |
---|---|---|
String | serialNumber | Serial number of the test item. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when |
ShowServiceView()
Shows the service window.
Declaration
public void ShowServiceView()
Events
Evaluated
Occurs when a MeasureCycle of the WorkPiece has evaluated.
Declaration
public event EventHandler<EvaluatedEventArgs> Evaluated
Event Type
Type | Description |
---|---|
System.EventHandler<EvaluatedEventArgs> |