aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-10-02 17:54:40 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-10-02 17:54:40 +0300
commit438f517fd49d1bb10d08d8a279533e82eb67801a (patch)
tree2aeb04502ad285f0d6a3109cc7e263b61e0d14a6 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml.cs
parent79be5ab4903b98e2960913d7b07ec49d14410b27 (diff)
downloadTango-438f517fd49d1bb10d08d8a279533e82eb67801a.tar.gz
Tango-438f517fd49d1bb10d08d8a279533e82eb67801a.zip
Working on RML module..
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);
}
}
}