aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-02-27 14:25:58 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-02-27 14:25:58 +0200
commit7d61c30b400b62069d1e69893ebe196412b2df2b (patch)
treee0a0655f153972f7db3efb5821d04926f020d489 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml.cs
parent0157053d3ab06d5fbf2777150bb12a9a35bd7368 (diff)
downloadTango-7d61c30b400b62069d1e69893ebe196412b2df2b.tar.gz
Tango-7d61c30b400b62069d1e69893ebe196412b2df2b.zip
Added PID Control.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml.cs
index b06d3bd27..d18a8ac71 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml.cs
@@ -57,6 +57,14 @@ namespace Tango.MachineStudio.HardwareDesigner.Views
}
}
+ private void OnPidControlDrop(object sender, DropEventArgs e)
+ {
+ if (e.Draggable.DataContext is PidControl)
+ {
+ _vm.OnDropPidControl(e.Draggable.DataContext as PidControl);
+ }
+ }
+
private void OnTrashDrop(object sender, DropEventArgs e)
{
if (e.Draggable.DataContext is MotorType)
@@ -67,6 +75,10 @@ namespace Tango.MachineStudio.HardwareDesigner.Views
{
_vm.OnRemoveDancer(e.Draggable.DataContext as DancerType);
}
+ else if (e.Draggable.DataContext is PidControl)
+ {
+ _vm.OnRemovePidControl(e.Draggable.DataContext as PidControl);
+ }
}
}
}