aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-01-04 15:26:21 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-01-04 15:26:21 +0200
commit6900c4dea48adb484efc9648e081b7b3f75bd60c (patch)
tree78cebaa7e24d9c36b14d25c35f5679403e5b1ce3 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml.cs
parent0681c34b56580e3c5c37d95bf1c3f948d95c2302 (diff)
downloadTango-6900c4dea48adb484efc9648e081b7b3f75bd60c.tar.gz
Tango-6900c4dea48adb484efc9648e081b7b3f75bd60c.zip
Progress on Machine Designer..
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml.cs32
1 files changed, 30 insertions, 2 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml.cs
index 97412178e..ebf45624d 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
@@ -29,7 +30,10 @@ namespace Tango.MachineStudio.MachineDesigner.Views
{
InitializeComponent();
DraggingSurface = dragSufrace;
- this.Loaded += (x, y) => _vm = DataContext as MainViewVM;
+ this.Loaded += (x, y) =>
+ {
+ _vm = DataContext as MainViewVM;
+ };
}
public DraggingSurface DraggingSurface
@@ -40,7 +44,7 @@ namespace Tango.MachineStudio.MachineDesigner.Views
public static readonly DependencyProperty DraggingSurfaceProperty =
DependencyProperty.Register("DraggingSurface", typeof(DraggingSurface), typeof(MainView), new PropertyMetadata(null));
- private void OnDroppedDispenser(object sender, DropEventArgs e)
+ private void OnDropOnIdsPack(object sender, DropEventArgs e)
{
if (e.Draggable.DataContext is Dispenser)
{
@@ -59,5 +63,29 @@ namespace Tango.MachineStudio.MachineDesigner.Views
_vm.DropMidTankType(e.Draggable.DataContext as MidTankType, e.Droppable.DataContext as IdsPack);
}
}
+
+ private void OnTabletDrop(object sender, DropEventArgs e)
+ {
+ if (e.Draggable.DataContext is ApplicationDisplayPanelVersion)
+ {
+ _vm.DropTouchPanel(e.Draggable.DataContext as ApplicationDisplayPanelVersion);
+ }
+ else if (e.Draggable.DataContext is ApplicationVersion)
+ {
+ _vm.DropApplicationVersion(e.Draggable.DataContext as ApplicationVersion);
+ }
+ }
+
+ private void OnEmbeddedDrop(object sender, DropEventArgs e)
+ {
+ if (e.Draggable.DataContext is EmbeddedFirmwareVersion)
+ {
+ _vm.DropEmbeddedFirmware(e.Draggable.DataContext as EmbeddedFirmwareVersion);
+ }
+ else if (e.Draggable.DataContext is EmbeddedSoftwareVersion)
+ {
+ _vm.DropEmbeddedSoftware(e.Draggable.DataContext as EmbeddedSoftwareVersion);
+ }
+ }
}
}