aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-10-03 12:14:39 +0300
committerShlomo Hecht <shlomo@twine-s.com>2018-10-03 12:14:39 +0300
commita4955b69fbbec89a80418ed8e8271e56db61bf32 (patch)
tree53ce5cf60f03b909e815475c1087ddcfad87af81 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML
parent0f546e28ff310f93da65ec6a8e7fd53ae19c0988 (diff)
parent251cf705409697f339828359b6770534116dca5f (diff)
downloadTango-a4955b69fbbec89a80418ed8e8271e56db61bf32.tar.gz
Tango-a4955b69fbbec89a80418ed8e8271e56db61bf32.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/App.config46
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Contracts/IMainView.cs20
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/rml-module.jpgbin0 -> 62359 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/thread_128px.pngbin0 -> 2191 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/threads.pngbin0 -> 315399 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/AssemblyInfo.cs19
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/Resources.Designer.cs62
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/Resources.resx117
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/Settings.Designer.cs30
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/Settings.settings7
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/RMLModule.cs63
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj182
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModelLocator.cs29
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs325
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/MainView.xaml18
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/MainView.xaml.cs37
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml286
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml.cs51
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml65
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/packages.config8
21 files changed, 1393 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/App.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/App.config
new file mode 100644
index 000000000..bd3d48f6d
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/App.config
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <configSections>
+ <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
+ </configSections>
+ <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="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.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/Tango.MachineStudio.RML/Contracts/IMainView.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Contracts/IMainView.cs
new file mode 100644
index 000000000..7431f1ef1
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/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.RML.Contracts
+{
+ public enum RmlNavigationView
+ {
+ RmlsView,
+ RmlView,
+ }
+
+ public interface IMainView : IView
+ {
+ void NavigateTo(RmlNavigationView view);
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/rml-module.jpg b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/rml-module.jpg
new file mode 100644
index 000000000..7999c88fd
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/rml-module.jpg
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/thread_128px.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/thread_128px.png
new file mode 100644
index 000000000..36533fbeb
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/thread_128px.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/threads.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/threads.png
new file mode 100644
index 000000000..86eb0b335
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/threads.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..062f0ace5
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/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 RML Module")]
+[assembly: AssemblyVersion("2.0.11.1737")]
+
+[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/Tango.MachineStudio.RML/Properties/Resources.Designer.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/Resources.Designer.cs
new file mode 100644
index 000000000..fb62b4ba4
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/Resources.Designer.cs
@@ -0,0 +1,62 @@
+//------------------------------------------------------------------------------
+// <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.RML.Properties {
+
+
+ /// <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", "4.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 ((resourceMan == null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.MachineStudio.RML.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/Tango.MachineStudio.RML/Properties/Resources.resx b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/Resources.resx
new file mode 100644
index 000000000..af7dbebba
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/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/Tango.MachineStudio.RML/Properties/Settings.Designer.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/Settings.Designer.cs
new file mode 100644
index 000000000..30784c8b0
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/Settings.Designer.cs
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+// <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.RML.Properties
+{
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.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/Tango.MachineStudio.RML/Properties/Settings.settings b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/Settings.settings
new file mode 100644
index 000000000..033d7a5e9
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/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/Tango.MachineStudio.RML/RMLModule.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/RMLModule.cs
new file mode 100644
index 000000000..fdd8cb124
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/RMLModule.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.RML.Views;
+using Tango.MachineStudio.Common;
+using Tango.SharedUI.Helpers;
+
+namespace Tango.MachineStudio.ColorLab
+{
+ [StudioModule(7)]
+ public class RMLModule : StudioModuleBase
+ {
+ public override string Name
+ {
+ get
+ {
+ return "RML";
+ }
+ }
+
+ public override string Description
+ {
+ get
+ {
+ return "Create and manage twine's recommended media list (RML). Configure RML's default calibration data and process parameters";
+ }
+ }
+
+ public override BitmapSource Image
+ {
+ get
+ {
+ return ResourceHelper.GetImageFromResources("Images/rml-module.jpg");
+ }
+ }
+
+ public override Type MainViewType
+ {
+ get
+ {
+ return typeof(MainView);
+ }
+ }
+
+ public override Permissions Permission
+ {
+ get
+ {
+ return Permissions.RunColorLabModule;
+ }
+ }
+
+ public override void Dispose()
+ {
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj
new file mode 100644
index 000000000..99b0a3c19
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj
@@ -0,0 +1,182 @@
+<?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>{D0186AC0-0FCF-4D3B-9619-54812B6E524B}</ProjectGuid>
+ <OutputType>library</OutputType>
+ <RootNamespace>Tango.MachineStudio.RML</RootNamespace>
+ <AssemblyName>Tango.MachineStudio.RML</AssemblyName>
+ <TargetFrameworkVersion>v4.7.2</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="Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.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="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="RMLModule.cs" />
+ <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>
+ <Compile Include="ViewModelLocator.cs" />
+ <Compile Include="ViewModels\MainViewVM.cs" />
+ <Compile Include="Views\MainView.xaml.cs">
+ <DependentUpon>MainView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\RmlsView.xaml.cs">
+ <DependentUpon>RmlsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\RmlView.xaml.cs">
+ <DependentUpon>RmlView.xaml</DependentUpon>
+ </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="..\..\..\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.CSV\Tango.CSV.csproj">
+ <Project>{58e8825f-0c96-449c-b320-1e82b0aa876b}</Project>
+ <Name>Tango.CSV</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Documents\Tango.Documents.csproj">
+ <Project>{ca87a608-7b17-4c98-88f2-42abee10f4c1}</Project>
+ <Name>Tango.Documents</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.DragAndDrop\Tango.DragAndDrop.csproj">
+ <Project>{b112d89a-a106-41ae-a0c1-4abc84c477f5}</Project>
+ <Name>Tango.DragAndDrop</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Logging\Tango.Logging.csproj">
+ <Project>{bc932dbd-7cdb-488c-99e4-f02cf441f55e}</Project>
+ <Name>Tango.Logging</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.PMR\Tango.PMR.csproj">
+ <Project>{e4927038-348d-4295-aaf4-861c58cb3943}</Project>
+ <Name>Tango.PMR</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>
+ <ProjectReference Include="..\Tango.MachineStudio.ColorLab\Tango.MachineStudio.ColorLab.csproj">
+ <Project>{4d183aca-552b-4135-ae81-7c5a8e5fc3b1}</Project>
+ <Name>Tango.MachineStudio.ColorLab</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\rml-module.jpg" />
+ </ItemGroup>
+ <ItemGroup>
+ <Page Include="Views\MainView.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="Views\RmlsView.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="Views\RmlView.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\threads.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\thread_128px.png" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModelLocator.cs
new file mode 100644
index 000000000..9c2bf2c6b
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModelLocator.cs
@@ -0,0 +1,29 @@
+using Tango.Core.DI;
+using Tango.MachineStudio.RML.ViewModels;
+using Tango.MachineStudio.RML.Views;
+
+namespace Tango.MachineStudio.RML
+{
+ /// <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/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs
new file mode 100644
index 000000000..b7e7859ac
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs
@@ -0,0 +1,325 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+using Tango.BL;
+using Tango.BL.Builders;
+using Tango.BL.Entities;
+using Tango.Core.Commands;
+using Tango.MachineStudio.ColorLab.ViewModels;
+using Tango.MachineStudio.Common;
+using Tango.MachineStudio.Common.Notifications;
+using Tango.MachineStudio.RML.Contracts;
+
+namespace Tango.MachineStudio.RML.ViewModels
+{
+ public class MainViewVM : StudioViewModel<IMainView>
+ {
+ private INotificationProvider _notification;
+
+ private ObservablesContext _rmls_context;
+ private ObservablesContext _active_context;
+
+ private ObservableCollection<Rml> _rmls;
+ public ObservableCollection<Rml> Rmls
+ {
+ get { return _rmls; }
+ set { _rmls = value; RaisePropertyChangedAuto(); }
+ }
+
+ private ObservableCollection<MediaMaterial> _materials;
+ public ObservableCollection<MediaMaterial> Materials
+ {
+ get { return _materials; }
+ set { _materials = value; RaisePropertyChangedAuto(); }
+ }
+
+ private ObservableCollection<MediaColor> _colors;
+ public ObservableCollection<MediaColor> Colors
+ {
+ get { return _colors; }
+ set { _colors = value; RaisePropertyChangedAuto(); }
+ }
+
+ private ObservableCollection<MediaPurpos> _purposes;
+ public ObservableCollection<MediaPurpos> Purposes
+ {
+ get { return _purposes; }
+ set { _purposes = value; RaisePropertyChangedAuto(); }
+ }
+
+ private ObservableCollection<MediaCondition> _conditions;
+ public ObservableCollection<MediaCondition> Conditions
+ {
+ get { return _conditions; }
+ set { _conditions = value; RaisePropertyChangedAuto(); }
+ }
+
+ private ObservableCollection<LinearMassDensityUnit> _linearMassDensityUnits;
+ public ObservableCollection<LinearMassDensityUnit> LinearMassDensityUnits
+ {
+ get { return _linearMassDensityUnits; }
+ set { _linearMassDensityUnits = value; RaisePropertyChangedAuto(); }
+ }
+
+ private ObservableCollection<FiberShape> _fiberShapes;
+ public ObservableCollection<FiberShape> FiberShapes
+ {
+ get { return _fiberShapes; }
+ set { _fiberShapes = value; RaisePropertyChangedAuto(); }
+ }
+
+ private ObservableCollection<FiberSynth> _fiberSynths;
+ public ObservableCollection<FiberSynth> FiberSynths
+ {
+ get { return _fiberSynths; }
+ set { _fiberSynths = value; RaisePropertyChangedAuto(); }
+ }
+
+ private Rml _selectedRML;
+ public Rml SelectedRML
+ {
+ get { return _selectedRML; }
+ set { _selectedRML = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); }
+ }
+
+ private Rml _activeRML;
+ public Rml ActiveRML
+ {
+ get { return _activeRML; }
+ set { _activeRML = value; RaisePropertyChangedAuto(); }
+ }
+
+ private CalibrationDataViewVM _calibrationDataViewVM;
+ public CalibrationDataViewVM CalibrationDataViewVM
+ {
+ get { return _calibrationDataViewVM; }
+ set { _calibrationDataViewVM = value; RaisePropertyChangedAuto(); }
+ }
+
+ private ObservableCollection<LiquidTypesRml> _liquidTypesRmls;
+ public ObservableCollection<LiquidTypesRml> LiquidTypesRmls
+ {
+ get { return _liquidTypesRmls; }
+ set { _liquidTypesRmls = value; RaisePropertyChangedAuto(); }
+ }
+
+ private ProcessParametersTablesGroup _activeProcessParametersGroup;
+ public ProcessParametersTablesGroup ActiveProcessParametersGroup
+ {
+ get { return _activeProcessParametersGroup; }
+ set { _activeProcessParametersGroup = value; RaisePropertyChangedAuto(); }
+ }
+
+ private ICollectionView _activeProcessParametersTableView;
+ public ICollectionView ActiveProcessParametersTableView
+ {
+ get { return _activeProcessParametersTableView; }
+ set { _activeProcessParametersTableView = value; RaisePropertyChangedAuto(); }
+ }
+
+
+ /// <summary>
+ /// Gets or sets the manage RML command.
+ /// </summary>
+ public RelayCommand ManageRmlCommand { get; set; }
+
+ /// <summary>
+ /// Gets or sets the add RML command.
+ /// </summary>
+ public RelayCommand AddRmlCommand { get; set; }
+
+ /// <summary>
+ /// Gets or sets the remove RML command.
+ /// </summary>
+ public RelayCommand RemoveRmlCommand { get; set; }
+
+ public RelayCommand AddProcessParametersTableCommand { get; set; }
+
+ /// <summary>
+ /// Gets or sets the back to RMLS command.
+ /// </summary>
+ public RelayCommand BackToRmlsCommand { get; set; }
+
+ public MainViewVM(INotificationProvider notificationProvider)
+ {
+ _notification = notificationProvider;
+ ManageRmlCommand = new RelayCommand(() => LoadActiveRML(SelectedRML.Guid), () => SelectedRML != null);
+ RemoveRmlCommand = new RelayCommand(RemoveSelectedRml);
+ AddRmlCommand = new RelayCommand(AddNewRml);
+ BackToRmlsCommand = new RelayCommand(BackToRmls);
+ AddProcessParametersTableCommand = new RelayCommand(AddProcessParametersTable);
+ }
+
+ public override void OnApplicationReady()
+ {
+ LoadRmls();
+ }
+
+ private async void LoadRmls()
+ {
+ using (_rmls_context = ObservablesContext.CreateDefault())
+ {
+ await Task.Factory.StartNew(() =>
+ {
+ Rmls = _rmls_context.Rmls.ToList().ToObservableCollection();
+ });
+ }
+ }
+
+ private async void LoadActiveRML(String guid)
+ {
+ using (_notification.PushTaskItem("Loading RML..."))
+ {
+ IsFree = false;
+
+ if (_active_context != null)
+ {
+ _active_context.Dispose();
+ }
+
+ _active_context = ObservablesContext.CreateDefault();
+
+ LoadRmlProperties();
+
+ ActiveRML = await new RmlBuilder(_active_context)
+ .Set(guid)
+ .WithActiveParametersGroup()
+ .WithLiquidFactors()
+ .WithMediaProperties()
+ .BuildAsync();
+
+ ActiveProcessParametersGroup = ActiveRML.ProcessParametersTablesGroups.ToList().FirstOrDefault();
+ ActiveProcessParametersTableView = CollectionViewSource.GetDefaultView(ActiveProcessParametersGroup.ProcessParametersTables);
+ ActiveProcessParametersTableView.SortDescriptions.Add(new SortDescription(nameof(ProcessParametersTable.TableIndex), ListSortDirection.Ascending));
+
+ CalibrationDataViewVM = new CalibrationDataViewVM();
+ LiquidTypesRmls = ActiveRML.LiquidTypesRmls;
+
+ foreach (var liquidTypeRml in LiquidTypesRmls)
+ {
+ CalibrationDataVM catVM = new CalibrationDataVM();
+ catVM.Name = liquidTypeRml.LiquidType.Name;
+ catVM.Color = liquidTypeRml.LiquidType.Color;
+
+ if (liquidTypeRml.DefaultCatData != null)
+ {
+ catVM.CalibrationPoints = liquidTypeRml.GetCalibrationData().CalibrationPoints.Select(x => new CalibrationDataPointVM(x.X, x.Y)).ToObservableCollection();
+ }
+
+ CalibrationDataViewVM.LiquidsCalibrationData.Add(catVM);
+ }
+
+
+ View.NavigateTo(RmlNavigationView.RmlView);
+
+ IsFree = true;
+ }
+ }
+
+ private void LoadRmlProperties()
+ {
+ Materials = _active_context.MediaMaterials.ToObservableCollection();
+ Colors = _active_context.MediaColors.ToObservableCollection();
+ Purposes = _active_context.MediaPurposes.ToObservableCollection();
+ Conditions = _active_context.MediaConditions.ToObservableCollection();
+ LinearMassDensityUnits = _active_context.LinearMassDensityUnits.ToObservableCollection();
+ FiberShapes = _active_context.FiberShapes.ToObservableCollection();
+ FiberSynths = _active_context.FiberSynths.ToObservableCollection();
+ }
+
+ private async void AddNewRml()
+ {
+ var name = _notification.ShowTextInput("Please enter RML name", "Name");
+
+ if (!String.IsNullOrWhiteSpace(name))
+ {
+ if (Rmls.ToList().Exists(x => x.Name == name))
+ {
+ _notification.ShowError("The specified RML name already exists. Please select a different name.");
+ return;
+ }
+
+ using (_notification.PushTaskItem("Creating new RML..."))
+ {
+ IsFree = false;
+
+ if (_active_context != null)
+ {
+ _active_context.Dispose();
+ }
+
+ LoadRmlProperties();
+
+ Rml rml = new Rml();
+ rml.Name = name;
+ rml.Manufacturer = "Twine";
+ rml.Code = Rmls.Max(x => x.Code) + 1;
+ rml.MediaMaterial = Materials.FirstOrDefault();
+ rml.MediaColor = Colors.FirstOrDefault();
+ rml.MediaPurpose = Purposes.FirstOrDefault();
+ rml.MediaCondition = Conditions.FirstOrDefault();
+ rml.LinearMassDensityUnit = LinearMassDensityUnits.FirstOrDefault();
+ rml.FiberShape = FiberShapes.FirstOrDefault();
+ rml.FiberSynth = FiberSynths.FirstOrDefault();
+ _active_context.Rmls.Add(rml);
+ await _active_context.SaveChangesAsync();
+ LoadActiveRML(rml.Guid);
+
+ IsFree = true;
+ }
+ }
+ }
+
+ private void RemoveSelectedRml()
+ {
+
+ }
+
+ private void AddProcessParametersTable()
+ {
+ var name = _notification.ShowTextInput("Enter table name", "Name");
+
+ if (!String.IsNullOrWhiteSpace(name))
+ {
+ _active_context.ProcessParametersTables.Add(new ProcessParametersTable()
+ {
+ ProcessParametersTablesGroup = ActiveProcessParametersGroup,
+ Name = name,
+ TableIndex = ActiveProcessParametersGroup.ProcessParametersTables.Max(x => x.TableIndex) + 1,
+ });
+ }
+ }
+
+ public void OnProcessParametersTableDropped(ProcessParametersTable dragged, ProcessParametersTable dropped)
+ {
+ if (dragged.TableIndex > dropped.TableIndex)
+ {
+ dragged.TableIndex = dropped.TableIndex - 1;
+ }
+ else
+ {
+ dragged.TableIndex = dropped.TableIndex + 1;
+ }
+
+ int index = 0;
+
+ foreach (var table in ActiveProcessParametersGroup.ProcessParametersTables.OrderBy(x => x.TableIndex))
+ {
+ table.TableIndex = index++;
+ }
+
+ ActiveProcessParametersTableView.Refresh();
+ }
+
+ private void BackToRmls()
+ {
+ View.NavigateTo(RmlNavigationView.RmlsView);
+ LoadRmls();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/MainView.xaml
new file mode 100644
index 000000000..ab5207722
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/MainView.xaml
@@ -0,0 +1,18 @@
+<UserControl x:Class="Tango.MachineStudio.RML.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:global="clr-namespace:Tango.MachineStudio.RML"
+ xmlns:vm="clr-namespace:Tango.MachineStudio.RML.ViewModels"
+ xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
+ xmlns:local="clr-namespace:Tango.MachineStudio.RML.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>
+ <controls:NavigationControl x:Name="navigationControl" TransitionType="Slide">
+ <local:RmlsView />
+ <local:RmlView/>
+ </controls:NavigationControl>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/MainView.xaml.cs
new file mode 100644
index 000000000..20ff4c076
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/MainView.xaml.cs
@@ -0,0 +1,37 @@
+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.RML.Contracts;
+using Tango.SharedUI;
+
+namespace Tango.MachineStudio.RML.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(RmlNavigationView view)
+ {
+ navigationControl.NavigateTo(view.ToString());
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml
new file mode 100644
index 000000000..e77663de4
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml
@@ -0,0 +1,286 @@
+<UserControl x:Class="Tango.MachineStudio.RML.Views.RmlView"
+ 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:global="clr-namespace:Tango.MachineStudio.RML"
+ xmlns:observables="clr-namespace:Tango.BL.Entities;assembly=Tango.BL"
+ xmlns:shapes="clr-namespace:Tango.SharedUI.Shapes;assembly=Tango.SharedUI"
+ xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
+ xmlns:editors="clr-namespace:Tango.SharedUI.Editors;assembly=Tango.SharedUI"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:colorLabViews="clr-namespace:Tango.MachineStudio.ColorLab.Views;assembly=Tango.MachineStudio.ColorLab"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:dragAndDrop="clr-namespace:Tango.DragAndDrop;assembly=Tango.DragAndDrop"
+ xmlns:vm="clr-namespace:Tango.MachineStudio.RML.ViewModels"
+ xmlns:local="clr-namespace:Tango.MachineStudio.RML.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:ColorToIntegerConverter x:Key="ColorToIntegerConverter"></converters:ColorToIntegerConverter>
+ </UserControl.Resources>
+
+ <Grid Margin="20">
+ <DockPanel>
+ <Grid DockPanel.Dock="Top">
+ <StackPanel Orientation="Horizontal">
+ <Button Style="{StaticResource MaterialDesignFlatButton}" Height="Auto" Command="{Binding BackToRmlsCommand}">
+ <materialDesign:PackIcon Kind="ArrowLeft" Width="50" Height="50" Foreground="#202020" ToolTip="Back to RML list" />
+ </Button>
+ <TextBlock Text="{Binding ActiveRML.Name}" VerticalAlignment="Center" Margin="10 0 0 0" FontSize="34"></TextBlock>
+ </StackPanel>
+ </Grid>
+
+ <Grid DockPanel.Dock="Bottom">
+
+ </Grid>
+
+ <Grid Margin="0 20">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="78*" MinWidth="100" />
+ <ColumnDefinition Width="5"/>
+ <ColumnDefinition Width="357*" MinWidth="400" />
+ </Grid.ColumnDefinitions>
+ <Grid>
+ <materialDesign:Card Background="{DynamicResource MaterialDesignBackground}" VerticalAlignment="Stretch">
+ <Grid>
+ <DockPanel>
+ <TextBlock DockPanel.Dock="Top" Margin="20 10 0 10" FontSize="16">PROPERTIES</TextBlock>
+ <controls:TableGrid RowHeight="35" Margin="20 0">
+ <TextBlock Text="Name:" ></TextBlock>
+ <TextBox Text="{Binding ActiveRML.Name,UpdateSourceTrigger=PropertyChanged}"></TextBox>
+
+ <TextBlock Text="Manufacturer:" ></TextBlock>
+ <TextBox Text="{Binding ActiveRML.Manufacturer}"></TextBox>
+
+ <TextBlock Text="Material:" ></TextBlock>
+ <ComboBox ItemsSource="{Binding Materials}" SelectedItem="{Binding ActiveRML.MediaMaterial,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>
+
+ <TextBlock Text="Color:" ></TextBlock>
+ <ComboBox ItemsSource="{Binding Colors}" SelectedItem="{Binding ActiveRML.MediaColor,Mode=TwoWay}">
+ <ComboBox.ItemTemplate>
+ <DataTemplate>
+ <StackPanel Orientation="Horizontal">
+ <Rectangle Width="16" Height="16" VerticalAlignment="Center">
+ <Rectangle.Fill>
+ <SolidColorBrush Color="{Binding Color}"></SolidColorBrush>
+ </Rectangle.Fill>
+ </Rectangle>
+ </StackPanel>
+ </DataTemplate>
+ </ComboBox.ItemTemplate>
+ </ComboBox>
+
+ <TextBlock Text="Purpose:" ></TextBlock>
+ <ComboBox ItemsSource="{Binding Purposes}" SelectedItem="{Binding ActiveRML.MediaPurpose,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>
+
+ <TextBlock Text="Condition:" ></TextBlock>
+ <ComboBox ItemsSource="{Binding Conditions}" SelectedItem="{Binding ActiveRML.MediaCondition,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>
+
+ <TextBlock Text="Linear Mass Density Unit:" ></TextBlock>
+ <ComboBox ItemsSource="{Binding LinearMassDensityUnits}" SelectedItem="{Binding ActiveRML.LinearMassDensityUnit,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>
+
+ <TextBlock Text="Fiber Shape:" ></TextBlock>
+ <ComboBox ItemsSource="{Binding FiberShapes}" SelectedItem="{Binding ActiveRML.FiberShape,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>
+
+ <TextBlock Text="Fiber Syntheses:" ></TextBlock>
+ <ComboBox ItemsSource="{Binding FiberSynths}" SelectedItem="{Binding ActiveRML.FiberSynth,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>
+
+ <TextBlock Text="Fiber Size:" ></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ActiveRML.FiberSize,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Fibers Count:" ></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding ActiveRML.NumberOfFibers,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Plies Per Fiber:" ></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding ActiveRML.PliesPerFiber,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Plies Per Thread:" ></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding ActiveRML.PliesPerThread,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Tensile Strength:" ></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ActiveRML.TensileStrength,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Elongation Break Percentage:" ></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ActiveRML.ElongationAtBreakPercentage,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Estimated Thread Diameter:" ></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ActiveRML.EstimatedThreadDiameter,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Twisted:" ></TextBlock>
+ <ToggleButton HorizontalAlignment="Right" IsChecked="{Binding ActiveRML.Twisted}" Style="{StaticResource MaterialDesignSwitchToggleButton}" />
+
+ <TextBlock Text="Air Entanglement:" ></TextBlock>
+ <ToggleButton HorizontalAlignment="Right" IsChecked="{Binding ActiveRML.AirEntanglement}" Style="{StaticResource MaterialDesignSwitchToggleButton}" />
+
+ <TextBlock Text="Lubricant:" ></TextBlock>
+ <ToggleButton HorizontalAlignment="Right" IsChecked="{Binding ActiveRML.Lubricant}" Style="{StaticResource MaterialDesignSwitchToggleButton}" />
+ </controls:TableGrid>
+ </DockPanel>
+ </Grid>
+ </materialDesign:Card>
+ </Grid>
+
+ <GridSplitter Grid.Column="1" HorizontalAlignment="Center" Width="5" VerticalAlignment="Stretch" />
+
+ <Grid Grid.Column="2">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="416*"/>
+ <RowDefinition Height="490"/>
+ </Grid.RowDefinitions>
+
+ <Grid>
+ <DockPanel>
+ <Border DockPanel.Dock="Top" Background="#E9FFFFFF" Margin="20 0" Padding="5" CornerRadius="5">
+ <Border.Effect>
+ <DropShadowEffect Opacity="0.4" />
+ </Border.Effect>
+ <Grid>
+ <TextBlock HorizontalAlignment="Left" Margin="20 0 0 0" FontSize="16">ACTIVE PROCESS GROUP</TextBlock>
+ <Button ToolTip="Add new table" Style="{StaticResource MaterialDesignFlatButton}" Height="Auto" Width="30" HorizontalAlignment="Right" Padding="0" Command="{Binding AddProcessParametersTableCommand}">
+ <materialDesign:PackIcon Kind="Plus" Foreground="#0AC30A" Width="24" Height="24" />
+ </Button>
+ </Grid>
+ </Border>
+ <Grid>
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="0 20">
+ <ItemsControl ItemsSource="{Binding ActiveProcessParametersTableView}">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <StackPanel HorizontalAlignment="Left" Orientation="Horizontal" />
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <DockPanel>
+ <Button DockPanel.Dock="Right" Style="{StaticResource MaterialDesignFlatButton}" Padding="0" VerticalAlignment="Bottom" ToolTip="Remove table" Width="30" Margin="10 0 0 10">
+ <materialDesign:PackIcon Kind="Delete" Width="24" Height="24" Foreground="#FF7D7D" />
+ </Button>
+
+ <Grid Style="{StaticResource draggableDroppableGrid}" dragAndDrop:DragAndDropService.Drop="OnProcessTableDropped">
+ <Border Padding="5" BorderThickness="1" Margin="20 5 0 5" BorderBrush="#101010" Background="#B9FFFFFF">
+ <Grid>
+ <DockPanel Width="300">
+ <TextBox materialDesign:HintAssist.Hint="Table Name" DockPanel.Dock="Top" Text="{Binding Name}"></TextBox>
+
+ <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" Padding="5">
+ <editors:ParameterizedEditor ParameterizedObject="{Binding}">
+ <editors:ParameterizedEditor.ItemsPanel>
+ <ItemsPanelTemplate>
+ <StackPanel IsItemsHost="True" />
+ </ItemsPanelTemplate>
+ </editors:ParameterizedEditor.ItemsPanel>
+ <editors:ParameterizedEditor.DoubleTemplate>
+ <DataTemplate>
+ <DockPanel>
+ <TextBlock IsHitTestVisible="False" Margin="0 5 0 5" Text="{Binding Name}" FontSize="11"></TextBlock>
+ <mahapps:NumericUpDown HorizontalAlignment="Right" Minimum="0" Margin="0 0 5 0" HideUpDownButtons="True" HorizontalContentAlignment="Right" Maximum="10000" StringFormat="0.0" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" Value="{Binding Value,Mode=TwoWay}"></mahapps:NumericUpDown>
+ </DockPanel>
+ </DataTemplate>
+ </editors:ParameterizedEditor.DoubleTemplate>
+ </editors:ParameterizedEditor>
+ </ScrollViewer>
+ </DockPanel>
+ </Grid>
+ </Border>
+
+ <dragAndDrop:DragThumb Background="Transparent" Cursor="SizeAll" ToolTip="Drag and drop" Margin="0 3 -1 0" HorizontalAlignment="Right" VerticalAlignment="Top">
+ <materialDesign:PackIcon HorizontalAlignment="Right" VerticalAlignment="Top" IsHitTestVisible="False" Kind="Drag" Width="32" Height="32" Background="Transparent" />
+ </dragAndDrop:DragThumb>
+ </Grid>
+ </DockPanel>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </StackPanel>
+
+ <dragAndDrop:DraggingSurface x:Name="draggingSurface" />
+ </Grid>
+ </DockPanel>
+ </Grid>
+
+
+ <Grid Grid.Row="1">
+
+ <DockPanel>
+
+ <ScrollViewer VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Auto">
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="120"/>
+ <RowDefinition Height="1*"/>
+ </Grid.RowDefinitions>
+ <Grid Margin="0 0 0 0">
+ <DockPanel>
+ <Border DockPanel.Dock="Top" Background="#E9FFFFFF" Margin="20 0" Padding="5" CornerRadius="5">
+ <Border.Effect>
+ <DropShadowEffect Opacity="0.4" />
+ </Border.Effect>
+ <Grid>
+ <TextBlock HorizontalAlignment="Left" Margin="20 0 0 0" FontSize="16">LIQUID FACTORS</TextBlock>
+
+ <Button ToolTip="Add new liquid factor" HorizontalAlignment="Right" Style="{StaticResource MaterialDesignFlatButton}" Height="Auto" VerticalAlignment="Bottom" Width="30" Padding="0">
+ <materialDesign:PackIcon Kind="Plus" Foreground="#0AC30A" Width="24" Height="24" />
+ </Button>
+ </Grid>
+ </Border>
+ <ItemsControl ItemsSource="{Binding LiquidTypesRmls}" Margin="0 10 0 0">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <UniformGrid IsItemsHost="True" Rows="1"></UniformGrid>
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate DataType="{x:Type observables:LiquidTypesRml}">
+ <Grid Margin="20 0 20 0">
+
+ <Button HorizontalAlignment="Right" Style="{StaticResource MaterialDesignFlatButton}" Padding="0" ToolTip="Delete liquid factor" Width="30">
+ <materialDesign:PackIcon Kind="Delete" Foreground="#FF7D7D" />
+ </Button>
+
+ <StackPanel Margin="0 0 10 0">
+ <TextBlock HorizontalAlignment="Center" FontSize="10" Foreground="DimGray" Text="{Binding LiquidType.Name}"></TextBlock>
+ <Grid Width="58" Height="48" Margin="0 5 0 0">
+ <shapes:Hexagon StrokeThickness="1" Stroke="Gray">
+ <shapes:Hexagon.Fill>
+ <LinearGradientBrush Opacity="0.7" >
+ <GradientStop Color="{Binding LiquidType.Color,Converter={StaticResource ColorToIntegerConverter}}"/>
+ <GradientStop Color="White" Offset="1"/>
+ </LinearGradientBrush>
+ </shapes:Hexagon.Fill>
+ </shapes:Hexagon>
+
+ <TextBox Style="{x:Null}" Background="Transparent" Foreground="Black" BorderThickness="0" Text="{Binding MaxNlPerCm}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontStyle="Italic"></TextBox>
+ </Grid>
+ </StackPanel>
+ </Grid>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </DockPanel>
+ </Grid>
+
+ <Grid Grid.Row="2">
+ <DockPanel>
+
+ <Border DockPanel.Dock="Top" Background="#E9FFFFFF" Margin="20 0" Padding="5" CornerRadius="5">
+ <Border.Effect>
+ <DropShadowEffect Opacity="0.4" />
+ </Border.Effect>
+ <TextBlock HorizontalAlignment="Left" Margin="20 0 0 0" FontSize="16">CALIBRATION DATA</TextBlock>
+ </Border>
+
+ <colorLabViews:CalibrationDataView Margin="0 10 0 0" DataContext="{Binding CalibrationDataViewVM}" />
+ </DockPanel>
+ </Grid>
+ </Grid>
+ </ScrollViewer>
+ </DockPanel>
+ </Grid>
+ </Grid>
+ </Grid>
+ </DockPanel>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml.cs
new file mode 100644
index 000000000..c1bc9ad4a
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml.cs
@@ -0,0 +1,51 @@
+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.BL.Entities;
+using Tango.DragAndDrop;
+using Tango.MachineStudio.RML.ViewModels;
+
+namespace Tango.MachineStudio.RML.Views
+{
+ /// <summary>
+ /// Interaction logic for RmlView.xaml
+ /// </summary>
+ public partial class RmlView : UserControl
+ {
+ private MainViewVM _vm;
+
+ public DraggingSurface DraggingSurface
+ {
+ get { return (DraggingSurface)GetValue(DraggingSurfaceProperty); }
+ set { SetValue(DraggingSurfaceProperty, value); }
+ }
+ public static readonly DependencyProperty DraggingSurfaceProperty =
+ DependencyProperty.Register("DraggingSurface", typeof(DraggingSurface), typeof(RmlView), new PropertyMetadata(null));
+
+
+ public RmlView()
+ {
+ InitializeComponent();
+ DraggingSurface = draggingSurface;
+ Loaded += (_, __) => { _vm = DataContext as MainViewVM; };
+ }
+
+ private void OnProcessTableDropped(object sender, DropEventArgs e)
+ {
+ ProcessParametersTable dragged = e.Draggable.DataContext as ProcessParametersTable;
+ ProcessParametersTable dropped = e.Droppable.DataContext as ProcessParametersTable;
+ _vm.OnProcessParametersTableDropped(dragged, dropped);
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml
new file mode 100644
index 000000000..b597c1dd2
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml
@@ -0,0 +1,65 @@
+<UserControl x:Class="Tango.MachineStudio.RML.Views.RmlsView"
+ 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:global="clr-namespace:Tango.MachineStudio.RML"
+ xmlns:vm="clr-namespace:Tango.MachineStudio.RML.ViewModels"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:local="clr-namespace:Tango.MachineStudio.RML.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">
+ <Image Source="../Images/threads.png" Width="300" Margin="10" />
+ </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 RemoveRmlCommand}">
+ <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 AddRmlCommand}">
+ <StackPanel Orientation="Horizontal">
+ <materialDesign:PackIcon Kind="Plus" Width="20" Height="20" />
+ <TextBlock Margin="5 0 0 0" FontSize="16">NEW RML</TextBlock>
+ </StackPanel>
+ </Button>
+ </StackPanel>
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
+ <Button Margin="50 0 0 0" MinWidth="200" Height="60" Command="{Binding ManageRmlCommand}">
+ <StackPanel Orientation="Horizontal">
+ <TextBlock FontSize="18" VerticalAlignment="Center">MANAGE</TextBlock>
+ <materialDesign:PackIcon Margin="5 0 0 0" Kind="ChevronRight" Width="30" Height="30" />
+ </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 Rmls}" SelectedItem="{Binding SelectedRML}">
+ <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="NAME" Binding="{Binding Name}" Width="1*" />
+ <DataGridTextColumn Header="LAST UPDATED" Binding="{Binding LastUpdated,Converter={StaticResource DateTimeUTCToShortDateTimeConverter}}" Width="1*" />
+ <DataGridTextColumn Header="MANUFACTURER" Binding="{Binding Manufacturer}" Width="1*" />
+ </DataGrid.Columns>
+ </DataGrid>
+ </Grid>
+ </DockPanel>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml.cs
new file mode 100644
index 000000000..66f52d8c8
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.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.RML.Views
+{
+ /// <summary>
+ /// Interaction logic for RmlsView.xaml
+ /// </summary>
+ public partial class RmlsView : UserControl
+ {
+ public RmlsView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/packages.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/packages.config
new file mode 100644
index 000000000..d8e0c7e97
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/packages.config
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="EntityFramework" version="6.0.0" targetFramework="net472" />
+ <package id="Google.Protobuf" version="3.4.1" targetFramework="net472" />
+ <package id="MahApps.Metro" version="1.5.0" targetFramework="net472" />
+ <package id="MaterialDesignColors" version="1.1.2" targetFramework="net472" />
+ <package id="MaterialDesignThemes" version="2.3.1.953" targetFramework="net472" />
+</packages> \ No newline at end of file