diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-10-02 17:54:40 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-10-02 17:54:40 +0300 |
| commit | 438f517fd49d1bb10d08d8a279533e82eb67801a (patch) | |
| tree | 2aeb04502ad285f0d6a3109cc7e263b61e0d14a6 /Software | |
| parent | 79be5ab4903b98e2960913d7b07ec49d14410b27 (diff) | |
| download | Tango-438f517fd49d1bb10d08d8a279533e82eb67801a.tar.gz Tango-438f517fd49d1bb10d08d8a279533e82eb67801a.zip | |
Working on RML module..
Diffstat (limited to 'Software')
32 files changed, 968 insertions, 152 deletions
diff --git a/Software/DB/PPC/Tango.mdf b/Software/DB/PPC/Tango.mdf Binary files differindex 0a107bfca..cea4bce53 100644 --- a/Software/DB/PPC/Tango.mdf +++ b/Software/DB/PPC/Tango.mdf diff --git a/Software/DB/PPC/Tango_log.ldf b/Software/DB/PPC/Tango_log.ldf Binary files differindex 44f24cfff..81d900e41 100644 --- a/Software/DB/PPC/Tango_log.ldf +++ b/Software/DB/PPC/Tango_log.ldf diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf Binary files differindex fdf00e2cd..51ca79c83 100644 --- a/Software/DB/Tango.mdf +++ b/Software/DB/Tango.mdf diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf Binary files differindex 62a4048b7..b6b95993f 100644 --- a/Software/DB/Tango_log.ldf +++ b/Software/DB/Tango_log.ldf diff --git a/Software/Graphics/thread_128px.png b/Software/Graphics/thread_128px.png Binary files differnew file mode 100644 index 000000000..36533fbeb --- /dev/null +++ b/Software/Graphics/thread_128px.png diff --git a/Software/Graphics/threads.png b/Software/Graphics/threads.png Binary files differnew file mode 100644 index 000000000..86eb0b335 --- /dev/null +++ b/Software/Graphics/threads.png diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Tango.MachineStudio.ColorLab.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Tango.MachineStudio.ColorLab.csproj index 7e8a9e126..18d51aa09 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Tango.MachineStudio.ColorLab.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Tango.MachineStudio.ColorLab.csproj @@ -74,10 +74,14 @@ </Compile> <Compile Include="ViewModelLocator.cs" /> <Compile Include="ViewModels\CalibrationDataPointVM.cs" /> + <Compile Include="ViewModels\CalibrationDataViewVM.cs" /> <Compile Include="ViewModels\CalibrationDataVM.cs" /> <Compile Include="ViewModels\LiquidVolumeVM.cs" /> <Compile Include="ViewModels\MainViewVM.cs" /> <Compile Include="ViewModels\RgbVM.cs" /> + <Compile Include="Views\CalibrationDataView.xaml.cs"> + <DependentUpon>CalibrationDataView.xaml</DependentUpon> + </Compile> <Compile Include="Views\MainView.xaml.cs"> <DependentUpon>MainView.xaml</DependentUpon> </Compile> @@ -157,6 +161,10 @@ </ProjectReference> </ItemGroup> <ItemGroup> + <Page Include="Views\CalibrationDataView.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> <Page Include="Views\MainView.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> @@ -179,7 +187,7 @@ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <ProjectExtensions> <VisualStudio> - <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" /> + <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" /> </VisualStudio> </ProjectExtensions> </Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/CalibrationDataViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/CalibrationDataViewVM.cs new file mode 100644 index 000000000..c9c83dde0 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/CalibrationDataViewVM.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.MachineStudio.Common; +using Tango.SharedUI; + +namespace Tango.MachineStudio.ColorLab.ViewModels +{ + public class CalibrationDataViewVM : ViewModel + { + private ObservableCollection<CalibrationDataVM> _liquidsCalibrationData; + /// <summary> + /// Gets or sets the liquids calibration data. + /// </summary> + public ObservableCollection<CalibrationDataVM> LiquidsCalibrationData + { + get { return _liquidsCalibrationData; } + set { _liquidsCalibrationData = value; RaisePropertyChangedAuto(); } + } + + /// <summary> + /// Initializes a new instance of the <see cref="CalibrationDataViewVM"/> class. + /// </summary> + public CalibrationDataViewVM() + { + LiquidsCalibrationData = new ObservableCollection<CalibrationDataVM>(); + } + + /// <summary> + /// Initializes a new instance of the <see cref="CalibrationDataViewVM"/> class. + /// </summary> + /// <param name="liquidsCalibrationData">The liquids calibration data.</param> + public CalibrationDataViewVM(ObservableCollection<CalibrationDataVM> liquidsCalibrationData) + { + LiquidsCalibrationData = liquidsCalibrationData; + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs index 02f496b1f..d0fa80a20 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs @@ -150,6 +150,13 @@ namespace Tango.MachineStudio.ColorLab.ViewModels set { _liquidsCalibrationData = value; RaisePropertyChangedAuto(); } } + private CalibrationDataViewVM _calibrationDataViewVM; + public CalibrationDataViewVM CalibrationDataViewVM + { + get { return _calibrationDataViewVM; } + set { _calibrationDataViewVM = value; RaisePropertyChangedAuto(); } + } + private RgbVM _sourceColor; /// <summary> /// Gets or sets the color of the source. @@ -566,6 +573,7 @@ namespace Tango.MachineStudio.ColorLab.ViewModels //RmlProcessParametersTableGroup = SelectedRML.ProcessParametersTablesGroups.ToList().SingleOrDefault(x => x.Active); LiquidsCalibrationData = new ObservableCollection<CalibrationDataVM>(); + CalibrationDataViewVM = new CalibrationDataViewVM(LiquidsCalibrationData); LiquidsCalibrationData.EnableCrossThreadOperations(); foreach (var idsPack in SelectedMachine.Configuration.NoneEmptyIdsPacks.OrderBy(x => x.PackIndex)) diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/CalibrationDataView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/CalibrationDataView.xaml new file mode 100644 index 000000000..28279bd50 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/CalibrationDataView.xaml @@ -0,0 +1,72 @@ +<UserControl x:Class="Tango.MachineStudio.ColorLab.Views.CalibrationDataView" + 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.ColorLab" + xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls" + xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" + xmlns:vm="clr-namespace:Tango.MachineStudio.ColorLab.ViewModels" + xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" + xmlns:local="clr-namespace:Tango.MachineStudio.ColorLab.Views" + mc:Ignorable="d" + d:DesignHeight="450" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:CalibrationDataViewVM, IsDesignTimeCreatable=False}"> + + <UserControl.Resources> + <converters:ColorToIntegerConverter x:Key="ColorToIntegerConverter"></converters:ColorToIntegerConverter> + <converters:ColorComponentToOpacityConverter x:Key="ColorComponentToOpacityConverter" /> + <converters:ColorToComponentsConverter x:Key="ColorToComponentsConverter" /> + </UserControl.Resources> + + <Grid> + <ItemsControl DockPanel.Dock="Top" ItemsSource="{Binding LiquidsCalibrationData}" IsEnabled="{Binding IsFree}"> + <ItemsControl.ItemsPanel> + <ItemsPanelTemplate> + <UniformGrid Rows="1" /> + </ItemsPanelTemplate> + </ItemsControl.ItemsPanel> + + <ItemsControl.ItemTemplate> + <DataTemplate> + <DockPanel Width="220"> + + <StackPanel DockPanel.Dock="Top"> + + <StackPanel DockPanel.Dock="Right" VerticalAlignment="Bottom" HorizontalAlignment="Right" Orientation="Horizontal" Margin="0 0 5 0"> + <Button Style="{StaticResource MaterialDesignFlatButton}" Padding="0" ToolTip="Import from excel" Width="30"> + <materialDesign:PackIcon Kind="Download" Foreground="Black" /> + </Button> + <Button Style="{StaticResource MaterialDesignFlatButton}" Padding="0" ToolTip="Export to excel" Width="30"> + <materialDesign:PackIcon Kind="Upload" Foreground="Black" /> + </Button> + </StackPanel> + <Border Padding="2" Margin="5" CornerRadius="3"> + <Border.Background> + <SolidColorBrush Opacity="0.4" Color="{Binding Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush> + </Border.Background> + <TextBlock Text="{Binding Name}" HorizontalAlignment="Center" Foreground="Black"></TextBlock> + </Border> + </StackPanel> + + <Grid Margin="0 0 0 5"> + <DataGrid Background="#BBFFFFFF" AlternatingRowBackground="#CCE1E1E1" BorderThickness="1" BorderBrush="#202020" Margin="5 0" ItemsSource="{Binding CalibrationPoints}" CanUserResizeColumns="False" CanUserReorderColumns="False" AutoGenerateColumns="False" CanUserAddRows="True" CanUserDeleteRows="True" CanUserSortColumns="False"> + <DataGrid.CellStyle> + <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}"> + <Setter Property="BorderThickness" Value="0"/> + <Setter Property="HorizontalContentAlignment" Value="Left"></Setter> + <Setter Property="FlowDirection" Value="RightToLeft"></Setter> + </Style> + </DataGrid.CellStyle> + <DataGrid.Columns> + <DataGridTextColumn Header="#" Binding="{Binding Index}" Width="Auto" IsReadOnly="True" Foreground="DimGray" FontSize="11" /> + <mahapps:DataGridNumericUpDownColumn Header="X" Binding="{Binding X}" Minimum="0" Maximum="10000" HideUpDownButtons="True" Width="1*"/> + <mahapps:DataGridNumericUpDownColumn Header="Y" Binding="{Binding Y}" Minimum="0" Maximum="10000" HideUpDownButtons="True" Width="1*" /> + </DataGrid.Columns> + </DataGrid> + </Grid> + </DockPanel> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ItemsControl> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/CalibrationDataView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/CalibrationDataView.xaml.cs new file mode 100644 index 000000000..26100f16d --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/CalibrationDataView.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.ColorLab.Views +{ + /// <summary> + /// Interaction logic for CalibrationDataView.xaml + /// </summary> + public partial class CalibrationDataView : UserControl + { + public CalibrationDataView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/MainView.xaml index 78eaf04e8..4e8703a6e 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/MainView.xaml @@ -360,44 +360,8 @@ <TextBlock FontSize="20" Margin="0 20 0 0" TextAlignment="Center">CALIBRATION DATA</TextBlock> </Grid> - <Grid Margin="0 20 0 0"> - <ItemsControl DockPanel.Dock="Top" ItemsSource="{Binding LiquidsCalibrationData}" IsEnabled="{Binding IsFree}"> - <ItemsControl.ItemsPanel> - <ItemsPanelTemplate> - <UniformGrid Rows="1" /> - </ItemsPanelTemplate> - </ItemsControl.ItemsPanel> - - <ItemsControl.ItemTemplate> - <DataTemplate> - <DockPanel> - <Border Padding="2" Margin="5" CornerRadius="3" DockPanel.Dock="Top"> - <Border.Background> - <SolidColorBrush Opacity="0.4" Color="{Binding Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush> - </Border.Background> - <TextBlock Text="{Binding Name}" HorizontalAlignment="Center" Foreground="Black"></TextBlock> - </Border> - - <Grid Margin="0 0 0 5"> - <DataGrid Background="#BBFFFFFF" AlternatingRowBackground="#CCE1E1E1" BorderThickness="1" BorderBrush="#202020" Margin="5 0" ItemsSource="{Binding CalibrationPoints}" CanUserResizeColumns="False" CanUserReorderColumns="False" AutoGenerateColumns="False" CanUserAddRows="True" CanUserDeleteRows="True" CanUserSortColumns="True"> - <DataGrid.CellStyle> - <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}"> - <Setter Property="BorderThickness" Value="0"/> - <Setter Property="HorizontalContentAlignment" Value="Left"></Setter> - <Setter Property="FlowDirection" Value="RightToLeft"></Setter> - </Style> - </DataGrid.CellStyle> - <DataGrid.Columns> - <DataGridTextColumn Header="#" Binding="{Binding Index}" Width="Auto" IsReadOnly="True" Foreground="DimGray" FontSize="11" /> - <mahapps:DataGridNumericUpDownColumn Header="X" Binding="{Binding X}" Minimum="0" Maximum="10000" HideUpDownButtons="True" Width="1*"/> - <mahapps:DataGridNumericUpDownColumn Header="Y" Binding="{Binding Y}" Minimum="0" Maximum="10000" HideUpDownButtons="True" Width="1*" /> - </DataGrid.Columns> - </DataGrid> - </Grid> - </DockPanel> - </DataTemplate> - </ItemsControl.ItemTemplate> - </ItemsControl> + <Grid Margin="0 20 0 0" IsEnabled="{Binding IsFree}"> + <local:CalibrationDataView DataContext="{Binding CalibrationDataViewVM}"></local:CalibrationDataView> </Grid> </DockPanel> </Grid> 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/thread_128px.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/thread_128px.png Binary files differnew file mode 100644 index 000000000..36533fbeb --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/thread_128px.png 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 Binary files differnew file mode 100644 index 000000000..86eb0b335 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/threads.png 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 index fcd933f4b..99b0a3c19 100644 --- 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 @@ -37,12 +37,18 @@ <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" /> @@ -66,6 +72,7 @@ <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> @@ -119,10 +126,18 @@ <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> @@ -135,6 +150,10 @@ <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" /> @@ -153,5 +172,11 @@ <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/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs index 9e108d0a8..b7e7859ac 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs @@ -1,18 +1,23 @@ 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 + public class MainViewVM : StudioViewModel<IMainView> { private INotificationProvider _notification; @@ -26,11 +31,60 @@ namespace Tango.MachineStudio.RML.ViewModels 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(); OnSelectedRmlChanged(); } + set { _selectedRML = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); } } private Rml _activeRML; @@ -40,9 +94,65 @@ namespace Tango.MachineStudio.RML.ViewModels 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() @@ -52,36 +162,21 @@ namespace Tango.MachineStudio.RML.ViewModels private async void LoadRmls() { - //using (_rmls_context = ObservablesContext.CreateDefault()) - //{ - // await Task.Factory.StartNew(() => - // { - // Rmls = _rmls.ToList().ToObservableCollection(); - // }); - //} - } - - private void OnSelectedRmlChanged() - { - if (SelectedRML != null) - { - LoadActiveRML(SelectedRML.Guid); - } - else + using (_rmls_context = ObservablesContext.CreateDefault()) { - UnloadActiveRML(); + await Task.Factory.StartNew(() => + { + Rmls = _rmls_context.Rmls.ToList().ToObservableCollection(); + }); } } - private void UnloadActiveRML() - { - ActiveRML = null; - } - private async void LoadActiveRML(String guid) { using (_notification.PushTaskItem("Loading RML...")) { + IsFree = false; + if (_active_context != null) { _active_context.Dispose(); @@ -89,12 +184,142 @@ namespace Tango.MachineStudio.RML.ViewModels _active_context = ObservablesContext.CreateDefault(); + LoadRmlProperties(); + ActiveRML = await new RmlBuilder(_active_context) .Set(guid) - .WithAllParametersGroup() + .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 index bdd36af7a..ab5207722 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/MainView.xaml @@ -5,10 +5,14 @@ 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 index 0fdcd11b8..20ff4c076 100644 --- 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 @@ -12,17 +12,26 @@ 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 + 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 index 92b8506f5..e77663de4 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml @@ -4,11 +4,283 @@ 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}"> - <Grid> - + + <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 index e01654243..c1bc9ad4a 100644 --- 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 @@ -12,6 +12,9 @@ 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 { @@ -20,9 +23,29 @@ namespace Tango.MachineStudio.RML.Views /// </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 index 2ba5e44c9..b597c1dd2 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml @@ -5,10 +5,61 @@ 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/packages.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/packages.config index efdb0fb1c..d8e0c7e97 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/packages.config +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/packages.config @@ -1,6 +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 diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioViewModel.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioViewModel.cs index 63ff2119a..9ce79703f 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioViewModel.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioViewModel.cs @@ -109,7 +109,10 @@ namespace Tango.MachineStudio.Common /// Called when the view has been attached /// </summary> /// <param name="view">The view.</param> - protected abstract void OnViewAttached(TView view); + protected virtual void OnViewAttached(TView view) + { + //Do Nothing. + } } } diff --git a/Software/Visual_Studio/Tango.BL/Builders/RmlBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/RmlBuilder.cs index 3d288e470..8eab66c85 100644 --- a/Software/Visual_Studio/Tango.BL/Builders/RmlBuilder.cs +++ b/Software/Visual_Studio/Tango.BL/Builders/RmlBuilder.cs @@ -33,7 +33,8 @@ namespace Tango.BL.Builders { return AddStep(2, () => { - Context.ProcessParametersTablesGroups.Where(x => x.RmlGuid == Entity.Guid && x.Active).Include(x => x.ProcessParametersTables).FirstOrDefault(); + var group = Context.ProcessParametersTablesGroups.Where(x => x.RmlGuid == Entity.Guid && x.Active).FirstOrDefault(); + Context.ProcessParametersTables.Where(x => x.ProcessParametersTablesGroupGuid == group.Guid).OrderBy(x => x.TableIndex).ToList(); }); } @@ -57,7 +58,21 @@ namespace Tango.BL.Builders { return AddStep(5, () => { - Context.LiquidTypesRmls.Where(x => x.RmlGuid == Entity.Guid).ToList(); + Context.LiquidTypesRmls.Where(x => x.RmlGuid == Entity.Guid).Include(x => x.LiquidType).ToList(); + }); + } + + public virtual RmlBuilder WithMediaProperties() + { + return AddStep(6, () => + { + Context.MediaMaterials.SingleOrDefault(x => x.Guid == Entity.MediaMaterialGuid); + Context.MediaColors.SingleOrDefault(x => x.Guid == Entity.MediaColorGuid); + Context.MediaPurposes.SingleOrDefault(x => x.Guid == Entity.MediaPurposeGuid); + Context.MediaConditions.SingleOrDefault(x => x.Guid == Entity.MediaConditionGuid); + Context.LinearMassDensityUnits.SingleOrDefault(x => x.Guid == Entity.LinearMassDensityUnitGuid); + Context.FiberShapes.SingleOrDefault(x => x.Guid == Entity.FiberShapeGuid); + Context.FiberSynths.SingleOrDefault(x => x.Guid == Entity.FiberSynthGuid); }); } } diff --git a/Software/Visual_Studio/Tango.BL/Entities/LiquidTypesRml.cs b/Software/Visual_Studio/Tango.BL/Entities/LiquidTypesRml.cs index 2464111da..e6ad7b573 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/LiquidTypesRml.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/LiquidTypesRml.cs @@ -93,6 +93,28 @@ namespace Tango.BL.Entities } + protected Byte[] _defaultcatdata; + + /// <summary> + /// Gets or sets the liquidtypesrml default cat data. + /// </summary> + + [Column("DEFAULT_CAT_DATA")] + + public Byte[] DefaultCatData + { + get + { + return _defaultcatdata; + } + + set + { + _defaultcatdata = value; RaisePropertyChanged(nameof(DefaultCatData)); + } + + } + protected LiquidType _liquidtype; /// <summary> diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/LiquidTypesRml.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/LiquidTypesRml.cs new file mode 100644 index 000000000..c4ccb4ab6 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/LiquidTypesRml.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.PMR.ColorLab; + +namespace Tango.BL.Entities +{ + public partial class LiquidTypesRml + { + public CalibrationData GetCalibrationData() + { + return CalibrationData.Parser.ParseFrom(DefaultCatData); + } + + public void PutCalibrationData(CalibrationData data) + { + DefaultCatData = data.ToBytes(); + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj index 932a0279f..c2d368160 100644 --- a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj +++ b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj @@ -111,6 +111,7 @@ <Compile Include="Dispensing\TransparentLiquidDispensingCalc.cs" /> <Compile Include="EntitiesExtensions\Contact.cs" /> <Compile Include="EntitiesExtensions\LiquidType.cs" /> + <Compile Include="EntitiesExtensions\LiquidTypesRml.cs" /> <Compile Include="EntitiesExtensions\MachineEvent.cs" /> <Compile Include="EntitiesExtensions\ProcessParametersTablesGroup.cs" /> <Compile Include="Entities\Customer.cs" /> @@ -335,7 +336,7 @@ </Target> <ProjectExtensions> <VisualStudio> - <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" /> + <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" /> </VisualStudio> </ProjectExtensions> </Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES_RMLS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES_RMLS.cs index 782f70d6c..dd0425502 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES_RMLS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES_RMLS.cs @@ -20,6 +20,7 @@ namespace Tango.DAL.Remote.DB public string LIQUID_TYPE_GUID { get; set; } public string RML_GUID { get; set; } public double MAX_NL_PER_CM { get; set; } + public byte[] DEFAULT_CAT_DATA { get; set; } public virtual LIQUID_TYPES LIQUID_TYPES { get; set; } public virtual RML RML { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx index 1609463e7..307e09764 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx @@ -661,6 +661,7 @@ <Property Name="LIQUID_TYPE_GUID" Type="varchar" MaxLength="36" Nullable="false" /> <Property Name="RML_GUID" Type="varchar" MaxLength="36" Nullable="false" /> <Property Name="MAX_NL_PER_CM" Type="float" Nullable="false" /> + <Property Name="DEFAULT_CAT_DATA" Type="image" /> </EntityType> <EntityType Name="MACHINE_STUDIO_VERSIONS"> <Key> @@ -3735,6 +3736,7 @@ <Property Name="LIQUID_TYPE_GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" /> <Property Name="RML_GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" /> <Property Name="MAX_NL_PER_CM" Type="Double" Nullable="false" /> + <Property Name="DEFAULT_CAT_DATA" Type="Binary" MaxLength="Max" FixedLength="false" /> <NavigationProperty Name="LIQUID_TYPES" Relationship="RemoteModel.FK_LIQUID_TYPES_RMLS_LIQUID_TYPES" FromRole="LIQUID_TYPES_RMLS" ToRole="LIQUID_TYPES" /> <NavigationProperty Name="RML" Relationship="RemoteModel.FK_LIQUID_TYPES_RMLS_RMLS" FromRole="LIQUID_TYPES_RMLS" ToRole="RML" /> </EntityType> @@ -5993,6 +5995,7 @@ <EntitySetMapping Name="LIQUID_TYPES_RMLS"> <EntityTypeMapping TypeName="RemoteModel.LIQUID_TYPES_RMLS"> <MappingFragment StoreEntitySet="LIQUID_TYPES_RMLS"> + <ScalarProperty Name="DEFAULT_CAT_DATA" ColumnName="DEFAULT_CAT_DATA" /> <ScalarProperty Name="MAX_NL_PER_CM" ColumnName="MAX_NL_PER_CM" /> <ScalarProperty Name="RML_GUID" ColumnName="RML_GUID" /> <ScalarProperty Name="LIQUID_TYPE_GUID" ColumnName="LIQUID_TYPE_GUID" /> diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram index 27afb3f0f..c55d6bcf2 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram @@ -5,81 +5,81 @@ <!-- Diagram content (shape and connector positions) --> <edmx:Diagrams> <Diagram DiagramId="f9ae01d708754bbd997add25a4bacc79" Name="Diagram1"> - <EntityTypeShape EntityType="RemoteModel.ACTION_TYPES" Width="1.5" PointX="13.25" PointY="25.875" /> - <EntityTypeShape EntityType="RemoteModel.ADDRESS" Width="1.5" PointX="3.75" PointY="30.375" /> - <EntityTypeShape EntityType="RemoteModel.APPLICATION_DISPLAY_PANEL_VERSIONS" Width="1.5" PointX="3.75" PointY="51.625" /> - <EntityTypeShape EntityType="RemoteModel.APPLICATION_FIRMWARE_VERSIONS" Width="1.5" PointX="3.75" PointY="64.625" /> - <EntityTypeShape EntityType="RemoteModel.APPLICATION_OS_VERSIONS" Width="1.5" PointX="3.75" PointY="57.375" /> - <EntityTypeShape EntityType="RemoteModel.BRUSH_STOPS" Width="1.5" PointX="15" PointY="15.125" /> - <EntityTypeShape EntityType="RemoteModel.CARTRIDGE_TYPES" Width="1.5" PointX="6" PointY="70.875" /> - <EntityTypeShape EntityType="RemoteModel.CAT" Width="1.5" PointX="5.25" PointY="19.5" /> - <EntityTypeShape EntityType="RemoteModel.CCT" Width="1.5" PointX="5.25" PointY="40.5" /> - <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS" Width="1.5" PointX="12.75" PointY="10.375" /> - <EntityTypeShape EntityType="RemoteModel.COLOR_SPACES" Width="1.5" PointX="6" PointY="11.5" /> - <EntityTypeShape EntityType="RemoteModel.CONFIGURATION" Width="1.5" PointX="6" PointY="56.875" /> - <EntityTypeShape EntityType="RemoteModel.CONTACT" Width="1.5" PointX="3.75" PointY="26.25" /> - <EntityTypeShape EntityType="RemoteModel.CUSTOMER" Width="1.5" PointX="8.25" PointY="14.75" /> - <EntityTypeShape EntityType="RemoteModel.DISPENSER_TYPES" Width="1.5" PointX="6" PointY="33.125" /> - <EntityTypeShape EntityType="RemoteModel.EMBEDDED_FIRMWARE_VERSIONS" Width="1.5" PointX="3.75" PointY="54.5" /> - <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES" Width="1.5" PointX="13.25" PointY="29" /> - <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_ACTIONS" Width="1.5" PointX="15.5" PointY="29.875" /> - <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_CATEGORIES" Width="1.5" PointX="11" PointY="29.875" /> - <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_GROUPS" Width="1.5" PointX="11" PointY="26.75" /> - <EntityTypeShape EntityType="RemoteModel.FIBER_SHAPES" Width="1.5" PointX="0.75" PointY="32.5" /> - <EntityTypeShape EntityType="RemoteModel.FIBER_SYNTHS" Width="1.5" PointX="0.75" PointY="26.625" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_BLOWER_TYPES" Width="1.5" PointX="3.75" PointY="67.875" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_BLOWERS" Width="1.5" PointX="6" PointY="62.625" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_BREAK_SENSOR_TYPES" Width="1.5" PointX="6.75" PointY="52.875" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_BREAK_SENSORS" Width="1.5" PointX="9" PointY="56.625" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCER_TYPES" Width="1.5" PointX="6.75" PointY="77.875" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCERS" Width="1.5" PointX="9" PointY="64.875" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTOR_TYPES" Width="1.5" PointX="9.75" PointY="70.875" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTORS" Width="1.5" PointX="12" PointY="58.5" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROL_TYPES" Width="1.5" PointX="9.75" PointY="52.875" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROLS" Width="1.5" PointX="12" PointY="51.25" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_SPEED_SENSOR_TYPES" Width="1.5" PointX="6.75" PointY="73.875" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_SPEED_SENSORS" Width="1.5" PointX="9" PointY="60.625" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_VERSIONS" Width="1.5" PointX="3.75" PointY="60.375" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDER_TYPES" Width="1.5" PointX="3.75" PointY="71.875" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDERS" Width="1.5" PointX="6" PointY="66.75" /> - <EntityTypeShape EntityType="RemoteModel.HTML_PAGES" Width="1.5" PointX="11" PointY="32.875" /> - <EntityTypeShape EntityType="RemoteModel.IDS_PACK_FORMULAS" Width="1.5" PointX="6" PointY="24.5" /> - <EntityTypeShape EntityType="RemoteModel.IDS_PACKS" Width="1.5" PointX="8.25" PointY="34.875" /> - <EntityTypeShape EntityType="RemoteModel.JOB_RUNS" Width="1.5" PointX="12.75" PointY="21.625" /> - <EntityTypeShape EntityType="RemoteModel.JOB" Width="1.5" PointX="10.5" PointY="16.375" /> - <EntityTypeShape EntityType="RemoteModel.LINEAR_MASS_DENSITY_UNITS" Width="1.5" PointX="0.75" PointY="29.625" /> - <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES" Width="1.5" PointX="3" PointY="12.625" /> - <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES_RMLS" Width="1.5" PointX="5.25" PointY="15.875" /> - <EntityTypeShape EntityType="RemoteModel.MACHINE_STUDIO_VERSIONS" Width="1.5" PointX="10.5" PointY="37.125" /> - <EntityTypeShape EntityType="RemoteModel.MACHINE_VERSIONS" Width="1.5" PointX="6" PointY="8" /> - <EntityTypeShape EntityType="RemoteModel.MACHINE" Width="1.5" PointX="8.25" PointY="18" /> - <EntityTypeShape EntityType="RemoteModel.MACHINES_CONFIGURATIONS" Width="1.5" PointX="10.5" PointY="12.875" /> - <EntityTypeShape EntityType="RemoteModel.MACHINES_EVENTS" Width="1.5" PointX="15.5" PointY="24.375" /> - <EntityTypeShape EntityType="RemoteModel.MEDIA_COLORS" Width="1.5" PointX="0.75" PointY="12.5" /> - <EntityTypeShape EntityType="RemoteModel.MEDIA_CONDITIONS" Width="1.5" PointX="0.75" PointY="20" /> - <EntityTypeShape EntityType="RemoteModel.MEDIA_MATERIALS" Width="1.5" PointX="0.75" PointY="15.875" /> - <EntityTypeShape EntityType="RemoteModel.MEDIA_PURPOSES" Width="1.5" PointX="0.75" PointY="23.75" /> - <EntityTypeShape EntityType="RemoteModel.MID_TANK_TYPES" Width="1.5" PointX="6" PointY="36.375" /> - <EntityTypeShape EntityType="RemoteModel.ORGANIZATION" Width="1.5" PointX="6" PointY="28.5" /> - <EntityTypeShape EntityType="RemoteModel.PERMISSION" Width="1.5" PointX="11.25" PointY="45" /> - <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES" Width="1.5" PointX="7.5" PointY="44.625" /> - <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES_GROUPS" Width="1.5" PointX="5.25" PointY="46.125" /> - <EntityTypeShape EntityType="RemoteModel.RML" Width="1.5" PointX="3" PointY="17.125" /> - <EntityTypeShape EntityType="RemoteModel.ROLE" Width="1.5" PointX="11.25" PointY="40.875" /> - <EntityTypeShape EntityType="RemoteModel.ROLES_PERMISSIONS" Width="1.5" PointX="13.5" PointY="41" /> - <EntityTypeShape EntityType="RemoteModel.SEGMENT" Width="1.5" PointX="12.75" PointY="18.125" /> - <EntityTypeShape EntityType="RemoteModel.SPOOL_TYPES" Width="1.5" PointX="6" PointY="3.375" /> - <EntityTypeShape EntityType="RemoteModel.sysdiagram" Width="1.5" PointX="0.75" PointY="0.75" /> - <EntityTypeShape EntityType="RemoteModel.TANGO_VERSIONS" Width="1.5" PointX="17.5" PointY="19.25" /> - <EntityTypeShape EntityType="RemoteModel.TECH_CONTROLLERS" Width="1.5" PointX="2.75" PointY="0.75" /> - <EntityTypeShape EntityType="RemoteModel.TECH_DISPENSERS" Width="1.5" PointX="0.75" PointY="4.75" /> - <EntityTypeShape EntityType="RemoteModel.TECH_HEATERS" Width="1.5" PointX="2.75" PointY="4.75" /> - <EntityTypeShape EntityType="RemoteModel.TECH_IOS" Width="1.5" PointX="0.75" PointY="7.75" /> - <EntityTypeShape EntityType="RemoteModel.TECH_MONITORS" Width="1.5" PointX="2.75" PointY="7.75" /> - <EntityTypeShape EntityType="RemoteModel.TECH_VALVES" Width="1.5" PointX="8.75" PointY="0.75" /> - <EntityTypeShape EntityType="RemoteModel.USER" Width="1.5" PointX="8.25" PointY="29" /> - <EntityTypeShape EntityType="RemoteModel.USERS_ROLES" Width="1.5" PointX="13.5" PointY="33.875" /> - <EntityTypeShape EntityType="RemoteModel.WINDING_METHODS" Width="1.5" PointX="8.25" PointY="25.875" /> + <EntityTypeShape EntityType="RemoteModel.ACTION_TYPES" Width="1.5" PointX="13.25" PointY="27.125" /> + <EntityTypeShape EntityType="RemoteModel.ADDRESS" Width="1.5" PointX="5.75" PointY="32.625" /> + <EntityTypeShape EntityType="RemoteModel.APPLICATION_DISPLAY_PANEL_VERSIONS" Width="1.5" PointX="5.75" PointY="56.75" /> + <EntityTypeShape EntityType="RemoteModel.APPLICATION_FIRMWARE_VERSIONS" Width="1.5" PointX="5.75" PointY="53.75" /> + <EntityTypeShape EntityType="RemoteModel.APPLICATION_OS_VERSIONS" Width="1.5" PointX="5.75" PointY="66.75" /> + <EntityTypeShape EntityType="RemoteModel.BRUSH_STOPS" Width="1.5" PointX="17" PointY="19" /> + <EntityTypeShape EntityType="RemoteModel.CARTRIDGE_TYPES" Width="1.5" PointX="8" PointY="72.5" /> + <EntityTypeShape EntityType="RemoteModel.CAT" Width="1.5" PointX="5.25" PointY="23.125" /> + <EntityTypeShape EntityType="RemoteModel.CCT" Width="1.5" PointX="5.25" PointY="48.875" /> + <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS" Width="1.5" PointX="14.75" PointY="35.125" /> + <EntityTypeShape EntityType="RemoteModel.COLOR_SPACES" Width="1.5" PointX="8" PointY="34.875" /> + <EntityTypeShape EntityType="RemoteModel.CONFIGURATION" Width="1.5" PointX="8" PointY="59" /> + <EntityTypeShape EntityType="RemoteModel.CONTACT" Width="1.5" PointX="5.75" PointY="28.625" /> + <EntityTypeShape EntityType="RemoteModel.CUSTOMER" Width="1.5" PointX="10.25" PointY="12.875" /> + <EntityTypeShape EntityType="RemoteModel.DISPENSER_TYPES" Width="1.5" PointX="8" PointY="75.375" /> + <EntityTypeShape EntityType="RemoteModel.EMBEDDED_FIRMWARE_VERSIONS" Width="1.5" PointX="5.75" PointY="63.875" /> + <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES" Width="1.5" PointX="13.25" PointY="30.25" /> + <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_ACTIONS" Width="1.5" PointX="15.5" PointY="31.125" /> + <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_CATEGORIES" Width="1.5" PointX="11" PointY="31" /> + <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_GROUPS" Width="1.5" PointX="11" PointY="27.875" /> + <EntityTypeShape EntityType="RemoteModel.FIBER_SHAPES" Width="1.5" PointX="0.75" PointY="21.625" /> + <EntityTypeShape EntityType="RemoteModel.FIBER_SYNTHS" Width="1.5" PointX="0.75" PointY="31.25" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_BLOWER_TYPES" Width="1.5" PointX="8.75" PointY="49.25" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_BLOWERS" Width="1.5" PointX="11" PointY="54.875" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_BREAK_SENSOR_TYPES" Width="1.5" PointX="11.75" PointY="51.25" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_BREAK_SENSORS" Width="1.5" PointX="14" PointY="53.875" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCER_TYPES" Width="1.5" PointX="8.75" PointY="79.25" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCERS" Width="1.5" PointX="11" PointY="59.125" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTOR_TYPES" Width="1.5" PointX="11.75" PointY="69.125" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTORS" Width="1.5" PointX="14" PointY="57.75" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROL_TYPES" Width="1.5" PointX="5.75" PointY="45.25" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROLS" Width="1.5" PointX="8" PointY="52.5" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_SPEED_SENSOR_TYPES" Width="1.5" PointX="5.75" PointY="70.25" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_SPEED_SENSORS" Width="1.5" PointX="8" PointY="64.875" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_VERSIONS" Width="1.5" PointX="5.75" PointY="59.625" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDER_TYPES" Width="1.5" PointX="8.75" PointY="83.25" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDERS" Width="1.5" PointX="11" PointY="65" /> + <EntityTypeShape EntityType="RemoteModel.HTML_PAGES" Width="1.5" PointX="11" PointY="34.125" /> + <EntityTypeShape EntityType="RemoteModel.IDS_PACK_FORMULAS" Width="1.5" PointX="8" PointY="14" /> + <EntityTypeShape EntityType="RemoteModel.IDS_PACKS" Width="1.5" PointX="10.25" PointY="43.75" /> + <EntityTypeShape EntityType="RemoteModel.JOB_RUNS" Width="1.5" PointX="14.75" PointY="18.625" /> + <EntityTypeShape EntityType="RemoteModel.JOB" Width="1.5" PointX="12.5" PointY="16.875" /> + <EntityTypeShape EntityType="RemoteModel.LINEAR_MASS_DENSITY_UNITS" Width="1.5" PointX="0.75" PointY="14.125" /> + <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES" Width="1.5" PointX="3" PointY="28.25" /> + <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES_RMLS" Width="1.5" PointX="8.25" PointY="24.375" /> + <EntityTypeShape EntityType="RemoteModel.MACHINE_STUDIO_VERSIONS" Width="1.5" PointX="15.5" PointY="8.5" /> + <EntityTypeShape EntityType="RemoteModel.MACHINE_VERSIONS" Width="1.5" PointX="8" PointY="38.625" /> + <EntityTypeShape EntityType="RemoteModel.MACHINE" Width="1.5" PointX="10.25" PointY="16.625" /> + <EntityTypeShape EntityType="RemoteModel.MACHINES_CONFIGURATIONS" Width="1.5" PointX="12.5" PointY="13.5" /> + <EntityTypeShape EntityType="RemoteModel.MACHINES_EVENTS" Width="1.5" PointX="15.5" PointY="14" /> + <EntityTypeShape EntityType="RemoteModel.MEDIA_COLORS" Width="1.5" PointX="0.75" PointY="25" /> + <EntityTypeShape EntityType="RemoteModel.MEDIA_CONDITIONS" Width="1.5" PointX="0.75" PointY="28.25" /> + <EntityTypeShape EntityType="RemoteModel.MEDIA_MATERIALS" Width="1.5" PointX="0.75" PointY="17" /> + <EntityTypeShape EntityType="RemoteModel.MEDIA_PURPOSES" Width="1.5" PointX="0.75" PointY="34.125" /> + <EntityTypeShape EntityType="RemoteModel.MID_TANK_TYPES" Width="1.5" PointX="8" PointY="69.375" /> + <EntityTypeShape EntityType="RemoteModel.ORGANIZATION" Width="1.5" PointX="8" PointY="30.875" /> + <EntityTypeShape EntityType="RemoteModel.PERMISSION" Width="1.5" PointX="16.25" PointY="0.75" /> + <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES" Width="1.5" PointX="7.5" PointY="17.75" /> + <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES_GROUPS" Width="1.5" PointX="5.25" PointY="19.25" /> + <EntityTypeShape EntityType="RemoteModel.RML" Width="1.5" PointX="3" PointY="18.75" /> + <EntityTypeShape EntityType="RemoteModel.ROLE" Width="1.5" PointX="16.25" PointY="4.625" /> + <EntityTypeShape EntityType="RemoteModel.ROLES_PERMISSIONS" Width="1.5" PointX="18.5" PointY="4.75" /> + <EntityTypeShape EntityType="RemoteModel.SEGMENT" Width="1.5" PointX="14.75" PointY="21.875" /> + <EntityTypeShape EntityType="RemoteModel.SPOOL_TYPES" Width="1.5" PointX="8" PointY="42.125" /> + <EntityTypeShape EntityType="RemoteModel.sysdiagram" Width="1.5" PointX="0.75" PointY="2.25" /> + <EntityTypeShape EntityType="RemoteModel.TANGO_VERSIONS" Width="1.5" PointX="19.5" PointY="23" /> + <EntityTypeShape EntityType="RemoteModel.TECH_CONTROLLERS" Width="1.5" PointX="2.75" PointY="2.25" /> + <EntityTypeShape EntityType="RemoteModel.TECH_DISPENSERS" Width="1.5" PointX="4.75" PointY="2.25" /> + <EntityTypeShape EntityType="RemoteModel.TECH_HEATERS" Width="1.5" PointX="0.75" PointY="6.25" /> + <EntityTypeShape EntityType="RemoteModel.TECH_IOS" Width="1.5" PointX="2.75" PointY="6.25" /> + <EntityTypeShape EntityType="RemoteModel.TECH_MONITORS" Width="1.5" PointX="4.75" PointY="5.25" /> + <EntityTypeShape EntityType="RemoteModel.TECH_VALVES" Width="1.5" PointX="6.75" PointY="2.25" /> + <EntityTypeShape EntityType="RemoteModel.USER" Width="1.5" PointX="13.25" PointY="7.75" /> + <EntityTypeShape EntityType="RemoteModel.USERS_ROLES" Width="1.5" PointX="18.5" PointY="8.625" /> + <EntityTypeShape EntityType="RemoteModel.WINDING_METHODS" Width="1.5" PointX="10.25" PointY="9" /> <AssociationConnector Association="RemoteModel.FK_EVENTS_ACTIONS_ACTIONS" /> <AssociationConnector Association="RemoteModel.FK_ORGANIZATIONS_ADDRESSES" /> <AssociationConnector Association="RemoteModel.FK_USERS_ADDRESSES" /> diff --git a/Software/Visual_Studio/Tango.SharedUI/IView.cs b/Software/Visual_Studio/Tango.SharedUI/IView.cs index d26bb68f8..7f57c6121 100644 --- a/Software/Visual_Studio/Tango.SharedUI/IView.cs +++ b/Software/Visual_Studio/Tango.SharedUI/IView.cs @@ -11,9 +11,6 @@ namespace Tango.SharedUI /// </summary> public interface IView { - /// <summary> - /// Occurs when the view is loaded and view model is defined as data context. - /// </summary> - event EventHandler<IView> ViewAttached; + } } |
