From 3283eca8d5cb327779d53b6e1744e3440098bb35 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Thu, 16 Mar 2023 18:17:48 +0200 Subject: Eurika UI. Changes in Job details according to figma. Created Job Status page - only GUI. --- .../Dialogs/ColorSelectionView.xaml | 2 +- .../Modules/Tango.PPC.JobsV2/Models/JobModel.cs | 18 + .../Tango.PPC.JobsV2/ViewModels/JobViewVM.cs | 16 + .../Tango.PPC.JobsV2/Views/JobEurekaView.xaml | 234 ++++++--- .../Controls/RunningJobViewerEureka.xaml | 119 +++++ .../Controls/RunningJobViewerEureka.xaml.cs | 77 +++ .../PPC/Tango.PPC.UI/Images/Job Issues/Events.png | Bin 0 -> 646 bytes .../PPC/Tango.PPC.UI/Images/Job Issues/Thread.png | Bin 0 -> 1239 bytes .../PPC/Tango.PPC.UI/Images/Job Issues/input.png | Bin 0 -> 1011 bytes .../Tango.PPC.UI/Images/Job Issues/job_copies.png | Bin 0 -> 978 bytes .../Tango.PPC.UI/Images/Job Issues/job_length.png | Bin 0 -> 1150 bytes .../Tango.PPC.UI/Images/Job Issues/job_weight.png | Bin 0 -> 1192 bytes .../PPC/Tango.PPC.UI/Images/Job Issues/output.png | Bin 0 -> 995 bytes .../PPC/Tango.PPC.UI/Images/Job Issues/spools.png | Bin 0 -> 1177 bytes .../Tango.PPC.UI/Images/Job Issues/thread_type.png | Bin 0 -> 1223 bytes .../Tango.PPC.UI/Images/Job Issues/ttime_left.png | Bin 0 -> 906 bytes .../PPC/Tango.PPC.UI/Tango.PPC.UI.csproj | 17 + .../Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs | 43 +- .../PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml | 11 +- .../PPC/Tango.PPC.UI/Views/MachineStatusView.xaml | 569 +++++++++++++++++---- .../Tango.Touch/Controls/TouchToggleSlider.xaml | 27 + .../Visual_Studio/Tango.Touch/Resources/Fonts.xaml | 1 + 22 files changed, 927 insertions(+), 207 deletions(-) create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Controls/RunningJobViewerEureka.xaml create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Controls/RunningJobViewerEureka.xaml.cs create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/Events.png create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/Thread.png create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/input.png create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/job_copies.png create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/job_length.png create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/job_weight.png create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/output.png create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/spools.png create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/thread_type.png create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/ttime_left.png (limited to 'Software') 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 d020e13ac..d8b3d535b 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 @@ -667,7 +667,7 @@ - + diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs index d2ad7e96b..0009fce24 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs @@ -335,6 +335,24 @@ namespace Tango.PPC.Jobs.Models get { return SpoolType.Guid; } } + private int _copies; + + public int Copies + { + get { return _copies; } + set { _copies = value; RaisePropertyChangedAuto(); } + } + + private int _devidedBySpools; + + public int DevidedBySpools + { + get { return _devidedBySpools; } + set { _devidedBySpools = value; RaisePropertyChangedAuto(); } + } + + + protected User _user; /// diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs index 19e6a22b2..788b1eca3 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs @@ -286,6 +286,8 @@ namespace Tango.PPC.Jobs.ViewModels public RelayCommand DeleteSegmentsGroupCommand { get; set; } public RelayCommand RepeatSegmentsGroupCommand { get; set; } + public RelayCommand NavigateBackToJobs { get; set; } + #endregion #region collapsed mode commands @@ -359,6 +361,7 @@ namespace Tango.PPC.Jobs.ViewModels UndoCommand = new RelayCommand(Undo);//(x) => { return UndoRedoManager.Instance.IsEnableUndoOperation(); } RedoCommand = new RelayCommand(Redo);//(x) => { return UndoRedoManager.Instance.IsEnableRedoOperation();} + NavigateBackToJobs = new RelayCommand(NavigateBack); IsFullMode = true; IsSummaryOpened = true; _not_show_warning = false; @@ -1281,6 +1284,19 @@ namespace Tango.PPC.Jobs.ViewModels } } + private async void NavigateBack() + { + if (IsFree ) + { + if(await OnNavigateBackRequest()) + { + LogManager.Log("Back command to Jobs pressed."); + await NavigationManager.NavigateTo(nameof(JobsView)); + } + + } + } + public override void OnApplicationReady() { base.OnApplicationReady(); diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml index 6999c54d7..f8e881df7 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml @@ -790,12 +790,66 @@ + + + + + + + + + + + + General Settings + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + - @@ -827,32 +881,90 @@ - - - + - + --> + - + + - - + + + + + + + + + + + + + + + + + + Color Properties + + + Select All + + + + + Advanced Options + + + + + + + + + + + + + + + + + + + + + - + - + - + @@ -885,7 +997,7 @@ - + - + - - - - - - - - - - + --> - - - - - - + @@ -1062,10 +1111,27 @@ - + + + + + + + + + + + + + + + - + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Controls/RunningJobViewerEureka.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Controls/RunningJobViewerEureka.xaml new file mode 100644 index 000000000..72a7660ad --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Controls/RunningJobViewerEureka.xaml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Controls/RunningJobViewerEureka.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Controls/RunningJobViewerEureka.xaml.cs new file mode 100644 index 000000000..db6a8c178 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Controls/RunningJobViewerEureka.xaml.cs @@ -0,0 +1,77 @@ +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; +using Tango.BL.Entities; +using Tango.Integration.Operation; + +namespace Tango.PPC.UI.Controls +{ + /// + /// Interaction logic for RunningJobViewerEureka.xaml + /// + public partial class RunningJobViewerEureka : UserControl + { + /// + /// Maybe not necessary! + /// + public bool IsActive + { + get { return (bool)GetValue(IsActiveProperty); } + set { SetValue(IsActiveProperty, value); } + } + public static readonly DependencyProperty IsActiveProperty = + DependencyProperty.Register("IsActive", typeof(bool), typeof(RunningJobViewerEureka), new PropertyMetadata(false)); + + /// + /// Gets or sets a value indicating whether summary markers. + /// + public bool DisplayMarkers + { + get { return (bool)GetValue(DisplayMarkersProperty); } + set { SetValue(DisplayMarkersProperty, value); } + } + public static readonly DependencyProperty DisplayMarkersProperty = + DependencyProperty.Register("DisplayMarkers", typeof(bool), typeof(RunningJobViewerEureka), new PropertyMetadata(true)); + + /// + /// Gets or sets the job. + /// + public Job Job + { + get { return (Job)GetValue(JobProperty); } + set { SetValue(JobProperty, value); } + } + public static readonly DependencyProperty JobProperty = + DependencyProperty.Register("Job", typeof(Job), typeof(RunningJobViewerEureka), new PropertyMetadata(null)); + + /// + /// Gets or sets the running job status. + /// + public RunningJobStatus RunningJobStatus + { + get { return (RunningJobStatus)GetValue(RunningJobStatusProperty); } + set { SetValue(RunningJobStatusProperty, value); } + } + public static readonly DependencyProperty RunningJobStatusProperty = + DependencyProperty.Register("RunningJobStatus", typeof(RunningJobStatus), typeof(RunningJobViewerEureka), new PropertyMetadata(null)); + + /// + /// Initializes a new instance of the class. + /// + public RunningJobViewerEureka() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/Events.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/Events.png new file mode 100644 index 000000000..4f76e1c11 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/Events.png differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/Thread.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/Thread.png new file mode 100644 index 000000000..85d0718f0 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/Thread.png differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/input.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/input.png new file mode 100644 index 000000000..77dbab1c9 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/input.png differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/job_copies.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/job_copies.png new file mode 100644 index 000000000..dc3cbf124 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/job_copies.png differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/job_length.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/job_length.png new file mode 100644 index 000000000..97a177ef4 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/job_length.png differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/job_weight.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/job_weight.png new file mode 100644 index 000000000..6eb0a6194 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/job_weight.png differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/output.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/output.png new file mode 100644 index 000000000..53b317042 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/output.png differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/spools.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/spools.png new file mode 100644 index 000000000..8bb977473 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/spools.png differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/thread_type.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/thread_type.png new file mode 100644 index 000000000..1e2523a56 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/thread_type.png differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/ttime_left.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/ttime_left.png new file mode 100644 index 000000000..55622f20f Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/ttime_left.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 14a4d02c1..6249447c4 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 @@ -136,6 +136,9 @@ MachineStatusControl.xaml + + RunningJobViewerEureka.xaml + @@ -292,6 +295,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -534,6 +541,16 @@ + + + + + + + + + + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs index a0d6e2955..594f418a7 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs @@ -12,6 +12,8 @@ namespace Tango.PPC.UI.ViewModels { public class MachineStatusViewVM : PPCViewModel { + #region Properties + private JobHandler _handler; private Job _job; @@ -34,11 +36,39 @@ namespace Tango.PPC.UI.ViewModels set { _runningJobStatus = value; RaisePropertyChangedAuto(); } } + private bool _isJobStatusViewEnable; + + public bool IsJobStatusViewEnable + { + get { return _isJobStatusViewEnable; } + set { _isJobStatusViewEnable = value; RaisePropertyChangedAuto(); } + } + + #endregion + + #region Commands + public RelayCommand StopCommand { get; set; } + /// + /// Gets or sets the job status view command. + /// + public RelayCommand JobStatusViewCommand { get; set; } + + /// + /// Gets or sets the overview view command. + /// + public RelayCommand OverviewViewCommand { get; set; } + + #endregion + public MachineStatusViewVM() { StopCommand = new RelayCommand(StopJob); + JobStatusViewCommand = new RelayCommand(JobStatusView); + OverviewViewCommand = new RelayCommand(OverviewView); + + IsJobStatusViewEnable = true; } public override void OnApplicationStarted() @@ -73,7 +103,7 @@ namespace Tango.PPC.UI.ViewModels RunningJobStatus = e; }); } - + #region Public Methods /// @@ -96,6 +126,17 @@ namespace Tango.PPC.UI.ViewModels _handler?.Cancel(); } + protected void JobStatusView() + { + IsJobStatusViewEnable = true; + } + + protected void OverviewView() + { + IsJobStatusViewEnable = false; + } + + #endregion } } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml index d496d4d14..f81b493ff 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml @@ -48,13 +48,6 @@ - - - - - @@ -216,9 +209,9 @@ - + - + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml index 0879fcaab..ca7aa957b 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml @@ -9,141 +9,486 @@ xmlns:global="clr-namespace:Tango.PPC.UI" xmlns:local="clr-namespace:Tango.PPC.UI.Views" mc:Ignorable="d" - d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:MachineStatusViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MachineStatusViewVM}"> - - - - - - - - - - - - - + d:DesignHeight="1280" d:DesignWidth="932" d:DataContext="{d:DesignInstance Type=vm:MachineStatusViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MachineStatusViewVM}"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Go To Job + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Thread Type + + + + + + + + Job Length + + + + + + + Job Weight + + + + + + + Copies + + + + + + + Spools + + + + + + + + + + + - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - Completed - + + + + + - + + + + + + Completed + + + m - - + + - - - - Getting Ready... + + + + Getting Ready... + - - + - - - Time Left - + + + Time Left + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Job Length + + + + + + + Job Weight + + + + + + + Copies + + + + + + + Time Left + + + + - + + + + + + + + + + + + Input + + + + + L + 86 + + + + A + 86 + + + + B + 86 + + + + + + + Output + + + + + C + 86 + + + + M + 86 + + + + Y + 86 + + + + K + 86 + + + + - + 86 + + + + - + 86 + + + + - + 86 + + + + + + - + + + + + + diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchToggleSlider.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchToggleSlider.xaml index 2f758ec8c..7d26fdcff 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchToggleSlider.xaml +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchToggleSlider.xaml @@ -132,4 +132,31 @@ + + \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Touch/Resources/Fonts.xaml b/Software/Visual_Studio/Tango.Touch/Resources/Fonts.xaml index f8db0094f..e1f249008 100644 --- a/Software/Visual_Studio/Tango.Touch/Resources/Fonts.xaml +++ b/Software/Visual_Studio/Tango.Touch/Resources/Fonts.xaml @@ -29,4 +29,5 @@ 27 46 + 42 \ No newline at end of file -- cgit v1.3.1