From 6900c4dea48adb484efc9648e081b7b3f75bd60c Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Thu, 4 Jan 2018 15:26:21 +0200 Subject: Progress on Machine Designer.. --- .../Views/MainView.xaml | 483 +++++++++++++++++---- .../Views/MainView.xaml.cs | 32 +- 2 files changed, 424 insertions(+), 91 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml index 1542adf49..48b90aa6b 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml @@ -5,6 +5,9 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:dragAndDrop="clr-namespace:Tango.DragAndDrop;assembly=Tango.DragAndDrop" xmlns:global="clr-namespace:Tango.MachineStudio.MachineDesigner" + xmlns:fa="http://schemas.fontawesome.io/icons/" + xmlns:providers="clr-namespace:Tango.MachineStudio.MachineDesigner.AutoComplete" + xmlns:autoComplete="clr-namespace:Tango.AutoComplete.Editors;assembly=Tango.AutoComplete" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:sharedConverters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:vm="clr-namespace:Tango.MachineStudio.MachineDesigner.ViewModels" @@ -14,6 +17,7 @@ + + + - + - + + + + + + + + + + + - - - - - - - - - - - - - - - + MACHINE DESIGNER + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - Touch Panel: - - - - - - Embedded Firmware: - - - - - - Dispensers: - - - - - - Mid Tanks: - - - - - + + + + + + + - + + + + + + + + + + + + Add IDS + + + + + + Remove IDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NO IDS PACKS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Touch Panel: + + + + + + Embedded Firmware: + + + + + + Dispensers: + + + + + + Mid Tanks: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IDS PACKS + + + + + + + + + + Dispenser: + + + + Cartridge: + + + + Mid Tank: + + + + Liquid: + + + + + + + + + + @@ -151,7 +348,7 @@ - + @@ -165,7 +362,7 @@ - + @@ -180,7 +377,7 @@ - + + + + + + + + + + v + + + + + + + + + + + + + + + + + + + + + + + v + + + + + + + + + + + + + + + + + + + + + + + v + + + + + + + + + + + + + + + + + + + + + + + v + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml.cs index 97412178e..ebf45624d 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using System.Threading; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; @@ -29,7 +30,10 @@ namespace Tango.MachineStudio.MachineDesigner.Views { InitializeComponent(); DraggingSurface = dragSufrace; - this.Loaded += (x, y) => _vm = DataContext as MainViewVM; + this.Loaded += (x, y) => + { + _vm = DataContext as MainViewVM; + }; } public DraggingSurface DraggingSurface @@ -40,7 +44,7 @@ namespace Tango.MachineStudio.MachineDesigner.Views public static readonly DependencyProperty DraggingSurfaceProperty = DependencyProperty.Register("DraggingSurface", typeof(DraggingSurface), typeof(MainView), new PropertyMetadata(null)); - private void OnDroppedDispenser(object sender, DropEventArgs e) + private void OnDropOnIdsPack(object sender, DropEventArgs e) { if (e.Draggable.DataContext is Dispenser) { @@ -59,5 +63,29 @@ namespace Tango.MachineStudio.MachineDesigner.Views _vm.DropMidTankType(e.Draggable.DataContext as MidTankType, e.Droppable.DataContext as IdsPack); } } + + private void OnTabletDrop(object sender, DropEventArgs e) + { + if (e.Draggable.DataContext is ApplicationDisplayPanelVersion) + { + _vm.DropTouchPanel(e.Draggable.DataContext as ApplicationDisplayPanelVersion); + } + else if (e.Draggable.DataContext is ApplicationVersion) + { + _vm.DropApplicationVersion(e.Draggable.DataContext as ApplicationVersion); + } + } + + private void OnEmbeddedDrop(object sender, DropEventArgs e) + { + if (e.Draggable.DataContext is EmbeddedFirmwareVersion) + { + _vm.DropEmbeddedFirmware(e.Draggable.DataContext as EmbeddedFirmwareVersion); + } + else if (e.Draggable.DataContext is EmbeddedSoftwareVersion) + { + _vm.DropEmbeddedSoftware(e.Draggable.DataContext as EmbeddedSoftwareVersion); + } + } } } -- cgit v1.3.1