diff options
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer')
7 files changed, 46 insertions, 22 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Properties/AssemblyInfo.cs index c29c487ae..87c13caf5 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; using System.Windows; [assembly: AssemblyTitle("Tango - Machine Studio Developer Module")] -[assembly: AssemblyVersion("2.0.17.1159")] +[assembly: AssemblyVersion("2.0.18.1737")] [assembly: ComVisible(false)] diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj index cc9831ad9..dc96f7112 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj @@ -359,7 +359,7 @@ <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" /> + <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" /> </VisualStudio> </ProjectExtensions> </Project>
\ No newline at end of file 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 60c2e65f9..55dd370d1 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 @@ -644,6 +644,16 @@ namespace Tango.MachineStudio.Developer.ViewModels /// Gets or sets the reload machines command. /// </summary> public RelayCommand ReloadMachinesCommand { get; set; } + + /// <summary> + /// Gets or sets the back to job command. + /// </summary> + public RelayCommand BackToJobCommand { get; set; } + + /// <summary> + /// Gets or sets to running job command. + /// </summary> + public RelayCommand ToRunningJobCommand { get; set; } #endregion #region Constructors @@ -717,6 +727,9 @@ namespace Tango.MachineStudio.Developer.ViewModels return null; } }); + + BackToJobCommand = new RelayCommand(BackToJob); + ToRunningJobCommand = new RelayCommand(ToRunningJob); } #endregion @@ -1310,6 +1323,16 @@ namespace Tango.MachineStudio.Developer.ViewModels } } + private void BackToJob() + { + _navigation.NavigateTo(DeveloperNavigationView.JobView); + } + + private void ToRunningJob() + { + _navigation.NavigateTo(DeveloperNavigationView.RunningJobView); + } + #endregion #region RML @@ -1357,7 +1380,7 @@ namespace Tango.MachineStudio.Developer.ViewModels LogManager.Log("Invalidating liquid factors, process parameters and process group history..."); LiquidTypesRmls = ActiveJob.Machine.Configuration.NoneEmptyIdsPacks.Where(x => !x.IsEmpty).OrderBy(x => x.PackIndex).Select(x => x.LiquidType).SelectMany(x => x.LiquidTypesRmls).Where(x => x.Rml.Guid == SelectedRML.Guid).ToList(); - _activeJobDbContext.ProcessParametersTablesGroups.Where(x => x.RmlGuid == SelectedRML.Guid).Include(x => x.ProcessParametersTables).ToList(); + _activeJobDbContext.Adapter.GetRmlProcessParametersTablesGroups(SelectedRML.Guid); RmlProcessParametersTableGroup = SelectedRML.ProcessParametersTablesGroups.ToList().SingleOrDefault(x => x.Active); @@ -1366,7 +1389,7 @@ namespace Tango.MachineStudio.Developer.ViewModels if (RmlProcessParametersTableGroup != null) { RmlProcessParametersTableGroup = RmlProcessParametersTableGroup.Clone(); - RmlProcessParametersTableGroup.ProcessParametersTables = RmlProcessParametersTableGroup.ProcessParametersTables.OrderBy(x => x.TableIndex).ToObservableCollection(); + RmlProcessParametersTableGroup.ProcessParametersTables = RmlProcessParametersTableGroup.ProcessParametersTables.OrderBy(x => x.TableIndex).ToSynchronizedObservableCollection(); } @@ -1445,7 +1468,7 @@ namespace Tango.MachineStudio.Developer.ViewModels } group.Active = true; - group.ProcessParametersTables = tables.ToObservableCollection(); + group.ProcessParametersTables = tables.ToSynchronizedObservableCollection(); group.Rml = SelectedRML; group.Name = response; group.SaveDate = DateTime.UtcNow; @@ -1509,7 +1532,7 @@ namespace Tango.MachineStudio.Developer.ViewModels SpoolTypes = _activeJobDbContext.SpoolTypes.ToObservableCollection(); LogManager.Log("Setting active job..."); - ActiveJob = _activeJobDbContext.Jobs.Include(x => x.Rml).Include(x => x.Segments).Include(x => x.Segments.Select(y => y.BrushStops)).SingleOrDefault(x => x.Guid == SelectedMachineJob.Guid); + ActiveJob = _activeJobDbContext.Adapter.GetJob(SelectedMachineJob.Guid); _activeJobDbContext.Ccts.Where(x => x.RmlGuid == ActiveJob.RmlGuid).ToList(); _activeJobDbContext.Cats.Where(x => x.RmlGuid == ActiveJob.RmlGuid).ToList(); @@ -1646,18 +1669,13 @@ namespace Tango.MachineStudio.Developer.ViewModels using (_notification.PushTaskItem("Loading selected machine...")) { await _machineDbContext.Jobs.Where(x => x.MachineGuid == SelectedMachine.Guid).Include(x => x.User).Include(x => x.User.Contact).LoadAsync(); - await _machineDbContext.Configurations.SingleOrDefaultAsync(x => x.Guid == SelectedMachine.ConfigurationGuid); await _machineDbContext.ColorSpaces.LoadAsync(); - SelectedMachine.Configuration.IdsPacks.EnableCrossThreadOperations(); - - await _machineDbContext.IdsPacks.OrderBy(x => x.PackIndex).Where(x => x.ConfigurationGuid == SelectedMachine.ConfigurationGuid). - Include(x => x.CartridgeType). - Include(x => x.DispenserType). - Include(x => x.LiquidType). - Include(x => x.IdsPackFormula). - Include(x => x.MidTankType).LoadAsync(); + await Task.Factory.StartNew(() => + { + _machineDbContext.Adapter.GetConfiguration(x => x.Guid == SelectedMachine.ConfigurationGuid); + }); RaisePropertyChanged(nameof(SelectedMachine)); 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 016718075..ea350767c 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 @@ -1159,7 +1159,7 @@ </Grid> <Grid DockPanel.Dock="Right" Margin="0 0 10 0"> - <StackPanel Orientation="Horizontal"> + <StackPanel Orientation="Horizontal" Visibility="{Binding IsJobRunning,Converter={StaticResource BooleanToVisibilityInverseConverter}}"> <Button Height="60" Width="280" Command="{Binding StartJobCommand}" Click="OnJobStartClick"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon VerticalAlignment="Center" Width="32" Height="32" Kind="ClockFast" /> @@ -1170,6 +1170,12 @@ <materialDesign:PackIcon VerticalAlignment="Center" Width="38" Height="38" Kind="Record" Foreground="#FF6D6D" /> </Button> </StackPanel> + <Button Command="{Binding ToRunningJobCommand}" Width="280" Height="60" Visibility="{Binding IsJobRunning,Converter={StaticResource BooleanToVisibilityConverter}}"> + <StackPanel Orientation="Horizontal"> + <materialDesign:PackIcon VerticalAlignment="Center" Width="32" Height="32" Kind="AlertCircle" /> + <TextBlock VerticalAlignment="Center" Margin="10 0 0 0" FontSize="18">VIEW RUNNING JOB</TextBlock> + </StackPanel> + </Button> </Grid> <Grid Margin="0 -18 0 0"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs index 2942d36af..e6a528612 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs @@ -73,7 +73,7 @@ namespace Tango.MachineStudio.Developer.Views segments.Add(new Segment() { Length = _vm.ActiveJob.InterSegmentLength, - BrushStops = new System.Collections.ObjectModel.ObservableCollection<BrushStop>() + BrushStops = new SynchronizedObservableCollection<BrushStop>() { new BrushStop() { diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml index 279a9daf3..1cb8536e0 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml @@ -168,10 +168,10 @@ </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> - <DataGridTemplateColumn Header="NAME" CanUserSort="True" SortMemberPath="Name"> + <DataGridTemplateColumn Header="NAME" CanUserSort="True" SortMemberPath="Name" MaxWidth="100"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> - <TextBlock Text="{Binding Name}" VerticalAlignment="Center" FontSize="14"></TextBlock> + <TextBlock Text="{Binding Name}" ToolTip="{Binding Name}" TextWrapping="Wrap" MaxHeight="40" TextTrimming="CharacterEllipsis" VerticalAlignment="Center" FontSize="14"></TextBlock> </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml index dd2e541f5..11c60c1ef 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml @@ -25,10 +25,10 @@ <Grid DockPanel.Dock="Bottom" Height="40"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0 0 0 0"> - <Button Command="{Binding ExportToExcelCommand}" Style="{StaticResource MaterialDesignFlatButton}"> + <Button Command="{Binding BackToJobCommand}" Style="{StaticResource MaterialDesignFlatButton}" FontSize="16"> <StackPanel Orientation="Horizontal"> - <materialDesign:PackIcon VerticalAlignment="Center" Kind="FileExcel"></materialDesign:PackIcon> - <TextBlock Margin="10 0 0 0">EXPORT TO EXCEL</TextBlock> + <materialDesign:PackIcon VerticalAlignment="Center" Kind="KeyboardBackspace" Width="24" Height="24"></materialDesign:PackIcon> + <TextBlock Margin="10 0 0 0">BACK TO JOB</TextBlock> </StackPanel> </Button> </StackPanel> |
