From 3c0b20184527064f1c5d9374894f3d9ec44672e3 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Sun, 10 Sep 2023 15:00:28 +0300 Subject: Add My Color - add command to save on OK, added name and selection to ListBox. libraries --- .../Dialogs/ColorSelectionView.xaml | 29 +++++++--- .../Dialogs/ColorSelectionViewVM.cs | 67 ++++++++++++++++++---- .../Tango.PPC.JobsV2/Models/ColorLibrary.cs | 19 +++++- 3 files changed, 96 insertions(+), 19 deletions(-) (limited to 'Software/Visual_Studio/PPC') diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionView.xaml index e737a8f7a..3ec03eff7 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionView.xaml @@ -51,7 +51,7 @@ - + @@ -170,7 +170,7 @@ - + + + + + + + diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionViewVM.cs index 3146da179..37f5c3f7b 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionViewVM.cs @@ -323,6 +323,24 @@ namespace Tango.PPC.Jobs.Dialogs private ColorLibrary SelectedColorLibrary { get; set; } + private ColorLibrary _selectedColorLibraryMyColor; + + public ColorLibrary SelectedColorLibraryMyColor + { + get { return _selectedColorLibraryMyColor; } + set { + if(_selectedColorLibraryMyColor != null) + _selectedColorLibraryMyColor.IsSelected = false; + + _selectedColorLibraryMyColor = value; + + if (_selectedColorLibraryMyColor != null) + _selectedColorLibraryMyColor.IsSelected = true; + RaisePropertyChangedAuto(); + } + } + + private FavoriteColor _selectedColor; public FavoriteColor SelectedColor @@ -446,10 +464,11 @@ namespace Tango.PPC.Jobs.Dialogs /// /// Gets or sets the save my colors command. /// + public RelayCommand OpenCloseAddMyColorDialogCommand { get; set; } public RelayCommand SaveMyColorsCommand { get; set; } public RelayCommand AddNewGroupCommand { get; set; } public RelayCommand AddNewGroupAndColorCommand { get; set; } - public RelayCommand AddColorToLibraryCommand { get; set; } + public RelayCommand SelectLibraryCommand { get; set; } /// /// Gets or sets the open my colors command. @@ -501,6 +520,7 @@ namespace Tango.PPC.Jobs.Dialogs } }); + OpenCloseAddMyColorDialogCommand = new RelayCommand(OpenCloseAddMyColorDialog); SaveMyColorsCommand = new RelayCommand(SaveMyColors); OpenMyColorsCommand = new RelayCommand(() => { MyColorsMode = true; }); CloseMyColorsCommand = new RelayCommand(() => { MyColorsMode = false; SearchColorText = "";}); @@ -508,7 +528,8 @@ namespace Tango.PPC.Jobs.Dialogs AddGroupCommand = new RelayCommand(AddGroup); AddNewGroupCommand = new RelayCommand(AddNewGroup); AddNewGroupAndColorCommand = new RelayCommand(AddNewGroupAndColor); - AddColorToLibraryCommand = new RelayCommand(AddColorToLibrary); + + SelectLibraryCommand = new RelayCommand(SelectLibrary); DeleteGroupCommand = new RelayCommand(DeleteGroup); EditColorsLibraryCommand = new RelayCommand(EditColorsLibrary); EditColorsLibrariesCommand = new RelayCommand(EditColorsLibraries); @@ -824,7 +845,7 @@ namespace Tango.PPC.Jobs.Dialogs #region MyColors - private void SaveMyColors() + private void OpenCloseAddMyColorDialog() { if(IsBusy) return; @@ -866,17 +887,37 @@ namespace Tango.PPC.Jobs.Dialogs else { SaveMyColorMode = !SaveMyColorMode; + //Init MyColorName on open the dialog String colorName = "MyColor"; - if (SelectedBrushStop != null && SelectedBrushStop.SegmentModel != null - && SelectedBrushStop.SegmentModel.Job != null) + if ( SelectedBrushStop != null && SelectedBrushStop.SegmentModel != null && SelectedBrushStop.SegmentModel.Job != null ) { colorName = SelectedBrushStop.SegmentModel.Job.Name; if(colorName.Length > 40) colorName = colorName.Substring(0, 40); } MyColorName = colorName; + SelectedColorLibraryMyColor = null; + AddGroupMode = false; } - + IsBusy = false; + + } + + /// + /// Saves my colors on OK button of dialog "Add my Color" + /// + private void SaveMyColors() + { + if (IsBusy) + return; + IsBusy = true; + if (SelectedColorLibraryMyColor != null) + { + AddColorToLibrary(SelectedColorLibraryMyColor); + } + SelectedColorLibraryMyColor = null; + AddGroupMode = false; + SaveMyColorMode = false; IsBusy = false; } @@ -932,14 +973,15 @@ namespace Tango.PPC.Jobs.Dialogs { NotificationProvider.ShowInfo("A group with this name already exists. Try adding a different name."); } + SelectedColorLibrary = library; - AddColorToLibrary(library); + // AddColorToLibrary(library); } NewGroupName = "Library" + (Libraries.Count() + 1); - SaveMyColorMode = false; - AddGroupMode = false; + //SaveMyColorMode = false; + //AddGroupMode = false; } - + /// /// Adds the selected color to library in Save my Colors. /// @@ -985,6 +1027,11 @@ namespace Tango.PPC.Jobs.Dialogs SaveMyColorMode = false; } + private void SelectLibrary(ColorLibrary library) + { + SelectedColorLibraryMyColor = library; + } + private void SelectColor(FavoriteColor favoriteColor) { SelectedColor = favoriteColor; diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/ColorLibrary.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/ColorLibrary.cs index 62dc7ec1b..284b2c787 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/ColorLibrary.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/ColorLibrary.cs @@ -16,6 +16,7 @@ namespace Tango.PPC.Jobs.Models { public class ColorLibrary: ExtendedObject { + #region Properties private ObservableCollection _colorList; public ObservableCollection ColorList { @@ -51,7 +52,23 @@ namespace Tango.PPC.Jobs.Models OnEditGroupModeChanged(); RaisePropertyChangedAuto(); } } - + + private bool _isSelected; + [BsonIgnore] + public bool IsSelected + { + get { + return _isSelected; + } + set { + _isSelected = value; + RaisePropertyChangedAuto(); + } + } + + + #endregion + public ColorLibrary() { _colorList = new ObservableCollection(); -- cgit v1.3.1 From 38200150dd731b158448316835b069d3fef2bc8f Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Thu, 14 Sep 2023 13:21:10 +0300 Subject: Select All in PPC - new icon. --- .../Tango.PPC.JobsV2/Images/JobView/select_all.png | Bin 0 -> 787 bytes .../Tango.PPC.JobsV2/Tango.PPC.JobsV2.csproj | 5 +++- .../Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs | 19 +++++++++++++ .../Modules/Tango.PPC.JobsV2/Views/JobsView.xaml | 22 +++++++++++++-- .../Tango.Touch/Controls/LightTouchDataGrid.cs | 31 ++++++++++++++++++++- 5 files changed, 73 insertions(+), 4 deletions(-) create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Images/JobView/select_all.png (limited to 'Software/Visual_Studio/PPC') diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Images/JobView/select_all.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Images/JobView/select_all.png new file mode 100644 index 000000000..0a27c2aaa Binary files /dev/null and b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Images/JobView/select_all.png differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Tango.PPC.JobsV2.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Tango.PPC.JobsV2.csproj index 96083d842..33ccc5b53 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Tango.PPC.JobsV2.csproj +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Tango.PPC.JobsV2.csproj @@ -752,10 +752,13 @@ + + + - + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs index e5e41b382..5f005385e 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs @@ -185,6 +185,16 @@ namespace Tango.PPC.Jobs.ViewModels set { _collectionFilter = value; RaisePropertyChangedAuto(); } } + private bool _selectAll; + + public bool SelectAll + { + get { return _selectAll; } + set { _selectAll = value; + RaisePropertyChangedAuto();} + } + + #endregion @@ -230,6 +240,8 @@ namespace Tango.PPC.Jobs.ViewModels /// public RelayCommand MoveToListJobsCommand { get; set; } + public RelayCommand SelectAllJobsCommand { get; set; } + #endregion #region Constructors @@ -257,6 +269,7 @@ namespace Tango.PPC.Jobs.ViewModels CloneJobsCommand = new RelayCommand(() => CloneJobs(SelectedJobs)); ExportJobCommand = new RelayCommand(ExportJob); MoveToListJobsCommand = new RelayCommand(() => MoveToListJobs(SelectedJobs)); + SelectAllJobsCommand = new RelayCommand(SelectAllJobs); RegisterForMessage(HandleJobRemovedMessage); RegisterForMessage(HandleJobSavedMessage); @@ -421,6 +434,12 @@ namespace Tango.PPC.Jobs.ViewModels IsMultiSelecting = false; } + private void SelectAllJobs() + { + SelectAll = !SelectAll; + } + + /// /// Adds a new job. /// diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml index d3fdedde5..b57619c8c 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml @@ -35,6 +35,8 @@ + + @@ -94,6 +96,22 @@ + + + + + + + + + + diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/machine-image-X4.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/machine-image-X4.png new file mode 100644 index 000000000..5a6095e4c Binary files /dev/null and b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/machine-image-X4.png differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Tango.PPC.Maintenance.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Tango.PPC.Maintenance.csproj index bebdd63c7..6ede5f25b 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Tango.PPC.Maintenance.csproj +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Tango.PPC.Maintenance.csproj @@ -323,10 +323,13 @@ + + + - + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Power/Images/machine-X4.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Power/Images/machine-X4.png new file mode 100644 index 000000000..25e4697fd Binary files /dev/null and b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Power/Images/machine-X4.png differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/machine-X4.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/machine-X4.png new file mode 100644 index 000000000..25e4697fd Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/machine-X4.png differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/machine-image-X4.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/machine-image-X4.png new file mode 100644 index 000000000..5a6095e4c Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/machine-image-X4.png differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj index 8f65f225b..a63c0fca2 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj @@ -648,6 +648,8 @@ + + @@ -993,7 +995,7 @@ if $(ConfigurationName) == Eureka copy /Y "$(ProjectDir)Intro.wmv" "$(TargetDir) - + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/EmergencyView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/EmergencyView.xaml index f2b018bfa..e4f55915c 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/EmergencyView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/EmergencyView.xaml @@ -20,7 +20,18 @@ 2. Release the emergency button. 3. Press the power button to power up the system. - + + + + + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/ExternalBridgeView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/ExternalBridgeView.xaml index fddd15fe7..7276d7d4c 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/ExternalBridgeView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/ExternalBridgeView.xaml @@ -18,7 +18,18 @@ - + + + + + + + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/RestartingView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/RestartingView.xaml index 41017f629..9e7abdca2 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/RestartingView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/RestartingView.xaml @@ -14,7 +14,18 @@ - + + + + + -- cgit v1.3.1 From bf7234e0757a53129bd4991d3db30b03ff5049b3 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Wed, 25 Oct 2023 18:11:26 +0300 Subject: Add input\output inks to TS1800 progress screen Related Work Items: #9165 --- .../Images/JobProgressView/input.png | Bin 0 -> 1011 bytes .../Images/JobProgressView/output.png | Bin 0 -> 995 bytes .../Tango.PPC.JobsV2/Tango.PPC.JobsV2.csproj | 6 +- .../ViewModels/JobProgressViewVM.cs | 147 ++++++++++- .../Tango.PPC.JobsV2/Views/JobProgressView.xaml | 271 ++++++++++++++++++++- .../Tango.PPC.JobsV2/Views/JobSummeryView.xaml | 96 +++++++- 6 files changed, 514 insertions(+), 6 deletions(-) create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Images/JobProgressView/input.png create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Images/JobProgressView/output.png (limited to 'Software/Visual_Studio/PPC') diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Images/JobProgressView/input.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Images/JobProgressView/input.png new file mode 100644 index 000000000..77dbab1c9 Binary files /dev/null and b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Images/JobProgressView/input.png differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Images/JobProgressView/output.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Images/JobProgressView/output.png new file mode 100644 index 000000000..53b317042 Binary files /dev/null and b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Images/JobProgressView/output.png differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Tango.PPC.JobsV2.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Tango.PPC.JobsV2.csproj index 33ccc5b53..405f87b28 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Tango.PPC.JobsV2.csproj +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Tango.PPC.JobsV2.csproj @@ -755,10 +755,14 @@ + + + + - + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobProgressViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobProgressViewVM.cs index 8756a6a57..b879831b9 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobProgressViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobProgressViewVM.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Tango.BL.Entities; +using Tango.BL.Enumerations; using Tango.Core.Commands; using Tango.Integration.Operation; using Tango.Logging; @@ -37,7 +38,12 @@ namespace Tango.PPC.Jobs.ViewModels public Job Job { get { return _job; } - set { _job = value; RaisePropertyChangedAuto(); } + set { _job = value; + if(_job == null) + { + IsDyeingProcess = false; + } + RaisePropertyChangedAuto(); } } private RunningJobStatus _runningJobStatus; @@ -47,7 +53,14 @@ namespace Tango.PPC.Jobs.ViewModels public RunningJobStatus RunningJobStatus { get { return _runningJobStatus; } - set { _runningJobStatus = value; RaisePropertyChangedAuto(); } + set { + _runningJobStatus = value; + if(_runningJobStatus == null) + { + IsDyeingProcess = false; + } + RaisePropertyChangedAuto(); + } } private bool _isDisplayJobOutline; @@ -70,6 +83,73 @@ namespace Tango.PPC.Jobs.ViewModels set { _jobOutlineTicket = value; RaisePropertyChangedAuto(); } } + private bool _isDyeingProcess; + + public bool IsDyeingProcess + { + get { return _isDyeingProcess; } + set + { + if (_isDyeingProcess != value) + { + _isDyeingProcess = value; + RaisePropertyChangedAuto(); + } + } + } + + private BrushStop _currentBrushStop; + public BrushStop CurrentBrushStop + { + get { return _currentBrushStop; } + set + { + // if (_currentBrushStop != value) + { + _currentBrushStop = value; + OnUpdateCurrentBrush(); + RaisePropertyChangedAuto(); + } + } + } + + public JobBrushStop JobBrushStop { get; set; } + + public double CyanOutput + { + get { return GetVolumeLiquidType(LiquidTypes.Cyan); } + } + + public double MagentaOutput + { + get { return GetVolumeLiquidType(LiquidTypes.Magenta); } + } + + public double YellowOutput + { + get { return GetVolumeLiquidType(LiquidTypes.Yellow); } + } + + public double BlackOutput + { + get { return GetVolumeLiquidType(LiquidTypes.Black); } + } + + public double LightCyanOutput + { + get { return GetVolumeLiquidType(LiquidTypes.LightCyan); } + } + + public double LightMagentaOutput + { + get { return GetVolumeLiquidType(LiquidTypes.LightMagenta); } + } + + public double LightYellowOutput + { + get { return GetVolumeLiquidType(LiquidTypes.LightYellow); } + } + #endregion #region Commands @@ -123,6 +203,31 @@ namespace Tango.PPC.Jobs.ViewModels NavigationManager.ClearHistoryExcept(); } + protected void OnUpdateCurrentBrush() + { + RaisePropertyChanged(nameof(CyanOutput)); + RaisePropertyChanged(nameof(LightCyanOutput)); + RaisePropertyChanged(nameof(MagentaOutput)); + RaisePropertyChanged(nameof(LightMagentaOutput)); + RaisePropertyChanged(nameof(YellowOutput)); + RaisePropertyChanged(nameof(LightYellowOutput)); + RaisePropertyChanged(nameof(BlackOutput)); + } + + private double GetVolumeLiquidType(LiquidTypes liquidType) + { + if (JobBrushStop != null && JobBrushStop.Dispensers != null && JobBrushStop.Dispensers.Count > 0) + { + var lt = JobBrushStop.Dispensers.FirstOrDefault(x => x.DispenserLiquidType == (DispenserLiquidType)liquidType); + + if (lt != null) + { + return Math.Round(lt.Volume, 2); + } + } + return 0; + } + #endregion #region Override Methods @@ -160,6 +265,7 @@ namespace Tango.PPC.Jobs.ViewModels if (_handler != null) { _handler.Cancel(); + IsDyeingProcess = false; } } @@ -228,6 +334,7 @@ namespace Tango.PPC.Jobs.ViewModels _handler.SpoolChangeRequired -= JobHandler_SpoolChangeRequired; _handler.Stopped -= JobHandler_Stopped; _handler.CanCancelChanged -= JobHandler_CanCancelChanged; + IsDyeingProcess = false; } } @@ -241,6 +348,42 @@ namespace Tango.PPC.Jobs.ViewModels InvokeUI(() => { RunningJobStatus = e; + IsDyeingProcess = (RunningJobStatus != null && RunningJobStatus.CurrentSegment != null); + if (RunningJobStatus != null && RunningJobStatus.CurrentSegment != null) + { + if (_runningJobStatus.CurrentSegment.IsInterSegment) + { + CurrentBrushStop = _runningJobStatus.CurrentSegment.BrushStops.FirstOrDefault(); + JobBrushStop = null; + } + else + { + var realsegmIndex = 1; + if (Job.EnableInterSegment && Job.InterSegmentLength > 0) + { + int segmentIndex = _runningJobStatus.CurrentSegment.SegmentIndex - (Job.EffectiveSegments.Count * RunningJobStatus.CurrentUnit); + if (RunningJobStatus.CurrentUnit > 0) + { + segmentIndex -= RunningJobStatus.CurrentUnit;// inter segment between units + } + realsegmIndex = (int)(segmentIndex / 2) + 1; + } + else + { + realsegmIndex = Math.Max(_runningJobStatus.CurrentSegment.SegmentIndex - (Job.Segments.Count * RunningJobStatus.CurrentUnit), 0); + } + + var segment = Job.Segments.FirstOrDefault(x => x.SegmentIndex == realsegmIndex); + if (segment != null) + { + if (_handler.JobTicket.Segments.Count > 0) + { + JobBrushStop = _handler.JobTicket.Segments[Job.OrderedSegments.IndexOf(segment)].BrushStops.First(); + } + } + CurrentBrushStop = RunningJobStatus.CurrentSegment.FirstBrushStop; + } + } }); } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobProgressView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobProgressView.xaml index a91d5676b..89b69a316 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobProgressView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobProgressView.xaml @@ -7,6 +7,7 @@ xmlns:controls="clr-namespace:Tango.PPC.Jobs.Controls" xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" xmlns:converters="clr-namespace:Tango.PPC.Jobs.Converters" + xmlns:entities="clr-namespace:Tango.BL.Entities;assembly=Tango.BL" xmlns:global="clr-namespace:Tango.PPC.Jobs" xmlns:local="clr-namespace:Tango.PPC.Jobs.Views" mc:Ignorable="d" @@ -14,6 +15,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -119,7 +219,7 @@ - + @@ -206,8 +306,175 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Output ( % ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + C + + + + + + LC + + + + + + M + + + + + + + LM + + + + + + Y + + + + + + LY + + + + + + K + + + + + - + Go to job diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobSummeryView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobSummeryView.xaml index a013cd7f9..6eb51d16f 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobSummeryView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobSummeryView.xaml @@ -11,6 +11,14 @@ xmlns:local="clr-namespace:Tango.PPC.Jobs.Views" mc:Ignorable="d" d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:JobSummeryViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.JobSummeryViewVM}"> + + + + @@ -51,7 +59,8 @@ - + + @@ -103,7 +112,92 @@ + + + + + + + + + Input + + + + + + + + + + + + + + + + + + + + + + + + + + Output ( % ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.3.1