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/ThreadMotionItem.cs | |
| 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/ThreadMotionItem.cs')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ThreadMotionItem.cs | 44 |
1 files changed, 27 insertions, 17 deletions
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); |
