aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.DragAndDrop
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-07-03 12:03:55 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-07-03 12:03:55 +0300
commitc9d3c1a7408f6f7a4814c1a8f5cf58a2d13e1694 (patch)
tree3b92b537099625fd2d29a4e08378194c3c62f3c4 /Software/Visual_Studio/Tango.DragAndDrop
parent5ab2e8a2edf1ce487976da347a5e03d18ff307b1 (diff)
downloadTango-c9d3c1a7408f6f7a4814c1a8f5cf58a2d13e1694.tar.gz
Tango-c9d3c1a7408f6f7a4814c1a8f5cf58a2d13e1694.zip
Machine Studio.
Implemented upload hardware configuration from connected machine view. Implemented process parameters dragging through developer module settings :/
Diffstat (limited to 'Software/Visual_Studio/Tango.DragAndDrop')
-rw-r--r--Software/Visual_Studio/Tango.DragAndDrop/DragAndDropContainer.cs44
-rw-r--r--Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs4
-rw-r--r--Software/Visual_Studio/Tango.DragAndDrop/Tango.DragAndDrop.csproj5
3 files changed, 47 insertions, 6 deletions
diff --git a/Software/Visual_Studio/Tango.DragAndDrop/DragAndDropContainer.cs b/Software/Visual_Studio/Tango.DragAndDrop/DragAndDropContainer.cs
new file mode 100644
index 000000000..043613308
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DragAndDrop/DragAndDropContainer.cs
@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Markup;
+
+namespace Tango.DragAndDrop
+{
+ [ContentProperty(nameof(InnerContent))]
+ public class DragAndDropContainer : ContentControl
+ {
+ public DragAndDropContainer()
+ {
+ Grid g = new Grid();
+ Content = g;
+
+ ContentControl control = new ContentControl();
+ control.Bind(ContentControl.ContentProperty, this, InnerContentProperty, System.Windows.Data.BindingMode.OneWay);
+ g.Children.Add(control);
+
+ DraggingSurface = new DraggingSurface();
+ g.Children.Add(DraggingSurface);
+ }
+
+ public DraggingSurface DraggingSurface
+ {
+ get { return (DraggingSurface)GetValue(DraggingSurfaceProperty); }
+ private set { SetValue(DraggingSurfaceProperty, value); }
+ }
+ public static readonly DependencyProperty DraggingSurfaceProperty =
+ DependencyProperty.Register("DraggingSurface", typeof(DraggingSurface), typeof(DragAndDropContainer), new PropertyMetadata(null));
+
+ public Object InnerContent
+ {
+ get { return (Object)GetValue(InnerContentProperty); }
+ set { SetValue(InnerContentProperty, value); }
+ }
+ public static readonly DependencyProperty InnerContentProperty =
+ DependencyProperty.Register("InnerContent", typeof(Object), typeof(DragAndDropContainer), new PropertyMetadata(null));
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs b/Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs
index 445cc3924..26a89911e 100644
--- a/Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs
+++ b/Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs
@@ -12,7 +12,7 @@ using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Threading;
using Tango.Core.EventArguments;
-using Tango.SharedUI.Helpers;
+
namespace Tango.DragAndDrop
{
@@ -621,7 +621,7 @@ namespace Tango.DragAndDrop
{
if (_currentDragedElement != null)
{
- BitmapSource source = UIHelper.TakeSnapshot(_currentDragedElement);
+ BitmapSource source = _currentDragedElement.TakeSnapshot();
_dragBorder = new Border();
var surface = GetDraggingSurface(_currentDragedElement);
diff --git a/Software/Visual_Studio/Tango.DragAndDrop/Tango.DragAndDrop.csproj b/Software/Visual_Studio/Tango.DragAndDrop/Tango.DragAndDrop.csproj
index 8d267b703..1cebe0037 100644
--- a/Software/Visual_Studio/Tango.DragAndDrop/Tango.DragAndDrop.csproj
+++ b/Software/Visual_Studio/Tango.DragAndDrop/Tango.DragAndDrop.csproj
@@ -67,6 +67,7 @@
<Compile Include="..\Versioning\Core.cs">
<Link>Core.cs</Link>
</Compile>
+ <Compile Include="DragAndDropContainer.cs" />
<Compile Include="DragAndDropService.cs" />
<Compile Include="DraggingSurface.cs" />
<Compile Include="DragThumb.cs" />
@@ -103,10 +104,6 @@
<Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project>
<Name>Tango.Core</Name>
</ProjectReference>
- <ProjectReference Include="..\Tango.SharedUI\Tango.SharedUI.csproj">
- <Project>{8491d07b-c1f6-4b62-a412-41b9fd2d6538}</Project>
- <Name>Tango.SharedUI</Name>
- </ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.