diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-10-02 17:54:40 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-10-02 17:54:40 +0300 |
| commit | 438f517fd49d1bb10d08d8a279533e82eb67801a (patch) | |
| tree | 2aeb04502ad285f0d6a3109cc7e263b61e0d14a6 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml.cs | |
| parent | 79be5ab4903b98e2960913d7b07ec49d14410b27 (diff) | |
| download | Tango-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.cs | 23 |
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); } } } |
