diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2024-12-05 02:42:52 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2024-12-05 02:42:52 +0200 |
| commit | 92de61904c6ae3f8455827944b4aa62c5582bbb5 (patch) | |
| tree | d02f1ce1294b93400d7732356d54edf24766af17 /Software/Visual_Studio/MachineStudio/Modules | |
| parent | 84708ec080fb94ccf637ac623967fd0e538c1fb5 (diff) | |
| parent | b77fbb01ed5b63b65f6e755fef9ca49c3e58ea50 (diff) | |
| download | Tango-92de61904c6ae3f8455827944b4aa62c5582bbb5.tar.gz Tango-92de61904c6ae3f8455827944b4aa62c5582bbb5.zip | |
Merged Extra Inks to Software.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules')
10 files changed, 426 insertions, 149 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs index 4fd1a834b..073f79a97 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs @@ -233,7 +233,22 @@ namespace Tango.MachineStudio.Developer.ViewModels public List<LiquidTypesRml> LiquidTypesRmls { get { return _liquidTypesRmls; } - set { _liquidTypesRmls = value; RaisePropertyChangedAuto(); } + set { _liquidTypesRmls = value; RaisePropertyChangedAuto(); RaisePropertyChanged(nameof(LiquidTypesRmlsOrdered)); } + } + + public List<LiquidTypesRml> LiquidTypesRmlsOrdered + { + get + { + if (Settings.UsePreferredLiquidVolumeIndex) + { + return LiquidTypesRmls.OrderBy(x => x.LiquidType.PreferredIndex).ToList(); + } + else + { + return LiquidTypesRmls; + } + } } private ProcessParametersTablesGroup _rmlProcessParametersTablesGroup; @@ -841,6 +856,14 @@ namespace Tango.MachineStudio.Developer.ViewModels { Settings = SettingsManager.Default.GetOrCreate<DeveloperModuleSettings>(); + Settings.PropertyChanged += (x, e) => + { + if (e.PropertyName == nameof(Settings.UsePreferredLiquidVolumeIndex)) + { + RaisePropertyChanged(nameof(LiquidTypesRmlsOrdered)); + } + }; + AutoProcessSelection = Settings.AutoProcessSelection; SelectedJobs = new ObservableCollection<Job>(); @@ -2336,10 +2359,9 @@ namespace Tango.MachineStudio.Developer.ViewModels newJob.Machine = SelectedMachine; - SelectedMachine.Jobs.Add(newJob); var segment = newJob.AddSolidSegment(); - segment.BrushStops[0].SetAllDispensingStepDivisions(BL.Dispensing.DispenserStepDivisions.D8); + segment.BrushStops[0].SetAllDispensingStepDivisions(BL.Dispensing.DispenserStepDivisions.D8, SelectedMachine.Configuration); LogManager.Log("Saving selected machine to database..."); await SelectedMachine.SaveAsync(_machineDbContext); @@ -2407,7 +2429,7 @@ namespace Tango.MachineStudio.Developer.ViewModels stop.Segment = SelectedSegment; stop.ColorSpace = ColorSpaces.FirstOrDefault(); stop.Color = Colors.Black; - stop.SetAllDispensingStepDivisions(BL.Dispensing.DispenserStepDivisions.D8); + stop.SetAllDispensingStepDivisions(BL.Dispensing.DispenserStepDivisions.D8, SelectedMachine.Configuration); stop.SetLiquidVolumes(SelectedMachine.Configuration, SelectedRML, SelectedProcessParametersTable); SelectedSegment.BrushStops.Add(stop); // _activeJobDbContext.BrushStops.Add(stop); diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml index 4217d9712..5d9325145 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml @@ -793,7 +793,7 @@ </StackPanel> - <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="60 40 250 0" Visibility="{Binding IsSideBarOpened,Converter={StaticResource BooleanToVisibilityInverseConverter}}"> + <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="60 25 350 0" Visibility="{Binding IsSideBarOpened,Converter={StaticResource BooleanToVisibilityInverseConverter}}"> <materialDesign:PackIcon Kind="ChevronLeft" Width="24" Height="24" /> <TextBlock Margin="0 -2 0 0" VerticalAlignment="Center"><Run>MEDIA LIQUIDS</Run> <Run FontSize="10" Foreground="{StaticResource DimGrayBrush}">( Max Nanolitter/CM )</Run></TextBlock> <materialDesign:PackIcon Kind="ChevronRight" Width="24" Height="24" /> @@ -802,7 +802,9 @@ <Grid HorizontalAlignment="Right" Margin="0 0 0 0"> <StackPanel HorizontalAlignment="Right" Margin="0 0 0 0"> <StackPanel Margin="0 10 0 0" Orientation="Horizontal" VerticalAlignment="Center"> - <ItemsControl ItemsSource="{Binding LiquidTypesRmls}" IsEnabled="{Binding AuthenticationProvider.CurrentUser,Converter={StaticResource UserRoleToBooleanConverter},ConverterParameter='Researcher'}"> + + <Viewbox Width="700" MaxHeight="65" HorizontalAlignment="Right"> + <ItemsControl ItemsSource="{Binding LiquidTypesRmlsOrdered}" IsEnabled="{Binding AuthenticationProvider.CurrentUser,Converter={StaticResource UserRoleToBooleanConverter},ConverterParameter='Researcher'}"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <WrapPanel IsItemsHost="True"></WrapPanel> @@ -828,7 +830,7 @@ </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> - + </Viewbox> <StackPanel Margin="0 20 0 0"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0 0 0 5" ToolTip="Sort the liquid volumes by their liquid type preferred index"> <Viewbox Width="25"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Tango.MachineStudio.Logging_dfcch3km_wpftmp.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Tango.MachineStudio.Logging_dfcch3km_wpftmp.csproj new file mode 100644 index 000000000..81201d169 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Tango.MachineStudio.Logging_dfcch3km_wpftmp.csproj @@ -0,0 +1,224 @@ +<?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>{1674F726-0E66-414F-B9FD-C6F20D7F07C7}</ProjectGuid> + <OutputType>library</OutputType> + <RootNamespace>Tango.MachineStudio.Logging</RootNamespace> + <AssemblyName>Tango.MachineStudio.Logging</AssemblyName> + <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>..\..\..\Build\Machine Studio\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>..\..\..\Build\Machine Studio\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + </ItemGroup> + <ItemGroup> + <Compile Include="..\..\..\Versioning\GlobalVersionInfo.cs"> + <Link>GlobalVersionInfo.cs</Link> + </Compile> + <Compile Include="ControlledObservableCollection.cs" /> + <Compile Include="Controls\TimelineScrollViewer.cs" /> + <Compile Include="Controls\TimeRuler.cs" /> + <Compile Include="Converters\DateIsInListToBooleanConverter.cs" /> + <Compile Include="Converters\EventsToTimeRulerTicksConverter.cs" /> + <Compile Include="Converters\LogItemToMessageConverter.cs" /> + <Compile Include="Converters\MachineEventToXConverter.cs" /> + <Compile Include="Converters\SecondsToWidthConverter.cs" /> + <Compile Include="Converters\StringToFirstLineConverter.cs" /> + <Compile Include="Converters\TimeSpanToXConverter.cs" /> + <Compile Include="Helpers\TimelineHelper.cs" /> + <Compile Include="LoggingModule.cs" /> + <Compile Include="Navigation\LoggingNavigationManager.cs" /> + <Compile Include="Navigation\LoggingNavigationView.cs" /> + <Compile Include="ViewModelLocator.cs" /> + <Compile Include="ViewModels\EmbeddedLogsViewVM.cs" /> + <Compile Include="ViewModels\ApplicationLogsViewVM.cs" /> + <Compile Include="ViewModels\EventDetailsViewVM.cs" /> + <Compile Include="ViewModels\HomeViewVM.cs" /> + <Compile Include="ViewModels\EventsViewVM.cs" /> + <Compile Include="ViewModels\LogDetailsViewVM.cs" /> + <Compile Include="ViewModels\TimelineEventGroup.cs" /> + <Compile Include="ViewModels\TimelineViewVM.cs" /> + <Compile Include="Views\EmbeddedLogDetailsView.xaml.cs"> + <DependentUpon>EmbeddedLogDetailsView.xaml</DependentUpon> + </Compile> + <Compile Include="Views\EmbeddedLogsView.xaml.cs"> + <DependentUpon>EmbeddedLogsView.xaml</DependentUpon> + </Compile> + <Compile Include="Views\ApplicationLogDetailsView.xaml.cs"> + <DependentUpon>ApplicationLogDetailsView.xaml</DependentUpon> + </Compile> + <Compile Include="Views\EventDetailsView.xaml.cs"> + <DependentUpon>EventDetailsView.xaml</DependentUpon> + </Compile> + <Compile Include="Views\ApplicationLogsView.xaml.cs"> + <DependentUpon>ApplicationLogsView.xaml</DependentUpon> + </Compile> + <Compile Include="Views\EventsView.xaml.cs"> + <DependentUpon>EventsView.xaml</DependentUpon> + </Compile> + <Compile Include="Views\HomeView.xaml.cs"> + <DependentUpon>HomeView.xaml</DependentUpon> + </Compile> + <Compile Include="Views\MainView.xaml.cs"> + <DependentUpon>MainView.xaml</DependentUpon> + </Compile> + <Compile Include="Views\TimelineView.xaml.cs"> + <DependentUpon>TimelineView.xaml</DependentUpon> + </Compile> + <Compile Include="Views\TimelineWrapperView.xaml.cs"> + <DependentUpon>TimelineWrapperView.xaml</DependentUpon> + </Compile> + </ItemGroup> + <ItemGroup> + <Compile Include="Properties\AssemblyInfo.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Properties\Resources.Designer.cs"> + <AutoGen>True</AutoGen> + <DesignTime>True</DesignTime> + <DependentUpon>Resources.resx</DependentUpon> + </Compile> + <Compile Include="Properties\Settings.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Settings.settings</DependentUpon> + <DesignTimeSharedInput>True</DesignTimeSharedInput> + </Compile> + <EmbeddedResource Include="Properties\Resources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + </EmbeddedResource> + <None Include="App.config" /> + <None Include="packages.config" /> + <None Include="Properties\Settings.settings"> + <Generator>SettingsSingleFileGenerator</Generator> + <LastGenOutput>Settings.Designer.cs</LastGenOutput> + </None> + </ItemGroup> + <ItemGroup> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\..\SideChains\Tango.AutoComplete\Tango.AutoComplete.csproj"> + <Project>{bb2abb74-ba58-4812-83aa-ec8171f42df4}</Project> + <Name>Tango.AutoComplete</Name> + </ProjectReference> + <ProjectReference Include="..\..\..\Tango.BL\Tango.BL.csproj"> + <Project>{f441feee-322a-4943-b566-110e12fd3b72}</Project> + <Name>Tango.BL</Name> + </ProjectReference> + <ProjectReference Include="..\..\..\Tango.Core\Tango.Core.csproj"> + <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project> + <Name>Tango.Core</Name> + </ProjectReference> + <ProjectReference Include="..\..\..\Tango.Integration\Tango.Integration.csproj"> + <Project>{4206ac58-3b57-4699-8835-90bf6db01a61}</Project> + <Name>Tango.Integration</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.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> + </ItemGroup> + <ItemGroup> + </ItemGroup> + <ItemGroup> + </ItemGroup> + <ItemGroup> + </ItemGroup> + <ItemGroup> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <ProjectExtensions> + <VisualStudio> + <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> + <ItemGroup> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\MaterialDesignColors.1.1.2\lib\net45\MaterialDesignColors.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Microsoft.CSharp.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\mscorlib.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\PresentationCore.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\PresentationFramework.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.ComponentModel.DataAnnotations.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Core.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Data.DataSetExtensions.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Data.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Net.Http.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\Expression.Blend.Sdk.1.0.2\lib\net45\System.Windows.Interactivity.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Xaml.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Xml.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Xml.Linq.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\SideChains\Tango.AutoComplete\bin\Debug\Tango.AutoComplete.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\Build\Core\Debug\Tango.BL.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\Build\Core\Debug\Tango.Core.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\Build\Core\Debug\Tango.Integration.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\Build\Core\Debug\Tango.Logging.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\Build\Machine Studio\Debug\Tango.MachineStudio.Common.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\Build\Core\Debug\Tango.PMR.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\Build\Core\Debug\Tango.Settings.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\Build\Core\Debug\Tango.SharedUI.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\Build\Core\Debug\Tango.Transport.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\WindowsBase.dll" /> + </ItemGroup> + <ItemGroup> + <Compile Include="C:\DATA\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.Logging\obj\Debug\App.g.cs" /> + <Compile Include="C:\DATA\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.Logging\obj\Debug\Views\EmbeddedLogDetailsView.g.cs" /> + <Compile Include="C:\DATA\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.Logging\obj\Debug\Views\EmbeddedLogsView.g.cs" /> + <Compile Include="C:\DATA\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.Logging\obj\Debug\Views\ApplicationLogDetailsView.g.cs" /> + <Compile Include="C:\DATA\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.Logging\obj\Debug\Views\EventDetailsView.g.cs" /> + <Compile Include="C:\DATA\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.Logging\obj\Debug\Views\ApplicationLogsView.g.cs" /> + <Compile Include="C:\DATA\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.Logging\obj\Debug\Views\EventsView.g.cs" /> + <Compile Include="C:\DATA\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.Logging\obj\Debug\Views\HomeView.g.cs" /> + <Compile Include="C:\DATA\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.Logging\obj\Debug\Views\MainView.g.cs" /> + <Compile Include="C:\DATA\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.Logging\obj\Debug\Views\TimelineView.g.cs" /> + <Compile Include="C:\DATA\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.Logging\obj\Debug\Views\TimelineWrapperView.g.cs" /> + <Compile Include="C:\DATA\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.Logging\obj\Debug\GeneratedInternalTypeHelper.g.cs" /> + </ItemGroup> +</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 cad54c848..75dcdbfe4 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 @@ -36,6 +36,7 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels { public class MainViewVM : StudioViewModel<IMainView> { + private const int MAX_IDS_PACKS = 15; private INotificationProvider _notification; private IActionLogManager _actionLogManager; private IAuthenticationProvider _authentication; @@ -260,6 +261,8 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels public RelayCommand MakePrototypeCommand { get; set; } public RelayCommand UpgradeToGen2Command { get; set; } + + public RelayCommand CreateDispenserCommand { get; set; } #endregion #region Constructors @@ -283,7 +286,7 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels _machines_action_timer = new ActionTimer(TimeSpan.FromMilliseconds(200)); _dispensers_action_timer = new ActionTimer(TimeSpan.FromMilliseconds(200)); - AddIdsCommand = new RelayCommand(AddIds, (x) => ActiveMachine != null && ActiveMachine.Configuration != null && ActiveMachine.Configuration.IdsPacks.Count < 10); + AddIdsCommand = new RelayCommand(AddIds, (x) => ActiveMachine != null && ActiveMachine.Configuration != null && ActiveMachine.Configuration.IdsPacks.Count < MAX_IDS_PACKS); RemoveIdsCommand = new RelayCommand(RemoveIds, (x) => SelectedIds != null); EditMachineCommand = new RelayCommand(() => LoadSelectedMachine(), () => SelectedMachine != null); BackToMachinesCommand = new RelayCommand(() => View.NavigateTo(MachineDesignerNavigationView.MachinesView)); @@ -300,6 +303,8 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels TupViewVM = new TupViewVM(_notification); UpgradeToGen2Command = new RelayCommand(UpgradeToGEN2); + + CreateDispenserCommand = new RelayCommand(CreateDispenser); } #endregion @@ -317,7 +322,7 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels { Task.Factory.StartNew(() => { - ActiveMachineAdapter.Dispensers = ActiveMachineAdapter.Context.Dispensers.Where(x => x.SerialNumber.ToLower().StartsWith(DispensersFilter.ToLower())).OrderBy(x => x.SerialNumber).ToSynchronizedObservableCollection(); + ActiveMachineAdapter.Dispensers = ActiveMachineAdapter.Context.Dispensers.Where(x => x.SerialNumber.ToLower().StartsWith(DispensersFilter.ToLower())).OrderBy(x => x.SerialNumber).ToSynchronizedObservableCollection().OrderByAlphaNumeric(x => x.SerialNumber).ToSynchronizedObservableCollection(); }); }); } @@ -393,6 +398,18 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels /// <param name="idsPack">The ids pack.</param> public void DropDispenser(Dispenser dispenser, IdsPack idsPack) { + if (ActiveMachine.Configuration.IdsPacks.Any(x => x.DispenserGuid == dispenser.Guid)) + { + _notification.ShowError("The selected dispenser is already installed on this machine."); + return; + } + + if (ActiveMachineAdapter.Context.IdsPacks.Any(x => x.DispenserGuid == dispenser.Guid)) + { + _notification.ShowError("The selected dispenser is already installed on another machine."); + return; + } + idsPack.Dispenser = dispenser; idsPack.DispenserGuid = dispenser.Guid; } @@ -965,6 +982,32 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels } } + private async void CreateDispenser() + { + String serialNumber = _notification.ShowTextInput("Please enter new serial number", "Serial Number", ActiveMachine.SerialNumber + "_D" + (ActiveMachine.Configuration.IdsPacks.Where(x => x.Dispenser != null).Count() + 1).ToString()); + if (serialNumber.IsNullOrWhiteSpace()) return; + + if (ActiveMachineAdapter.Context.Dispensers.Any(x => x.SerialNumber == serialNumber)) + { + _notification.ShowError($"Dispenser '{serialNumber}' already exists. Please enter a different serial number."); + return; + } + + using (_notification.PushTaskItem("Creating new dispenser...")) + { + using (var db = ObservablesContext.CreateDefault()) + { + Dispenser dispenser = new Dispenser(); + dispenser.SerialNumber = serialNumber; + dispenser.DispenserTypeGuid = ActiveMachineAdapter.Context.DispenserTypes.First(x => x.Code == (int)DispenserTypes.StandardDispenser).Guid; + dispenser.NlPerPulse = 2.34; + db.Dispensers.Add(dispenser); + await db.SaveChangesAsync(); + DispensersFilter = serialNumber; + } + } + } + #endregion private void CloneMachine() diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/ConfigurationView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/ConfigurationView.xaml index d1eaaaeff..5278d1780 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/ConfigurationView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/ConfigurationView.xaml @@ -139,18 +139,6 @@ <materialDesign:PackIcon Kind="Minus" Width="24" Height="24"></materialDesign:PackIcon> </Button> - <UniformGrid Width="310" Canvas.Top="295" Canvas.Left="420" Rows="1" Columns="10" TextElement.FontSize="9"> - <TextBlock HorizontalAlignment="Center">1</TextBlock> - <TextBlock HorizontalAlignment="Center">2</TextBlock> - <TextBlock HorizontalAlignment="Center">3</TextBlock> - <TextBlock HorizontalAlignment="Center">4</TextBlock> - <TextBlock HorizontalAlignment="Center">5</TextBlock> - <TextBlock HorizontalAlignment="Center">6</TextBlock> - <TextBlock HorizontalAlignment="Center">7</TextBlock> - <TextBlock HorizontalAlignment="Center">8</TextBlock> - <TextBlock HorizontalAlignment="Center">9</TextBlock> - <TextBlock HorizontalAlignment="Center">10</TextBlock> - </UniformGrid> <Grid x:Name="gridIds" Width="310" Height="195" Canvas.Top="314" Canvas.Left="420"> <ListBox ItemsSource="{Binding ActiveMachine.Configuration.IdsPacks}" SelectedItem="{Binding SelectedIds}" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled"> <ListBox.ItemContainerStyle> @@ -162,13 +150,14 @@ </ListBox.ItemContainerStyle> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> - <UniformGrid Columns="10"></UniformGrid> + <UniformGrid Rows="1"></UniformGrid> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate> - <Grid dragAndDrop:DragAndDropService.DraggableBorderBrush="{StaticResource AccentColorBrush}" dragAndDrop:DragAndDropService.Drop="OnDropOnIdsPack"> + <Grid MaxWidth="35" dragAndDrop:DragAndDropService.DraggableBorderBrush="{StaticResource AccentColorBrush}" dragAndDrop:DragAndDropService.Drop="OnDropOnIdsPack"> <Grid.RowDefinitions> + <RowDefinition Height="11"/> <RowDefinition Height="1*"/> <RowDefinition Height="30"/> </Grid.RowDefinitions> @@ -179,7 +168,7 @@ </Style.Triggers> </Style> </Grid.Style> - <UniformGrid Columns="1" Rows="2"> + <UniformGrid Grid.Row="1" Columns="1" Rows="2"> <Grid Margin="2"> <Image IsHitTestVisible="False" Source="../Images/dispenser.png" RenderOptions.BitmapScalingMode="Fant"> <Image.Style> @@ -231,7 +220,7 @@ </Grid> </UniformGrid> - <Grid Grid.Row="1" Margin="3" IsHitTestVisible="False"> + <Grid Grid.Row="2" Margin="3" IsHitTestVisible="False"> <Grid.Style> <Style TargetType="Grid"> <Style.Triggers> @@ -258,6 +247,8 @@ </Border.Background> </Border> </Grid> + + <TextBlock Grid.Row="0" FontSize="9" HorizontalAlignment="Center" VerticalAlignment="Top" Text="{Binding PackIndex}"></TextBlock> </Grid> </DataTemplate> </ItemsControl.ItemTemplate> @@ -455,6 +446,7 @@ </DataTemplate> </ListBox.ItemTemplate> </ListBox> + <Button Margin="40 10" Command="{Binding CreateDispenserCommand}" Width="160" Height="35">CREATE DISPENSER</Button> </StackPanel> </Expander> <Border Height="1" HorizontalAlignment="Stretch" Background="{DynamicResource MaterialDesignDivider}" SnapsToDevicePixels="True" /> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineView.xaml index 54e47c0d4..ea2e2e84d 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineView.xaml @@ -69,19 +69,6 @@ <Rectangle Stroke="Gray" HorizontalAlignment="Left" StrokeThickness="1" StrokeDashArray="5" RenderTransformOrigin="0.5,0.5"/> </Grid> - <UniformGrid Width="310" Canvas.Top="295" Canvas.Left="420" Rows="1" Columns="10" TextElement.FontSize="9"> - <TextBlock HorizontalAlignment="Center">1</TextBlock> - <TextBlock HorizontalAlignment="Center">2</TextBlock> - <TextBlock HorizontalAlignment="Center">3</TextBlock> - <TextBlock HorizontalAlignment="Center">4</TextBlock> - <TextBlock HorizontalAlignment="Center">5</TextBlock> - <TextBlock HorizontalAlignment="Center">6</TextBlock> - <TextBlock HorizontalAlignment="Center">7</TextBlock> - <TextBlock HorizontalAlignment="Center">8</TextBlock> - <TextBlock HorizontalAlignment="Center">9</TextBlock> - <TextBlock HorizontalAlignment="Center">10</TextBlock> - </UniformGrid> - <Grid x:Name="gridIds" Width="310" Height="195" Canvas.Top="314" Canvas.Left="420"> <ListBox ItemsSource="{Binding Configuration.IdsPacks}" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled"> <ListBox.ItemContainerStyle> @@ -93,24 +80,18 @@ </ListBox.ItemContainerStyle> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> - <UniformGrid Columns="10"></UniformGrid> + <UniformGrid Rows="1"></UniformGrid> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate> - <Grid dragAndDrop:DragAndDropService.DraggableBorderBrush="{StaticResource AccentColorBrush}" > + <Grid MaxWidth="35"> <Grid.RowDefinitions> + <RowDefinition Height="11"/> <RowDefinition Height="1*"/> <RowDefinition Height="30"/> </Grid.RowDefinitions> - <Grid.Style> - <Style TargetType="Grid" BasedOn="{StaticResource draggableGrid}"> - <Style.Triggers> - - </Style.Triggers> - </Style> - </Grid.Style> - <UniformGrid Columns="1" Rows="2"> + <UniformGrid Grid.Row="1" Columns="1" Rows="2"> <Grid Margin="2"> <Image IsHitTestVisible="False" Source="../Images/dispenser.png" RenderOptions.BitmapScalingMode="Fant"> <Image.Style> @@ -156,7 +137,7 @@ </Grid> </UniformGrid> - <Grid Grid.Row="1" Margin="3" IsHitTestVisible="False"> + <Grid Grid.Row="2" Margin="3" IsHitTestVisible="False"> <Grid.Style> <Style TargetType="Grid"> <Style.Triggers> @@ -183,6 +164,8 @@ </Border.Background> </Border> </Grid> + + <TextBlock Grid.Row="0" FontSize="9" HorizontalAlignment="Center" VerticalAlignment="Top" Text="{Binding PackIndex}"></TextBlock> </Grid> </DataTemplate> </ItemsControl.ItemTemplate> @@ -199,7 +182,7 @@ </Style.Triggers> </Style> </Grid.Style> - <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="20" FontWeight="Bold" Foreground="Gainsboro">NO IDS PACKS</TextBlock> + <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="20" FontWeight="Bold" Foreground="{StaticResource BorderBrushGainsboro}">NO IDS PACKS</TextBlock> </Grid> <Rectangle VerticalAlignment="Bottom" Stroke="DimGray" StrokeThickness="1"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorConversionViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorConversionViewVM.cs index ca3c3e322..b9e2ebf5d 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorConversionViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorConversionViewVM.cs @@ -282,6 +282,8 @@ namespace Tango.MachineStudio.RML.ViewModels inputLiquid.LiquidType = (PMR.ColorLab.LiquidType)vm.LiquidType.Code; inputLiquid.MaxNanoliterPerCentimeter = LiquidTypesRmls.SingleOrDefault(x => x.LiquidType.Code == vm.LiquidType.Code).MaxNlPerCm; + inputLiquid.IsExtraInk = vm.LiquidType.IsExtraInk; + inputLiquid.Color = vm.LiquidType.Color; input.InputCoordinates.InputLiquids.Add(inputLiquid); } @@ -400,6 +402,8 @@ namespace Tango.MachineStudio.RML.ViewModels inputLiquid.LiquidType = (PMR.ColorLab.LiquidType)vm.LiquidType.Code; inputLiquid.MaxNanoliterPerCentimeter = LiquidTypesRmls.SingleOrDefault(x => x.LiquidType.Code == vm.LiquidType.Code).MaxNlPerCm; inputLiquid.Volume = LiquidVolumes.SingleOrDefault(x => x.LiquidType == vm.LiquidType).Volume; + inputLiquid.IsExtraInk = vm.LiquidType.IsExtraInk; + inputLiquid.Color = vm.LiquidType.Color; input.InputCoordinates.InputLiquids.Add(inputLiquid); } 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 e3c128cb7..0962cd4d1 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 @@ -348,9 +348,9 @@ namespace Tango.MachineStudio.RML.ViewModels BatchConversionCommand = new RelayCommand(BatchConversion); } - public override void OnApplicationReady() + public override async void OnApplicationReady() { - + } private async Task LoadRmls() diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorConversionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorConversionView.xaml index 73f5208db..a86707319 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorConversionView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorConversionView.xaml @@ -128,7 +128,7 @@ <TextBlock FontStyle="Italic" HorizontalAlignment="Center" Grid.Column="2" Margin="0 0 0 0">SUGGESTIONS</TextBlock> <TextBlock FontStyle="Italic" HorizontalAlignment="Center" Grid.Column="4" Margin="-80 0 0 0">LIQUID VOLUMES</TextBlock> - <Image Source="../Images/arrow-long-right.png" Grid.Column="1" Grid.Row="1" Width="100" Stretch="Fill" Height="30" Opacity="0.8" Margin="20 0 20 0"></Image> + <Image Source="../Images/arrow-long-right.png" Grid.Column="1" Grid.Row="1" Width="70" Stretch="Fill" Height="30" Opacity="0.8" Margin="20 0 20 0"></Image> <hive:HexList Width="220" Height="270" UseHexItemHasContainer="True" Grid.Column="2" Grid.Row="1" RowCount="6" ColumnCount="5" ItemsSource="{Binding HiveSuggestions}" SelectedItem="{Binding SelectedSuggestion,Mode=TwoWay}"> <hive:HexList.ItemContainerStyle> @@ -175,7 +175,7 @@ </TextBlock.Style> </TextBlock> - <Image Source="../Images/arrow-long-right.png" Grid.Column="3" Grid.Row="1" Width="100" Stretch="Fill" Height="30" Opacity="0.8" Margin="20 0 20 0"></Image> + <Image Source="../Images/arrow-long-right.png" Grid.Column="3" Grid.Row="1" Width="70" Stretch="Fill" Height="30" Opacity="0.8" Margin="20 0 20 0"></Image> <Grid Grid.Column="4" Grid.Row="1" IsHitTestVisible="False"> <StackPanel HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 -20 0 0"> @@ -243,7 +243,8 @@ </StackPanel> </StackPanel> - <ItemsControl ItemsSource="{Binding LiquidVolumes}" VerticalAlignment="Center" MinWidth="420" > + <Viewbox MaxHeight="80" HorizontalAlignment="Right"> + <ItemsControl ItemsSource="{Binding LiquidVolumes}" VerticalAlignment="Center"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <StackPanel VerticalAlignment="Center" Orientation="Horizontal" IsItemsHost="True"></StackPanel> @@ -267,6 +268,7 @@ </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> + </Viewbox> <Image Source="../Images/arrow-long-down.png" Grid.Column="1" Grid.Row="1" Margin="0 0 10 -170" Height="70" Width="40" Opacity="0.8" Stretch="Fill" HorizontalAlignment="Right" ></Image> <TextBlock FontSize="14" FontWeight="SemiBold" FontStyle="Italic" VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 15"> @@ -284,30 +286,32 @@ </StackPanel> </StackPanel> - <ItemsControl ItemsSource="{Binding LiquidVolumes}" VerticalAlignment="Center" MinWidth="420" IsEnabled="{Binding IsFree}"> - <ItemsControl.ItemsPanel> - <ItemsPanelTemplate> - <StackPanel VerticalAlignment="Center" Orientation="Horizontal" IsItemsHost="True"></StackPanel> - </ItemsPanelTemplate> - </ItemsControl.ItemsPanel> - <ItemsControl.ItemTemplate> - <DataTemplate> - <StackPanel> - <TextBlock HorizontalAlignment="Center" TextAlignment="Center" Text="{Binding Name}" FontSize="10" Margin="0 0 0 5"></TextBlock> - <ContentControl Focusable="False" Style="{StaticResource numberBorder}" Width="60" Height="60" Margin="10 0 0 0"> - <ContentControl.Foreground> - <SolidColorBrush Color="{Binding Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush> - </ContentControl.Foreground> - <mahapps:NumericUpDown FontSize="16" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Volume, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0.00" HideUpDownButtons="True" Minimum="0" Maximum="1000" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center"> - <!--<mahapps:NumericUpDown.Resources> + <Viewbox MaxHeight="80" HorizontalAlignment="Right"> + <ItemsControl ItemsSource="{Binding LiquidVolumes}" VerticalAlignment="Center" IsEnabled="{Binding IsFree}"> + <ItemsControl.ItemsPanel> + <ItemsPanelTemplate> + <StackPanel VerticalAlignment="Center" Orientation="Horizontal" IsItemsHost="True"></StackPanel> + </ItemsPanelTemplate> + </ItemsControl.ItemsPanel> + <ItemsControl.ItemTemplate> + <DataTemplate> + <StackPanel> + <TextBlock HorizontalAlignment="Center" TextAlignment="Center" Text="{Binding Name}" FontSize="10" Margin="0 0 0 5"></TextBlock> + <ContentControl Focusable="False" Style="{StaticResource numberBorder}" Width="60" Height="60" Margin="10 0 0 0"> + <ContentControl.Foreground> + <SolidColorBrush Color="{Binding Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush> + </ContentControl.Foreground> + <mahapps:NumericUpDown FontSize="16" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Volume, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0.00" HideUpDownButtons="True" Minimum="0" Maximum="1000" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center"> + <!--<mahapps:NumericUpDown.Resources> <StaticResource ResourceKey="SelectAllTextBoxResource"></StaticResource> </mahapps:NumericUpDown.Resources>--> - </mahapps:NumericUpDown> - </ContentControl> - </StackPanel> - </DataTemplate> - </ItemsControl.ItemTemplate> - </ItemsControl> + </mahapps:NumericUpDown> + </ContentControl> + </StackPanel> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ItemsControl> + </Viewbox> </StackPanel> 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 8730355cc..8447a3899 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 @@ -23,13 +23,14 @@ <converters:ColorToIntegerConverter x:Key="ColorToIntegerConverter"></converters:ColorToIntegerConverter> <converters:EnumToItemsSourceConverter x:Key="EnumToItemsSourceConverter"/> <converters:EnumToDescriptionConverter x:Key="EnumToDescriptionConverter"/> + <converters:EnumToVisibilityConverter x:Key="EnumToVisibilityConverter" /> <ObjectDataProvider x:Key="Plies" ObjectType="{x:Type sys:Enum}" MethodName="GetValues"> <ObjectDataProvider.MethodParameters> <x:Type TypeName="enumerations:Plies"/> </ObjectDataProvider.MethodParameters> </ObjectDataProvider> - + </UserControl.Resources> <Grid Margin="20"> @@ -105,7 +106,7 @@ <TextBlock Text="Condition:" ></TextBlock> <ComboBox ItemsSource="{Binding Conditions}" SelectedItem="{Binding ActiveRML.MediaCondition,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>--> - + <TextBlock Text="Linear Density:" ></TextBlock> <mahapps:NumericUpDown Minimum="0" Maximum="9999" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding ActiveRML.FiberSize,Mode=TwoWay}" FontSize="16"></mahapps:NumericUpDown> @@ -124,7 +125,7 @@ <TextBlock Text="Count (den):" ></TextBlock> <TextBlock Text="{Binding ActiveRML.DencityCount}" Foreground="Blue" ></TextBlock> - + <!--<TextBlock Text="Fiber Shape:" ></TextBlock> <ComboBox ItemsSource="{Binding FiberShapes}" SelectedItem="{Binding ActiveRML.FiberShape,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>--> @@ -139,7 +140,7 @@ <!--<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> @@ -224,83 +225,85 @@ </Grid> </Border> <Grid DockPanel.Dock="Top" Background="#35B5B5B5" Margin="20 0"> - <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center"> - <Grid> - <StackPanel Orientation="Vertical" HorizontalAlignment="Left"> - <Image Source="../Images/data-table.png" Height="80" Opacity="0.8" ></Image> - <StackPanel VerticalAlignment="Center" Width="200" Margin="5 20 5 10"> + <ScrollViewer HorizontalScrollBarVisibility="Disabled"> + <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center"> + <Grid> + <StackPanel Orientation="Vertical" HorizontalAlignment="Left"> + <Image Source="../Images/data-table.png" Height="20" Opacity="0.8" ></Image> + <StackPanel VerticalAlignment="Center" Margin="5 20 5 10"> - <StackPanel> <StackPanel> - <ComboBox materialDesign:HintAssist.Hint="No CCT Defined" Margin="0 5 0 0" HorizontalContentAlignment="Center" ItemsSource="{Binding CCTS}" SelectedItem="{Binding SelectedCCT}" DisplayMemberPath="FileName" Style="{StaticResource TransparentComboBoxStyle}"></ComboBox> - <UniformGrid Columns="2" Margin="0 5 0 0" HorizontalAlignment="Center"> - <Button Style="{StaticResource MaterialDesignFlatButton}" Padding="0" Command="{Binding ImportForwardDataCommand}"> - <StackPanel Orientation="Horizontal" Margin="0 0 20 0"> - <materialDesign:PackIcon Kind="Upload" VerticalAlignment="Center" /> - <TextBlock Margin="5 0 0 0">IMPORT</TextBlock> - </StackPanel> - </Button> - <Button Style="{StaticResource MaterialDesignFlatButton}" Padding="0" Command="{Binding ExportForwardDataCommand}"> - <StackPanel Orientation="Horizontal"> - <materialDesign:PackIcon Kind="Download" VerticalAlignment="Center" /> - <TextBlock Margin="5 0 0 0">EXPORT</TextBlock> - </StackPanel> - </Button> - </UniformGrid> - </StackPanel> + <StackPanel> + <ComboBox materialDesign:HintAssist.Hint="No CCT Defined" Margin="0 5 0 0" HorizontalContentAlignment="Center" ItemsSource="{Binding CCTS}" SelectedItem="{Binding SelectedCCT}" DisplayMemberPath="FileName" Style="{StaticResource TransparentComboBoxStyle}"></ComboBox> + <UniformGrid Columns="2" Margin="0 5 0 0" HorizontalAlignment="Center"> + <Button Style="{StaticResource MaterialDesignFlatButton}" Padding="0" Command="{Binding ImportForwardDataCommand}"> + <StackPanel Orientation="Horizontal" Margin="0 0 20 0"> + <materialDesign:PackIcon Kind="Upload" VerticalAlignment="Center" /> + <TextBlock Margin="5 0 0 0">IMPORT</TextBlock> + </StackPanel> + </Button> + <Button Style="{StaticResource MaterialDesignFlatButton}" Padding="0" Command="{Binding ExportForwardDataCommand}"> + <StackPanel Orientation="Horizontal"> + <materialDesign:PackIcon Kind="Download" VerticalAlignment="Center" /> + <TextBlock Margin="5 0 0 0">EXPORT</TextBlock> + </StackPanel> + </Button> + </UniformGrid> + </StackPanel> - <StackPanel> - <ComboBox materialDesign:HintAssist.Hint="No GBD Defined" Margin="0 5 0 0" HorizontalContentAlignment="Center" ItemsSource="{Binding GBDS}" SelectedItem="{Binding SelectedGBD}" DisplayMemberPath="FileName" Style="{StaticResource TransparentComboBoxStyle}"></ComboBox> - <UniformGrid Columns="2" Margin="0 5 0 0" HorizontalAlignment="Center"> - <Button Style="{StaticResource MaterialDesignFlatButton}" Padding="0" Command="{Binding ImportGBDCommand}"> - <StackPanel Orientation="Horizontal" Margin="0 0 20 0"> - <materialDesign:PackIcon Kind="Upload" VerticalAlignment="Center" /> - <TextBlock Margin="5 0 0 0">IMPORT</TextBlock> - </StackPanel> - </Button> - <Button Style="{StaticResource MaterialDesignFlatButton}" Padding="0" Command="{Binding ExportGBDCommand}"> - <StackPanel Orientation="Horizontal"> - <materialDesign:PackIcon Kind="Download" VerticalAlignment="Center" /> - <TextBlock Margin="5 0 0 0">EXPORT</TextBlock> - </StackPanel> - </Button> - </UniformGrid> - </StackPanel> + <StackPanel> + <ComboBox materialDesign:HintAssist.Hint="No GBD Defined" Margin="0 5 0 0" HorizontalContentAlignment="Center" ItemsSource="{Binding GBDS}" SelectedItem="{Binding SelectedGBD}" DisplayMemberPath="FileName" Style="{StaticResource TransparentComboBoxStyle}"></ComboBox> + <UniformGrid Columns="2" Margin="0 5 0 0" HorizontalAlignment="Center"> + <Button Style="{StaticResource MaterialDesignFlatButton}" Padding="0" Command="{Binding ImportGBDCommand}"> + <StackPanel Orientation="Horizontal" Margin="0 0 20 0"> + <materialDesign:PackIcon Kind="Upload" VerticalAlignment="Center" /> + <TextBlock Margin="5 0 0 0">IMPORT</TextBlock> + </StackPanel> + </Button> + <Button Style="{StaticResource MaterialDesignFlatButton}" Padding="0" Command="{Binding ExportGBDCommand}"> + <StackPanel Orientation="Horizontal"> + <materialDesign:PackIcon Kind="Download" VerticalAlignment="Center" /> + <TextBlock Margin="5 0 0 0">EXPORT</TextBlock> + </StackPanel> + </Button> + </UniformGrid> + </StackPanel> - <StackPanel> - <ComboBox materialDesign:HintAssist.Hint="No LUB Defined" Margin="0 5 0 0" HorizontalContentAlignment="Center" ItemsSource="{Binding LUBS}" SelectedItem="{Binding SelectedLUB}" DisplayMemberPath="FileName" Style="{StaticResource TransparentComboBoxStyle}"></ComboBox> - <UniformGrid Columns="2" Margin="0 5 0 0" HorizontalAlignment="Center"> - <Button Style="{StaticResource MaterialDesignFlatButton}" Padding="0" Command="{Binding ImportLUBCommand}"> - <StackPanel Orientation="Horizontal" Margin="0 0 20 0"> - <materialDesign:PackIcon Kind="Upload" VerticalAlignment="Center" /> - <TextBlock Margin="5 0 0 0">IMPORT</TextBlock> - </StackPanel> - </Button> - <Button Style="{StaticResource MaterialDesignFlatButton}" Padding="0" Command="{Binding ExportLUBCommand}"> - <StackPanel Orientation="Horizontal"> - <materialDesign:PackIcon Kind="Download" VerticalAlignment="Center" /> - <TextBlock Margin="5 0 0 0">EXPORT</TextBlock> - </StackPanel> - </Button> - </UniformGrid> + <StackPanel> + <ComboBox materialDesign:HintAssist.Hint="No LUB Defined" Margin="0 5 0 0" HorizontalContentAlignment="Center" ItemsSource="{Binding LUBS}" SelectedItem="{Binding SelectedLUB}" DisplayMemberPath="FileName" Style="{StaticResource TransparentComboBoxStyle}"></ComboBox> + <UniformGrid Columns="2" Margin="0 5 0 0" HorizontalAlignment="Center"> + <Button Style="{StaticResource MaterialDesignFlatButton}" Padding="0" Command="{Binding ImportLUBCommand}"> + <StackPanel Orientation="Horizontal" Margin="0 0 20 0"> + <materialDesign:PackIcon Kind="Upload" VerticalAlignment="Center" /> + <TextBlock Margin="5 0 0 0">IMPORT</TextBlock> + </StackPanel> + </Button> + <Button Style="{StaticResource MaterialDesignFlatButton}" Padding="0" Command="{Binding ExportLUBCommand}"> + <StackPanel Orientation="Horizontal"> + <materialDesign:PackIcon Kind="Download" VerticalAlignment="Center" /> + <TextBlock Margin="5 0 0 0">EXPORT</TextBlock> + </StackPanel> + </Button> + </UniformGrid> + </StackPanel> </StackPanel> - </StackPanel> - <TextBlock Margin="0 40 0 0" Text="Color Conversion Version:" HorizontalAlignment="Center"></TextBlock> - <mahapps:NumericUpDown Minimum="1" Maximum="6" Value="{Binding ActiveRML.ColorConversionVersion}" HorizontalContentAlignment="Center" Background="Transparent" BorderBrush="{StaticResource DimGrayBrush}" HasDecimals="False" Margin="0 5 0 0" /> + <TextBlock Margin="0 20 0 0" Text="Color Conversion Version:" HorizontalAlignment="Center"></TextBlock> + <mahapps:NumericUpDown Minimum="1" Maximum="6" Value="{Binding ActiveRML.ColorConversionVersion}" HorizontalContentAlignment="Center" Background="Transparent" BorderBrush="{StaticResource DimGrayBrush}" HasDecimals="False" Margin="0 5 0 0" /> - <CheckBox ToolTip="Use the color conversion engine to generate gradients" IsChecked="{Binding ActiveRML.UseColorLibGradients}" HorizontalAlignment="Left" Margin="0 20 0 0">Enable Gradient Generation</CheckBox> - <CheckBox ToolTip="Use light inks when converting colors to liquid volumes" IsChecked="{Binding ActiveRML.UseLightInks}" HorizontalAlignment="Left" Margin="0 10 0 0">Use Light Inks</CheckBox> - <CheckBox ToolTip="Use lubricant transformation when converting to liquid volumes" IsChecked="{Binding ActiveRML.UseLubricantTransform}" HorizontalAlignment="Left" Margin="0 10 0 0">Use Lubricant Transform</CheckBox> + <CheckBox ToolTip="Use the color conversion engine to generate gradients" IsChecked="{Binding ActiveRML.UseColorLibGradients}" HorizontalAlignment="Left" Margin="0 20 0 0">Enable Gradient Generation</CheckBox> + <CheckBox ToolTip="Use light inks when converting colors to liquid volumes" IsChecked="{Binding ActiveRML.UseLightInks}" HorizontalAlignment="Left" Margin="0 10 0 0">Use Light Inks</CheckBox> + <CheckBox ToolTip="Use lubricant transformation when converting to liquid volumes" IsChecked="{Binding ActiveRML.UseLubricantTransform}" HorizontalAlignment="Left" Margin="0 10 0 0">Use Lubricant Transform</CheckBox> - <DockPanel Margin="0 10 0 0"> - <TextBlock VerticalAlignment="Center" Text="V-Max:" ></TextBlock> - <mahapps:NumericUpDown Minimum="1" Maximum="100" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" HorizontalAlignment="Right" Width="100" Value="{Binding ActiveRML.VMax,Mode=TwoWay}"></mahapps:NumericUpDown> - </DockPanel> + <DockPanel Margin="0 10 0 0"> + <TextBlock VerticalAlignment="Center" Text="V-Max:" ></TextBlock> + <mahapps:NumericUpDown Minimum="1" Maximum="100" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" HorizontalAlignment="Right" Width="100" Value="{Binding ActiveRML.VMax,Mode=TwoWay}"></mahapps:NumericUpDown> + </DockPanel> + </StackPanel> </StackPanel> - </StackPanel> - </Grid> - </StackPanel> + </Grid> + </StackPanel> + </ScrollViewer> </Grid> </DockPanel> </Grid> |
