diff options
| author | Roy <roy.mail.net@gmail.com> | 2018-02-11 21:11:52 +0200 |
|---|---|---|
| committer | Roy <roy.mail.net@gmail.com> | 2018-02-11 21:11:52 +0200 |
| commit | a801f688bde7b6c75f47ca4ebd2991271c521d34 (patch) | |
| tree | b87d7d5e29d535ed275c5f5671e46cf7658d1de7 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ThreadMotionItem.cs | |
| parent | cfc74df6e4c6dd375c4cad44ce7f300b90eb8f7e (diff) | |
| download | Tango-a801f688bde7b6c75f47ca4ebd2991271c521d34.tar.gz Tango-a801f688bde7b6c75f47ca4ebd2991271c521d34.zip | |
Implemented Thread Motion Tech Item.
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 | 64 |
1 files changed, 64 insertions, 0 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 new file mode 100644 index 000000000..04b71ac8c --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ThreadMotionItem.cs @@ -0,0 +1,64 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Media; +using System.Xml.Serialization; +using Tango.SharedUI.Helpers; + +namespace Tango.MachineStudio.Technician.TechItems +{ + public class ThreadMotionItem : TechItem + { + 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; + public double Speed + { + get { return _speed; } + set { _speed = value; RaisePropertyChangedAuto(); } + } + + public ThreadMotionItem() : base() + { + Name = "Thread Motion"; + Description = "Thread Motion Controller"; + Image = ResourceHelper.GetImageFromResources("Images/thread.png"); + TechName = Name; + Color = Colors.White; + } + + public ThreadMotionItem(object dummyConst) : this() + { + + } + + public override TechItem Clone() + { + ThreadMotionItem cloned = base.Clone() as ThreadMotionItem; + return cloned; + } + + public void RaiseAction(MotorActionType action) + { + ActionExecuted?.Invoke(this, action); + } + } +} |
