aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2018-12-30 01:27:53 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2018-12-30 01:27:53 +0200
commitcc3480d4aac4175b1072060dd2d6d398d3451ae8 (patch)
tree0c416705eca9d499a3118d83d84b5143f3cee262 /Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers
parent7b69f9a96ab82e3a6e2345092600edf5854f5f4f (diff)
downloadTango-cc3480d4aac4175b1072060dd2d6d398d3451ae8.tar.gz
Tango-cc3480d4aac4175b1072060dd2d6d398d3451ae8.zip
Working on dispenserssssssss
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/App.config55
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Contracts/IMainView.cs20
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/DispensersModule.cs63
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Images/dispensers-title.pngbin0 -> 89550 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Images/dispensers.pngbin0 -> 205567 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Models/DispenserModel.cs25
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Properties/AssemblyInfo.cs19
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Properties/Resources.Designer.cs63
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Properties/Resources.resx117
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Properties/Settings.Designer.cs26
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Properties/Settings.settings7
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Tango.MachineStudio.Dispensers.csproj167
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/ViewModelLocator.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/ViewModels/MainViewVM.cs107
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/DispenserView.xaml46
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/DispenserView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/DispensersView.xaml76
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/DispensersView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/MainView.xaml22
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/MainView.xaml.cs36
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/packages.config9
21 files changed, 942 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/App.config b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/App.config
new file mode 100644
index 000000000..56898686f
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/App.config
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO.FileSystem.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Xml.XPath.XDocument" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Console" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Diagnostics.StackTrace" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+</configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Contracts/IMainView.cs b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Contracts/IMainView.cs
new file mode 100644
index 000000000..ea0744c84
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Contracts/IMainView.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.SharedUI;
+
+namespace Tango.MachineStudio.Dispensers.Contracts
+{
+ public enum DispensersNavigationView
+ {
+ DispensersView,
+ DispenserView,
+ }
+
+ public interface IMainView : IView
+ {
+ void NavigateTo(DispensersNavigationView view);
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/DispensersModule.cs b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/DispensersModule.cs
new file mode 100644
index 000000000..6d6c7d8e6
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/DispensersModule.cs
@@ -0,0 +1,63 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Media.Imaging;
+using Tango.BL.Enumerations;
+using Tango.MachineStudio.Dispensers.Views;
+using Tango.MachineStudio.Common;
+using Tango.SharedUI.Helpers;
+
+namespace Tango.MachineStudio.ColorLab
+{
+ [StudioModule(10)]
+ public class DispensersModule : StudioModuleBase
+ {
+ public override string Name
+ {
+ get
+ {
+ return "Dispensers";
+ }
+ }
+
+ public override string Description
+ {
+ get
+ {
+ return "Manage twine's dispensers repository.";
+ }
+ }
+
+ public override BitmapSource Image
+ {
+ get
+ {
+ return ResourceHelper.GetImageFromResources("Images/dispensers.png");
+ }
+ }
+
+ public override Type MainViewType
+ {
+ get
+ {
+ return typeof(MainView);
+ }
+ }
+
+ public override Permissions Permission
+ {
+ get
+ {
+ return Permissions.RunResearchModule;
+ }
+ }
+
+ public override void Dispose()
+ {
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Images/dispensers-title.png b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Images/dispensers-title.png
new file mode 100644
index 000000000..b5c594aa7
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Images/dispensers-title.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Images/dispensers.png b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Images/dispensers.png
new file mode 100644
index 000000000..2f9e1ca8b
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Images/dispensers.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Models/DispenserModel.cs b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Models/DispenserModel.cs
new file mode 100644
index 000000000..94bf24e85
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Models/DispenserModel.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.BL;
+using Tango.BL.Entities;
+
+namespace Tango.MachineStudio.Dispensers.Models
+{
+ public class DispenserModel
+ {
+ private ObservablesContext _context;
+
+ public Dispenser Dispenser { get; set; }
+
+ public DispenserModel(Dispenser dispenser, ObservablesContext context)
+ {
+ Dispenser = dispenser;
+ _context = context;
+ }
+
+
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..f52524e12
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Properties/AssemblyInfo.cs
@@ -0,0 +1,19 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+[assembly: AssemblyTitle("Tango - Machine Studio Dispensers Module")]
+[assembly: AssemblyVersion("2.0.12.1608")]
+
+[assembly: ComVisible(false)]
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
diff --git a/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Properties/Resources.Designer.cs b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Properties/Resources.Designer.cs
new file mode 100644
index 000000000..436917dd5
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Properties/Resources.Designer.cs
@@ -0,0 +1,63 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.MachineStudio.Dispensers.Properties {
+ using System;
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.MachineStudio.Dispensers.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Properties/Resources.resx b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Properties/Resources.resx
new file mode 100644
index 000000000..af7dbebba
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Properties/Resources.resx
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Properties/Settings.Designer.cs b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Properties/Settings.Designer.cs
new file mode 100644
index 000000000..caf9445c0
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Properties/Settings.Designer.cs
@@ -0,0 +1,26 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.MachineStudio.Dispensers.Properties {
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.7.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default {
+ get {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Properties/Settings.settings b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Properties/Settings.settings
new file mode 100644
index 000000000..033d7a5e9
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Properties/Settings.settings
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
+ <Profiles>
+ <Profile Name="(Default)" />
+ </Profiles>
+ <Settings />
+</SettingsFile> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Tango.MachineStudio.Dispensers.csproj b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Tango.MachineStudio.Dispensers.csproj
new file mode 100644
index 000000000..bd8f858a6
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Tango.MachineStudio.Dispensers.csproj
@@ -0,0 +1,167 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{F69DA3A8-F823-461E-87CF-A9275ABC0B15}</ProjectGuid>
+ <OutputType>library</OutputType>
+ <RootNamespace>Tango.MachineStudio.Dispensers</RootNamespace>
+ <AssemblyName>Tango.MachineStudio.Dispensers</AssemblyName>
+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\..\Build\Machine Studio\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\..\Build\Machine Studio\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.dll</HintPath>
+ </Reference>
+ <Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
+ </Reference>
+ <Reference Include="MahApps.Metro, Version=1.5.0.23, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll</HintPath>
+ </Reference>
+ <Reference Include="MaterialDesignColors, Version=1.1.2.0, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\MaterialDesignColors.1.1.2\lib\net45\MaterialDesignColors.dll</HintPath>
+ </Reference>
+ <Reference Include="MaterialDesignThemes.Wpf, Version=2.3.1.953, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll</HintPath>
+ </Reference>
+ <Reference Include="Microsoft.Practices.ServiceLocation, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.ComponentModel.DataAnnotations" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\MahApps.Metro.1.5.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Xml" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="System.Net.Http" />
+ <Reference Include="System.Xaml">
+ <RequiredTargetFramework>4.0</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="WindowsBase" />
+ <Reference Include="PresentationCore" />
+ <Reference Include="PresentationFramework" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="..\..\..\Versioning\GlobalVersionInfo.cs">
+ <Link>GlobalVersionInfo.cs</Link>
+ </Compile>
+ <Compile Include="Contracts\IMainView.cs" />
+ <Compile Include="DispensersModule.cs" />
+ <Compile Include="Models\DispenserModel.cs" />
+ <Compile Include="ViewModelLocator.cs" />
+ <Compile Include="ViewModels\MainViewVM.cs" />
+ <Compile Include="Views\DispensersView.xaml.cs">
+ <DependentUpon>DispensersView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DispenserView.xaml.cs">
+ <DependentUpon>DispenserView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\MainView.xaml.cs">
+ <DependentUpon>MainView.xaml</DependentUpon>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Properties\AssemblyInfo.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Properties\Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>Resources.resx</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\Settings.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Settings.settings</DependentUpon>
+ <DesignTimeSharedInput>True</DesignTimeSharedInput>
+ </Compile>
+ <EmbeddedResource Include="Properties\Resources.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ <None Include="app.config" />
+ <None Include="packages.config" />
+ <None Include="Properties\Settings.settings">
+ <Generator>SettingsSingleFileGenerator</Generator>
+ <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\SideChains\Tango.AutoComplete\Tango.AutoComplete.csproj">
+ <Project>{bb2abb74-ba58-4812-83aa-ec8171f42df4}</Project>
+ <Name>Tango.AutoComplete</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.BL\Tango.BL.csproj">
+ <Project>{f441feee-322a-4943-b566-110e12fd3b72}</Project>
+ <Name>Tango.BL</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Core\Tango.Core.csproj">
+ <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project>
+ <Name>Tango.Core</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Logging\Tango.Logging.csproj">
+ <Project>{bc932dbd-7cdb-488c-99e4-f02cf441f55e}</Project>
+ <Name>Tango.Logging</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Settings\Tango.Settings.csproj">
+ <Project>{d8f1ad85-526a-4f50-b6dc-d437af63d8d8}</Project>
+ <Name>Tango.Settings</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.SharedUI\Tango.SharedUI.csproj">
+ <Project>{8491d07b-c1f6-4b62-a412-41b9fd2d6538}</Project>
+ <Name>Tango.SharedUI</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Tango.MachineStudio.Common\Tango.MachineStudio.Common.csproj">
+ <Project>{cb0b0aa2-bb24-4bca-a720-45e397684e12}</Project>
+ <Name>Tango.MachineStudio.Common</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\dispensers-title.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Page Include="Views\DispensersView.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="Views\DispenserView.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="Views\MainView.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\dispensers.png" />
+ </ItemGroup>
+ <ItemGroup />
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/ViewModelLocator.cs
new file mode 100644
index 000000000..038a052b3
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/ViewModelLocator.cs
@@ -0,0 +1,28 @@
+using Tango.MachineStudio.Dispensers.ViewModels;
+using Tango.Core.DI;
+
+namespace Tango.MachineStudio.Dispensers
+{
+ /// <summary>
+ /// This class contains static references to all the view models in the
+ /// application and provides an entry point for the bindings.
+ /// </summary>
+ public static class ViewModelLocator
+ {
+ /// <summary>
+ /// Initializes a new instance of the ViewModelLocator class.
+ /// </summary>
+ static ViewModelLocator()
+ {
+ TangoIOC.Default.Register<MainViewVM>();
+ }
+
+ public static MainViewVM MainViewVM
+ {
+ get
+ {
+ return TangoIOC.Default.GetInstance<MainViewVM>();
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/ViewModels/MainViewVM.cs
new file mode 100644
index 000000000..db9dff355
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/ViewModels/MainViewVM.cs
@@ -0,0 +1,107 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.BL;
+using Tango.BL.Entities;
+using Tango.MachineStudio.Common;
+using System.Data.Entity;
+using Tango.MachineStudio.Common.Notifications;
+using Tango.MachineStudio.Dispensers.Contracts;
+using Tango.Core.Commands;
+
+namespace Tango.MachineStudio.Dispensers.ViewModels
+{
+ public class MainViewVM : StudioViewModel<IMainView>
+ {
+ private ObservablesContext _dbContext;
+ private ObservablesContext _activeContext;
+ private INotificationProvider _notification;
+
+ private ObservableCollection<Dispenser> _dispensers;
+ public ObservableCollection<Dispenser> Dispensers
+ {
+ get { return _dispensers; }
+ set { _dispensers = value; RaisePropertyChangedAuto(); }
+ }
+
+ private Dispenser _selectedDispenser;
+ public Dispenser SelectedDispenser
+ {
+ get { return _selectedDispenser; }
+ set { _selectedDispenser = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); }
+ }
+
+ private Dispenser _activeDispenser;
+ public Dispenser ActiveDispenser
+ {
+ get { return _activeDispenser; }
+ set { _activeDispenser = value; RaisePropertyChangedAuto(); }
+ }
+
+ private String _filter;
+ public String Filter
+ {
+ get { return _filter; }
+ set { _filter = value; RaisePropertyChangedAuto(); OnFilterChanged(); }
+ }
+
+ public RelayCommand AddDispenserCommand { get; set; }
+
+ public RelayCommand RemoveDispenserCommand { get; set; }
+
+ public RelayCommand ManageDispenserCommand { get; set; }
+
+ public RelayCommand BackToDispensersCommand { get; set; }
+
+ public RelayCommand SaveCommand { get; set; }
+
+ public MainViewVM(INotificationProvider notificationProvider)
+ {
+ _notification = notificationProvider;
+
+ ManageDispenserCommand = new RelayCommand(ManageSelectedDispenser,() => SelectedDispenser != null);
+ BackToDispensersCommand = new RelayCommand(() => { View.NavigateTo(DispensersNavigationView.DispensersView); });
+ }
+
+ private async void OnFilterChanged()
+ {
+ if (Filter != null)
+ {
+ IsFree = false;
+ Dispensers = (await _dbContext.Dispensers.Where(x => x.SerialNumber.StartsWith(Filter)).ToListAsync()).ToObservableCollection();
+ IsFree = true;
+ }
+ }
+
+ private async void ManageSelectedDispenser()
+ {
+ if (SelectedDispenser != null)
+ {
+ if (_activeContext != null)
+ {
+ _activeContext.Dispose();
+ }
+
+ using (_notification.PushTaskItem("Loading dispenser data..."))
+ {
+ _activeContext = ObservablesContext.CreateDefault();
+ ActiveDispenser = await _activeContext.Dispensers.SingleOrDefaultAsync(x => x.Guid == SelectedDispenser.Guid);
+ View.NavigateTo(DispensersNavigationView.DispenserView);
+ }
+ }
+ else
+ {
+ ActiveDispenser = null;
+ }
+ }
+
+ public async override void OnApplicationReady()
+ {
+ _dbContext = ObservablesContext.CreateDefault();
+ await _dbContext.DispenserTypes.LoadAsync();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/DispenserView.xaml b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/DispenserView.xaml
new file mode 100644
index 000000000..796c0f8a4
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/DispenserView.xaml
@@ -0,0 +1,46 @@
+<UserControl x:Class="Tango.MachineStudio.Dispensers.Views.DispenserView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:observables="clr-namespace:Tango.BL.Entities;assembly=Tango.BL"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:vm="clr-namespace:Tango.MachineStudio.Dispensers.ViewModels"
+ xmlns:global="clr-namespace:Tango.MachineStudio.Dispensers"
+ xmlns:local="clr-namespace:Tango.MachineStudio.Dispensers.Views"
+ mc:Ignorable="d"
+ d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">
+
+ <Grid Margin="20">
+ <DockPanel>
+ <Grid DockPanel.Dock="Top">
+ <StackPanel Orientation="Horizontal">
+ <Button Style="{StaticResource MaterialDesignFlatButton}" Height="Auto" Command="{Binding BackToDispensersCommand}">
+ <materialDesign:PackIcon Kind="ArrowLeft" Width="50" Height="50" Foreground="#202020" ToolTip="Back to RML list" />
+ </Button>
+ <TextBlock VerticalAlignment="Center" Margin="10 0 0 0" FontSize="34">
+ <Run>DISPENSER</Run>
+ <Run Text="{Binding ActiveDispenser.SerialNumber}"></Run>
+ </TextBlock>
+ </StackPanel>
+
+ <Button HorizontalAlignment="Right" Width="170" Height="45" Margin="0 0 20 0" VerticalAlignment="Center" Command="{Binding SaveCommand}">
+ <StackPanel Orientation="Horizontal">
+ <materialDesign:PackIcon Kind="ContentSaveAll" Width="24" Height="24" />
+ <TextBlock VerticalAlignment="Center" Margin="10 0 0 0">SAVE</TextBlock>
+ </StackPanel>
+ </Button>
+ </Grid>
+
+ <Grid DockPanel.Dock="Bottom">
+
+ </Grid>
+
+ <Grid Margin="0 20">
+
+ </Grid>
+ </DockPanel>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/DispenserView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/DispenserView.xaml.cs
new file mode 100644
index 000000000..61e758dc7
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/DispenserView.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.Dispensers.Views
+{
+ /// <summary>
+ /// Interaction logic for DispenserView.xaml
+ /// </summary>
+ public partial class DispenserView : UserControl
+ {
+ public DispenserView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/DispensersView.xaml b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/DispensersView.xaml
new file mode 100644
index 000000000..3ae7082f0
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/DispensersView.xaml
@@ -0,0 +1,76 @@
+<UserControl x:Class="Tango.MachineStudio.Dispensers.Views.DispensersView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:observables="clr-namespace:Tango.BL.Entities;assembly=Tango.BL"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:vm="clr-namespace:Tango.MachineStudio.Dispensers.ViewModels"
+ xmlns:global="clr-namespace:Tango.MachineStudio.Dispensers"
+ xmlns:local="clr-namespace:Tango.MachineStudio.Dispensers.Views"
+ mc:Ignorable="d"
+ d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">
+
+ <UserControl.Resources>
+ <converters:DateTimeUTCToShortDateTimeConverter x:Key="DateTimeUTCToShortDateTimeConverter" />
+ </UserControl.Resources>
+
+ <Grid>
+ <DockPanel Margin="100" MaxWidth="1200">
+ <Grid DockPanel.Dock="Top">
+ <StackPanel Orientation="Horizontal">
+ <Image Source="../Images/dispensers-title.png" Width="350" RenderOptions.BitmapScalingMode="Fant" Margin="10" />
+
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" Margin="0 0 0 10">
+ <materialDesign:PackIcon VerticalAlignment="Center" Kind="BarcodeScan" Width="32" Height="32" />
+ <TextBox Width="400" FontSize="20" Margin="10 0 0 0" materialDesign:HintAssist.Hint="Serial Number" Text="{Binding Filter,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBox>
+ </StackPanel>
+ </StackPanel>
+ </Grid>
+ <Grid DockPanel.Dock="Bottom">
+ <StackPanel VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Left" Margin="0 0 0 0">
+ <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="#FF7575" BorderBrush="#FF7575" Command="{Binding RemoveDispenserCommand}">
+ <StackPanel Orientation="Horizontal">
+ <materialDesign:PackIcon Kind="Delete" Width="20" Height="20" />
+ <TextBlock Margin="5 0 0 0" FontSize="16">DELETE</TextBlock>
+ </StackPanel>
+ </Button>
+ <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="#65C682" BorderBrush="#65C682" Command="{Binding AddDispenserCommand}">
+ <StackPanel Orientation="Horizontal">
+ <materialDesign:PackIcon Kind="Plus" Width="20" Height="20" />
+ <TextBlock Margin="5 0 0 0" FontSize="16">NEW DISPENSER</TextBlock>
+ </StackPanel>
+ </Button>
+ </StackPanel>
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
+ <Button Margin="50 0 0 0" MinWidth="200" Height="60" Command="{Binding ManageDispenserCommand}">
+ <StackPanel Orientation="Horizontal">
+ <materialDesign:PackIcon Kind="Pencil" Width="24" Height="24" />
+ <TextBlock Margin="10 0 0 0" FontSize="18">EDIT</TextBlock>
+ </StackPanel>
+ </Button>
+ </StackPanel>
+ </Grid>
+ <Grid>
+ <DataGrid Margin="0 0 0 10" BorderBrush="Silver" IsReadOnly="True" BorderThickness="1" Background="#93FFFFFF" AlternatingRowBackground="#C9F6F6F6" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" ItemsSource="{Binding Dispensers}" SelectedItem="{Binding SelectedDispenser}">
+ <DataGrid.CellStyle>
+ <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
+ <Setter Property="BorderThickness" Value="0"/>
+ <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
+ <Setter Property="VerticalContentAlignment" Value="Center"></Setter>
+ </Style>
+ </DataGrid.CellStyle>
+ <DataGrid.Columns>
+ <DataGridTextColumn Header="SERIAL NUMBER" Binding="{Binding SerialNumber}" Width="Auto" />
+ <DataGridTextColumn Header="TYPE" Binding="{Binding DispenserType.Name}" Width="Auto" />
+ <DataGridTextColumn Header="NANOLITER / PULSE" Binding="{Binding NlPerPulse}" Width="Auto" />
+ <DataGridTextColumn Header="INSTALLED" Binding="{Binding Installed}" Width="Auto" />
+ <DataGridTextColumn Header="LAST UPDATED" Binding="{Binding LastUpdated,Converter={StaticResource DateTimeUTCToShortDateTimeConverter}}" Width="Auto" />
+ </DataGrid.Columns>
+ </DataGrid>
+ </Grid>
+ </DockPanel>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/DispensersView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/DispensersView.xaml.cs
new file mode 100644
index 000000000..dda818ff6
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/DispensersView.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.Dispensers.Views
+{
+ /// <summary>
+ /// Interaction logic for DispensersView.xaml
+ /// </summary>
+ public partial class DispensersView : UserControl
+ {
+ public DispensersView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/MainView.xaml
new file mode 100644
index 000000000..4062f8b74
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/MainView.xaml
@@ -0,0 +1,22 @@
+<UserControl x:Class="Tango.MachineStudio.Dispensers.Views.MainView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:observables="clr-namespace:Tango.BL.Entities;assembly=Tango.BL"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:vm="clr-namespace:Tango.MachineStudio.Dispensers.ViewModels"
+ xmlns:global="clr-namespace:Tango.MachineStudio.Dispensers"
+ xmlns:local="clr-namespace:Tango.MachineStudio.Dispensers.Views"
+ xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
+ mc:Ignorable="d"
+ d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">
+ <Grid>
+ <controls:NavigationControl x:Name="navigationControl" TransitionType="Slide">
+ <local:DispensersView />
+ <local:DispenserView/>
+ </controls:NavigationControl>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/MainView.xaml.cs
new file mode 100644
index 000000000..bc3f747e8
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/MainView.xaml.cs
@@ -0,0 +1,36 @@
+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.Core.DI;
+using Tango.MachineStudio.Dispensers.Contracts;
+
+namespace Tango.MachineStudio.Dispensers.Views
+{
+ /// <summary>
+ /// Interaction logic for MainView.xaml
+ /// </summary>
+ public partial class MainView : UserControl , IMainView
+ {
+ public MainView()
+ {
+ InitializeComponent();
+ TangoIOC.Default.Register<IMainView>(this);
+ }
+
+ public void NavigateTo(DispensersNavigationView view)
+ {
+ navigationControl.NavigateTo(view.ToString());
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/packages.config b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/packages.config
new file mode 100644
index 000000000..6676d3860
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/packages.config
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="CommonServiceLocator" version="1.3" targetFramework="net461" />
+ <package id="EntityFramework" version="6.0.0" targetFramework="net461" />
+ <package id="Expression.Blend.Sdk" version="1.0.2" targetFramework="net461" />
+ <package id="MahApps.Metro" version="1.5.0" targetFramework="net461" />
+ <package id="MaterialDesignColors" version="1.1.2" targetFramework="net461" />
+ <package id="MaterialDesignThemes" version="2.3.1.953" targetFramework="net461" />
+</packages> \ No newline at end of file