diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-02-14 11:47:21 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-02-14 11:47:21 +0200 |
| commit | 7ed962c7206817556e790d048bca38e4e3caf249 (patch) | |
| tree | 502518f28704c7180354d772cc148450b52d658d /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems | |
| parent | 94ac70f0eaf29fcca4ae3ff5552c52cad22df492 (diff) | |
| download | Tango-7ed962c7206817556e790d048bca38e4e3caf249.tar.gz Tango-7ed962c7206817556e790d048bca38e4e3caf249.zip | |
Added code comments for technician module.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems')
13 files changed, 385 insertions, 74 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalInItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalInItem.cs index f6d09ae59..7f1548254 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalInItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalInItem.cs @@ -10,10 +10,17 @@ using Tango.SharedUI.Helpers; namespace Tango.MachineStudio.Technician.TechItems { + /// <summary> + /// Represents a digital input pin item. + /// </summary> + /// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" /> [TechItem(0)] public class DigitalInItem : TechItem { private TechIo _techIo; + /// <summary> + /// Gets or sets the DB tech item. + /// </summary> [XmlIgnore] public TechIo TechIo { @@ -22,6 +29,9 @@ namespace Tango.MachineStudio.Technician.TechItems } private bool _value; + /// <summary> + /// Gets or sets whether the input is on. + /// </summary> [XmlIgnore] public bool Value { @@ -29,6 +39,9 @@ namespace Tango.MachineStudio.Technician.TechItems set { _value = value; RaisePropertyChangedAuto(); } } + /// <summary> + /// Initializes a new instance of the <see cref="DigitalInItem"/> class. + /// </summary> public DigitalInItem() : base() { Name = "Digital In"; @@ -37,11 +50,19 @@ namespace Tango.MachineStudio.Technician.TechItems Color = Colors.White; } + /// <summary> + /// Initializes a new instance of the <see cref="DigitalInItem"/> class. + /// </summary> + /// <param name="techIo">The db tech.</param> public DigitalInItem(TechIo techIo) : this() { TechIo = techIo; } + /// <summary> + /// Clones this instance. + /// </summary> + /// <returns></returns> public override TechItem Clone() { DigitalInItem cloned = base.Clone() as DigitalInItem; diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalOutItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalOutItem.cs index ae8a0a023..2a0625c53 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalOutItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalOutItem.cs @@ -10,12 +10,22 @@ using Tango.SharedUI.Helpers; namespace Tango.MachineStudio.Technician.TechItems { + /// <summary> + /// Represents a digital output pin item. + /// </summary> + /// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" /> [TechItem(1)] public class DigitalOutItem : TechItem { + /// <summary> + /// Occurs when the user has changed the current value. + /// </summary> public event EventHandler<bool> ValueChanged; private TechIo _techIo; + /// <summary> + /// Gets or sets the db tech item. + /// </summary> [XmlIgnore] public TechIo TechIo { @@ -24,6 +34,9 @@ namespace Tango.MachineStudio.Technician.TechItems } private bool _value; + /// <summary> + /// Gets or sets a value indicating whether this <see cref="DigitalOutItem"/> is on. + /// </summary> [XmlIgnore] public bool Value { @@ -32,6 +45,9 @@ namespace Tango.MachineStudio.Technician.TechItems } private bool _effectiveValue; + /// <summary> + /// Gets or sets the effective value received from the embedded device. + /// </summary> [XmlIgnore] public bool EffectiveValue { @@ -48,6 +64,9 @@ namespace Tango.MachineStudio.Technician.TechItems } } + /// <summary> + /// Initializes a new instance of the <see cref="DigitalOutItem"/> class. + /// </summary> public DigitalOutItem() : base() { Name = "Digital Out"; @@ -56,11 +75,19 @@ namespace Tango.MachineStudio.Technician.TechItems Color = Colors.White; } + /// <summary> + /// Initializes a new instance of the <see cref="DigitalOutItem"/> class. + /// </summary> + /// <param name="techIo">The db tech item.</param> public DigitalOutItem(TechIo techIo) : this() { TechIo = techIo; } + /// <summary> + /// Clones this instance. + /// </summary> + /// <returns></returns> public override TechItem Clone() { DigitalOutItem cloned = base.Clone() as DigitalOutItem; diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DispenserItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DispenserItem.cs index 8bb72fc66..e2ab9931d 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DispenserItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DispenserItem.cs @@ -11,13 +11,27 @@ using Tango.SharedUI.Helpers; namespace Tango.MachineStudio.Technician.TechItems { + /// <summary> + /// Represents a dispenser controller item. + /// </summary> + /// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" /> [TechItem(8)] public class DispenserItem : TechItem { + /// <summary> + /// Occurs when the user has pressed one of the action controllers. + /// </summary> public event EventHandler<MotorActionType> ActionExecuted; + + /// <summary> + /// Occurs when dispenser homing has completed. + /// </summary> public event EventHandler HomingCompleted; private TechDispenser _techDispenser; + /// <summary> + /// Gets or sets the db tech dispenser. + /// </summary> [XmlIgnore] public TechDispenser TechDispenser { @@ -26,6 +40,9 @@ namespace Tango.MachineStudio.Technician.TechItems } private bool _isHoming; + /// <summary> + /// Gets or sets a value indicating whether the dispenser is currently homing. + /// </summary> [XmlIgnore] public bool IsHoming { @@ -38,7 +55,10 @@ namespace Tango.MachineStudio.Technician.TechItems } private bool _isHomingCompleted; - + /// <summary> + /// Gets or sets a value indicating whether the dispenser homing has completed. + /// </summary> + [XmlIgnore] public bool IsHomingCompleted { get { return _isHomingCompleted; } @@ -55,6 +75,9 @@ namespace Tango.MachineStudio.Technician.TechItems } private double _homingProgress; + /// <summary> + /// Gets or sets the dispenser current homing progress. + /// </summary> [XmlIgnore] public double HomingProgress { @@ -67,6 +90,9 @@ namespace Tango.MachineStudio.Technician.TechItems } private double _homingMaximumProgress; + /// <summary> + /// Gets or sets the homing maximum progress. + /// </summary> [XmlIgnore] public double HomingMaximumProgress { @@ -74,29 +100,19 @@ namespace Tango.MachineStudio.Technician.TechItems set { _homingMaximumProgress = value; RaisePropertyChangedAuto(); } } - private bool _isForwardPressed; - [XmlIgnore] - public bool IsForwardPressed - { - get { return _isForwardPressed; } - set { _isForwardPressed = value; RaisePropertyChangedAuto(); } - } - - private bool _isBackwardPressed; - [XmlIgnore] - public bool IsBackwardPressed - { - get { return _isBackwardPressed; } - set { _isBackwardPressed = value; RaisePropertyChangedAuto(); } - } - private double _speed; + /// <summary> + /// Gets or sets the dispenser motor speed. + /// </summary> public double Speed { get { return _speed; } set { _speed = value; RaisePropertyChangedAuto(); } } + /// <summary> + /// Initializes a new instance of the <see cref="DispenserItem"/> class. + /// </summary> public DispenserItem() : base() { Name = "Dispenser"; @@ -105,11 +121,19 @@ namespace Tango.MachineStudio.Technician.TechItems Color = Colors.White; } + /// <summary> + /// Initializes a new instance of the <see cref="DispenserItem"/> class. + /// </summary> + /// <param name="techDispenser">The tech dispenser.</param> public DispenserItem(TechDispenser techDispenser) : this() { TechDispenser = techDispenser; } + /// <summary> + /// Clones this instance. + /// </summary> + /// <returns></returns> public override TechItem Clone() { DispenserItem cloned = base.Clone() as DispenserItem; @@ -117,6 +141,10 @@ namespace Tango.MachineStudio.Technician.TechItems return cloned; } + /// <summary> + /// Raises the <see cref="ActionExecuted"/> event with the specified action. + /// </summary> + /// <param name="action">The action.</param> public void RaiseAction(MotorActionType action) { ActionExecuted?.Invoke(this, action); diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MeterItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MeterItem.cs index d7f019fa9..ce90859b2 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MeterItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MeterItem.cs @@ -11,10 +11,17 @@ using Tango.SharedUI.Helpers; namespace Tango.MachineStudio.Technician.TechItems { + /// <summary> + /// Represents an analog style VU meter item. + /// </summary> + /// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" /> [TechItem(3)] public class MeterItem : TechItem { private TechMonitor _techMonitor; + /// <summary> + /// Gets or sets the db tech monitor. + /// </summary> [XmlIgnore] public TechMonitor TechMonitor { @@ -23,6 +30,9 @@ namespace Tango.MachineStudio.Technician.TechItems } private double _value; + /// <summary> + /// Gets or sets the current value. + /// </summary> [XmlIgnore] public double Value { @@ -31,6 +41,9 @@ namespace Tango.MachineStudio.Technician.TechItems } private int _updateInterval; + /// <summary> + /// Gets or sets the minimum update interval. + /// </summary> public int UpdateInterval { get { return _updateInterval; } @@ -38,6 +51,9 @@ namespace Tango.MachineStudio.Technician.TechItems } private int _ledCount; + /// <summary> + /// Gets or sets the amount of LED's. + /// </summary> public int LedCount { get { return _ledCount; } @@ -45,23 +61,34 @@ namespace Tango.MachineStudio.Technician.TechItems } private int _ticksCount; + /// <summary> + /// Gets or sets the amount of meter ticks. + /// </summary> public int TicksCount { get { return _ticksCount; } set { _ticksCount = value; RaisePropertyChangedAuto(); } } - private TickPlacement _tickPlacement; + /// <summary> + /// Gets or sets the ticks placement. + /// </summary> public TickPlacement TickPlacement { get { return _tickPlacement; } set { _tickPlacement = value; RaisePropertyChangedAuto(); } } + /// <summary> + /// Gets or sets the last update time. + /// </summary> [XmlIgnore] public DateTime LastUpdateTime { get; set; } + /// <summary> + /// Initializes a new instance of the <see cref="MeterItem"/> class. + /// </summary> public MeterItem() : base() { Name = "VU Monitor"; @@ -75,11 +102,19 @@ namespace Tango.MachineStudio.Technician.TechItems Color = Colors.DimGray; } + /// <summary> + /// Initializes a new instance of the <see cref="MeterItem"/> class. + /// </summary> + /// <param name="techMonitor">The db tech monitor.</param> public MeterItem(TechMonitor techMonitor) : this() { TechMonitor = techMonitor; } + /// <summary> + /// Clones this instance. + /// </summary> + /// <returns></returns> public override TechItem Clone() { MeterItem cloned = base.Clone() as MeterItem; diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MonitorItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MonitorItem.cs index 987c6cc99..984cd5f78 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MonitorItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MonitorItem.cs @@ -10,10 +10,17 @@ using Tango.SharedUI.Helpers; namespace Tango.MachineStudio.Technician.TechItems { + /// <summary> + /// Represents an analog style integer monitor item. + /// </summary> + /// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" /> [TechItem(2)] public class MonitorItem : TechItem { private TechMonitor _techMonitor; + /// <summary> + /// Gets or sets the db tech monitor. + /// </summary> [XmlIgnore] public TechMonitor TechMonitor { @@ -22,6 +29,9 @@ namespace Tango.MachineStudio.Technician.TechItems } private double _value; + /// <summary> + /// Gets or sets the current value. + /// </summary> [XmlIgnore] public double Value { @@ -30,15 +40,24 @@ namespace Tango.MachineStudio.Technician.TechItems } private int _updateInterval; + /// <summary> + /// Gets or sets the update interval. + /// </summary> public int UpdateInterval { get { return _updateInterval; } set { _updateInterval = value; RaisePropertyChangedAuto(); } } + /// <summary> + /// Gets or sets the last update time. + /// </summary> [XmlIgnore] public DateTime LastUpdateTime { get; set; } + /// <summary> + /// Initializes a new instance of the <see cref="MonitorItem"/> class. + /// </summary> public MonitorItem() : base() { Name = "Monitor"; @@ -49,11 +68,19 @@ namespace Tango.MachineStudio.Technician.TechItems UpdateInterval = 10; } + /// <summary> + /// Initializes a new instance of the <see cref="MonitorItem"/> class. + /// </summary> + /// <param name="techMonitor">The db tech monitor.</param> public MonitorItem(TechMonitor techMonitor) : this() { TechMonitor = techMonitor; } + /// <summary> + /// Clones this instance. + /// </summary> + /// <returns></returns> public override TechItem Clone() { MonitorItem cloned = base.Clone() as MonitorItem; diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MotorActionType.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MotorActionType.cs index 319345926..57dabbbb2 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MotorActionType.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MotorActionType.cs @@ -6,6 +6,9 @@ using System.Threading.Tasks; namespace Tango.MachineStudio.Technician.TechItems { + /// <summary> + /// Represents motor action types. + /// </summary> public enum MotorActionType { ForwardPressed, diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MotorGroupItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MotorGroupItem.cs index 551bf1f0a..143ce9c66 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MotorGroupItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MotorGroupItem.cs @@ -12,13 +12,27 @@ using Tango.SharedUI.Helpers; namespace Tango.MachineStudio.Technician.TechItems { + /// <summary> + /// Represents a motors group item. + /// </summary> + /// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" /> [TechItem(7)] public class MotorGroupItem : TechItem { + /// <summary> + /// Occurs when the user has pressed/released on of the item actions. + /// </summary> public event EventHandler<MotorActionType> ActionExecuted; + + /// <summary> + /// Occurs when motor homing has completed. + /// </summary> public event EventHandler HomingCompleted; private SelectedObjectCollection<TechMotor> _selectedMotors; + /// <summary> + /// Gets or sets the selected db tech motors. + /// </summary> [XmlIgnore] public SelectedObjectCollection<TechMotor> SelectedMotors { @@ -27,6 +41,9 @@ namespace Tango.MachineStudio.Technician.TechItems } private ObservableCollection<TechMotor> _techMotors; + /// <summary> + /// Gets or sets the available db tech motors. + /// </summary> [XmlIgnore] public ObservableCollection<TechMotor> TechMotors { @@ -34,6 +51,9 @@ namespace Tango.MachineStudio.Technician.TechItems set { _techMotors = value; RaisePropertyChangedAuto(); SetSelectedMotors(); } } + /// <summary> + /// Sets the selected motors. + /// </summary> private void SetSelectedMotors() { if (TechMotors != null) @@ -42,18 +62,25 @@ namespace Tango.MachineStudio.Technician.TechItems } } + /// <summary> + /// Gets or sets the selected tech items motors guids. + /// </summary> public List<String> ItemsGuids { get; set; } private String _groupName; - + /// <summary> + /// Gets or sets the name of the group. + /// </summary> public String GroupName { get { return _groupName; } set { _groupName = value; RaisePropertyChangedAuto(); TechName = value; } } - private bool _isHoming; + /// <summary> + /// Gets or sets a value indicating whether this motor group is currently homing. + /// </summary> [XmlIgnore] public bool IsHoming { @@ -66,7 +93,10 @@ namespace Tango.MachineStudio.Technician.TechItems } private bool _isHomingCompleted; - + /// <summary> + /// Gets or sets a value indicating whether this group homing has completed. + /// </summary> + [XmlIgnore] public bool IsHomingCompleted { get { return _isHomingCompleted; } @@ -83,6 +113,9 @@ namespace Tango.MachineStudio.Technician.TechItems } private double _homingProgress; + /// <summary> + /// Gets or sets the current homing progress. + /// </summary> [XmlIgnore] public double HomingProgress { @@ -95,6 +128,9 @@ namespace Tango.MachineStudio.Technician.TechItems } private double _homingMaximumProgress; + /// <summary> + /// Gets or sets the homing maximum progress. + /// </summary> [XmlIgnore] public double HomingMaximumProgress { @@ -102,29 +138,19 @@ namespace Tango.MachineStudio.Technician.TechItems set { _homingMaximumProgress = value; RaisePropertyChangedAuto(); } } - private bool _isForwardPressed; - [XmlIgnore] - public bool IsForwardPressed - { - get { return _isForwardPressed; } - set { _isForwardPressed = value; RaisePropertyChangedAuto(); } - } - - private bool _isBackwardPressed; - [XmlIgnore] - public bool IsBackwardPressed - { - get { return _isBackwardPressed; } - set { _isBackwardPressed = value; RaisePropertyChangedAuto(); } - } - private double _speed; + /// <summary> + /// Gets or sets the motors speed. + /// </summary> public double Speed { get { return _speed; } set { _speed = value; RaisePropertyChangedAuto(); } } + /// <summary> + /// Initializes a new instance of the <see cref="MotorGroupItem"/> class. + /// </summary> public MotorGroupItem() : base() { ItemsGuids = new List<string>(); @@ -136,11 +162,19 @@ namespace Tango.MachineStudio.Technician.TechItems GroupName = "Motor Group"; } + /// <summary> + /// Initializes a new instance of the <see cref="MotorGroupItem"/> class. + /// </summary> + /// <param name="dummyConstructor">does not matter.</param> public MotorGroupItem(object dummyConstructor) : this() { } + /// <summary> + /// Clones this instance. + /// </summary> + /// <returns></returns> public override TechItem Clone() { MotorGroupItem cloned = base.Clone() as MotorGroupItem; @@ -151,6 +185,10 @@ namespace Tango.MachineStudio.Technician.TechItems return cloned; } + /// <summary> + /// Raises the <see cref="ActionExecuted"/> event with the specified action. + /// </summary> + /// <param name="action">The action.</param> public void RaiseAction(MotorActionType action) { ActionExecuted?.Invoke(this, action); diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MotorItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MotorItem.cs index ce668a464..2af7e6490 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MotorItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MotorItem.cs @@ -11,13 +11,27 @@ using Tango.SharedUI.Helpers; namespace Tango.MachineStudio.Technician.TechItems { + /// <summary> + /// Represents a motor controller item. + /// </summary> + /// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" /> [TechItem(6)] public class MotorItem : TechItem { + /// <summary> + /// Occurs when the user has pressed/released on of the item actions. + /// </summary> public event EventHandler<MotorActionType> ActionExecuted; + + /// <summary> + /// Occurs when motor homing has completed. + /// </summary> public event EventHandler HomingCompleted; private TechMotor _techMotor; + /// <summary> + /// Gets or sets the db tech motor. + /// </summary> [XmlIgnore] public TechMotor TechMotor { @@ -26,6 +40,9 @@ namespace Tango.MachineStudio.Technician.TechItems } private bool _isHoming; + /// <summary> + /// Gets or sets a value indicating whether the motor is currently homing. + /// </summary> [XmlIgnore] public bool IsHoming { @@ -38,7 +55,10 @@ namespace Tango.MachineStudio.Technician.TechItems } private bool _isHomingCompleted; - + /// <summary> + /// Gets or sets a value indicating whether the motor homing has completed. + /// </summary> + [XmlIgnore] public bool IsHomingCompleted { get { return _isHomingCompleted; } @@ -55,6 +75,9 @@ namespace Tango.MachineStudio.Technician.TechItems } private double _homingProgress; + /// <summary> + /// Gets or sets the current homing progress. + /// </summary> [XmlIgnore] public double HomingProgress { @@ -67,6 +90,9 @@ namespace Tango.MachineStudio.Technician.TechItems } private double _homingMaximumProgress; + /// <summary> + /// Gets or sets the homing maximum progress. + /// </summary> [XmlIgnore] public double HomingMaximumProgress { @@ -74,29 +100,19 @@ namespace Tango.MachineStudio.Technician.TechItems set { _homingMaximumProgress = value; RaisePropertyChangedAuto(); } } - private bool _isForwardPressed; - [XmlIgnore] - public bool IsForwardPressed - { - get { return _isForwardPressed; } - set { _isForwardPressed = value; RaisePropertyChangedAuto(); } - } - - private bool _isBackwardPressed; - [XmlIgnore] - public bool IsBackwardPressed - { - get { return _isBackwardPressed; } - set { _isBackwardPressed = value; RaisePropertyChangedAuto(); } - } - private double _speed; + /// <summary> + /// Gets or sets the motor speed. + /// </summary> public double Speed { get { return _speed; } set { _speed = value; RaisePropertyChangedAuto(); } } + /// <summary> + /// Initializes a new instance of the <see cref="MotorItem"/> class. + /// </summary> public MotorItem() : base() { Name = "Motor"; @@ -105,11 +121,19 @@ namespace Tango.MachineStudio.Technician.TechItems Color = Colors.White; } + /// <summary> + /// Initializes a new instance of the <see cref="MotorItem"/> class. + /// </summary> + /// <param name="techMotor">The tech motor.</param> public MotorItem(TechMotor techMotor) : this() { TechMotor = techMotor; } + /// <summary> + /// Clones this instance. + /// </summary> + /// <returns></returns> public override TechItem Clone() { MotorItem cloned = base.Clone() as MotorItem; @@ -118,6 +142,10 @@ namespace Tango.MachineStudio.Technician.TechItems return cloned; } + /// <summary> + /// Raises the <see cref="ActionExecuted"/> event with the specified action. + /// </summary> + /// <param name="action">The action.</param> public void RaiseAction(MotorActionType action) { ActionExecuted?.Invoke(this, action); diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs index 65ee521ef..f74a4b02c 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs @@ -10,10 +10,17 @@ using Tango.SharedUI.Helpers; namespace Tango.MachineStudio.Technician.TechItems { + /// <summary> + /// Represents a multi channel real-time graph item. + /// </summary> + /// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" /> [TechItem(5)] public class MultiGraphItem : TechItem { private TechMonitor _techMonitor; + /// <summary> + /// Gets or sets the db tech monitor. + /// </summary> [XmlIgnore] public TechMonitor TechMonitor { @@ -37,9 +44,15 @@ namespace Tango.MachineStudio.Technician.TechItems } } + /// <summary> + /// Gets or sets the item editor. + /// </summary> [XmlIgnore] public MultiGraphElementEditor Editor { get; set; } + /// <summary> + /// Initializes a new instance of the <see cref="MultiGraphItem"/> class. + /// </summary> public MultiGraphItem() : base() { Name = "Multi Channel Graph"; @@ -47,11 +60,19 @@ namespace Tango.MachineStudio.Technician.TechItems Image = ResourceHelper.GetImageFromResources("Images/multi-graph.png"); } + /// <summary> + /// Initializes a new instance of the <see cref="MultiGraphItem"/> class. + /// </summary> + /// <param name="techMonitor">The db tech monitor.</param> public MultiGraphItem(TechMonitor techMonitor) : this() { TechMonitor = techMonitor; } + /// <summary> + /// Clones this instance. + /// </summary> + /// <returns></returns> public override TechItem Clone() { MultiGraphItem cloned = base.Clone() as MultiGraphItem; diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs index 9d44c6a33..9b19f0861 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs @@ -10,10 +10,17 @@ using Tango.SharedUI.Helpers; namespace Tango.MachineStudio.Technician.TechItems { + /// <summary> + /// Represents a single channel real-time graph item. + /// </summary> + /// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" /> [TechItem(4)] public class SingleGraphItem : TechItem { private TechMonitor _techMonitor; + /// <summary> + /// Gets or sets the db tech monitor. + /// </summary> [XmlIgnore] public TechMonitor TechMonitor { @@ -36,9 +43,15 @@ namespace Tango.MachineStudio.Technician.TechItems } } + /// <summary> + /// Gets or sets the item editor. + /// </summary> [XmlIgnore] public SingleGraphElementEditor Editor { get; set; } + /// <summary> + /// Initializes a new instance of the <see cref="SingleGraphItem"/> class. + /// </summary> public SingleGraphItem() : base() { Name = "Single Channel Graph"; @@ -46,11 +59,19 @@ namespace Tango.MachineStudio.Technician.TechItems Image = ResourceHelper.GetImageFromResources("Images/single-graph.png"); } + /// <summary> + /// Initializes a new instance of the <see cref="SingleGraphItem"/> class. + /// </summary> + /// <param name="techMonitor">The db tech monitor.</param> public SingleGraphItem(TechMonitor techMonitor) : this() { TechMonitor = techMonitor; } + /// <summary> + /// Clones this instance. + /// </summary> + /// <returns></returns> public override TechItem Clone() { SingleGraphItem cloned = base.Clone() as SingleGraphItem; diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs index a64cd7908..254c141b6 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs @@ -14,6 +14,10 @@ using System.Reflection; namespace Tango.MachineStudio.Technician.TechItems { + /// <summary> + /// Represents a tech item base class. + /// </summary> + /// <seealso cref="Tango.Core.ExtendedObject" /> [XmlInclude(typeof(DispenserItem))] [XmlInclude(typeof(DigitalOutItem))] [XmlInclude(typeof(MeterItem))] @@ -26,6 +30,9 @@ namespace Tango.MachineStudio.Technician.TechItems [XmlInclude(typeof(DigitalInItem))] public abstract class TechItem : ExtendedObject { + /// <summary> + /// Initializes a new instance of the <see cref="TechItem"/> class. + /// </summary> public TechItem() { ID = Guid.NewGuid().ToString(); @@ -35,6 +42,9 @@ namespace Tango.MachineStudio.Technician.TechItems } private String _description; + /// <summary> + /// Gets or sets the description. + /// </summary> [XmlIgnore] public String Description { @@ -43,6 +53,9 @@ namespace Tango.MachineStudio.Technician.TechItems } private BitmapSource _image; + /// <summary> + /// Gets or sets the image. + /// </summary> [XmlIgnore] public BitmapSource Image { @@ -50,6 +63,9 @@ namespace Tango.MachineStudio.Technician.TechItems set { _image = value; RaisePropertyChangedAuto(); } } + /// <summary> + /// Gets or sets the db adapter. + /// </summary> [XmlIgnore] public ObservablesEntitiesAdapter Adapter { get; set; } @@ -126,6 +142,9 @@ namespace Tango.MachineStudio.Technician.TechItems private String _techName; + /// <summary> + /// Gets or sets the tech item name. + /// </summary> [XmlIgnore] public String TechName { @@ -133,10 +152,15 @@ namespace Tango.MachineStudio.Technician.TechItems set { _techName = value; RaisePropertyChangedAuto(); } } - + /// <summary> + /// Gets or sets the db tech item guid. + /// </summary> public String ItemGuid { get; set; } private Color _color; + /// <summary> + /// Gets or sets the item color. + /// </summary> [XmlIgnore] public Color Color { @@ -150,7 +174,9 @@ namespace Tango.MachineStudio.Technician.TechItems } private int _colorNumber; - + /// <summary> + /// Gets or sets the color number (for XML serialization). + /// </summary> public int ColorNumber { get { return _colorNumber; } @@ -162,7 +188,10 @@ namespace Tango.MachineStudio.Technician.TechItems } } - + /// <summary> + /// Clones this instance. + /// </summary> + /// <returns></returns> public virtual TechItem Clone() { TechItem cloned = Activator.CreateInstance(this.GetType()) as TechItem; @@ -175,6 +204,10 @@ namespace Tango.MachineStudio.Technician.TechItems return cloned; } + /// <summary> + /// Gets the available tech items. + /// </summary> + /// <returns></returns> public static List<TechItem> GetAvailableTechItems() { List<TechItem> items = new List<TechItem>(); @@ -187,6 +220,10 @@ namespace Tango.MachineStudio.Technician.TechItems return items; } + /// <summary> + /// Sets the bounds. + /// </summary> + /// <param name="bounds">The bounds.</param> public void SetBounds(Rect bounds) { Left = bounds.Left; @@ -195,6 +232,10 @@ namespace Tango.MachineStudio.Technician.TechItems Height = bounds.Height; } + /// <summary> + /// Gets the bounds. + /// </summary> + /// <returns></returns> public Rect GetBounds() { return new Rect(Left, Top, Width, Height); diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItemAttribute.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItemAttribute.cs index cd6dfb1ea..fafd00954 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItemAttribute.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItemAttribute.cs @@ -6,10 +6,21 @@ using System.Threading.Tasks; namespace Tango.MachineStudio.Technician.TechItems { + /// <summary> + /// Represents a tech item attribute + /// </summary> + /// <seealso cref="System.Attribute" /> public class TechItemAttribute : Attribute { + /// <summary> + /// Gets or sets the item index. + /// </summary> public int Index { get; set; } + /// <summary> + /// Initializes a new instance of the <see cref="TechItemAttribute"/> class. + /// </summary> + /// <param name="index">The index.</param> public TechItemAttribute(int index) { Index = index; diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ThreadMotionItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ThreadMotionItem.cs index 79ecf9372..a5789377f 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ThreadMotionItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ThreadMotionItem.cs @@ -9,34 +9,31 @@ using Tango.SharedUI.Helpers; namespace Tango.MachineStudio.Technician.TechItems { + /// <summary> + /// Represents a thread motion controller item. + /// </summary> + /// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" /> [TechItem(9)] public class ThreadMotionItem : TechItem { + /// <summary> + /// Occurs when the user has pressed/released on of the item actions. + /// </summary> public event EventHandler<MotorActionType> ActionExecuted; - private bool _isForwardPressed; - [XmlIgnore] - public bool IsForwardPressed - { - get { return _isForwardPressed; } - set { _isForwardPressed = value; RaisePropertyChangedAuto(); } - } - - private bool _isBackwardPressed; - [XmlIgnore] - public bool IsBackwardPressed - { - get { return _isBackwardPressed; } - set { _isBackwardPressed = value; RaisePropertyChangedAuto(); } - } - private double _speed; + /// <summary> + /// Gets or sets the motor speed. + /// </summary> public double Speed { get { return _speed; } set { _speed = value; RaisePropertyChangedAuto(); } } + /// <summary> + /// Initializes a new instance of the <see cref="ThreadMotionItem"/> class. + /// </summary> public ThreadMotionItem() : base() { Name = "Thread Motion"; @@ -46,17 +43,30 @@ namespace Tango.MachineStudio.Technician.TechItems Color = Colors.White; } - public ThreadMotionItem(object dummyConst) : this() + /// <summary> + /// Initializes a new instance of the <see cref="ThreadMotionItem"/> class. + /// </summary> + /// <param name="dummyConstructor">Does not matter.</param> + public ThreadMotionItem(object dummyConstructor) : this() { } + /// <summary> + /// Clones this instance. + /// </summary> + /// <returns></returns> public override TechItem Clone() { ThreadMotionItem cloned = base.Clone() as ThreadMotionItem; + cloned.Speed = Speed; return cloned; } + /// <summary> + /// Raises the <see cref="ActionExecuted"/> event with the specified action. + /// </summary> + /// <param name="action">The action.</param> public void RaiseAction(MotorActionType action) { ActionExecuted?.Invoke(this, action); |
