diff options
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner')
5 files changed, 77 insertions, 1 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj index 6ae893e72..d5ad86e2a 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj @@ -81,6 +81,9 @@ <Compile Include="ViewModels\MachineCreationDialogVM.cs" /> <Compile Include="ViewModels\MachineVersionDialogVM.cs" /> <Compile Include="ViewModels\MainViewVM.cs" /> + <Compile Include="Views\ColorCalibrationView.xaml.cs"> + <DependentUpon>ColorCalibrationView.xaml</DependentUpon> + </Compile> <Compile Include="Views\MachineCreationDialog.xaml.cs"> <DependentUpon>MachineCreationDialog.xaml</DependentUpon> </Compile> @@ -109,6 +112,10 @@ <Compile Include="Views\SpoolsView.xaml.cs"> <DependentUpon>SpoolsView.xaml</DependentUpon> </Compile> + <Page Include="Views\ColorCalibrationView.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> <Page Include="Views\MachineCreationDialog.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> @@ -230,6 +237,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\machine-full-fx.png" /> @@ -276,7 +287,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.MachineDesigner/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs index 22bf03148..044217c62 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs @@ -112,6 +112,12 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels set { _selectedSpool = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); } } + private ColorLab.ViewModels.MainViewVM _colorLabVM; + public ColorLab.ViewModels.MainViewVM ColorLabVM + { + get { return _colorLabVM; } + set { _colorLabVM = value; RaisePropertyChangedAuto(); } + } #endregion @@ -201,6 +207,7 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels public override async void OnApplicationReady() { MachinesAdapter.MachineVersions = (await MachinesAdapter.Context.MachineVersions.ToListAsync()).ToObservableCollection(); + ColorLabVM = new ColorLab.ViewModels.MainViewVM(_notification) { IsHosted = true }; } #endregion @@ -419,6 +426,8 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels } } + ColorLabVM.InitHost(ActiveMachineAdapter.Context, ActiveMachine, ActiveMachineAdapter.Rmls, ActiveMachineAdapter.Rmls.FirstOrDefault()); + View.NavigateTo(MachineDesignerNavigationView.MachineDetailsView); } catch (Exception ex) @@ -561,6 +570,8 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels ActiveMachine.ProductionDate = DateTime.UtcNow; await ActiveMachineAdapter.Context.SaveChangesAsync(); + await ColorLabVM.SaveChanges(); + if (SelectedMachine != null) { await SelectedMachine.Reload(MachinesAdapter.Context); diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/ColorCalibrationView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/ColorCalibrationView.xaml new file mode 100644 index 000000000..e73c9661f --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/ColorCalibrationView.xaml @@ -0,0 +1,20 @@ +<UserControl x:Class="Tango.MachineStudio.MachineDesigner.Views.ColorCalibrationView" + 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:local="clr-namespace:Tango.MachineStudio.MachineDesigner.Views" + xmlns:global="clr-namespace:Tango.MachineStudio.MachineDesigner" + xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls" + xmlns:observables="clr-namespace:Tango.BL.Entities;assembly=Tango.BL" + xmlns:vm="clr-namespace:Tango.MachineStudio.MachineDesigner.ViewModels" + xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" + xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" + xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" + xmlns:colorLab="clr-namespace:Tango.MachineStudio.ColorLab.Views;assembly=Tango.MachineStudio.ColorLab" + 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> + <colorLab:MainView DataContext="{Binding ColorLabVM}" /> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/ColorCalibrationView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/ColorCalibrationView.xaml.cs new file mode 100644 index 000000000..d617df37f --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/ColorCalibrationView.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 ColorCalibrationView.xaml + /// </summary> + public partial class ColorCalibrationView : UserControl + { + public ColorCalibrationView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineDetailsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineDetailsView.xaml index 31e7f535b..ce60ebf02 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineDetailsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineDetailsView.xaml @@ -42,6 +42,9 @@ <Style TargetType="TabPanel"> <Setter Property="HorizontalAlignment" Value="Center"/> </Style> + <Style TargetType="TabItem" BasedOn="{StaticResource {x:Type TabItem}}"> + <Setter Property="Padding" Value="20,2"></Setter> + </Style> </TabControl.Resources> <TabItem Header="SETTINGS"> <local:MachineSettingsView/> @@ -52,6 +55,9 @@ <TabItem Header="SPOOLS"> <local:SpoolsView/> </TabItem> + <TabItem Header="COLOR CALIBRATION"> + <local:ColorCalibrationView/> + </TabItem> </TabControl> </Grid> </DockPanel> |
