aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml.cs23
1 files changed, 23 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml.cs
index e01654243..c1bc9ad4a 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml.cs
@@ -12,6 +12,9 @@ using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
+using Tango.BL.Entities;
+using Tango.DragAndDrop;
+using Tango.MachineStudio.RML.ViewModels;
namespace Tango.MachineStudio.RML.Views
{
@@ -20,9 +23,29 @@ namespace Tango.MachineStudio.RML.Views
/// </summary>
public partial class RmlView : UserControl
{
+ 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(RmlView), new PropertyMetadata(null));
+
+
public RmlView()
{
InitializeComponent();
+ DraggingSurface = draggingSurface;
+ Loaded += (_, __) => { _vm = DataContext as MainViewVM; };
+ }
+
+ private void OnProcessTableDropped(object sender, DropEventArgs e)
+ {
+ ProcessParametersTable dragged = e.Draggable.DataContext as ProcessParametersTable;
+ ProcessParametersTable dropped = e.Droppable.DataContext as ProcessParametersTable;
+ _vm.OnProcessParametersTableDropped(dragged, dropped);
}
}
}