From 3234e33cc4ba354f0395bb514b8b2fa102cf38ec Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 21 Jan 2018 15:56:57 +0200 Subject: Started working on Developer module. --- .../MachineDesignerModule.cs | 2 +- .../Tango.MachineStudio.MachineDesigner.csproj | 7 + .../ViewModels/MainViewVM.cs | 21 +- .../Views/MachineView.xaml | 327 +++++++++++++++++++++ .../Views/MachineView.xaml.cs | 28 ++ 5 files changed, 383 insertions(+), 2 deletions(-) create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineView.xaml.cs (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/MachineDesignerModule.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/MachineDesignerModule.cs index 8fbac790f..b0160abd5 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/MachineDesignerModule.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/MachineDesignerModule.cs @@ -48,7 +48,7 @@ namespace Tango.MachineStudio.MachineDesigner /// /// Gets the permission required to see and load this module. /// - public Permissions Permission => Permissions.RunDeveloperModule; + public Permissions Permission => Permissions.RunMachineDesignerModule; /// /// Gets a value indicating whether this module has been initialized. 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 ac1616401..64c54b357 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 @@ -85,6 +85,9 @@ MachineVersionDialog.xaml + + MachineView.xaml + MainView.xaml @@ -96,6 +99,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile 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 24f2f6d43..9f44bc270 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 @@ -13,10 +13,12 @@ using Tango.DAL.Observables; using Tango.MachineStudio.Common.Notifications; using Tango.SharedUI; using SimpleValidator.Extensions; +using Tango.MachineStudio.Common.StudioApplication; +using Tango.MachineStudio.Common; namespace Tango.MachineStudio.MachineDesigner.ViewModels { - public class MainViewVM : ViewModel + public class MainViewVM : ViewModel, IModuleRequestListener { private bool _isSaving; private INotificationProvider _notification; @@ -631,5 +633,22 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels } #endregion + + #region IModuleRequestListener + + /// + /// Called when the request has been made. + /// + /// The module instance. + /// The arguments. + public void OnRequestModule(IStudioModule module, object args) + { + if (module is MachineDesignerModule) + { + SelectedMachine = args as Machine; + } + } + + #endregion } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineView.xaml new file mode 100644 index 000000000..a54f9bbdc --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineView.xaml @@ -0,0 +1,327 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Hardware + + + + + + Add IDS + + + + + + Remove IDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NO IDS PACKS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Touch Panel + + + + + + Embedded Firmware + + + + + + Dispensers + + + + + + Mid Tanks + + + + + + Cartridges + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineView.xaml.cs new file mode 100644 index 000000000..67fa0d5bf --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineView.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.MachineDesigner.Views +{ + /// + /// Interaction logic for MachineView.xaml + /// + public partial class MachineView : UserControl + { + public MachineView() + { + InitializeComponent(); + } + } +} -- cgit v1.3.1