aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-01-24 18:30:53 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-01-24 18:30:53 +0200
commit11e64f69d00d84974bb09bef6f921c7eeab7c47e (patch)
tree4981a4e079bb4d4c669901ffad6387fcfc9ed1ff /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml.cs
parente82bd25172095f1a521a95179b35cb01db7e8a62 (diff)
downloadTango-11e64f69d00d84974bb09bef6f921c7eeab7c47e.tar.gz
Tango-11e64f69d00d84974bb09bef6f921c7eeab7c47e.zip
Added Graphs Drag & Drop to Developer Module.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml.cs
index 6ebfd9832..9eeff4975 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.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.DAL.Observables;
+using Tango.DragAndDrop;
+using Tango.MachineStudio.Developer.ViewModels;
namespace Tango.MachineStudio.Developer.Views
{
@@ -20,9 +23,33 @@ namespace Tango.MachineStudio.Developer.Views
/// </summary>
public partial class MainView : 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(MainView), new PropertyMetadata(null));
+
public MainView()
{
InitializeComponent();
+
+ DraggingSurface = draggingSurface;
+ this.Loaded += (x, y) =>
+ {
+ _vm = DataContext as MainViewVM;
+ };
+ }
+
+ private void OnDropAvailableSensor(object sender, DropEventArgs e)
+ {
+ if (e.Draggable.DataContext is Sensor)
+ {
+ _vm.OnDropAvailableSensor(e.Draggable.DataContext as Sensor);
+ }
}
}
}