aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml.cs
diff options
context:
space:
mode:
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.cs61
1 files changed, 0 insertions, 61 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 dad105a43..14593327b 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
@@ -25,72 +25,11 @@ namespace Tango.MachineStudio.HardwareDesigner.Views
{
private MainViewVM _vm;
- public DraggingSurface DraggingSurface
- {
- get { return (DraggingSurface)GetValue(DraggingSurfaceProperty); }
- set { SetValue(DraggingSurfaceProperty, value); }
- }
- public static readonly DependencyProperty DraggingSurfaceProperty =
- DependencyProperty.Register("DraggingSurface", typeof(DraggingSurface), typeof(MainView), new PropertyMetadata(null));
-
public MainView()
{
InitializeComponent();
- DraggingSurface = dragSufrace;
Loaded += (x, y) => _vm = DataContext as MainViewVM;
}
-
- private void OnMotorsDrop(object sender, DropEventArgs e)
- {
- if (e.Draggable.DataContext is HardwareMotorType)
- {
- _vm.OnMotorDrop(e.Draggable.DataContext as HardwareMotorType);
- }
- }
-
- private void OnDancerDrop(object sender, DropEventArgs e)
- {
- if (e.Draggable.DataContext is HardwareDancerType)
- {
- _vm.OnDropDancer(e.Draggable.DataContext as HardwareDancerType);
- }
- }
-
- private void OnPidControlDrop(object sender, DropEventArgs e)
- {
- if (e.Draggable.DataContext is HardwarePidControlType)
- {
- _vm.OnDropPidControl(e.Draggable.DataContext as HardwarePidControlType);
- }
- }
-
- private void OnDropWinder(object sender, DropEventArgs e)
- {
- if (e.Draggable.DataContext is HardwareWinderType)
- {
- _vm.OnDropWinder(e.Draggable.DataContext as HardwareWinderType);
- }
- }
-
- private void OnTrashDrop(object sender, DropEventArgs e)
- {
- if (e.Draggable.DataContext is HardwareMotor)
- {
- _vm.OnRemoveMotor(e.Draggable.DataContext as HardwareMotor);
- }
- else if (e.Draggable.DataContext is HardwareDancer)
- {
- _vm.OnRemoveDancer(e.Draggable.DataContext as HardwareDancer);
- }
- else if (e.Draggable.DataContext is HardwarePidControl)
- {
- _vm.OnRemovePidControl(e.Draggable.DataContext as HardwarePidControl);
- }
- else if (e.Draggable.DataContext is HardwareWinder)
- {
- _vm.OnRemoveWinder(e.Draggable.DataContext as HardwareWinder);
- }
- }
}
}