From b9009a814b9c91010e44534b42fa15fe164757a3 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Thu, 5 Nov 2020 19:33:06 +0200 Subject: Completed ThreadBreak/Loading Wizards !!! --- .../PPC/Tango.PPC.UI/Dialogs/ThreadBreakView.xaml | 225 +++++++++++++++++++ .../Tango.PPC.UI/Dialogs/ThreadBreakView.xaml.cs | 28 +++ .../PPC/Tango.PPC.UI/Dialogs/ThreadBreakViewVM.cs | 243 +++++++++++++++++++++ .../Tango.PPC.UI/Dialogs/ThreadLoadingView.xaml | 111 ++++++---- .../Dialogs/ThreadLoadingViewVM - Copy.cs | 176 --------------- .../Tango.PPC.UI/Dialogs/ThreadLoadingViewVM.cs | 20 +- .../Images/ThreadLoading/DryerClose/1.jpg | Bin 0 -> 57998 bytes .../Images/ThreadLoading/DryerClose/2.jpg | Bin 0 -> 58057 bytes .../Images/ThreadLoading/DryerClose/3.jpg | Bin 0 -> 59306 bytes .../Images/ThreadLoading/DryerClose/4.jpg | Bin 0 -> 55777 bytes .../Images/ThreadLoading/FeedingUnits/1.JPG | Bin 0 -> 50823 bytes .../Images/ThreadLoading/FeedingUnits/2.JPG | Bin 0 -> 36100 bytes .../Images/ThreadLoading/FeedingUnits/3.JPG | Bin 0 -> 52652 bytes .../Images/ThreadLoading/FeedingUnits/4.JPG | Bin 0 -> 103042 bytes .../Images/ThreadLoading/FeedingUnits/arc/1.jpg | Bin 0 -> 50823 bytes .../Images/ThreadLoading/FeedingUnits/arc/2.jpg | Bin 0 -> 36100 bytes .../Images/ThreadLoading/FeedingUnits/arc/3.jpg | Bin 0 -> 52652 bytes .../Images/ThreadLoading/FeedingUnits/arc/4.jpg | Bin 0 -> 103042 bytes .../Images/ThreadLoading/FeedingUnits/arc/5.jpg | Bin 0 -> 123123 bytes .../Images/ThreadLoading/GuidingUnits/1.JPG | Bin 0 -> 47345 bytes .../NewThread/ReadyForLoading/arc/1.jpg | Bin 0 -> 70545 bytes .../NewThread/ReadyForLoading/arc/2.JPG | Bin 0 -> 50823 bytes .../NewThread/ReadyForLoading/arc/3.JPG | Bin 0 -> 36100 bytes .../NewThread/ReadyForLoading/arc/4.JPG | Bin 0 -> 85970 bytes .../NewThread/ReadyForLoading/arc/5.JPG | Bin 0 -> 123123 bytes .../NewThread/ReadyForLoading/arc/6.JPG | Bin 0 -> 67829 bytes .../NewThread/ReadyForLoading/arc/7.jpg | Bin 0 -> 229536 bytes .../NewThread/TS1800_CloseUp_Feeder_P.jpg | Bin 0 -> 94899 bytes .../ThreadLoading/NewThread/machine_full.jpg | Bin 0 -> 67243 bytes .../Images/ThreadLoading/TheDryer/1.jpg | Bin 0 -> 39336 bytes .../Images/ThreadLoading/TheDryer/2.jpg | Bin 0 -> 36100 bytes .../Images/ThreadLoading/TheDryer/3.jpg | Bin 0 -> 45420 bytes .../Images/ThreadLoading/TheDryer/4.jpg | Bin 0 -> 46782 bytes .../Images/ThreadLoading/TheDryer/5.jpg | Bin 0 -> 49932 bytes .../PPC/Tango.PPC.UI/Tango.PPC.UI.csproj | 39 +++- .../ThreadLoading/DefaultThreadLoadingService.cs | 17 +- 36 files changed, 639 insertions(+), 220 deletions(-) create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadBreakView.xaml create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadBreakView.xaml.cs create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadBreakViewVM.cs delete mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadLoadingViewVM - Copy.cs create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/DryerClose/1.jpg create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/DryerClose/2.jpg create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/DryerClose/3.jpg create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/DryerClose/4.jpg create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/1.JPG create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/2.JPG create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/3.JPG create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/4.JPG create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/arc/1.jpg create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/arc/2.jpg create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/arc/3.jpg create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/arc/4.jpg create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/arc/5.jpg create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/GuidingUnits/1.JPG create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/1.jpg create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/2.JPG create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/3.JPG create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/4.JPG create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/5.JPG create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/6.JPG create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/7.jpg create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/TS1800_CloseUp_Feeder_P.jpg create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/machine_full.jpg create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/TheDryer/1.jpg create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/TheDryer/2.jpg create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/TheDryer/3.jpg create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/TheDryer/4.jpg create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/TheDryer/5.jpg (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadBreakView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadBreakView.xaml new file mode 100644 index 000000000..6c64520a4 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadBreakView.xaml @@ -0,0 +1,225 @@ + + + + + + Thread Break Wizard + + + + + + + + + + Back + + + + + + + + + + + + Found But Can't Fix + Found and Fixed + Can't Find It + + + + Please check guiding units on both sides of the system and fix/tie the thread if possible. + + + + + + + + + + + + + + Found and Fixed + Can't Fix + + + if the thread is out of is route or tangle on one of the components you can go to the maintenance screen and open the component to solve the problem + + + + + Open the covers and check the feeder and puller and fix/tie if possible. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Removed Successfully + Can't Remove + + + + + HOT SURFACE! + + + Recommended to cool down and/or to wear safety gloves + + + + + + Open the dryer, cut the thread and remove any residue. + + + + + + + + + + + + + + + + + + + Open The Thread Loading Wizard + + + You will be able to open the thread loading wizard once the dryer door is closed + + + + + Close the dryer door + + + + + + + + + + + + + + + + + + Close + + + + + Please Contact Twine Customer Care + + + + + support@twine-s.com + + + + + + + + + + + + Verifying thread movement + + + + + working... + + + + + + + + + + + Close + + + + + Issue Resolved + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadBreakView.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadBreakView.xaml.cs new file mode 100644 index 000000000..c105a9a15 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadBreakView.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.PPC.UI.Dialogs +{ + /// + /// Interaction logic for ThreadBreakWizard.xaml + /// + public partial class ThreadBreakView : UserControl + { + public ThreadBreakView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadBreakViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadBreakViewVM.cs new file mode 100644 index 000000000..131f976c1 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadBreakViewVM.cs @@ -0,0 +1,243 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Core.Commands; +using Tango.Core.DI; +using Tango.Logging; +using Tango.PPC.Common.Connection; +using Tango.PPC.Common.Notifications; +using Tango.SharedUI; + +namespace Tango.PPC.UI.Dialogs +{ + public class ThreadBreakViewVM : DialogViewVM + { + public enum ThreadBreakWizardResult + { + None, + StartThreadLoading + } + + public enum WizardStage + { + Welcome, + GuidingUnits, + FeedingUnits, + Jogging, + TheDryer, + DryerClose, + Fixed, + ContactSupport, + } + + [TangoInject] + private IMachineProvider MachineProvider { get; set; } + + [TangoInject] + private INotificationProvider NotificationProvider { get; set; } + + public ThreadBreakWizardResult Result { get; set; } + + private WizardStage _stage; + public WizardStage Stage + { + get { return _stage; } + set { _stage = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); } + } + + private bool _isArcHead; + public bool IsArcHead + { + get { return _isArcHead; } + set { _isArcHead = value; RaisePropertyChangedAuto(); } + } + + public RelayCommand BackCommand { get; set; } + + //Guiding Units + public RelayCommand GuidingUnitsFoundCantFixCommand { get; set; } + public RelayCommand GuidingUnitsCantFindItCommand { get; set; } + public RelayCommand GuidingUnitsFoundAndFixedCommand { get; set; } + + //Feeding Units + public RelayCommand FeedingUnitsCantFixCommand { get; set; } + public RelayCommand FeedingUnitsFoundAndFixedCommand { get; set; } + + //The Dryer + public RelayCommand TheDryerCantRemoveCommand { get; set; } + public RelayCommand TheDryerRemovedSuccessfullyCommand { get; set; } + + //Dryer Close + public RelayCommand OpenThreadLoadingWizardCommand { get; set; } + + public ThreadBreakViewVM() + { + CanClose = true; + TangoIOC.Default.Inject(this); + + MachineProvider.MachineOperator.MachineEventsStateProvider.EventsChanged += MachineEventsStateProvider_EventsChanged; + MachineProvider.MachineDisconnected += MachineProvider_MachineDisconnected; + + IsArcHead = MachineProvider.Machine.MachineHeadType == BL.Enumerations.HeadTypes.Arc; + + BackCommand = new RelayCommand(GoBack, CanGoBack); + + //Guiding Units Commands + GuidingUnitsFoundCantFixCommand = new RelayCommand(GuidingUnitsFoundCantFix); + GuidingUnitsCantFindItCommand = new RelayCommand(GuidingUnitsCantFindIt); + GuidingUnitsFoundAndFixedCommand = new RelayCommand(GuidingUnitsFoundAndFixed); + + //Feeding Units Commands + FeedingUnitsCantFixCommand = new RelayCommand(FeedingUnitsCantFix); + FeedingUnitsFoundAndFixedCommand = new RelayCommand(FeedingUnitsFoundAndFixed); + + //The Dryer Commands + TheDryerRemovedSuccessfullyCommand = new RelayCommand(TheDryerRemovedSuccessfully); + TheDryerCantRemoveCommand = new RelayCommand(TheDryerCantRemove); + + OpenThreadLoadingWizardCommand = new RelayCommand(OpenThreadLoadingWizard, () => !MachineProvider.MachineOperator.MachineEventsStateProvider.Events.Any(x => x.Type == BL.Enumerations.EventTypes.DRYER_DOOR_OPEN)); + } + + private void MachineProvider_MachineDisconnected(object sender, EventArgs e) + { + InvokeUI(() => + { + Cancel(); + }); + } + + private void MachineEventsStateProvider_EventsChanged(object sender, IEnumerable e) + { + InvalidateRelayCommands(); + } + + #region Back + + private bool CanGoBack() + { + return Stage != WizardStage.GuidingUnits && + Stage != WizardStage.Jogging && + Stage != WizardStage.Fixed; + } + + private void GoBack() + { + switch (Stage) + { + case WizardStage.FeedingUnits: + Stage = WizardStage.GuidingUnits; + break; + case WizardStage.TheDryer: + Stage = WizardStage.GuidingUnits; + break; + case WizardStage.ContactSupport: + Stage = WizardStage.TheDryer; + break; + case WizardStage.DryerClose: + Stage = WizardStage.TheDryer; + break; + } + } + + #endregion + + #region Guiding Units Commands + + private async void GuidingUnitsFoundAndFixed() + { + Stage = WizardStage.Jogging; + + try + { + await MachineProvider.MachineOperator.AttemptThreadJogging(); + Stage = WizardStage.Fixed; + } + catch (Exception ex) + { + LogManager.Log(ex, LogCategory.Warning, "Error occurred while attempting to perform thread jogging."); + Stage = WizardStage.FeedingUnits; + } + } + + private void GuidingUnitsCantFindIt() + { + Stage = WizardStage.FeedingUnits; + } + + private void GuidingUnitsFoundCantFix() + { + Stage = WizardStage.TheDryer; + } + + #endregion + + #region Feeding Units Commands + + private void FeedingUnitsCantFix() + { + Stage = WizardStage.TheDryer; + } + + private async void FeedingUnitsFoundAndFixed() + { + Stage = WizardStage.Jogging; + + try + { + await MachineProvider.MachineOperator.AttemptThreadJogging(); + Stage = WizardStage.Fixed; + } + catch (Exception ex) + { + LogManager.Log(ex, LogCategory.Warning, "Error occurred while attempting to perform thread jogging."); + Stage = WizardStage.TheDryer; + } + } + + #endregion + + #region The Dryer Commands + + private void TheDryerCantRemove() + { + Stage = WizardStage.ContactSupport; + } + + private void TheDryerRemovedSuccessfully() + { + Stage = WizardStage.DryerClose; + } + + #endregion + + #region Dryer Close Commands + + private void OpenThreadLoadingWizard() + { + Result = ThreadBreakWizardResult.StartThreadLoading; + Accept(); + } + + #endregion + + protected override void Accept() + { + base.Accept(); + CleanUp(); + } + + protected override void Cancel() + { + base.Cancel(); + CleanUp(); + } + + private void CleanUp() + { + MachineProvider.MachineOperator.MachineEventsStateProvider.EventsChanged -= MachineEventsStateProvider_EventsChanged; + MachineProvider.MachineDisconnected -= MachineProvider_MachineDisconnected; + } + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadLoadingView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadLoadingView.xaml index a88d7a598..3d37c81bd 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadLoadingView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadLoadingView.xaml @@ -4,6 +4,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" + xmlns:commonControls="clr-namespace:Tango.PPC.Common.Controls;assembly=Tango.PPC.Common" xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" xmlns:local="clr-namespace:Tango.PPC.UI.Dialogs" mc:Ignorable="d" @@ -17,123 +18,153 @@ + - - CLOSE - CONTINUE + + Continue Welcome to the automatic thread loading wizard. - - - Please ensure there are no thread residue in the system and press 'continue'. - + + + + Please ensure there are no thread residue in the system and press + continue + + - + + + - - CLOSE - CONTINUE + + Continue - + The system is now preparing... - + - + + - - CLOSE - CONTINUE + + Continue - Please select the thread type you are going to load and press 'continue'. + Please select the thread type you are going to load and press + continue - + + + + + + + + + + + + + + + + + + + + - - CLOSE - CONTINUE + + Continue The system is now loading the thread... - + - + + + + - - CLOSE + + Close - Thread loading completed successfully! + - + + - - CLOSE - RETRY + + Close + Retry - Something went wrong - + + - + + - - CLOSE - RETRY + + Close + Retry - Something went wrong - + + - + + + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadLoadingViewVM - Copy.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadLoadingViewVM - Copy.cs deleted file mode 100644 index 95fb77e48..000000000 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadLoadingViewVM - Copy.cs +++ /dev/null @@ -1,176 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.BL.Entities; -using Tango.Core.Commands; -using Tango.Integration.Operation; -using Tango.PMR.ThreadLoading; -using Tango.PPC.Common.Connection; -using Tango.SharedUI; - -namespace Tango.PPC.UI.Dialogs -{ - public class ThreadLoadingViewVM : DialogViewVM - { - public class ThreadLoadingResult - { - public bool IsCompleted { get; set; } - public Exception FailedException { get; set; } - } - - private ThreadLoadingConfirmationRequiredEventArgs _confirmationArgs; - - public ThreadLoadingResult Result { get; set; } - - public IMachineProvider MachineProvider { get; set; } - - private StartThreadLoadingResponse _status; - public StartThreadLoadingResponse Status - { - get { return _status; } - set { _status = value; RaisePropertyChangedAuto(); } - } - - private bool _isFinalizing; - public bool IsFinalizing - { - get { return _isFinalizing; } - set { _isFinalizing = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); } - } - - private bool _isPreparing; - public bool IsPreparing - { - get { return _isPreparing; } - set { _isPreparing = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); } - } - - public List Rmls { get; set; } - - private Rml _selectedRml; - public Rml SelectedRml - { - get { return _selectedRml; } - set { _selectedRml = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); } - } - - public RelayCommand ContinueCommand { get; set; } - - public ThreadLoadingViewVM(IMachineProvider machineProvider) - { - CanClose = false; - IsPreparing = true; - ContinueCommand = new RelayCommand(ContinueThreadLoading, () => !IsFinalizing && SelectedRml != null); - MachineProvider = machineProvider; - MachineProvider.MachineOperator.ThreadLoadingStatusChanged += MachineOperator_ThreadLoadingStatusChanged; - MachineProvider.MachineOperator.ThreadLoadingCompleted += MachineOperator_ThreadLoadingCompleted; - MachineProvider.MachineOperator.ThreadLoadingFailed += MachineOperator_ThreadLoadingFailed; - MachineProvider.MachineOperator.ThreadLoadingConfirmationRequired += MachineOperator_ThreadLoadingConfirmationRequired; - } - - public ThreadLoadingViewVM(IMachineProvider machineProvider, ThreadLoadingConfirmationRequiredEventArgs confirmationArgs) : this(machineProvider) - { - _confirmationArgs = confirmationArgs; - IsPreparing = false; - } - - private void MachineOperator_ThreadLoadingConfirmationRequired(object sender, ThreadLoadingConfirmationRequiredEventArgs e) - { - _confirmationArgs = e; - IsPreparing = false; - } - - private async void ContinueThreadLoading() - { - IsFinalizing = true; - - try - { - await Task.Factory.StartNew(() => { _confirmationArgs.Confirm(SelectedRml.GetActiveProcessGroup().ProcessParametersTables.FirstOrDefault()); }); - } - catch (Exception ex) - { - Result = new ThreadLoadingResult() - { - FailedException = ex, - }; - - IsFinalizing = false; - - if (IsVisible) - { - InvokeUI(() => - { - Accept(); - }); - } - } - } - - private void MachineOperator_ThreadLoadingCompleted(object sender, StartThreadLoadingResponse e) - { - Result = new ThreadLoadingResult() - { - IsCompleted = true - }; - - if (IsVisible) - { - InvokeUI(() => - { - Accept(); - }); - } - } - - private void MachineOperator_ThreadLoadingFailed(object sender, StartThreadLoadingResponse e) - { - Result = new ThreadLoadingResult() - { - FailedException = new Exception(e.ErrorReason), - }; - - if (IsVisible) - { - InvokeUI(() => - { - Accept(); - }); - } - } - - private void MachineOperator_ThreadLoadingStatusChanged(object sender, StartThreadLoadingResponse e) - { - Status = e; - - if (Status.State == ThreadLoadingState.Finalizing) - { - IsFinalizing = true; - } - } - - protected override void Cancel() - { - IsFinalizing = false; - ClearEvents(); - base.Cancel(); - } - - protected override void Accept() - { - IsFinalizing = false; - ClearEvents(); - base.Accept(); - } - - private void ClearEvents() - { - MachineProvider.MachineOperator.ThreadLoadingStatusChanged -= MachineOperator_ThreadLoadingStatusChanged; - MachineProvider.MachineOperator.ThreadLoadingCompleted -= MachineOperator_ThreadLoadingCompleted; - MachineProvider.MachineOperator.ThreadLoadingFailed -= MachineOperator_ThreadLoadingFailed; - MachineProvider.MachineOperator.ThreadLoadingConfirmationRequired -= MachineOperator_ThreadLoadingConfirmationRequired; - } - } -} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadLoadingViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadLoadingViewVM.cs index 75354caf2..bb503e718 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadLoadingViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadLoadingViewVM.cs @@ -67,6 +67,13 @@ namespace Tango.PPC.UI.Dialogs set { _stage = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); } } + private bool _isArcHead; + public bool IsArcHead + { + get { return _isArcHead; } + set { _isArcHead = value; RaisePropertyChangedAuto(); } + } + private String _error; public String Error { @@ -74,7 +81,6 @@ namespace Tango.PPC.UI.Dialogs set { _error = value; RaisePropertyChangedAuto(); } } - public RelayCommand ContinueCommand { get; set; } public RelayCommand AbortCommand { get; set; } @@ -86,6 +92,9 @@ namespace Tango.PPC.UI.Dialogs _settings = SettingsManager.Default.GetOrCreate(); MachineProvider.MachineOperator.ThreadLoadingStatusChanged += MachineOperator_ThreadLoadingStatusChanged; + MachineProvider.MachineDisconnected += MachineProvider_MachineDisconnected; + + IsArcHead = MachineProvider.Machine.MachineHeadType == BL.Enumerations.HeadTypes.Arc; ContinueCommand = new RelayCommand(Continue, CanContinue); AbortCommand = new RelayCommand(Abort); @@ -93,6 +102,14 @@ namespace Tango.PPC.UI.Dialogs AdaptToState(userInvoked); } + private void MachineProvider_MachineDisconnected(object sender, EventArgs e) + { + InvokeUI(() => + { + Cancel(); + }); + } + private void AdaptToState(bool userInvoked = false) { var status = MachineProvider.MachineOperator.ThreadLoadingStatus; @@ -258,6 +275,7 @@ namespace Tango.PPC.UI.Dialogs private void CleanUp() { MachineProvider.MachineOperator.ThreadLoadingStatusChanged -= MachineOperator_ThreadLoadingStatusChanged; + MachineProvider.MachineDisconnected -= MachineProvider_MachineDisconnected; if (SelectedRml != null) { diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/DryerClose/1.jpg b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/DryerClose/1.jpg new file mode 100644 index 000000000..3b2f58620 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/DryerClose/1.jpg differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/DryerClose/2.jpg b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/DryerClose/2.jpg new file mode 100644 index 000000000..a2f5ae568 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/DryerClose/2.jpg differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/DryerClose/3.jpg b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/DryerClose/3.jpg new file mode 100644 index 000000000..6069e9c29 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/DryerClose/3.jpg differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/DryerClose/4.jpg b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/DryerClose/4.jpg new file mode 100644 index 000000000..7588d68e2 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/DryerClose/4.jpg differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/1.JPG b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/1.JPG new file mode 100644 index 000000000..68921f1ca Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/1.JPG differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/2.JPG b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/2.JPG new file mode 100644 index 000000000..a8b5d9ba4 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/2.JPG differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/3.JPG b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/3.JPG new file mode 100644 index 000000000..407f1eae6 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/3.JPG differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/4.JPG b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/4.JPG new file mode 100644 index 000000000..575066c23 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/4.JPG differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/arc/1.jpg b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/arc/1.jpg new file mode 100644 index 000000000..68921f1ca Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/arc/1.jpg differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/arc/2.jpg b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/arc/2.jpg new file mode 100644 index 000000000..a8b5d9ba4 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/arc/2.jpg differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/arc/3.jpg b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/arc/3.jpg new file mode 100644 index 000000000..407f1eae6 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/arc/3.jpg differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/arc/4.jpg b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/arc/4.jpg new file mode 100644 index 000000000..575066c23 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/arc/4.jpg differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/arc/5.jpg b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/arc/5.jpg new file mode 100644 index 000000000..fa2c8312d Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/FeedingUnits/arc/5.jpg differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/GuidingUnits/1.JPG b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/GuidingUnits/1.JPG new file mode 100644 index 000000000..8d58771d4 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/GuidingUnits/1.JPG differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/1.jpg b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/1.jpg new file mode 100644 index 000000000..81aa412ec Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/1.jpg differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/2.JPG b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/2.JPG new file mode 100644 index 000000000..68921f1ca Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/2.JPG differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/3.JPG b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/3.JPG new file mode 100644 index 000000000..a8b5d9ba4 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/3.JPG differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/4.JPG b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/4.JPG new file mode 100644 index 000000000..9f200198d Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/4.JPG differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/5.JPG b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/5.JPG new file mode 100644 index 000000000..fa2c8312d Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/5.JPG differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/6.JPG b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/6.JPG new file mode 100644 index 000000000..7956b0695 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/6.JPG differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/7.jpg b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/7.jpg new file mode 100644 index 000000000..4ca8677cd Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/7.jpg differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/TS1800_CloseUp_Feeder_P.jpg b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/TS1800_CloseUp_Feeder_P.jpg new file mode 100644 index 000000000..f41898bc1 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/TS1800_CloseUp_Feeder_P.jpg differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/machine_full.jpg b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/machine_full.jpg new file mode 100644 index 000000000..212edc547 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/machine_full.jpg differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/TheDryer/1.jpg b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/TheDryer/1.jpg new file mode 100644 index 000000000..d8da5726d Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/TheDryer/1.jpg differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/TheDryer/2.jpg b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/TheDryer/2.jpg new file mode 100644 index 000000000..a8b5d9ba4 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/TheDryer/2.jpg differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/TheDryer/3.jpg b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/TheDryer/3.jpg new file mode 100644 index 000000000..86dd6f397 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/TheDryer/3.jpg differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/TheDryer/4.jpg b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/TheDryer/4.jpg new file mode 100644 index 000000000..9d36f3642 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/TheDryer/4.jpg differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/TheDryer/5.jpg b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/TheDryer/5.jpg new file mode 100644 index 000000000..6ac67aa46 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/TheDryer/5.jpg 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 4e9c8af59..7f520ecc5 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 @@ -144,6 +144,10 @@ SafetyLevelOperationsConfirmationView.xaml + + ThreadBreakView.xaml + + ThreadLoadingView.xaml @@ -160,7 +164,6 @@ - FirmwareUpgradeFromFileView.xaml @@ -273,6 +276,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + MSBuild:Compile Designer @@ -454,6 +461,34 @@ PreserveNewest + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -726,7 +761,7 @@ if $(ConfigurationName) == Debug copy /Y "$(TargetDir)Packages" "$(TargetDir)" - + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ThreadLoading/DefaultThreadLoadingService.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ThreadLoading/DefaultThreadLoadingService.cs index 5656300a7..a6479da63 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ThreadLoading/DefaultThreadLoadingService.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ThreadLoading/DefaultThreadLoadingService.cs @@ -40,11 +40,26 @@ namespace Tango.PPC.UI.ThreadLoading } } - public async void StartThreadLoading() + public async void StartThreadLoadingWizard() { _dialogShown = true; await _notificationsProvider.ShowDialog(new ThreadLoadingViewVM(true)); _dialogShown = false; } + + public async void StartThreadBreakWizard() + { + if (!_dialogShown) + { + _dialogShown = true; + var vm = await _notificationsProvider.ShowDialog(); + _dialogShown = false; + + if (vm.Result == ThreadBreakViewVM.ThreadBreakWizardResult.StartThreadLoading) + { + StartThreadLoadingWizard(); + } + } + } } } -- cgit v1.3.1 From 906b39989f5686d3cb738b6a0a16402472c865fd Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 9 Nov 2020 15:36:38 +0200 Subject: Redundant. --- Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest index efc5f8179..d72e75011 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest @@ -16,7 +16,7 @@ Remove this element if your application requires this virtualization for backwards compatibility. --> - + -- cgit v1.3.1