From bfc6aeabda4b320f9365f5eef4c8f1bcab9b24af Mon Sep 17 00:00:00 2001 From: Roy Date: Sat, 27 Jan 2018 22:57:48 +0200 Subject: Added IDS_PACK_FORMULA. Added necessary login to machine designer & db module. Started working on job segments. --- .../Tango.MachineStudio.DB.csproj | 15 +++ .../Tango.MachineStudio.DB/ViewModelLocator.cs | 9 ++ .../ViewModels/DbTableViewModel.cs | 17 ++-- .../ViewModels/IdsPackFormulasViewVM.cs | 17 ++++ .../Views/DBViews/IdsPackFormulaView.xaml | 33 +++++++ .../Views/DBViews/IdsPackFormulaView.xaml.cs | 28 ++++++ .../Views/DBViews/IdsPackFormulasView.xaml | 31 ++++++ .../Views/DBViews/IdsPackFormulasView.xaml.cs | 32 +++++++ .../Views/DBViews/IdsPackView.xaml | 13 ++- .../Views/DBViews/IdsPacksView.xaml | 3 + .../Tango.MachineStudio.Developer/Images/ruler.png | Bin 0 -> 1110 bytes .../Images/segment-single.png | Bin 0 -> 535 bytes .../Images/segment.png | Bin 0 -> 1610 bytes .../Tango.MachineStudio.Developer.csproj | 9 ++ .../ViewModels/MainViewVM.cs | 104 ++++++++++++++++++++- .../Views/MainView.xaml | 86 +++++++++++++++++ .../Images/formula.png | Bin 0 -> 853 bytes .../Tango.MachineStudio.MachineDesigner.csproj | 3 + .../ViewModels/MainViewVM.cs | 12 +++ .../Views/MainView.xaml | 36 +++++++ .../Views/MainView.xaml.cs | 8 +- 21 files changed, 444 insertions(+), 12 deletions(-) create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/IdsPackFormulasViewVM.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackFormulaView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackFormulaView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackFormulasView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackFormulasView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Images/ruler.png create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Images/segment-single.png create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Images/segment.png create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Images/formula.png (limited to 'Software/Visual_Studio/MachineStudio') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj index 54c29f7f3..c17c43aa0 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj @@ -114,6 +114,7 @@ + @@ -142,6 +143,12 @@ ActionTypeView.xaml + + IdsPackFormulasView.xaml + + + IdsPackFormulaView.xaml + ProcessParametersTablesGroupsView.xaml @@ -378,6 +385,14 @@ MSBuild:Compile Designer + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + MSBuild:Compile Designer diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs index 8a7afc067..46223d9f4 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs @@ -36,6 +36,7 @@ namespace Tango.MachineStudio.DB SimpleIoc.Default.Register(); SimpleIoc.Default.Register(); + SimpleIoc.Default.Register(); SimpleIoc.Default.Register(); SimpleIoc.Default.Register(); SimpleIoc.Default.Register(); @@ -358,5 +359,13 @@ namespace Tango.MachineStudio.DB return ServiceLocator.Current.GetInstance(); } } + + public static IdsPackFormulasViewVM IdsPackFormulasViewVM + { + get + { + return ServiceLocator.Current.GetInstance(); + } + } } } \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DbTableViewModel.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DbTableViewModel.cs index ae4fa8a07..e1be2aa9b 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DbTableViewModel.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DbTableViewModel.cs @@ -156,14 +156,6 @@ namespace Tango.MachineStudio.DB.ViewModels { using (_notification.PushTaskItem("Saving changes to database...")) { - //var dependenctEntities = SelectedEntity.GetDependentEntitiesNameAndGuid(); - - //if (dependenctEntities.Count > 0) - //{ - // _notification.ShowError("The selected entity is being used by " + dependenctEntities.Count + " other entities." + Environment.NewLine + "Please delete any dependencies and try again." + Environment.NewLine + Environment.NewLine + String.Join(Environment.NewLine, dependenctEntities.Select(x => x.Key + ", ID: " + x.Value))); - // return; - //} - try { await SelectedEntity.DeleteAsync(); @@ -226,12 +218,21 @@ namespace Tango.MachineStudio.DB.ViewModels using (_notification.PushTaskItem("Saving changes to database...")) { + if (mode == DialogOpenMode.Adding) + { + entity.Attach(); + } + try { await entity.SaveAsync(); } catch (DbUpdateException ex) { + if (mode == DialogOpenMode.Adding) + { + entity.Detach(); + } Adapter.Invalidate(); _notification.ShowError("Could not save entity." + Environment.NewLine + ex.InnerException.InnerException != null ? ex.InnerException.InnerException.Message : ex.InnerException.Message); } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/IdsPackFormulasViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/IdsPackFormulasViewVM.cs new file mode 100644 index 000000000..a2763a257 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/IdsPackFormulasViewVM.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.DAL.Observables; +using Tango.MachineStudio.Common.Notifications; + +namespace Tango.MachineStudio.DB.ViewModels +{ + public class IdsPackFormulasViewVM : DbTableViewModel + { + public IdsPackFormulasViewVM(INotificationProvider notification) : base(notification) + { + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackFormulaView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackFormulaView.xaml new file mode 100644 index 000000000..83b2cc3d7 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackFormulaView.xaml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackFormulaView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackFormulaView.xaml.cs new file mode 100644 index 000000000..4c289ddd2 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackFormulaView.xaml.cs @@ -0,0 +1,28 @@ +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.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.MachineStudio.DB.Views.DBViews +{ + /// + /// Interaction logic for MachineView.xaml + /// + public partial class IdsPackFormulaView : UserControl + { + public IdsPackFormulaView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackFormulasView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackFormulasView.xaml new file mode 100644 index 000000000..81c9124f3 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackFormulasView.xaml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackFormulasView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackFormulasView.xaml.cs new file mode 100644 index 000000000..079c48746 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackFormulasView.xaml.cs @@ -0,0 +1,32 @@ +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.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using Tango.MachineStudio.DB.CustomAttributes; +using Tango.MachineStudio.DB.Managers; +using Tango.SharedUI.Controls; + +namespace Tango.MachineStudio.DB.Views.DBViews +{ + /// + /// Interaction logic for MachinesView.xaml + /// + [DBView] + public partial class IdsPackFormulasView : UserControl + { + public IdsPackFormulasView() : base() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackView.xaml index 537bdb9f7..75093aa77 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackView.xaml @@ -10,7 +10,7 @@ xmlns:vm="clr-namespace:Tango.MachineStudio.DB.ViewModels" xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews" mc:Ignorable="d" - d:DesignHeight="400" d:DesignWidth="300" d:DataContext="{d:DesignInstance Type=vm:IdsPacksViewVM, IsDesignTimeCreatable=False}"> + d:DesignHeight="500" d:DesignWidth="300" d:DataContext="{d:DesignInstance Type=vm:IdsPacksViewVM, IsDesignTimeCreatable=False}"> @@ -68,6 +68,17 @@ + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml index 0837bbf9f..03ab1d7d4 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml @@ -12,6 +12,7 @@ + @@ -57,6 +58,8 @@ + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Images/ruler.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Images/ruler.png new file mode 100644 index 000000000..173e4c204 Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Images/ruler.png differ diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Images/segment-single.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Images/segment-single.png new file mode 100644 index 000000000..016666122 Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Images/segment-single.png differ diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Images/segment.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Images/segment.png new file mode 100644 index 000000000..d0f85b83f Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Images/segment.png differ diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj index 970556986..71527d1dc 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj @@ -188,5 +188,14 @@ + + + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs index 8f3d2a7e3..e77093eee 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs @@ -106,7 +106,22 @@ namespace Tango.MachineStudio.Developer.ViewModels public Job SelectedJob { get { return _selectedJob; } - set { _selectedJob = value; RaisePropertyChangedAuto(); } + set + { + _selectedJob = value; + RaisePropertyChangedAuto(); + OnSelectedJobChanged(); + } + } + + private Segment _selectedSegment; + /// + /// Gets or sets the job selected segment. + /// + public Segment SelectedSegment + { + get { return _selectedSegment; } + set { _selectedSegment = value; RaisePropertyChangedAuto(); } } private Rml _selectedRML; @@ -184,6 +199,26 @@ namespace Tango.MachineStudio.Developer.ViewModels /// public RelayCommand SaveLiquidFactorsCommand { get; set; } + /// + /// Gets or sets the add segment command. + /// + public RelayCommand AddSegmentCommand { get; set; } + + /// + /// Gets or sets the remove segment command. + /// + public RelayCommand RemoveSegmentCommand { get; set; } + + /// + /// Gets or sets the add job command. + /// + public RelayCommand AddJobCommand { get; set; } + + /// + /// Gets or sets the remove job command. + /// + public RelayCommand RemoveJobCommand { get; set; } + #endregion #region Constructors @@ -219,6 +254,10 @@ namespace Tango.MachineStudio.Developer.ViewModels ToggleSideBarCommand = new RelayCommand(() => IsSideBarOpened = !IsSideBarOpened); SaveProcessParametersCommand = new RelayCommand(SaveProcessParameters); SaveLiquidFactorsCommand = new RelayCommand(SaveLiquidFactors); + AddSegmentCommand = new RelayCommand(AddSegment); + RemoveSegmentCommand = new RelayCommand(RemoveSegment); + AddJobCommand = new RelayCommand(AddJob); + RemoveJobCommand = new RelayCommand(RemoveJob); } #endregion @@ -239,6 +278,17 @@ namespace Tango.MachineStudio.Developer.ViewModels #region Virtual Methods + /// + /// Called when the selected job has been changed. + /// + private void OnSelectedJobChanged() + { + if (SelectedJob != null) + { + SelectedSegment = SelectedJob.Segments.FirstOrDefault(); + } + } + /// /// Called when the selected group history has been changed /// @@ -358,6 +408,58 @@ namespace Tango.MachineStudio.Developer.ViewModels } } + /// + /// Removes the selected segment. + /// + private void RemoveSegment() + { + if (SelectedJob != null && SelectedSegment != null) + { + SelectedSegment.DefferedDelete(); + SelectedJob.Segments.Remove(SelectedSegment); + } + } + + /// + /// Adds a new segment. + /// + private void AddSegment() + { + if (SelectedJob != null) + { + Segment seg = new Segment(); + seg.Name = "New Seg"; + SelectedJob.Segments.Add(seg); + } + } + + /// + /// Removes the selected job. + /// + private void RemoveJob() + { + if (SelectedMachine != null && SelectedJob != null) + { + SelectedJob.Delete(); + SelectedMachine.Jobs.Remove(SelectedJob); + } + } + + /// + /// Adds a new job to the selected machine. + /// + private void AddJob() + { + if (SelectedMachine != null) + { + SelectedMachine.Jobs.Add(new Job() + { + Name = "New Job", + CreationDate = DateTime.UtcNow, + }); + } + } + #endregion #region Public Events diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml index 243165cd5..b971d9124 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml @@ -398,6 +398,14 @@ + + + + @@ -425,6 +433,10 @@ + + + + @@ -494,7 +506,81 @@ + + + + + + + + + + + + + SEGMENTS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + + + + + + + Length + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Images/formula.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Images/formula.png new file mode 100644 index 000000000..6f476e79c Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Images/formula.png differ diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj index 64c54b357..bebcf2480 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj @@ -226,5 +226,8 @@ + + + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs index 5cb216a6c..f4da7beaa 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs @@ -361,6 +361,18 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels idsPack.LiquidTypeGuid = liquidType.Guid; } + /// + /// Drops the ids formula. + /// + /// The ids pack formula. + /// The ids pack. + /// + public void DropIdsFormula(IdsPackFormula idsPackFormula, IdsPack idsPack) + { + idsPack.IdsPackFormula = idsPackFormula; + idsPack.IdsPackFormulaGuid = idsPackFormula.Guid; + } + #endregion #region Private Methods 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 e442e0e6f..61259508a 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 @@ -226,6 +226,12 @@ + + + + + + @@ -417,6 +423,10 @@ Liquid: + + + Formula: + @@ -618,6 +628,32 @@ + + + + + + + + + + + + + + + + + + + + + + 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 6d08a10e0..70e127b6c 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 @@ -62,7 +62,7 @@ namespace Tango.MachineStudio.MachineDesigner.Views { SetHighlightRegion(hardwareGrid); } - else if (e.DataContext is ApplicationVersion || e.DataContext is ApplicationOsVersion || e.DataContext is ApplicationDisplayPanelVersion) + else if (e.DataContext is ApplicationVersion || e.DataContext is ApplicationOsVersion || e.DataContext is ApplicationDisplayPanelVersion || e.DataContext is ApplicationFirmwareVersion) { SetHighlightRegion(gridTablet); } @@ -70,7 +70,7 @@ namespace Tango.MachineStudio.MachineDesigner.Views { SetHighlightRegion(gridEmbedded); } - else if (e.DataContext is DispenserType || e.DataContext is CartridgeType || e.DataContext is LiquidType || e.DataContext is MidTankType) + else if (e.DataContext is DispenserType || e.DataContext is CartridgeType || e.DataContext is LiquidType || e.DataContext is MidTankType || e.DataContext is IdsPackFormula) { SetHighlightRegion(gridIds); } @@ -102,6 +102,10 @@ namespace Tango.MachineStudio.MachineDesigner.Views { _vm.DropMidTankType(e.Draggable.DataContext as MidTankType, e.Droppable.DataContext as IdsPack); } + else if (e.Draggable.DataContext is IdsPackFormula) + { + _vm.DropIdsFormula(e.Draggable.DataContext as IdsPackFormula, e.Droppable.DataContext as IdsPack); + } else if (e.Draggable.DataContext is IdsPack) { _vm.DropIdsPack(e.Draggable.DataContext as IdsPack, e.Droppable.DataContext as IdsPack); -- cgit v1.3.1