diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-01-03 15:11:49 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-01-03 15:11:49 +0200 |
| commit | 0fc95107f2da4f93f7c135e7c29802bd7d785431 (patch) | |
| tree | 11f6c6e961a30ad942edf38dc6aebee501fed34a /Software/Visual_Studio/MachineStudio/Modules | |
| parent | 63b2a192ba12f8239668b6818db4ad02db68dbbc (diff) | |
| download | Tango-0fc95107f2da4f93f7c135e7c29802bd7d785431.tar.gz Tango-0fc95107f2da4f93f7c135e7c29802bd7d785431.zip | |
Added Mid Tanks to DB.
Started implementing Machine Designer.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules')
27 files changed, 958 insertions, 5 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj index 01cd9d1a9..4faf2125a 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj @@ -125,6 +125,7 @@ <Compile Include="ViewModels\MediaConditionsViewVM.cs" /> <Compile Include="ViewModels\MediaMaterialsViewVM.cs" /> <Compile Include="ViewModels\MediaPurposesViewVM.cs" /> + <Compile Include="ViewModels\MidTankTypesViewVM.cs" /> <Compile Include="ViewModels\MultiComboVM.cs" /> <Compile Include="ViewModels\OrganizationsViewVM.cs" /> <Compile Include="ViewModels\PermissionsViewVM.cs" /> @@ -140,6 +141,12 @@ <Compile Include="Views\DBViews\ActionTypeView.xaml.cs"> <DependentUpon>ActionTypeView.xaml</DependentUpon> </Compile> + <Compile Include="Views\DBViews\MidTankTypesView.xaml.cs"> + <DependentUpon>MidTankTypesView.xaml</DependentUpon> + </Compile> + <Compile Include="Views\DBViews\MidTankTypeView.xaml.cs"> + <DependentUpon>MidTankTypeView.xaml</DependentUpon> + </Compile> <Compile Include="Views\DBViews\CatsView.xaml.cs"> <DependentUpon>CatsView.xaml</DependentUpon> </Compile> @@ -367,6 +374,14 @@ <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> + <Page Include="Views\DBViews\MidTankTypesView.xaml"> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + </Page> + <Page Include="Views\DBViews\MidTankTypeView.xaml"> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + </Page> <Page Include="Views\DBViews\CatsView.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs index 857f0d3cf..3079f8e5f 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs @@ -41,6 +41,7 @@ namespace Tango.MachineStudio.DB SimpleIoc.Default.Register<LiquidTypesViewVM>(); SimpleIoc.Default.Register<CartridgesViewVM>(); SimpleIoc.Default.Register<CartridgeTypesViewVM>(); + SimpleIoc.Default.Register<MidTankTypesViewVM>(); SimpleIoc.Default.Register<EventTypesViewVM>(); SimpleIoc.Default.Register<ActionTypesViewVM>(); @@ -339,5 +340,13 @@ namespace Tango.MachineStudio.DB return ServiceLocator.Current.GetInstance<CatsViewVM>(); } } + + public static MidTankTypesViewVM MidTankTypesViewVM + { + get + { + return ServiceLocator.Current.GetInstance<MidTankTypesViewVM>(); + } + } } }
\ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MidTankTypesViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MidTankTypesViewVM.cs new file mode 100644 index 000000000..6203a8fe3 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MidTankTypesViewVM.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.DAL.Observables; +using Tango.MachineStudio.Common.Notifications; + +namespace Tango.MachineStudio.DB.ViewModels +{ + public class MidTankTypesViewVM : DbTableViewModel<MidTankType> + { + public MidTankTypesViewVM(INotificationProvider notification) : base(notification) + { + + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackView.xaml index be6b135ce..699a9ceb6 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackView.xaml @@ -51,11 +51,20 @@ </DataTemplate> </ComboBox.ItemTemplate> </ComboBox> - <TextBlock Text="Cartridge:" FontWeight="Bold"></TextBlock> - <ComboBox ItemsSource="{Binding Adapter.Cartridges}" SelectedItem="{Binding EditEntity.Cartridge,Mode=TwoWay}"> + <TextBlock Text="Cartridge Type:" FontWeight="Bold"></TextBlock> + <ComboBox ItemsSource="{Binding Adapter.CartridgeTypes}" SelectedItem="{Binding EditEntity.CartridgeTypes,Mode=TwoWay}"> <ComboBox.ItemTemplate> <DataTemplate> - <TextBlock><Run Text="{Binding SerialNumber}"></Run><Run>,</Run> <Run Text="{Binding CartridgeTypes.Name}"></Run></TextBlock> + <TextBlock><Run Text="{Binding Name}"></Run></TextBlock> + </DataTemplate> + </ComboBox.ItemTemplate> + </ComboBox> + + <TextBlock Text="Mid Tank Type:" FontWeight="Bold"></TextBlock> + <ComboBox ItemsSource="{Binding Adapter.MidTankTypes}" SelectedItem="{Binding EditEntity.MidTankTypes,Mode=TwoWay}"> + <ComboBox.ItemTemplate> + <DataTemplate> + <TextBlock><Run Text="{Binding Name}"></Run></TextBlock> </DataTemplate> </ComboBox.ItemTemplate> </ComboBox> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml index 7720a07ae..4a35b1900 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml @@ -43,10 +43,17 @@ </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> - <DataGridTemplateColumn Header="Cartridge"> + <DataGridTemplateColumn Header="Cartridge Type"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> - <TextBlock><Run Text="{Binding Cartridge.SerialNumber}"></Run><Run>,</Run> <Run Text="{Binding Dispenser.CartridgeTypes.Name}"></Run></TextBlock> + <TextBlock><Run Text="{Binding CartridgeTypes.Name}"></Run></TextBlock> + </DataTemplate> + </DataGridTemplateColumn.CellTemplate> + </DataGridTemplateColumn> + <DataGridTemplateColumn Header="Mid Tank Type"> + <DataGridTemplateColumn.CellTemplate> + <DataTemplate> + <TextBlock><Run Text="{Binding MidTankTypes.Name}"></Run></TextBlock> </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MidTankTypeView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MidTankTypeView.xaml new file mode 100644 index 000000000..c6875a1da --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MidTankTypeView.xaml @@ -0,0 +1,31 @@ +<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.MidTankTypeView" + 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:mahapps="http://metro.mahapps.com/winfx/xaml/controls" + xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls" + xmlns:colorPicker="clr-namespace:Tango;assembly=Tango.ColorPicker" + xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" + xmlns:vm="clr-namespace:Tango.MachineStudio.DB.ViewModels" + xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews" + mc:Ignorable="d" + d:DesignHeight="400" d:DesignWidth="300" d:DataContext="{d:DesignInstance Type=vm:MidTankTypesViewVM, IsDesignTimeCreatable=False}"> + + <Grid> + <controls:TableGrid> + <TextBlock Text="ID:" FontWeight="Bold"></TextBlock> + <TextBox Text="{Binding EditEntity.ID}" IsReadOnly="True"></TextBox> + <TextBlock Text="GUID:" FontWeight="Bold"></TextBlock> + <TextBox Text="{Binding EditEntity.Guid}" IsReadOnly="True"></TextBox> + <TextBlock Text="Last Updated:" FontWeight="Bold"></TextBlock> + <TextBox Text="{Binding EditEntity.LastUpdated}" IsReadOnly="True"></TextBox> + <TextBlock Text="Code:" FontWeight="Bold"></TextBlock> + <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding EditEntity.Code,Mode=TwoWay}"></mahapps:NumericUpDown> + <TextBlock Text="Name:" FontWeight="Bold"></TextBlock> + <TextBox Text="{Binding EditEntity.Name,Mode=TwoWay}"></TextBox> + <TextBlock Text="Liters Capacity:" FontWeight="Bold"></TextBlock> + <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.LiterCapacity,Mode=TwoWay}"></mahapps:NumericUpDown> + </controls:TableGrid> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MidTankTypeView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MidTankTypeView.xaml.cs new file mode 100644 index 000000000..5b279f2e0 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MidTankTypeView.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.MachineStudio.DB.Views.DBViews +{ + /// <summary> + /// Interaction logic for MachineView.xaml + /// </summary> + public partial class MidTankTypeView : UserControl + { + public MidTankTypeView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MidTankTypesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MidTankTypesView.xaml new file mode 100644 index 000000000..a808b8438 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MidTankTypesView.xaml @@ -0,0 +1,25 @@ +<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.MidTankTypesView" + 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.DB" + xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls" + xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" + xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" + mc:Ignorable="d" + d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.MidTankTypesViewVM}"> + <Grid> + <controls:DbTableView> + <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.MidTankTypesViewSource}" SelectedItem="{Binding SelectedEntity}" AutoGenerateColumns="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsReadOnly="True"> + <DataGrid.Columns> + <DataGridTextColumn Header="ID" Binding="{Binding ID}"></DataGridTextColumn> + <DataGridTextColumn Header="GUID" Binding="{Binding Guid}"></DataGridTextColumn> + <DataGridTextColumn Header="Code" Binding="{Binding Code}"></DataGridTextColumn> + <DataGridTextColumn Header="Name" Binding="{Binding Name}"></DataGridTextColumn> + <DataGridTextColumn Header="Capacity" Binding="{Binding LiterCapacity}"></DataGridTextColumn> + </DataGrid.Columns> + </DataGrid> + </controls:DbTableView> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MidTankTypesView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MidTankTypesView.xaml.cs new file mode 100644 index 000000000..020e9dcc2 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MidTankTypesView.xaml.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using Tango.MachineStudio.DB.CustomAttributes; +using Tango.MachineStudio.DB.Managers; +using Tango.SharedUI.Controls; + +namespace Tango.MachineStudio.DB.Views.DBViews +{ + /// <summary> + /// Interaction logic for MachinesView.xaml + /// </summary> + [DBView] + public partial class MidTankTypesView : UserControl + { + public MidTankTypesView() : base() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Images/dispenser.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Images/dispenser.png Binary files differnew file mode 100644 index 000000000..82cf1a39a --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Images/dispenser.png diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Images/machine-full-fx.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Images/machine-full-fx.png Binary files differnew file mode 100644 index 000000000..b3c497546 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Images/machine-full-fx.png diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Images/machine-sketch.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Images/machine-sketch.png Binary files differnew file mode 100644 index 000000000..a4e1ae2a8 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Images/machine-sketch.png diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Images/mid-tank.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Images/mid-tank.png Binary files differnew file mode 100644 index 000000000..d22896e86 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Images/mid-tank.png diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Images/ti-tm4c129x.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Images/ti-tm4c129x.png Binary files differnew file mode 100644 index 000000000..9c280255e --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Images/ti-tm4c129x.png diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/MachineDesignerModule.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/MachineDesignerModule.cs new file mode 100644 index 000000000..e7b343db8 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/MachineDesignerModule.cs @@ -0,0 +1,39 @@ +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.DAL.Observables; +using Tango.MachineStudio.Common; +using Tango.MachineStudio.MachineDesigner.Views; +using Tango.SharedUI.Helpers; + +namespace Tango.MachineStudio.MachineDesigner +{ + public class MachineDesignerModule : IStudioModule + { + public string Name => "Machine Designer"; + + public string Description => "Provides a graphical control over machine configurations. Create, manage and deploy machine configurations using simple drag and drop interface."; + + public BitmapSource Image => ResourceHelper.GetImageFromResources("Images/machine-sketch.png"); + + public FrameworkElement MainView => new MainView(); + + public Permissions Permission => Permissions.RunDeveloperModule; + + public bool IsInitialized => true; + + public void Dispose() + { + + } + + public void Initialize() + { + + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..2470d1d64 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Properties/AssemblyInfo.cs @@ -0,0 +1,18 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +[assembly: AssemblyTitle("Tango - Machine Studio Machine Designer Module")] + +[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.MachineDesigner/Properties/Resources.Designer.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Properties/Resources.Designer.cs new file mode 100644 index 000000000..83f9d4088 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/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.MachineDesigner.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.MachineDesigner.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.MachineDesigner/Properties/Resources.resx b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Properties/Resources.resx new file mode 100644 index 000000000..af7dbebba --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/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.MachineDesigner/Properties/Settings.Designer.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Properties/Settings.Designer.cs new file mode 100644 index 000000000..7dbfd3b21 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/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.MachineDesigner.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.MachineDesigner/Properties/Settings.settings b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Properties/Settings.settings new file mode 100644 index 000000000..033d7a5e9 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/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.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj new file mode 100644 index 000000000..41157a0be --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj @@ -0,0 +1,177 @@ +<?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>{D0CE8122-077D-42A2-9490-028AE4769B52}</ProjectGuid> + <OutputType>library</OutputType> + <RootNamespace>Tango.MachineStudio.MachineDesigner</RootNamespace> + <AssemblyName>Tango.MachineStudio.MachineDesigner</AssemblyName> + <TargetFrameworkVersion>v4.6</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\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>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="GalaSoft.MvvmLight, Version=5.3.0.19026, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL"> + <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.dll</HintPath> + </Reference> + <Reference Include="GalaSoft.MvvmLight.Extras, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL"> + <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath> + </Reference> + <Reference Include="GalaSoft.MvvmLight.Platform, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL"> + <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.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.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="ViewModelLocator.cs" /> + <Compile Include="ViewModels\MainViewVM.cs" /> + <Compile Include="Views\MainView.xaml.cs"> + <DependentUpon>MainView.xaml</DependentUpon> + </Compile> + <Compile Include="..\..\..\Versioning\GlobalVersionInfo.cs"> + <Link>GlobalVersionInfo.cs</Link> + </Compile> + <Compile Include="MachineDesignerModule.cs" /> + <Page Include="Views\MainView.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> + </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.ColorPicker\Tango.ColorPicker.csproj"> + <Project>{a2f5af44-29ff-45d6-9d25-ecda5cce88b5}</Project> + <Name>Tango.ColorPicker</Name> + </ProjectReference> + <ProjectReference Include="..\..\..\Tango.Core\Tango.Core.csproj"> + <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project> + <Name>Tango.Core</Name> + </ProjectReference> + <ProjectReference Include="..\..\..\Tango.DAL.Observables\Tango.DAL.Observables.csproj"> + <Project>{0ecd6da8-7aa6-48d9-8b65-279d176ad9af}</Project> + <Name>Tango.DAL.Observables</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.Synchronization\Tango.Synchronization.csproj"> + <Project>{7ada4e86-cad7-4968-a210-3a8a9e5153ab}</Project> + <Name>Tango.Synchronization</Name> + </ProjectReference> + <ProjectReference Include="..\..\..\Tango.Transport\Tango.Transport.csproj"> + <Project>{74e700b0-1156-4126-be40-ee450d3c3026}</Project> + <Name>Tango.Transport</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\machine-full-fx.png" /> + <Resource Include="Images\machine-sketch.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\mid-tank.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\dispenser.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\ti-tm4c129x.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.MachineDesigner/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModelLocator.cs new file mode 100644 index 000000000..66018e09c --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModelLocator.cs @@ -0,0 +1,31 @@ +using GalaSoft.MvvmLight; +using GalaSoft.MvvmLight.Ioc; +using Microsoft.Practices.ServiceLocation; +using Tango.MachineStudio.MachineDesigner.ViewModels; + +namespace Tango.MachineStudio.MachineDesigner +{ + /// <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() + { + ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default); + SimpleIoc.Default.Register<MainViewVM>(); + } + + public static MainViewVM MainViewVM + { + get + { + return ServiceLocator.Current.GetInstance<MainViewVM>(); + } + } + } +}
\ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs new file mode 100644 index 000000000..120ae7972 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.DAL.Observables; +using Tango.SharedUI; + +namespace Tango.MachineStudio.MachineDesigner.ViewModels +{ + public class MainViewVM : ViewModel + { + private ObservablesEntitiesAdapter _adapter; + /// <summary> + /// Gets or sets the db adapter. + /// </summary> + public ObservablesEntitiesAdapter Adapter + { + get { return _adapter; } + set { _adapter = value; RaisePropertyChangedAuto(); } + } + + private Machine _machine; + /// <summary> + /// Gets or sets the machine. + /// </summary> + public Machine Machine + { + get { return _machine; } + set { _machine = value; RaisePropertyChangedAuto(); } + } + + private Configuration _configuration; + /// <summary> + /// Gets or sets the configuration. + /// </summary> + public Configuration Configuration + { + get { return _configuration; } + set { _configuration = value; RaisePropertyChangedAuto(); } + } + + /// <summary> + /// Initializes a new instance of the <see cref="MainViewVM"/> class. + /// </summary> + public MainViewVM() + { + Adapter = ObservablesEntitiesAdapter.Instance; + Machine = Adapter.Machines.First(); + Configuration = Machine.Configuration; + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml new file mode 100644 index 000000000..cc0b43e48 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml @@ -0,0 +1,198 @@ +<UserControl x:Class="Tango.MachineStudio.MachineDesigner.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:dragAndDrop="clr-namespace:Tango.DragAndDrop;assembly=Tango.DragAndDrop" + xmlns:global="clr-namespace:Tango.MachineStudio.MachineDesigner" + xmlns:local="clr-namespace:Tango.MachineStudio.MachineDesigner.Views" + mc:Ignorable="d" + d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.MainViewVM}"> + <Grid> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="477*"/> + <ColumnDefinition Width="250"/> + </Grid.ColumnDefinitions> + + <Grid> + <Viewbox MaxWidth="900"> + <Grid> + <Image Source="../Images/machine-full-fx.png" MaxWidth="800" RenderOptions.BitmapScalingMode="Fant"> + <Image.Effect> + <DropShadowEffect ShadowDepth="0" BlurRadius="20" Opacity="1" RenderingBias="Performance" Color="DimGray"></DropShadowEffect> + </Image.Effect> + </Image> + + <Canvas> + <Grid Canvas.Top="410" Canvas.Left="420" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="310" Height="90"> + <UniformGrid Columns="8"> + <Grid Margin="2"> + <Image Source="../Images/mid-tank.png" RenderOptions.BitmapScalingMode="Fant"></Image> + <Rectangle Margin="4 25 4 1"> + <Rectangle.Fill> + <LinearGradientBrush StartPoint="0,0" EndPoint="0,0.8" Opacity="0.8"> + <GradientStop Offset="0" Color="Transparent" /> + <GradientStop Offset="1" Color="#FF00E8FF"/> + </LinearGradientBrush> + </Rectangle.Fill> + </Rectangle> + </Grid> + <Grid Margin="2"> + <Image Source="../Images/mid-tank.png" RenderOptions.BitmapScalingMode="Fant"></Image> + <Rectangle Margin="4 25 4 1"> + <Rectangle.Fill> + <LinearGradientBrush StartPoint="0,0" EndPoint="0,0.8" Opacity="0.8"> + <GradientStop Offset="0" Color="Transparent" /> + <GradientStop Offset="1" Color="#FFD900FF"/> + </LinearGradientBrush> + </Rectangle.Fill> + </Rectangle> + </Grid> + <Grid Margin="2"> + <Image Source="../Images/mid-tank.png" RenderOptions.BitmapScalingMode="Fant"></Image> + <Rectangle Margin="4 25 4 1"> + <Rectangle.Fill> + <LinearGradientBrush StartPoint="0,0" EndPoint="0,0.8" Opacity="0.8"> + <GradientStop Offset="0" Color="Transparent" /> + <GradientStop Offset="1" Color="#FFFAFF00"/> + </LinearGradientBrush> + </Rectangle.Fill> + </Rectangle> + </Grid> + <Grid Margin="2"> + <Image Source="../Images/mid-tank.png" RenderOptions.BitmapScalingMode="Fant"></Image> + <Rectangle Margin="4 25 4 1"> + <Rectangle.Fill> + <LinearGradientBrush StartPoint="0,0" EndPoint="0,0.8" Opacity="0.8"> + <GradientStop Offset="0" Color="Transparent" /> + <GradientStop Offset="1" Color="Black"/> + </LinearGradientBrush> + </Rectangle.Fill> + </Rectangle> + </Grid> + <Grid Margin="2"> + <Image Source="../Images/mid-tank.png" RenderOptions.BitmapScalingMode="Fant"></Image> + <Rectangle Margin="4 25 4 1"> + <Rectangle.Fill> + <LinearGradientBrush StartPoint="0,0" EndPoint="0,0.8" Opacity="0.8"> + <GradientStop Offset="0" Color="Transparent" /> + <GradientStop Offset="1" Color="White"/> + </LinearGradientBrush> + </Rectangle.Fill> + </Rectangle> + </Grid> + <Image Source="../Images/mid-tank.png" RenderOptions.BitmapScalingMode="Fant" Margin="2"></Image> + <Image Source="../Images/mid-tank.png" RenderOptions.BitmapScalingMode="Fant" Margin="2"></Image> + <Image Source="../Images/mid-tank.png" RenderOptions.BitmapScalingMode="Fant" Margin="2"></Image> + </UniformGrid> + <Rectangle VerticalAlignment="Bottom" Stroke="#202020" StrokeThickness="1"> + <Rectangle.Effect> + <DropShadowEffect></DropShadowEffect> + </Rectangle.Effect> + </Rectangle> + </Grid> + + <Grid Width="310" Height="90" Canvas.Top="314" Canvas.Left="420"> + <UniformGrid Columns="8"> + <Grid Margin="2"> + <Image Source="../Images/dispenser.png" RenderOptions.BitmapScalingMode="Fant"></Image> + <Rectangle Margin="14 25 13 34"> + <Rectangle.Fill> + <LinearGradientBrush StartPoint="0,0" EndPoint="0,0.8" Opacity="0.8"> + <GradientStop Offset="0" Color="Transparent" /> + <GradientStop Offset="1" Color="#FF00E8FF"/> + </LinearGradientBrush> + </Rectangle.Fill> + </Rectangle> + </Grid> + + <Grid Margin="2"> + <Image Source="../Images/dispenser.png" RenderOptions.BitmapScalingMode="Fant"></Image> + <Rectangle Margin="14 25 13 34"> + <Rectangle.Fill> + <LinearGradientBrush StartPoint="0,0" EndPoint="0,0.8" Opacity="0.8"> + <GradientStop Offset="0" Color="Transparent" /> + <GradientStop Offset="1" Color="#FFA800FF"/> + </LinearGradientBrush> + </Rectangle.Fill> + </Rectangle> + </Grid> + + <Grid Margin="2"> + <Image Source="../Images/dispenser.png" RenderOptions.BitmapScalingMode="Fant"></Image> + <Rectangle Margin="14 25 13 34"> + <Rectangle.Fill> + <LinearGradientBrush StartPoint="0,0" EndPoint="0,0.8" Opacity="0.8"> + <GradientStop Offset="0" Color="Transparent" /> + <GradientStop Offset="1" Color="#FFE9FF00"/> + </LinearGradientBrush> + </Rectangle.Fill> + </Rectangle> + </Grid> + <Grid Margin="2"> + <Image Source="../Images/dispenser.png" RenderOptions.BitmapScalingMode="Fant"></Image> + <Rectangle Margin="14 25 13 34"> + <Rectangle.Fill> + <LinearGradientBrush StartPoint="0,0" EndPoint="0,0.8" Opacity="0.8"> + <GradientStop Offset="0" Color="Transparent" /> + <GradientStop Offset="1" Color="Black"/> + </LinearGradientBrush> + </Rectangle.Fill> + </Rectangle> + </Grid> + <Grid Margin="2"> + <Image Source="../Images/dispenser.png" RenderOptions.BitmapScalingMode="Fant"></Image> + </Grid> + <Grid Margin="2"> + <Image Source="../Images/dispenser.png" RenderOptions.BitmapScalingMode="Fant"></Image> + </Grid> + <Grid Margin="2"> + <Image Source="../Images/dispenser.png" RenderOptions.BitmapScalingMode="Fant"></Image> + </Grid> + <Grid Margin="2"> + <Image Source="../Images/dispenser.png" RenderOptions.BitmapScalingMode="Fant"></Image> + </Grid> + </UniformGrid> + </Grid> + + <Grid Width="100" Height="100" Canvas.Left="70" Canvas.Top="331"> + <Image Source="../Images/ti-tm4c129x.png" RenderOptions.BitmapScalingMode="Fant"></Image> + </Grid> + + <TextBlock Canvas.Top="163" Canvas.Left="288" FontStyle="Italic" Foreground="Gray">Touch Panel:</TextBlock> + <Grid Width="53" Height="55" Canvas.Top="184" Canvas.Left="279"> + <Rectangle Stroke="Gray" VerticalAlignment="Bottom" StrokeThickness="1" StrokeDashArray="5" RenderTransformOrigin="0.5,0.5"/> + <Rectangle Stroke="Gray" HorizontalAlignment="Right" StrokeThickness="1" StrokeDashArray="5" RenderTransformOrigin="0.5,0.5"/> + </Grid> + + <TextBlock Canvas.Top="441" Canvas.Left="156" FontStyle="Italic" Foreground="Gray">Embedded Firmware:</TextBlock> + <Grid Width="82" Height="26" Canvas.Top="410" Canvas.Left="158"> + <Rectangle Stroke="Gray" VerticalAlignment="Top" StrokeThickness="1" StrokeDashArray="5" RenderTransformOrigin="0.5,0.5"/> + <Rectangle Stroke="Gray" HorizontalAlignment="Right" StrokeThickness="1" StrokeDashArray="6" RenderTransformOrigin="0.5,0.5"/> + </Grid> + + <TextBlock Canvas.Top="310" Canvas.Left="340" FontStyle="Italic" Foreground="Gray">Dispensers:</TextBlock> + <Grid Width="53" Height="20" Canvas.Top="331" Canvas.Left="377"> + <Rectangle Stroke="Gray" VerticalAlignment="Bottom" StrokeThickness="1" StrokeDashArray="5" RenderTransformOrigin="0.5,0.5"/> + <Rectangle Stroke="Gray" HorizontalAlignment="Left" StrokeThickness="1" StrokeDashArray="5" RenderTransformOrigin="0.5,0.5"/> + </Grid> + + <TextBlock Canvas.Top="420" Canvas.Left="340" FontStyle="Italic" Foreground="Gray">Mid Tanks:</TextBlock> + <Grid Width="53" Height="44" Canvas.Top="441" Canvas.Left="362"> + <Rectangle Stroke="Gray" VerticalAlignment="Bottom" StrokeThickness="1" StrokeDashArray="5" RenderTransformOrigin="0.5,0.5"/> + <Rectangle Stroke="Gray" HorizontalAlignment="Left" StrokeThickness="1" StrokeDashArray="5" RenderTransformOrigin="0.5,0.5"/> + </Grid> + </Canvas> + </Grid> + </Viewbox> + </Grid> + + <Grid Grid.Column="1" Background="#F6F6F6"> + + </Grid> + </Grid> + + <dragAndDrop:DraggingSurface x:Name="dragSufrace" /> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml.cs new file mode 100644 index 000000000..bcf52aff0 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.MachineStudio.MachineDesigner.Views +{ + /// <summary> + /// Interaction logic for MainView.xaml + /// </summary> + public partial class MainView : UserControl + { + public MainView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/app.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/app.config new file mode 100644 index 000000000..cacd4cd77 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/app.config @@ -0,0 +1,11 @@ +<?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> + </assemblyBinding> + </runtime> +</configuration>
\ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/packages.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/packages.config new file mode 100644 index 000000000..4fd672b32 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/packages.config @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="CommonServiceLocator" version="1.3" targetFramework="net46" /> + <package id="MahApps.Metro" version="1.5.0" targetFramework="net46" /> + <package id="MaterialDesignColors" version="1.1.2" targetFramework="net46" /> + <package id="MaterialDesignThemes" version="2.3.1.953" targetFramework="net46" /> + <package id="MvvmLightLibs" version="5.3.0.0" targetFramework="net46" /> +</packages>
\ No newline at end of file |
