From 00a491d93733d4625ad329b2ba8237f445364b3f Mon Sep 17 00:00:00 2001 From: Mirta Date: Wed, 30 Dec 2020 16:39:52 +0200 Subject: merge --- .../PPC/Modules/Tango.PPC.BackupRestore/App.xaml | 11 - .../Tango.PPC.BackupRestore/BackupRestoreModule.cs | 84 ----- .../Tango.PPC.BackupRestore/Images/backup-big.png | Bin 3044 -> 0 bytes .../Images/backup-restore.png | Bin 89496 -> 0 bytes .../Tango.PPC.BackupRestore/Images/restore.png | Bin 3252 -> 0 bytes .../Properties/AssemblyInfo.cs | 20 -- .../Properties/Resources.Designer.cs | 63 ---- .../Properties/Resources.resx | 117 ------- .../Properties/Settings.Designer.cs | 26 -- .../Properties/Settings.settings | 7 - .../Tango.PPC.BackupRestore.csproj | 246 --------------- .../Tango.PPC.BackupRestore/ViewModelLocator.cs | 95 ------ .../ViewModels/BackupCompletedViewVM.cs | 20 -- .../ViewModels/BackupErrorViewVM.cs | 37 --- .../ViewModels/BackupViewVM.cs | 163 ---------- .../ViewModels/MainViewVM.cs | 34 -- .../ViewModels/RestoreCompletedViewVM.cs | 51 --- .../ViewModels/RestoreErrorViewVM.cs | 38 --- .../ViewModels/RestoreViewVM.cs | 168 ---------- .../ViewModels/WelcomeViewVM.cs | 48 --- .../Views/BackupCompletedView.xaml | 37 --- .../Views/BackupCompletedView.xaml.cs | 28 -- .../Views/BackupErrorView.xaml | 39 --- .../Views/BackupErrorView.xaml.cs | 28 -- .../Views/BackupProgressView.xaml | 38 --- .../Views/BackupProgressView.xaml.cs | 28 -- .../Tango.PPC.BackupRestore/Views/BackupView.xaml | 99 ------ .../Views/BackupView.xaml.cs | 28 -- .../Tango.PPC.BackupRestore/Views/MainView.xaml | 39 --- .../Tango.PPC.BackupRestore/Views/MainView.xaml.cs | 30 -- .../Views/RestoreCompletedView.xaml | 37 --- .../Views/RestoreCompletedView.xaml.cs | 28 -- .../Views/RestoreErrorView.xaml | 39 --- .../Views/RestoreErrorView.xaml.cs | 28 -- .../Views/RestoreProgressView.xaml | 38 --- .../Views/RestoreProgressView.xaml.cs | 28 -- .../Tango.PPC.BackupRestore/Views/RestoreView.xaml | 160 ---------- .../Views/RestoreView.xaml.cs | 28 -- .../Tango.PPC.BackupRestore/Views/WelcomeView.xaml | 72 ----- .../Views/WelcomeView.xaml.cs | 28 -- .../PPC/Modules/Tango.PPC.BackupRestore/app.config | 61 ---- .../Tango.PPC.BackupRestore/packages.config | 7 - .../PPC/Modules/Tango.PPC.Browser/App.xaml | 11 - .../Attributes/BoundObjectAttribute.cs | 20 -- .../BoundsObjects/KeyboardHandler.cs | 66 ---- .../PPC/Modules/Tango.PPC.Browser/BrowserModule.cs | 101 ------ .../Modules/Tango.PPC.Browser/CefSharpOutput.zip | Bin 143444091 -> 0 bytes .../Helpers/BoundObjectsHelper.cs | 72 ----- .../Modules/Tango.PPC.Browser/Images/browser.png | Bin 2539 -> 0 bytes .../Navigation/BrowserNavigationRequest.cs | 19 -- .../Tango.PPC.Browser/Properties/AssemblyInfo.cs | 20 -- .../Properties/Resources.Designer.cs | 63 ---- .../Tango.PPC.Browser/Properties/Resources.resx | 117 ------- .../Properties/Settings.Designer.cs | 26 -- .../Tango.PPC.Browser/Properties/Settings.settings | 7 - .../RequestHandlers/ChromiumRequestHandler.cs | 114 ------- .../Modules/Tango.PPC.Browser/Scripts/keyboard.js | 21 -- .../Tango.PPC.Browser/Tango.PPC.Browser.csproj | 199 ------------ .../ViewContracts/IBrowserView.cs | 18 -- .../Modules/Tango.PPC.Browser/ViewModelLocator.cs | 32 -- .../Tango.PPC.Browser/ViewModels/BrowserViewVM.cs | 134 -------- .../Tango.PPC.Browser/Views/BrowserView.xaml | 77 ----- .../Tango.PPC.Browser/Views/BrowserView.xaml.cs | 211 ------------- .../Modules/Tango.PPC.Browser/Views/ErrorView.xaml | 23 -- .../Tango.PPC.Browser/Views/ErrorView.xaml.cs | 29 -- .../PPC/Modules/Tango.PPC.Browser/app.config | 90 ------ .../PPC/Modules/Tango.PPC.Browser/packages.config | 11 - .../Tango.PPC.BugReporting/BugReportingModule.cs | 2 +- .../TFS/TeamFoundationServicePPCClient.cs | 73 +---- .../Tango.PPC.BugReporting_txujxqrg_wpftmp.csproj | 235 -------------- .../Tango.PPC.BugReporting/ViewModelLocator.cs | 2 +- .../Converters/MachineEventToViewConverter.cs | 7 - .../EventsViews/ThreadBreakView.xaml | 26 -- .../EventsViews/ThreadBreakView.xaml.cs | 49 --- .../Modules/Tango.PPC.Events/Resources/Styles.xaml | 4 +- .../Tango.PPC.Events/Tango.PPC.Events.csproj | 9 +- .../Tango.PPC.Events/ViewModels/MainViewVM.cs | 32 +- .../Modules/Tango.PPC.Events/Views/MainView.xaml | 8 +- .../AppBarItems/JobProgressAppBarItemView.xaml | 5 +- .../AppButtons/StartPrintingButton.cs | 4 +- .../Tango.PPC.Jobs/Controls/JobOutlineControl.cs | 319 ------------------- .../Tango.PPC.Jobs/Controls/JobSummeryViewer.xaml | 3 - .../Tango.PPC.Jobs/Controls/RunningJobViewer.xaml | 3 - .../Converters/ColorSpaceToVisibilityConverter.cs | 12 +- .../Dialogs/AdvancedColorCorrectionView.xaml | 68 +--- .../Dialogs/AdvancedColorCorrectionViewVM.cs | 2 +- .../Dialogs/BasicColorCorrectionView.xaml | 9 +- .../Dialogs/CatalogSelectionView.xaml | 2 +- .../Tango.PPC.Jobs/Dialogs/ImportJobView.xaml | 2 +- .../Tango.PPC.Jobs/Images/JobView/transparent.jpg | Bin 27097 -> 0 bytes .../Images/JobView/transparent_small.jpg | Bin 10743 -> 0 bytes .../Modules/Tango.PPC.Jobs/Images/color-picker.png | Bin 1171 -> 0 bytes .../PPC/Modules/Tango.PPC.Jobs/Images/sync.png | Bin 4127 -> 0 bytes .../PPC/Modules/Tango.PPC.Jobs/Images/sync_job.png | Bin 6743 -> 0 bytes .../NewSynchronizardJobsNotificationItem.cs | 32 -- .../NewSynchronizardJobsNotificationItemView.xaml | 30 -- ...ewSynchronizardJobsNotificationItemView.xaml.cs | 30 -- .../Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj | 26 +- .../Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs | 108 ++----- .../Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs | 37 +-- .../Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs | 149 +++------ .../Tango.PPC.Jobs/ViewModels/JobsViewVM.cs | 186 ++++------- .../Tango.PPC.Jobs/ViewModels/MainViewVM.cs | 66 +--- .../Tango.PPC.Jobs/Views/JobProgressView.xaml | 138 ++++----- .../Tango.PPC.Jobs/Views/JobSummeryView.xaml | 2 +- .../PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml | 323 ++++++++----------- .../Modules/Tango.PPC.Jobs/Views/JobView.xaml.cs | 16 +- .../PPC/Modules/Tango.PPC.Jobs/Views/JobsView.xaml | 14 +- .../MachineSettingsModule.cs | 2 +- .../ViewModels/MainViewVM.cs | 229 +------------- .../Tango.PPC.MachineSettings/Views/MainView.xaml | 186 +---------- .../PPC/Modules/Tango.PPC.Maintenance/App.xaml | 11 - .../Commands/HomingMotorCommand.cs | 80 ----- .../Commands/OpenCloseDyeingHeadCommand.cs | 31 -- .../Commands/OpenCloseLeftLeadingWheelsCommand.cs | 30 -- .../Commands/OpenCloseMotorCommand.cs | 158 ---------- .../Commands/OpenCloseRightLeadingWheelsCommand.cs | 30 -- .../Commands/ResetThreadLoadingCommand.cs | 24 -- .../Controls/StateTouchButton.cs | 109 ------- .../Converters/LiquidTypeToBrushConverter.cs | 74 ----- .../Converters/LiquidTypeToShortNameConverter.cs | 41 --- .../MidTankLevelToElementHeightConverter.cs | 34 -- .../Converters/StringToFirstLetterConverter.cs | 30 -- .../Dialogs/CleanerDispensingView.xaml | 66 ---- .../Dialogs/CleanerDispensingView.xaml.cs | 28 -- .../Dialogs/CleanerDispensingViewVM.cs | 128 -------- .../Dialogs/HeadCleaningView.xaml | 56 ---- .../Dialogs/HeadCleaningView.xaml.cs | 28 -- .../Dialogs/HeadCleaningViewVM.cs | 150 --------- .../PPC/Modules/Tango.PPC.Maintenance/GuideBase.cs | 35 --- .../PPC/Modules/Tango.PPC.Maintenance/GuideStep.cs | 21 -- .../Guides/HandleWasteCartridgeGuide.cs | 43 --- .../Guides/LoadInkCartridgeGuide.cs | 43 --- .../Guides/LoadNewThreadGuide.cs | 43 --- .../Guides/ReplaceAirFilterGuide.cs | 43 --- .../Guides/ReplaceThreadGuide.cs | 43 --- .../Tango.PPC.Maintenance/Helpers/GuideHelper.cs | 33 -- .../Images/Guides/Loading-New-Thread.gif | Bin 4092741 -> 0 bytes .../Images/Guides/Loading-an-Ink-Cartridge.gif | Bin 4197318 -> 0 bytes .../Images/Guides/Replacing-the-Air-Filter.gif | Bin 3500573 -> 0 bytes .../Images/Guides/Replacing-the-Thread.gif | Bin 13319358 -> 0 bytes .../Images/Guides/Residue-Cartridges-A.gif | Bin 3567850 -> 0 bytes .../Guides/handling-the-waste-cartridges.png | Bin 2174 -> 0 bytes .../Images/Guides/loading-an-ink-cartridge.png | Bin 2266 -> 0 bytes .../Images/Guides/loading-new-thread.png | Bin 2228 -> 0 bytes .../Images/Guides/machine-image.png | Bin 138220 -> 0 bytes .../Images/Guides/replacing-the-air-filter.png | Bin 2269 -> 0 bytes .../Images/Guides/replacing-the-thread.png | Bin 2175 -> 0 bytes .../Tango.PPC.Maintenance/Images/Waste/absent.png | Bin 892 -> 0 bytes .../Images/Waste/present_empty_error.png | Bin 1440 -> 0 bytes .../Images/Waste/present_empty_right.png | Bin 1497 -> 0 bytes .../Images/Waste/present_full_right.png | Bin 2035 -> 0 bytes .../Tango.PPC.Maintenance/Images/action.png | Bin 1152 -> 0 bytes .../Tango.PPC.Maintenance/Images/cl-full.png | Bin 3454 -> 0 bytes .../Tango.PPC.Maintenance/Images/cone-empty.png | Bin 4125 -> 0 bytes .../Tango.PPC.Maintenance/Images/cone-full.png | Bin 3018 -> 0 bytes .../Tango.PPC.Maintenance/Images/guides.png | Bin 2099 -> 0 bytes .../Tango.PPC.Maintenance/Images/head_cleaning.png | Bin 44260 -> 0 bytes .../Modules/Tango.PPC.Maintenance/Images/inks.png | Bin 2075 -> 0 bytes .../Tango.PPC.Maintenance/Images/l-full.png | Bin 19717 -> 0 bytes .../Tango.PPC.Maintenance/Images/lubricant2.png | Bin 194234 -> 0 bytes .../Tango.PPC.Maintenance/Images/maintenance.png | Bin 686 -> 0 bytes .../Tango.PPC.Maintenance/Images/status.png | Bin 1663 -> 0 bytes .../Images/temperature-green.png | Bin 926 -> 0 bytes .../Images/temperature-red.png | Bin 928 -> 0 bytes .../Images/temperature-yellow.png | Bin 927 -> 0 bytes .../Images/thread_loading.png | Bin 7209 -> 0 bytes .../Tango.PPC.Maintenance/MaintenanceCommand.cs | 81 ----- .../Tango.PPC.Maintenance/MaintenanceModule.cs | 84 ----- .../Models/MidTankLevelModel.cs | 35 --- .../Models/OverallTemperatureModel.cs | 30 -- .../Properties/AssemblyInfo.cs | 20 -- .../Properties/Resources.Designer.cs | 63 ---- .../Properties/Resources.resx | 117 ------- .../Properties/Settings.Designer.cs | 26 -- .../Properties/Settings.settings | 7 - .../Tango.PPC.Maintenance/Resources/Guides.xaml | 60 ---- .../Tango.PPC.Maintenance.csproj | 320 ------------------- .../Tango.PPC.Maintenance/Themes/Generic.xaml | 9 - .../Tango.PPC.Maintenance/ViewModelLocator.cs | 56 ---- .../ViewModels/GeneralGuideViewVM.cs | 40 --- .../Tango.PPC.Maintenance/ViewModels/MainViewVM.cs | 31 -- .../ViewModels/MaintenanceViewVM.cs | 324 -------------------- .../Views/GeneralGuideView.xaml | 55 ---- .../Views/GeneralGuideView.xaml.cs | 33 -- .../Tango.PPC.Maintenance/Views/MainView.xaml | 22 -- .../Tango.PPC.Maintenance/Views/MainView.xaml.cs | 28 -- .../Views/MaintenanceView.xaml | 341 --------------------- .../Views/MaintenanceView.xaml.cs | 30 -- .../PPC/Modules/Tango.PPC.Maintenance/app.config | 61 ---- .../Modules/Tango.PPC.Maintenance/packages.config | 11 - .../Models/StorageNavigationIntent.cs | 4 +- .../PPC/Modules/Tango.PPC.Storage/StorageModule.cs | 2 +- .../Tango.PPC.Storage/ViewModels/MainViewVM.cs | 60 +--- .../Modules/Tango.PPC.Storage/Views/MainView.xaml | 70 +---- .../Dialogs/EmbeddedLogItemDetailsView.xaml | 80 ----- .../Dialogs/EmbeddedLogItemDetailsView.xaml.cs | 28 -- .../Dialogs/EmbeddedLogItemDetailsViewVM.cs | 21 -- .../Dialogs/SynchronizationDetailsView.xaml | 74 ----- .../Dialogs/SynchronizationDetailsView.xaml.cs | 28 -- .../Dialogs/SynchronizationDetailsViewVM.cs | 22 -- .../Dialogs/UpdateDetailsView.xaml | 87 ------ .../Dialogs/UpdateDetailsView.xaml.cs | 28 -- .../Dialogs/UpdateDetailsViewVM.cs | 21 -- .../Tango.PPC.Technician/Images/browser.png | Bin 2539 -> 0 bytes .../Tango.PPC.Technician/Images/circuit-board.png | Bin 2492 -> 0 bytes .../Tango.PPC.Technician/Images/conveyor.png | Bin 4349 -> 0 bytes .../Modules/Tango.PPC.Technician/Images/exit.png | Bin 1784 -> 0 bytes .../Tango.PPC.Technician/Images/mobile-phone.png | Bin 4438 -> 0 bytes .../Tango.PPC.Technician/Images/packages.png | Bin 1781 -> 0 bytes .../Images/remote_connections.png | Bin 4186 -> 0 bytes .../Tango.PPC.Technician/Images/shutdown.png | Bin 3703 -> 0 bytes .../Modules/Tango.PPC.Technician/Images/sync.png | Bin 4127 -> 0 bytes .../Tango.PPC.Technician.csproj | 71 ----- .../Tango.PPC.Technician/ViewModelLocator.cs | 36 --- .../ViewModels/CatalogViewVM.cs | 23 +- .../ViewModels/LoggingViewVM.cs | 125 +------- .../Tango.PPC.Technician/ViewModels/MainViewVM.cs | 4 +- .../ViewModels/PackagesViewVM.cs | 44 --- .../ViewModels/RemoteConnectionsViewVM.cs | 64 ---- .../ViewModels/SystemViewVM.cs | 87 +----- .../ViewModels/UpdatesViewVM.cs | 107 ------- .../Tango.PPC.Technician/Views/CatalogView.xaml | 134 ++------ .../Tango.PPC.Technician/Views/LoggingView.xaml | 178 +++++------ .../Tango.PPC.Technician/Views/MainView.xaml | 3 - .../Tango.PPC.Technician/Views/PackagesView.xaml | 103 ------- .../Views/PackagesView.xaml.cs | 28 -- .../Views/RemoteConnectionsView.xaml | 88 ------ .../Views/RemoteConnectionsView.xaml.cs | 28 -- .../Tango.PPC.Technician/Views/SystemView.xaml | 321 +++---------------- .../Tango.PPC.Technician/Views/UpdatesView.xaml | 160 ---------- .../Tango.PPC.Technician/Views/UpdatesView.xaml.cs | 28 -- 232 files changed, 611 insertions(+), 10949 deletions(-) delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/App.xaml delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/BackupRestoreModule.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Images/backup-big.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Images/backup-restore.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Images/restore.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Properties/AssemblyInfo.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Properties/Resources.Designer.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Properties/Resources.resx delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Properties/Settings.Designer.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Properties/Settings.settings delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Tango.PPC.BackupRestore.csproj delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModelLocator.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/BackupCompletedViewVM.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/BackupErrorViewVM.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/BackupViewVM.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/MainViewVM.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/RestoreCompletedViewVM.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/RestoreErrorViewVM.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/RestoreViewVM.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/WelcomeViewVM.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupCompletedView.xaml delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupCompletedView.xaml.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupErrorView.xaml delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupErrorView.xaml.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupProgressView.xaml delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupProgressView.xaml.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupView.xaml delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupView.xaml.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/MainView.xaml delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/MainView.xaml.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/RestoreCompletedView.xaml delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/RestoreCompletedView.xaml.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/RestoreErrorView.xaml delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/RestoreErrorView.xaml.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/RestoreProgressView.xaml delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/RestoreProgressView.xaml.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/RestoreView.xaml delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/RestoreView.xaml.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/WelcomeView.xaml delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/WelcomeView.xaml.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/app.config delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/packages.config delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/App.xaml delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Attributes/BoundObjectAttribute.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/BoundsObjects/KeyboardHandler.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/BrowserModule.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/CefSharpOutput.zip delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Helpers/BoundObjectsHelper.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Images/browser.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Navigation/BrowserNavigationRequest.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Properties/AssemblyInfo.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Properties/Resources.Designer.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Properties/Resources.resx delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Properties/Settings.Designer.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Properties/Settings.settings delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/RequestHandlers/ChromiumRequestHandler.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Scripts/keyboard.js delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Tango.PPC.Browser.csproj delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/ViewContracts/IBrowserView.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/ViewModelLocator.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/ViewModels/BrowserViewVM.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Views/BrowserView.xaml delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Views/BrowserView.xaml.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Views/ErrorView.xaml delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Views/ErrorView.xaml.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/app.config delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/packages.config delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Tango.PPC.BugReporting_txujxqrg_wpftmp.csproj delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/ThreadBreakView.xaml delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/ThreadBreakView.xaml.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobOutlineControl.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/transparent.jpg delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/transparent_small.jpg delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/color-picker.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/sync.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/sync_job.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NotificationItems/NewSynchronizardJobsNotificationItem.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NotificationItems/NewSynchronizardJobsNotificationItemView.xaml delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NotificationItems/NewSynchronizardJobsNotificationItemView.xaml.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/App.xaml delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Commands/HomingMotorCommand.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Commands/OpenCloseDyeingHeadCommand.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Commands/OpenCloseLeftLeadingWheelsCommand.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Commands/OpenCloseMotorCommand.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Commands/OpenCloseRightLeadingWheelsCommand.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Commands/ResetThreadLoadingCommand.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Controls/StateTouchButton.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/LiquidTypeToBrushConverter.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/LiquidTypeToShortNameConverter.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/MidTankLevelToElementHeightConverter.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/StringToFirstLetterConverter.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Dialogs/CleanerDispensingView.xaml delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Dialogs/CleanerDispensingView.xaml.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Dialogs/CleanerDispensingViewVM.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Dialogs/HeadCleaningView.xaml delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Dialogs/HeadCleaningView.xaml.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Dialogs/HeadCleaningViewVM.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/GuideBase.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/GuideStep.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/HandleWasteCartridgeGuide.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/LoadInkCartridgeGuide.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/LoadNewThreadGuide.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/ReplaceAirFilterGuide.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/ReplaceThreadGuide.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Helpers/GuideHelper.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Loading-New-Thread.gif delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Loading-an-Ink-Cartridge.gif delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Replacing-the-Air-Filter.gif delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Replacing-the-Thread.gif delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Residue-Cartridges-A.gif delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/handling-the-waste-cartridges.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/loading-an-ink-cartridge.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/loading-new-thread.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/machine-image.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/replacing-the-air-filter.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/replacing-the-thread.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Waste/absent.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Waste/present_empty_error.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Waste/present_empty_right.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Waste/present_full_right.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/action.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/cl-full.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/cone-empty.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/cone-full.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/guides.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/head_cleaning.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/inks.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/l-full.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/lubricant2.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/maintenance.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/status.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/temperature-green.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/temperature-red.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/temperature-yellow.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/thread_loading.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/MaintenanceCommand.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/MaintenanceModule.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Models/MidTankLevelModel.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Models/OverallTemperatureModel.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/AssemblyInfo.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/Resources.Designer.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/Resources.resx delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/Settings.Designer.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/Settings.settings delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Resources/Guides.xaml delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Tango.PPC.Maintenance.csproj delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Themes/Generic.xaml delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModelLocator.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/GeneralGuideViewVM.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MainViewVM.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MaintenanceViewVM.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/GeneralGuideView.xaml delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/GeneralGuideView.xaml.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MainView.xaml delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MainView.xaml.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/app.config delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/packages.config delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/EmbeddedLogItemDetailsView.xaml delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/EmbeddedLogItemDetailsView.xaml.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/EmbeddedLogItemDetailsViewVM.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsView.xaml delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsView.xaml.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsViewVM.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsView.xaml delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsView.xaml.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsViewVM.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/browser.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/circuit-board.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/conveyor.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/exit.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/mobile-phone.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/packages.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/remote_connections.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/shutdown.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/sync.png delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/PackagesViewVM.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/RemoteConnectionsViewVM.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/UpdatesViewVM.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/PackagesView.xaml delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/PackagesView.xaml.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/RemoteConnectionsView.xaml delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/RemoteConnectionsView.xaml.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/UpdatesView.xaml delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/UpdatesView.xaml.cs (limited to 'Software/Visual_Studio/PPC/Modules') diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/App.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/App.xaml deleted file mode 100644 index 595ed2299..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/App.xaml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/BackupRestoreModule.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/BackupRestoreModule.cs deleted file mode 100644 index 25cdfbb27..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/BackupRestoreModule.cs +++ /dev/null @@ -1,84 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Media.Imaging; -using Tango.BL.Enumerations; -using Tango.PPC.Common; -using Tango.PPC.BackupRestore.Views; -using Tango.SharedUI.Helpers; - -namespace Tango.PPC.BackupRestore -{ - /// - /// Represents a PPC . - /// - /// - [PPCModule(20)] - public class BackupRestoreModule : PPCModuleBase - { - /// - /// Gets the module name. - /// - public override string Name - { - get - { - return "Backup & Restore"; - } - } - - /// - /// Gets the module description. - /// - public override string Description - { - get - { - return "Tango Backup/Restore Module"; - } - } - - /// - /// Gets the module cover image. - /// - public override BitmapSource Image - { - get - { - return ResourceHelper.GetImageFromResources("Images/backup-big.png"); - } - } - - /// - /// Gets the module entry point view type. - /// - public override Type MainViewType - { - get - { - return typeof(MainView); - } - } - - /// - /// Gets the permission required to see and load this module. - /// - public override Permissions Permission - { - get - { - return Permissions.RunPPC; - } - } - - /// - /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - /// - public override void Dispose() - { - //Dispose module here... - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Images/backup-big.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Images/backup-big.png deleted file mode 100644 index 3a712af49..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Images/backup-big.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Images/backup-restore.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Images/backup-restore.png deleted file mode 100644 index 15be3b163..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Images/backup-restore.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Images/restore.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Images/restore.png deleted file mode 100644 index e60aaf425..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Images/restore.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Properties/AssemblyInfo.cs deleted file mode 100644 index ac385e0ba..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Reflection; -using System.Resources; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Windows; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Tango Backup & Restore Module")] -[assembly: AssemblyVersion("2.0.1.1407")] - -[assembly: ThemeInfo( - ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located - //(used if a resource is not found in the page, - // or application resource dictionaries) - ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located - //(used if a resource is not found in the page, - // app, or any theme specific resource dictionaries) -)] diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Properties/Resources.Designer.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Properties/Resources.Designer.cs deleted file mode 100644 index 160bdf95c..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Properties/Resources.Designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Tango.PPC.BackupRestore.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.PPC.BackupRestore.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Properties/Resources.resx b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Properties/Resources.resx deleted file mode 100644 index af7dbebba..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Properties/Settings.Designer.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Properties/Settings.Designer.cs deleted file mode 100644 index 087ecdbcd..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Properties/Settings.Designer.cs +++ /dev/null @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Tango.PPC.BackupRestore.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.8.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { - return defaultInstance; - } - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Properties/Settings.settings b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Properties/Settings.settings deleted file mode 100644 index 033d7a5e9..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Tango.PPC.BackupRestore.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Tango.PPC.BackupRestore.csproj deleted file mode 100644 index 99ac13ae4..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Tango.PPC.BackupRestore.csproj +++ /dev/null @@ -1,246 +0,0 @@ - - - - - Debug - AnyCPU - {BC2753F8-C0F7-48F5-A85C-149EC7A2F8C7} - library - Tango.PPC.BackupRestore - Tango.PPC.BackupRestore - v4.6.1 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - - - - true - full - false - ..\..\..\Build\PPC\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - ..\..\..\Build\PPC\Release\ - TRACE - prompt - 4 - - - - ..\..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.dll - True - - - ..\..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.SqlServer.dll - - - ..\..\..\packages\FontAwesome.WPF.4.7.0.9\lib\net40\FontAwesome.WPF.dll - - - ..\..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll - - - - - - ..\..\..\packages\Expression.Blend.Sdk.1.0.2\lib\net45\System.Windows.Interactivity.dll - - - - - - - - - 4.0 - - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - - - GlobalVersionInfo.cs - - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - - - - - - - - RestoreCompletedView.xaml - - - BackupCompletedView.xaml - - - RestoreErrorView.xaml - - - BackupErrorView.xaml - - - RestoreProgressView.xaml - - - BackupProgressView.xaml - - - BackupView.xaml - - - MainView.xaml - - - RestoreView.xaml - - - WelcomeView.xaml - - - ResXFileCodeGenerator - Resources.Designer.cs - - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - {f441feee-322a-4943-b566-110e12fd3b72} - Tango.BL - - - {a34ee0f0-649d-41c8-8489-b6f1cc6924ee} - Tango.Core - - - {b112d89a-a106-41ae-a0c1-4abc84c477f5} - Tango.DragAndDrop - - - {4399AF76-DB52-4CFB-8020-6F85BDB29FD5} - Tango.Explorer - - - {bc932dbd-7cdb-488c-99e4-f02cf441f55e} - Tango.Logging - - - {e4927038-348d-4295-aaf4-861c58cb3943} - Tango.PMR - - - {d8f1ad85-526a-4f50-b6dc-d437af63d8d8} - Tango.Settings - - - {8491d07b-c1f6-4b62-a412-41b9fd2d6538} - Tango.SharedUI - - - {fd86424c-6e84-491b-8df9-3d0f5c236a2a} - Tango.Touch - - - {74e700b0-1156-4126-be40-ee450d3c3026} - Tango.Transport - - - {0be74eee-22cb-4dba-b896-793b9e1a3ac0} - Tango.PPC.Common - - - {04FEBB02-F782-4B96-B47D-F6902AFA43BE} - Tango.PPC.Storage - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModelLocator.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModelLocator.cs deleted file mode 100644 index 698a70cd7..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModelLocator.cs +++ /dev/null @@ -1,95 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.Core.DI; -using Tango.PPC.BackupRestore.ViewModels; - -namespace Tango.PPC.BackupRestore -{ - public static class ViewModelLocator - { - /// - /// Initializes a new instance of the ViewModelLocator class. - /// - static ViewModelLocator() - { - TangoIOC.Default.Register(); - TangoIOC.Default.Register(); - TangoIOC.Default.Register(); - TangoIOC.Default.Register(); - TangoIOC.Default.Register(); - TangoIOC.Default.Register(); - TangoIOC.Default.Register(); - TangoIOC.Default.Register(); - } - - /// - /// Gets the main view VM. - /// - public static MainViewVM MainViewVM - { - get - { - return TangoIOC.Default.GetInstance(); - } - } - - public static WelcomeViewVM WelcomeViewVM - { - get - { - return TangoIOC.Default.GetInstance(); - } - } - - public static BackupViewVM BackupViewVM - { - get - { - return TangoIOC.Default.GetInstance(); - } - } - - public static RestoreViewVM RestoreViewVM - { - get - { - return TangoIOC.Default.GetInstance(); - } - } - - public static BackupErrorViewVM BackupErrorViewVM - { - get - { - return TangoIOC.Default.GetInstance(); - } - } - - public static BackupCompletedViewVM BackupCompletedViewVM - { - get - { - return TangoIOC.Default.GetInstance(); - } - } - - public static RestoreErrorViewVM RestoreErrorViewVM - { - get - { - return TangoIOC.Default.GetInstance(); - } - } - - public static RestoreCompletedViewVM RestoreCompletedViewVM - { - get - { - return TangoIOC.Default.GetInstance(); - } - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/BackupCompletedViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/BackupCompletedViewVM.cs deleted file mode 100644 index 8c40bf288..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/BackupCompletedViewVM.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.PPC.Common; -using Tango.PPC.Common.BackupRestore; -using Tango.PPC.Common.Navigation; -using static Tango.PPC.BackupRestore.ViewModels.BackupCompletedViewVM; - -namespace Tango.PPC.BackupRestore.ViewModels -{ - public class BackupCompletedViewVM : PPCViewModel - { - public override void OnApplicationStarted() - { - - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/BackupErrorViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/BackupErrorViewVM.cs deleted file mode 100644 index 42f2c9e51..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/BackupErrorViewVM.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.PPC.Common; -using Tango.PPC.Common.BackupRestore; -using Tango.PPC.Common.Navigation; -using static Tango.PPC.BackupRestore.ViewModels.BackupErrorViewVM; - -namespace Tango.PPC.BackupRestore.ViewModels -{ - public class BackupErrorViewVM : PPCViewModel, INavigationObjectReceiver - { - public class BackupErrorNavigationObject - { - public String Error { get; set; } - } - - private String _error; - public String Error - { - get { return _error; } - set { _error = value; RaisePropertyChangedAuto(); } - } - - public override void OnApplicationStarted() - { - - } - - public void OnNavigatedToWithObject(BackupErrorNavigationObject obj) - { - Error = obj.Error; - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/BackupViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/BackupViewVM.cs deleted file mode 100644 index ef5b3810c..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/BackupViewVM.cs +++ /dev/null @@ -1,163 +0,0 @@ -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.Explorer; -using Tango.PPC.BackupRestore.Views; -using Tango.PPC.Common; -using Tango.PPC.Common.BackupRestore; -using Tango.PPC.Storage; -using static Tango.PPC.BackupRestore.ViewModels.BackupErrorViewVM; - -namespace Tango.PPC.BackupRestore.ViewModels -{ - public class BackupViewVM : PPCViewModel - { - private String _backupFileName; - - [TangoInject] - public IBackupManager BackupManager { get; set; } - - private BackupRestoreProgressEventArgs _currentBackupProgress; - public BackupRestoreProgressEventArgs CurrentBackupProgress - { - get { return _currentBackupProgress; } - set { _currentBackupProgress = value; RaisePropertyChangedAuto(); } - } - - private bool _isBackupJobs; - public bool IsBackupJobs - { - get { return _isBackupJobs; } - set - { - if (value) - { - _isBackupJobs = value; - RaisePropertyChangedAuto(); - _isBackupFull = false; - RaisePropertyChanged(nameof(IsBackupFull)); - } - else - { - RaisePropertyChangedAuto(); - } - } - } - - private bool _isBackupFull; - public bool IsBackupFull - { - get { return _isBackupFull; } - set - { - if (value) - { - _isBackupFull = value; - RaisePropertyChangedAuto(); - _isBackupJobs = false; - RaisePropertyChanged(nameof(IsBackupJobs)); - } - else - { - RaisePropertyChangedAuto(); - } - } - } - - private String _backupLocation; - public String BackupLocation - { - get { return _backupLocation; } - set { _backupLocation = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); } - } - - private String _backupName; - public String BackupName - { - get { return _backupName; } - set { _backupName = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); } - } - - public RelayCommand BackupCommand { get; set; } - - public RelayCommand BrowseBackupLocationCommand { get; set; } - - public BackupViewVM() - { - BrowseBackupLocationCommand = new RelayCommand(BrowseBackupLocation); - BackupCommand = new RelayCommand(StartBackup, () => !String.IsNullOrWhiteSpace(BackupName) && BackupLocation != null); - IsBackupJobs = true; - } - - private async void StartBackup() - { - await NavigationManager.NavigateTo(nameof(BackupProgressView), false); - - try - { - IsFree = false; - NavigationManager.IsBackEnabled = false; - await BackupManager.CreateBackup(_backupFileName, BackupName, new BackupSettings() - { - Mode = IsBackupFull ? BackupMode.Full : BackupMode.Jobs, - }); - await NavigationManager.NavigateTo(nameof(BackupCompletedView), false); - } - catch (Exception ex) - { - LogManager.Log(ex, "The backup operation failed."); - - await NavigationManager.NavigateWithObject(new BackupErrorNavigationObject() - { - Error = ex.FlattenMessage(), - }, false); - } - finally - { - IsFree = true; - NavigationManager.IsBackEnabled = true; - } - } - - public override void OnApplicationStarted() - { - - } - - public override void OnApplicationReady() - { - base.OnApplicationReady(); - BackupManager.Progress += BackupManager_Progress; - } - - private void BackupManager_Progress(object sender, BackupRestoreProgressEventArgs e) - { - CurrentBackupProgress = e; - } - - private async void BrowseBackupLocation() - { - var result = await NavigationManager. - NavigateForResult( - new Storage.Models.StorageNavigationRequest() - { - Intent = Storage.Models.StorageNavigationIntent.SaveFile, - DefaultFileName = $"Tango-Backup-{DateTime.Now.ToFileName()}", - Filter = ExplorerFileDefinition.Backup.Extension, - Title = "Select Destination Backup File", - }); - - if (result != null) - { - _backupFileName = result.Path + ExplorerFileDefinition.Backup.Extension; - BackupLocation = result.Path + ExplorerFileDefinition.Backup.Extension; - } - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/MainViewVM.cs deleted file mode 100644 index 989f8a6ee..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/MainViewVM.cs +++ /dev/null @@ -1,34 +0,0 @@ -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.Explorer; -using Tango.PPC.BackupRestore.Views; -using Tango.PPC.Common; -using Tango.PPC.Common.BackupRestore; -using Tango.PPC.Storage; - -namespace Tango.PPC.BackupRestore.ViewModels -{ - public class MainViewVM : PPCViewModel - { - public override void OnNavigatedFrom() - { - base.OnNavigatedFrom(); - } - - public override void OnNavigatedTo() - { - base.OnNavigatedTo(); - NavigationManager.NavigateTo(nameof(WelcomeView), false); - } - - public override void OnApplicationStarted() - { - - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/RestoreCompletedViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/RestoreCompletedViewVM.cs deleted file mode 100644 index d773aa5d4..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/RestoreCompletedViewVM.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.Core.Commands; -using Tango.Core.Helpers; -using Tango.PPC.Common; -using Tango.PPC.Common.BackupRestore; -using Tango.PPC.Common.Navigation; - -namespace Tango.PPC.BackupRestore.ViewModels -{ - public class RestoreCompletedViewVM : PPCViewModel, INavigationObjectReceiver - { - private RestoreResult _restoreResult; - - public RelayCommand RestartCommand { get; set; } - - public RestoreCompletedViewVM() - { - RestartCommand = new RelayCommand(Restart); - } - - private void Restart() - { - if (_restoreResult.BackupFile.Settings.Mode == BackupMode.Jobs) - { - //Perform normal restart. - ApplicationManager.Restart(); - } - else - { - //Perform update restart using the result path. - String updater_exe = Path.Combine(_restoreResult.FolderPath, "Tango.PPC.Updater.exe"); - ApplicationManager.UpdateApplication(updater_exe, PathHelper.GetStartupPath()); - } - } - - public override void OnApplicationStarted() - { - - } - - public void OnNavigatedToWithObject(RestoreResult restoreResult) - { - _restoreResult = restoreResult; - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/RestoreErrorViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/RestoreErrorViewVM.cs deleted file mode 100644 index b6df53318..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/RestoreErrorViewVM.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.PPC.BackupRestore.Views; -using Tango.PPC.Common; -using Tango.PPC.Common.BackupRestore; -using Tango.PPC.Common.Navigation; -using static Tango.PPC.BackupRestore.ViewModels.RestoreErrorViewVM; - -namespace Tango.PPC.BackupRestore.ViewModels -{ - public class RestoreErrorViewVM : PPCViewModel, INavigationObjectReceiver - { - public class RestoreErrorNavigationObject - { - public String Error { get; set; } - } - - private String _error; - public String Error - { - get { return _error; } - set { _error = value; RaisePropertyChangedAuto(); } - } - - public override void OnApplicationStarted() - { - - } - - public void OnNavigatedToWithObject(RestoreErrorNavigationObject obj) - { - Error = obj.Error; - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/RestoreViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/RestoreViewVM.cs deleted file mode 100644 index d925ebad1..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/RestoreViewVM.cs +++ /dev/null @@ -1,168 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.Core.Commands; -using Tango.Core.DI; -using Tango.Explorer; -using Tango.PPC.BackupRestore.Views; -using Tango.PPC.Common; -using Tango.PPC.Common.BackupRestore; -using Tango.PPC.Storage; -using static Tango.PPC.BackupRestore.ViewModels.RestoreErrorViewVM; - -namespace Tango.PPC.BackupRestore.ViewModels -{ - public class RestoreViewVM : PPCViewModel - { - private string _backupFileLocation; - private bool _isBrowsing; - - [TangoInject] - public IBackupManager BackupManager { get; set; } - - private String _backupFileName; - public String BackupFileName - { - get { return _backupFileName; } - set { _backupFileName = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); } - } - - private RestoreSettings _restoreSettings; - public RestoreSettings RestoreSettings - { - get { return _restoreSettings; } - set { _restoreSettings = value; RaisePropertyChangedAuto(); } - } - - private BackupFile _backupFile; - public BackupFile BackupFile - { - get { return _backupFile; } - set { _backupFile = value; RaisePropertyChangedAuto(); } - } - - private BackupRestoreProgressEventArgs _currentRestoreProgress; - public BackupRestoreProgressEventArgs CurrentRestoreProgress - { - get { return _currentRestoreProgress; } - set { _currentRestoreProgress = value; RaisePropertyChangedAuto(); } - } - - private long _backupSize; - public long BackupSize - { - get { return _backupSize; } - set { _backupSize = value; RaisePropertyChangedAuto(); } - } - - public RelayCommand BrowseForBackupCommand { get; set; } - - public RelayCommand RestoreCommand { get; set; } - - public RestoreViewVM() - { - RestoreSettings = new RestoreSettings(); - RestoreCommand = new RelayCommand(StartRestore, () => BackupFileName != null); - BrowseForBackupCommand = new RelayCommand(BrowseForBackup); - } - - private async void StartRestore() - { - await NavigationManager.NavigateTo(nameof(RestoreProgressView), false); - - try - { - IsFree = false; - NavigationManager.IsBackEnabled = false; - var result = await BackupManager.Restore(_backupFileLocation, RestoreSettings); - await NavigationManager.NavigateWithObject(result, false); - } - catch (Exception ex) - { - LogManager.Log(ex, "The restore operation failed."); - - await NavigationManager.NavigateWithObject(new RestoreErrorNavigationObject() - { - Error = ex.FlattenMessage(), - }, false); - - NavigationManager.IsBackEnabled = true; - } - finally - { - IsFree = true; - } - } - - private async void BrowseForBackup() - { - _isBrowsing = true; - - var result = await NavigationManager. - NavigateForResult( - new Storage.Models.StorageNavigationRequest() - { - Intent = Storage.Models.StorageNavigationIntent.LoadFile, - Filter = ExplorerFileDefinition.Backup.Extension, - Title = "Select Backup File", - }); - - _isBrowsing = false; - - if (result != null) - { - _backupFileLocation = result.Path; - - try - { - BackupFile = await BackupManager.ExtractBackupConfiguration(_backupFileLocation); - BackupFileName = Path.GetFileName(result.Path); - BackupSize = new System.IO.FileInfo(_backupFileLocation).Length; - } - catch (Exception ex) - { - LogManager.Log(ex, $"Error extracting backup configuration from file '{_backupFileLocation}'."); - await NotificationProvider.ShowError($"Error occurred while trying to extract the backup file information\n{ex.FlattenMessage()}"); - } - } - } - - public override Task OnNavigateBackRequest() - { - return Task.FromResult(IsFree); - } - - public override void OnNavigatedFrom() - { - base.OnNavigatedFrom(); - - if (!_isBrowsing) - { - BackupFileName = null; - BackupFile = null; - _backupFileLocation = null; - } - } - - public override void OnApplicationReady() - { - base.OnApplicationReady(); - BackupManager.Progress += BackupManager_Progress; - } - - private void BackupManager_Progress(object sender, BackupRestoreProgressEventArgs e) - { - CurrentRestoreProgress = e; - } - - public override void OnApplicationStarted() - { - - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/WelcomeViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/WelcomeViewVM.cs deleted file mode 100644 index 4fbac321e..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/WelcomeViewVM.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.Core.Commands; -using Tango.PPC.BackupRestore.Views; -using Tango.PPC.Common; - -namespace Tango.PPC.BackupRestore.ViewModels -{ - public class WelcomeViewVM : PPCViewModel - { - public RelayCommand NavigateToBackupCommand { get; set; } - - public RelayCommand NavigateToRestoreCommand { get; set; } - - public WelcomeViewVM() - { - NavigateToBackupCommand = new RelayCommand(() => - { - NavigationManager.NavigateTo(nameof(BackupView)); - }); - - NavigateToRestoreCommand = new RelayCommand(() => - { - NavigationManager.NavigateTo(nameof(RestoreView)); - }); - } - - public override void OnApplicationStarted() - { - - } - - public override void OnNavigatedTo() - { - base.OnNavigatedTo(); - NotificationProvider.NotificationsVisible = false; - } - - public override Task OnNavigateBackRequest() - { - NotificationProvider.NotificationsVisible = true; - return base.OnNavigateBackRequest(); - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupCompletedView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupCompletedView.xaml deleted file mode 100644 index 470c16256..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupCompletedView.xaml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - Backup completed - - - The backup operation was completed successfully. - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupCompletedView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupCompletedView.xaml.cs deleted file mode 100644 index 2a9779ed1..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupCompletedView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -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.BackupRestore.Views -{ - /// - /// Interaction logic for BackupView.xaml - /// - public partial class BackupCompletedView : UserControl - { - public BackupCompletedView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupErrorView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupErrorView.xaml deleted file mode 100644 index b54694a50..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupErrorView.xaml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - Backup failed - - - The backup operation has failed due to the following reason. - - - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupErrorView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupErrorView.xaml.cs deleted file mode 100644 index cf050140d..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupErrorView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -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.BackupRestore.Views -{ - /// - /// Interaction logic for BackupView.xaml - /// - public partial class BackupErrorView : UserControl - { - public BackupErrorView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupProgressView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupProgressView.xaml deleted file mode 100644 index 7785c1c0f..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupProgressView.xaml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - Backing up your system - - - This process may take several minutes, please wait. - - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupProgressView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupProgressView.xaml.cs deleted file mode 100644 index dd650f750..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupProgressView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -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.BackupRestore.Views -{ - /// - /// Interaction logic for BackupView.xaml - /// - public partial class BackupProgressView : UserControl - { - public BackupProgressView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupView.xaml deleted file mode 100644 index 2a72f9788..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupView.xaml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - Backup your system - - - Please specify the location and settings of your backup and press 'START'. - - - - - - Backup Mode - - - - - - - - - - - - Jobs - (create a backup of all your jobs) - - - - - - - Full Backup - (backup the entire state of the system) - - - - - - - - - - - Location - - - - - Please select the destination of your backup file - - SELECT - - - - - - - - - - Name - - - - Please enter the name of your backup - - - - - - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupView.xaml.cs deleted file mode 100644 index adc951f87..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/BackupView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -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.BackupRestore.Views -{ - /// - /// Interaction logic for BackupView.xaml - /// - public partial class BackupView : UserControl - { - public BackupView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/MainView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/MainView.xaml deleted file mode 100644 index 0caabd0e1..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/MainView.xaml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/MainView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/MainView.xaml.cs deleted file mode 100644 index e21bec0cb..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/MainView.xaml.cs +++ /dev/null @@ -1,30 +0,0 @@ -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.Core.DI; -using static Tango.PPC.BackupRestore.ViewModels.MainViewVM; - -namespace Tango.PPC.BackupRestore.Views -{ - /// - /// Interaction logic for MainView.xaml - /// - public partial class MainView : UserControl - { - public MainView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/RestoreCompletedView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/RestoreCompletedView.xaml deleted file mode 100644 index 6352797e7..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/RestoreCompletedView.xaml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - System restored - - - Your system was successfully restored. The system needs to restart in order apply the changes. - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/RestoreCompletedView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/RestoreCompletedView.xaml.cs deleted file mode 100644 index 5c3fbeaec..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/RestoreCompletedView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -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.BackupRestore.Views -{ - /// - /// Interaction logic for BackupView.xaml - /// - public partial class RestoreCompletedView : UserControl - { - public RestoreCompletedView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/RestoreErrorView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/RestoreErrorView.xaml deleted file mode 100644 index 2d09326ea..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/RestoreErrorView.xaml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - Restore failed - - - The restore operation has failed due to the following reason. - - - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/RestoreErrorView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/RestoreErrorView.xaml.cs deleted file mode 100644 index c0268d020..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/RestoreErrorView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -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.BackupRestore.Views -{ - /// - /// Interaction logic for BackupView.xaml - /// - public partial class RestoreErrorView : UserControl - { - public RestoreErrorView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/RestoreProgressView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/RestoreProgressView.xaml deleted file mode 100644 index 65c1678c5..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/RestoreProgressView.xaml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - Restoring your system - - - This process may take several minutes, please wait. - - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/RestoreProgressView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/RestoreProgressView.xaml.cs deleted file mode 100644 index 3b8b19fa9..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/RestoreProgressView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -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.BackupRestore.Views -{ - /// - /// Interaction logic for BackupView.xaml - /// - public partial class RestoreProgressView : UserControl - { - public RestoreProgressView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/RestoreView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/RestoreView.xaml deleted file mode 100644 index fca7a668e..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/RestoreView.xaml +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - Restore your system - - - Please specify the location of your backup file and other options. Press 'START' when you are ready. - - - - - - Location - - - - - Please insert a storage device and select your backup file - - SELECT - - - - - - - - - - Information - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Options - - - - - - - - - - - - Overwrite existing jobs - (existing jobs will change if there are conflicts) - - - - - - - Do not remove existing jobs - (existing jobs will not be deleted) - - - - - - - - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/RestoreView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/RestoreView.xaml.cs deleted file mode 100644 index 4df9146bb..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/RestoreView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -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.BackupRestore.Views -{ - /// - /// Interaction logic for RestoreView.xaml - /// - public partial class RestoreView : UserControl - { - public RestoreView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/WelcomeView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/WelcomeView.xaml deleted file mode 100644 index cf64b5bea..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/WelcomeView.xaml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - Welcome to the backup/restore wizard - - - This wizard allows you to create a complete backup of your current machine state including software, firmware, data and user settings. - - - - For creating a complete backup of your system please press 'Backup'. - - In case you want to restore your system to a previous state, please press 'Restore'. - - - - - - - - - Backup - - Create a complete backup of your system state and save it to a storage device. - - - - - - - - - - Restore - - Restore your system from a previously saved backup file. - - - - - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/WelcomeView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/WelcomeView.xaml.cs deleted file mode 100644 index a7c347016..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/Views/WelcomeView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -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.BackupRestore.Views -{ - /// - /// Interaction logic for WelcomeView.xaml - /// - public partial class WelcomeView : UserControl - { - public WelcomeView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/app.config b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/app.config deleted file mode 100644 index 1e22e6a88..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/app.config +++ /dev/null @@ -1,61 +0,0 @@ - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/packages.config b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/packages.config deleted file mode 100644 index 80367fdd2..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/packages.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/App.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/App.xaml deleted file mode 100644 index 576597134..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/App.xaml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Attributes/BoundObjectAttribute.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Attributes/BoundObjectAttribute.cs deleted file mode 100644 index b4e822f1e..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Attributes/BoundObjectAttribute.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Tango.PPC.Browser.Attributes -{ - public class BoundObjectAttribute : Attribute - { - public String Name { get; set; } - public String ScriptFile { get; set; } - - public BoundObjectAttribute(String name,String scriptFile) - { - Name = name; - ScriptFile = scriptFile; - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/BoundsObjects/KeyboardHandler.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/BoundsObjects/KeyboardHandler.cs deleted file mode 100644 index 3c608a518..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/BoundsObjects/KeyboardHandler.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using Tango.PPC.Browser.Attributes; -using Tango.PPC.Browser.Views; -using Tango.PPC.Common.Helpers; -using Tango.Touch.Keyboard; - -namespace Tango.PPC.Browser.BoundsObjects -{ - [BoundObject("keyboard", "keyboard.js")] - public class KeyboardHandler - { - private DateTime _lastTime; - - public KeyboardHandler() - { - _lastTime = DateTime.Now; - } - - public void openKeyboard(String inputType) - { - if (DateTime.Now > _lastTime.AddMilliseconds(1000)) - { - _lastTime = DateTime.Now; - - Application.Current.Dispatcher.BeginInvoke(new Action(async () => - { - switch (inputType) - { - case "search": - KeyboardHelper.OpenKeyboard(KeyboardActionKeyMode.Go); - break; - default: - KeyboardHelper.OpenKeyboard(KeyboardActionKeyMode.Next); - break; - } - - - await Task.Delay(50); - BrowserView.Instance.btnGo.Focus(); - await Task.Delay(50); - BrowserView.Instance.Browser.Focus(); - Debug.WriteLine("Focus"); - })); - } - } - - public void closeKeyboard() - { - if (DateTime.Now > _lastTime.AddMilliseconds(1000)) - { - _lastTime = DateTime.Now; - - Application.Current.Dispatcher.BeginInvoke(new Action(() => - { - KeyboardHelper.CloseKeyboard(); - })); - } - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/BrowserModule.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/BrowserModule.cs deleted file mode 100644 index dc7b294d5..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/BrowserModule.cs +++ /dev/null @@ -1,101 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Media.Imaging; -using Tango.BL.Enumerations; -using Tango.PPC.Common; -using Tango.PPC.Browser.Views; -using Tango.SharedUI.Helpers; -using Tango.Core.DI; -using Tango.PPC.Common.Application; -using System.IO; -using Tango.Core.Helpers; - -namespace Tango.PPC.Browser -{ - /// - /// Represents a PPC . - /// - /// - [PPCModule(10)] - public class BrowserModule : PPCModuleBase - { - /// - /// Initializes a new instance of the class. - /// - public BrowserModule() - { - IsVisibleInMenu = false; - } - - /// - /// Gets the module name. - /// - public override string Name - { - get - { - return "Browser"; - } - } - - /// - /// Gets the module description. - /// - public override string Description - { - get - { - return "Browser module"; - } - } - - /// - /// Gets the module cover image. - /// - public override BitmapSource Image - { - get - { - return ResourceHelper.GetImageFromResources("Images/browser.png"); - } - } - - /// - /// Gets the module entry point view type. - /// - public override Type MainViewType - { - get - { - return IsCefAvailable() ? typeof(BrowserView) : typeof(ErrorView); - } - } - - /// - /// Gets the permission required to see and load this module. - /// - public override Permissions Permission - { - get - { - return Permissions.RunPPC; - } - } - - private bool IsCefAvailable() - { - return File.Exists(Path.Combine(AssemblyHelper.GetCurrentAssemblyFolder(), "x86", "CefSharp.Core.dll")); - } - - /// - /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - /// - public override void Dispose() - { - //Dispose module here... - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/CefSharpOutput.zip b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/CefSharpOutput.zip deleted file mode 100644 index 8c68cedb7..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/CefSharpOutput.zip and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Helpers/BoundObjectsHelper.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Helpers/BoundObjectsHelper.cs deleted file mode 100644 index fe68ee848..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Helpers/BoundObjectsHelper.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Reflection; -using Tango.PPC.Browser.Attributes; -using CefSharp; -using CefSharp.Wpf; -using Tango.Core.Helpers; -using System.Windows.Threading; - -namespace Tango.PPC.Browser.Helpers -{ - public static class BoundObjectsHelper - { - private static DispatcherTimer _timer; - private static Dispatcher _dispatcher; - private static ChromiumWebBrowser _browser; - - private static List _scripts = new List(); - - public static void RegisterAllBoundObjects(ChromiumWebBrowser browser, Dispatcher dispatcher) - { - _dispatcher = dispatcher; - _browser = browser; - - _timer = new DispatcherTimer(DispatcherPriority.Background, dispatcher); - _timer.Tick += _timer_Tick; - _timer.Interval = TimeSpan.FromSeconds(2); - _timer.Stop(); - - foreach (var type in typeof(BoundObjectsHelper).Assembly.GetTypes().Where(x => x.GetCustomAttribute() != null)) - { - var att = type.GetCustomAttribute(); - - var script = EmbeddedResourceHelper.GetEmbeddedResourceText($"Tango.PPC.Browser.Scripts.{att.ScriptFile}"); - _scripts.Add(script); - - browser.JavascriptObjectRepository.Register(att.Name, Activator.CreateInstance(type), true); - - browser.FrameLoadEnd += Browser_FrameLoadEnd; - } - } - - private static void Browser_FrameLoadEnd(object sender, FrameLoadEndEventArgs e) - { - _timer.Stop(); - _timer.Start(); - } - - private static void _timer_Tick(object sender, EventArgs e) - { - try - { - _timer.Stop(); - - _dispatcher.BeginInvoke(new Action(() => - { - foreach (var script in _scripts) - { - _browser.GetMainFrame().ExecuteJavaScriptAsync(script); - } - })); - } - catch - { - _timer.Start(); - } - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Images/browser.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Images/browser.png deleted file mode 100644 index ebb975b6f..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Images/browser.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Navigation/BrowserNavigationRequest.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Navigation/BrowserNavigationRequest.cs deleted file mode 100644 index a8becf251..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Navigation/BrowserNavigationRequest.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Tango.PPC.Browser.Navigation -{ - public class BrowserNavigationRequest - { - public String Address { get; set; } - public bool DisplayAddressBar { get; set; } - - public BrowserNavigationRequest() - { - DisplayAddressBar = true; - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Properties/AssemblyInfo.cs deleted file mode 100644 index 70edee491..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Reflection; -using System.Resources; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Windows; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Tango Web Browser Module")] -[assembly: AssemblyVersion("2.0.1.1407")] - -[assembly: ThemeInfo( - ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located - //(used if a resource is not found in the page, - // or application resource dictionaries) - ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located - //(used if a resource is not found in the page, - // app, or any theme specific resource dictionaries) -)] diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Properties/Resources.Designer.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Properties/Resources.Designer.cs deleted file mode 100644 index 01c0a8851..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Properties/Resources.Designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Tango.PPC.Browser.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.PPC.Browser.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Properties/Resources.resx b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Properties/Resources.resx deleted file mode 100644 index af7dbebba..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Properties/Settings.Designer.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Properties/Settings.Designer.cs deleted file mode 100644 index f464e258d..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Properties/Settings.Designer.cs +++ /dev/null @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Tango.PPC.Browser.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { - return defaultInstance; - } - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Properties/Settings.settings b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Properties/Settings.settings deleted file mode 100644 index 033d7a5e9..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/RequestHandlers/ChromiumRequestHandler.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/RequestHandlers/ChromiumRequestHandler.cs deleted file mode 100644 index fc6cb119c..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/RequestHandlers/ChromiumRequestHandler.cs +++ /dev/null @@ -1,114 +0,0 @@ -using CefSharp; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Tango.PPC.Browser.RequestHandlers -{ - public class ChromiumRequestHandler : IRequestHandler - { - public event EventHandler AddressChanged; - - public bool GetAuthCredentials(IWebBrowser browserControl, IBrowser browser, IFrame frame, bool isProxy, string host, int port, string realm, string scheme, IAuthCallback callback) - { - return false; - } - - public bool OnBeforeBrowse(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, bool isRedirect) - { - // You can check the Request object for the URL Here - return false; - } - - public CefReturnValue OnBeforeResourceLoad(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IRequestCallback callback) - { - // You can also check the URL here - callback.Dispose(); - return CefReturnValue.Continue; - } - - public bool OnCertificateError(IWebBrowser browserControl, IBrowser browser, CefErrorCode errorCode, string requestUrl, ISslInfo sslInfo, IRequestCallback callback) - { - callback.Dispose(); - return false; - } - - public bool OnOpenUrlFromTab(IWebBrowser browserControl, IBrowser browser, IFrame frame, string targetUrl, WindowOpenDisposition targetDisposition, bool userGesture) - { - return false; - } - - public void OnPluginCrashed(IWebBrowser browserControl, IBrowser browser, string pluginPath) - { - } - - public bool OnProtocolExecution(IWebBrowser browserControl, IBrowser browser, string url) - { - return false; - } - - public bool OnQuotaRequest(IWebBrowser browserControl, IBrowser browser, string originUrl, long newSize, IRequestCallback callback) - { - callback.Dispose(); - return false; - } - - public void OnRenderProcessTerminated(IWebBrowser browserControl, IBrowser browser, CefTerminationStatus status) - { - } - - public void OnRenderViewReady(IWebBrowser browserControl, IBrowser browser) - { - } - - public void OnResourceLoadComplete(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IResponse response, UrlRequestStatus status, long receivedContentLength) - { - // You can also check the request URL here - } - - public void OnResourceRedirect(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, ref string newUrl) - { - } - - public bool OnResourceResponse(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IResponse response) - { - return false; - } - - - public IResponseFilter GetResourceResponseFilter(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IResponse response) - { - return null; - } - - - public void OnResourceRedirect(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IResponse response, ref string newUrl) - { - } - - public bool OnSelectClientCertificate(IWebBrowser browserControl, IBrowser browser, bool isProxy, string host, int port, System.Security.Cryptography.X509Certificates.X509Certificate2Collection certificates, ISelectClientCertificateCallback callback) - { - callback.Dispose(); - return false; - } - - public bool OnBeforeBrowse(IWebBrowser chromiumWebBrowser, IBrowser browser, IFrame frame, IRequest request, bool userGesture, bool isRedirect) - { - AddressChanged?.Invoke(this, request.Url); - return false; - } - - public IResourceRequestHandler GetResourceRequestHandler(IWebBrowser chromiumWebBrowser, IBrowser browser, IFrame frame, IRequest request, bool isNavigation, bool isDownload, string requestInitiator, ref bool disableDefaultHandling) - { - return null; - } - - public bool GetAuthCredentials(IWebBrowser chromiumWebBrowser, IBrowser browser, string originUrl, bool isProxy, string host, int port, string realm, string scheme, IAuthCallback callback) - { - callback.Dispose(); - return false; - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Scripts/keyboard.js b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Scripts/keyboard.js deleted file mode 100644 index 21771eb8e..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Scripts/keyboard.js +++ /dev/null @@ -1,21 +0,0 @@ -(async function () { - await CefSharp.BindObjectAsync("keyboard", "bound"); - - var inputs = document.getElementsByTagName('input'); - var i = 0; - - do { - - var type = inputs[i].type; - - if (type == 'text' || type == 'email' || type == 'password' || type == 'search' || type == 'date' || type == 'url' || type == 'time' || type == 'tel' || type == 'number') { - inputs[i].onfocus = function () { - keyboard.openKeyboard(type); - } - inputs[i].onblur = function () { - keyboard.closeKeyboard(); - } - } - } - while (inputs[++i]) -})(); \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Tango.PPC.Browser.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Tango.PPC.Browser.csproj deleted file mode 100644 index b742d4d75..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Tango.PPC.Browser.csproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - - true - Debug - AnyCPU - {F02EAA84-AD59-465B-99A2-4422C13BFB72} - library - Tango.PPC.Browser - Tango.PPC.Browser - v4.6.1 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - - - - - - true - full - false - ..\..\..\Build\PPC\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.dll - True - - - ..\..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.SqlServer.dll - - - ..\..\..\packages\FontAwesome.WPF.4.7.0.9\lib\net40\FontAwesome.WPF.dll - - - ..\..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll - - - - - - ..\..\..\packages\Expression.Blend.Sdk.1.0.2\lib\net45\System.Windows.Interactivity.dll - - - - - - - - - 4.0 - - - - - - - - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - - - GlobalVersionInfo.cs - - - - - - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - - - BrowserView.xaml - - - ErrorView.xaml - - - ResXFileCodeGenerator - Resources.Designer.cs - - - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - {f441feee-322a-4943-b566-110e12fd3b72} - Tango.BL - - - {a34ee0f0-649d-41c8-8489-b6f1cc6924ee} - Tango.Core - - - {b112d89a-a106-41ae-a0c1-4abc84c477f5} - Tango.DragAndDrop - - - {bc932dbd-7cdb-488c-99e4-f02cf441f55e} - Tango.Logging - - - {e4927038-348d-4295-aaf4-861c58cb3943} - Tango.PMR - - - {d8f1ad85-526a-4f50-b6dc-d437af63d8d8} - Tango.Settings - - - {8491d07b-c1f6-4b62-a412-41b9fd2d6538} - Tango.SharedUI - - - {fd86424c-6e84-491b-8df9-3d0f5c236a2a} - Tango.Touch - - - {74e700b0-1156-4126-be40-ee450d3c3026} - Tango.Transport - - - {0be74eee-22cb-4dba-b896-793b9e1a3ac0} - Tango.PPC.Common - - - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - - - \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/ViewContracts/IBrowserView.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/ViewContracts/IBrowserView.cs deleted file mode 100644 index 8369209a3..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/ViewContracts/IBrowserView.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.PPC.Common; -using Tango.SharedUI; - -namespace Tango.PPC.Browser.ViewContracts -{ - public interface IBrowserView : IPPCView - { - event EventHandler AddressChanged; - bool CanGoBack(); - void NavigateTo(String address); - void GoBack(); - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/ViewModelLocator.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/ViewModelLocator.cs deleted file mode 100644 index 054310e99..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/ViewModelLocator.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.Core.DI; -using Tango.PPC.Browser.ViewModels; - -namespace Tango.PPC.Browser -{ - public static class ViewModelLocator - { - /// - /// Initializes a new instance of the ViewModelLocator class. - /// - static ViewModelLocator() - { - TangoIOC.Default.Register(); - } - - /// - /// Gets the main view VM. - /// - public static BrowserViewVM BrowserViewVM - { - get - { - return TangoIOC.Default.GetInstance(); - } - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/ViewModels/BrowserViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/ViewModels/BrowserViewVM.cs deleted file mode 100644 index 0f5a49639..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/ViewModels/BrowserViewVM.cs +++ /dev/null @@ -1,134 +0,0 @@ -using CefSharp; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.Core.Commands; -using Tango.PPC.Browser.Navigation; -using Tango.PPC.Browser.ViewContracts; -using Tango.PPC.Common; -using Tango.PPC.Common.Navigation; -using Tango.Touch.Keyboard; - -namespace Tango.PPC.Browser.ViewModels -{ - /// - /// Represents the main view VM and entry point for . - /// - /// - public class BrowserViewVM : PPCViewModel, INavigationObjectReceiver - { - private bool _isFromObject; - - private String _address; - public String Address - { - get { return _address; } - set { _address = value; RaisePropertyChangedAuto(); } - } - - private bool _displayAddressBar; - public bool DisplayAddressBar - { - get { return _displayAddressBar; } - set { _displayAddressBar = value; RaisePropertyChangedAuto(); } - } - - public RelayCommand GoCommand { get; set; } - - public BrowserViewVM() - { - DisplayAddressBar = true; - - GoCommand = new RelayCommand(Go); - } - - public override void OnViewAttached() - { - base.OnViewAttached(); - View.AddressChanged += View_AddressChanged; - } - - private void View_AddressChanged(object sender, string address) - { - Address = address; - } - - public override void OnNavigatedTo() - { - base.OnNavigatedTo(); - - KeyboardView.Default.OutputMode = KeyboardOutputMode.Windows; - - if (!_isFromObject) - { - DisplayAddressBar = true; - } - - _isFromObject = false; - } - - public override void OnNavigatedFrom() - { - base.OnNavigatedFrom(); - KeyboardView.Default.OutputMode = KeyboardOutputMode.Wpf; - } - - public override Task OnNavigateBackRequest() - { - if (View != null && View.CanGoBack()) - { - View.GoBack(); - return Task.FromResult(false); - } - else - { - return Task.FromResult(true); - } - } - - /// - /// Called when the application has been started - /// - public override void OnApplicationStarted() - { - - } - - public override void OnApplicationShuttingDown() - { - base.OnApplicationShuttingDown(); - - try - { - Cef.Shutdown(); - } - catch (Exception ex) - { - LogManager.Log(ex, "Error shutting down cef."); - } - } - - private void Go() - { - if (View != null) - { - View.NavigateTo(Address); - } - } - - public void OnNavigatedToWithObject(BrowserNavigationRequest obj) - { - _isFromObject = true; - - DisplayAddressBar = obj.DisplayAddressBar; - - if (obj.Address != null) - { - Address = obj.Address; - Go(); - } - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Views/BrowserView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Views/BrowserView.xaml deleted file mode 100644 index ce28d660e..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Views/BrowserView.xaml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Page Not Found - - The page at '' - could not be reached. - - Please check your internet connection. - - - - - - - - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Views/BrowserView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Views/BrowserView.xaml.cs deleted file mode 100644 index e7fe1ca27..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Views/BrowserView.xaml.cs +++ /dev/null @@ -1,211 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; -using System.Text.RegularExpressions; -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 System.Windows.Threading; -using CefSharp; -using CefSharp.Wpf; -using Tango.Core.DI; -using Tango.Core.Helpers; -using Tango.Logging; -using Tango.PPC.Browser.BoundsObjects; -using Tango.PPC.Browser.ViewContracts; -using Tango.PPC.Common.Helpers; -using Tango.Touch.Keyboard; - -namespace Tango.PPC.Browser.Views -{ - /// - /// Interaction logic for MainView.xaml - /// - public partial class BrowserView : UserControl, IBrowserView - { - public event EventHandler AddressChanged; - - public static BrowserView Instance { get; set; } - - public BrowserView() - { - try - { - var settings = new CefSettings(); - settings.BrowserSubprocessPath = @"x86\CefSharp.BrowserSubprocess.exe"; - settings.UserAgent = "Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"; - - Cef.Initialize(settings, performDependencyCheck: false, browserProcessHandler: null); - } - catch (Exception ex) - { - LogManager.Default.Log(ex, "Error loading cef."); - } - - InitializeComponent(); - - Instance = this; - - TangoIOC.Default.Register(this); - - Helpers.BoundObjectsHelper.RegisterAllBoundObjects(Browser, Dispatcher); - - KeyboardView.Default.KeyboardOpened += Default_KeyboardOpened; - KeyboardView.Default.KeyboardClosed += Default_KeyboardClosed; - - var handler = new RequestHandlers.ChromiumRequestHandler(); - handler.AddressChanged += Handler_AddressChanged; - Browser.RequestHandler = handler; - Browser.LoadError += Browser_LoadError; - Browser.LoadingStateChanged += Browser_LoadingStateChanged; - } - - private void Browser_LoadError(object sender, LoadErrorEventArgs e) - { - //if (e.ErrorCode == CefErrorCode.ConnectionTimedOut || e.ErrorCode == CefErrorCode.NameNotResolved) - //{ - InvokeUI(() => - { - runError.Text = e.ErrorText; - gridError.Visibility = Visibility.Visible; - }); - //} - } - - private void Browser_LoadingStateChanged(object sender, LoadingStateChangedEventArgs e) - { - if (!e.IsLoading) - { - InvokeUI(() => - { - KeyboardHelper.CloseKeyboard(); - }); - } - else - { - InvokeUI(() => - { - gridError.Visibility = Visibility.Hidden; - }); - } - } - - private void Handler_AddressChanged(object sender, string address) - { - InvokeUI(() => - { - AddressChanged?.Invoke(this, address); - }); - } - - private void Default_KeyboardClosed(object sender, EventArgs e) - { - Browser.VerticalAlignment = VerticalAlignment.Stretch; - Browser.Height = double.NaN; - } - - private void Default_KeyboardOpened(object sender, EventArgs e) - { - Browser.VerticalAlignment = VerticalAlignment.Top; - Browser.Height = 780; - } - - public bool CanGoBack() - { - return Browser.CanGoBack; - } - - public void NavigateTo(string address) - { - if (Browser.Address != address) - { - String uri; - - if (ValidHttpURL(address, out uri)) - { - Browser.Address = uri; - } - else - { - Browser.Address = $"google.com/search?q={address.Replace(" ", "+")}"; - } - } - else - { - Browser.Reload(); - } - } - - public static bool ValidHttpURL(string s, out string result) - { - if (Uri.IsWellFormedUriString(s, UriKind.Absolute)) - { - result = s; - return true; - } - else if (s.StartsWith("www.")) - { - result = "http://" + s; - return true; - } - - result = s; - return false; - } - - public void GoBack() - { - if (Browser.CanGoBack) - { - Browser.Back(); - } - } - - private async void TxtAddress_GotFocus(object sender, RoutedEventArgs e) - { - KeyboardHelper.OpenKeyboard(KeyboardActionKeyMode.Go); - await Task.Delay(100); - txtAddress.SelectAll(); - } - - private void TxtAddress_LostFocus(object sender, RoutedEventArgs e) - { - KeyboardHelper.CloseKeyboard(); - } - - private void TxtAddress_KeyDown(object sender, KeyEventArgs e) - { - if (e.Key == Key.Return) - { - KeyboardHelper.CloseKeyboard(); - NavigateTo(txtAddress.Text); - } - } - - private void TxtAddress_MouseUp(object sender, MouseButtonEventArgs e) - { - KeyboardHelper.OpenKeyboard(KeyboardActionKeyMode.Go); - } - - private async void TxtAddress_PreviewMouseDoubleClick(object sender, MouseButtonEventArgs e) - { - KeyboardHelper.OpenKeyboard(KeyboardActionKeyMode.Go); - await Task.Delay(100); - txtAddress.SelectAll(); - } - - private void InvokeUI(Action action) - { - Dispatcher.BeginInvoke(action); - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Views/ErrorView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Views/ErrorView.xaml deleted file mode 100644 index 25e3381ba..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Views/ErrorView.xaml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - Browser Not Loaded - - The browser module was not loaded properly or has caused some error. - - - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Views/ErrorView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Views/ErrorView.xaml.cs deleted file mode 100644 index 0d59b80f0..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Views/ErrorView.xaml.cs +++ /dev/null @@ -1,29 +0,0 @@ -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.PPC.Browser.ViewContracts; - -namespace Tango.PPC.Browser.Views -{ - /// - /// Interaction logic for ErrorView.xaml - /// - public partial class ErrorView : UserControl - { - public ErrorView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/app.config b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/app.config deleted file mode 100644 index cf33970a7..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/app.config +++ /dev/null @@ -1,90 +0,0 @@ - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/packages.config b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/packages.config deleted file mode 100644 index f7fe1b9a2..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/packages.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/BugReportingModule.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/BugReportingModule.cs index 659ffe732..e65b44698 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/BugReportingModule.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/BugReportingModule.cs @@ -17,7 +17,7 @@ namespace Tango.PPC.BugReporting /// Represents a PPC . /// /// - [PPCModule(6)] + [PPCModule(5)] public class BugReportingModule : PPCModuleBase { /// diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/TFS/TeamFoundationServicePPCClient.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/TFS/TeamFoundationServicePPCClient.cs index b84d11c37..26d6425bf 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/TFS/TeamFoundationServicePPCClient.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/TFS/TeamFoundationServicePPCClient.cs @@ -13,8 +13,6 @@ using Tango.PPC.Common.Connection; using Tango.TFS; using Tango.Core.ExtensionMethods; using Tango.Core.Helpers; -using Tango.Settings; -using Tango.PPC.Common; namespace Tango.PPC.BugReporting.TFS { @@ -55,21 +53,6 @@ namespace Tango.PPC.BugReporting.TFS } } - private string[] GetLogFiles(FileLogger logger) - { - string[] fileEntries = new string[1]; - fileEntries[0] = logger.LogFile; - string fileName = Path.GetFileNameWithoutExtension(logger.LogFile); - int indexPos = fileName.IndexOf(FileLogger.FILE_SET_EXTENSION); - if (indexPos > 0) - { - string extension = Path.GetExtension(logger.LogFile); - fileName = fileName.Substring(0, indexPos); - fileEntries = Directory.GetFiles(logger.Folder, $"{fileName}*{extension}").Where(x => Path.GetFileName(x).StartsWith(logger.Tag)).OrderBy(x => x.Length).ThenBy(x => x).ToArray(); - } - return fileEntries; - } - public async Task SubmitBug(String title, String steps, TeamMember createdBy, TeamMember assignedTo, Severity severity) { LogManager.Log("Submitting bug report..."); @@ -97,7 +80,6 @@ namespace Tango.PPC.BugReporting.TFS item.Severity = severity; item.State = State.New; item.Type = WorkItemType.Bug; - item.Environment = SettingsManager.Default.GetOrCreate().DeploymentSlot.ToDescription(); FileLogger appFileLogger = LogManager.Default.RegisteredLoggers.FirstOrDefault(x => x.GetType() == typeof(FileLogger)) as FileLogger; FileLogger embeddedFileLogger = MachineOperator.EmbeddedLogManager.RegisteredLoggers.FirstOrDefault(x => x.GetType() == typeof(FileLogger)) as FileLogger; @@ -105,54 +87,31 @@ namespace Tango.PPC.BugReporting.TFS if (appFileLogger != null) { LogManager.Log($"Attaching application log file ${appFileLogger.LogFile}"); - string[] logFiles = GetLogFiles(appFileLogger); - foreach (string file in logFiles) + + var appLogFile = tempFolder.CreateImaginaryFile(); + File.Copy(appFileLogger.LogFile, appLogFile.Path); + + item.Attachments.Add(new Attachment() { - var appLogFile = tempFolder.CreateImaginaryFile(); - File.Copy(file, appLogFile.Path); - item.Attachments.Add(new Attachment() - { - Description = "Application Log File", - FilePath = appLogFile.Path, - Name = Path.GetFileName(file), - }); - } + Description = "Application Log File", + FilePath = appLogFile.Path, + Name = Path.GetFileName(appFileLogger.LogFile), + }); } if (embeddedFileLogger != null && File.Exists(embeddedFileLogger.LogFile)) { LogManager.Log($"Attaching embedded log file ${embeddedFileLogger.LogFile}"); - string[] logFiles = GetLogFiles(embeddedFileLogger); - foreach (string file in logFiles) - { - var embeddedLogFile = tempFolder.CreateImaginaryFile(); - File.Copy(file, embeddedLogFile.Path); - item.Attachments.Add(new Attachment() - { - Description = "Embedded Log File", - FilePath = embeddedLogFile.Path, - Name = Path.GetFileName(file), - }); - } - } + var embeddedLogFile = tempFolder.CreateImaginaryFile(); + File.Copy(embeddedFileLogger.LogFile, embeddedLogFile.Path); - //Add session log file.. - if (MachineOperator.EnableSessionLogFile) - { - var file = MachineOperator.SessionLogger.LogFile; - - if (file != null && File.Exists(file)) + item.Attachments.Add(new Attachment() { - var sessionLogFile = tempFolder.CreateImaginaryFile(); - File.Copy(file, sessionLogFile.Path); - item.Attachments.Add(new Attachment() - { - Description = "Session Log File", - FilePath = sessionLogFile.Path, - Name = Path.GetFileName(file), - }); - } + Description = "Embedded Log File", + FilePath = embeddedLogFile.Path, + Name = Path.GetFileName(embeddedFileLogger.LogFile), + }); } SystemInformationModel sysModel = new SystemInformationModel(); diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Tango.PPC.BugReporting_txujxqrg_wpftmp.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Tango.PPC.BugReporting_txujxqrg_wpftmp.csproj deleted file mode 100644 index 3b897aa71..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Tango.PPC.BugReporting_txujxqrg_wpftmp.csproj +++ /dev/null @@ -1,235 +0,0 @@ - - - - - Debug - AnyCPU - {8146FA0A-0725-4A1A-82E6-696C58F33A2B} - library - Tango.PPC.BugReporting - Tango.PPC.BugReporting - v4.6.1 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - - - - true - full - false - ..\..\..\Build\PPC\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - ..\..\..\Build\PPC\Release\ - TRACE - prompt - 4 - - - - - - - - GlobalVersionInfo.cs - - - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - - - MainView.xaml - - - ResXFileCodeGenerator - Resources.Designer.cs - - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - - {f441feee-322a-4943-b566-110e12fd3b72} - Tango.BL - - - {caedae94-11ed-473c-888a-268a6d38cd20} - Tango.CodeGeneration - - - {a34ee0f0-649d-41c8-8489-b6f1cc6924ee} - Tango.Core - - - {b112d89a-a106-41ae-a0c1-4abc84c477f5} - Tango.DragAndDrop - - - {4206ac58-3b57-4699-8835-90bf6db01a61} - Tango.Integration - - - {bc932dbd-7cdb-488c-99e4-f02cf441f55e} - Tango.Logging - - - {e4927038-348d-4295-aaf4-861c58cb3943} - Tango.PMR - - - {d8f1ad85-526a-4f50-b6dc-d437af63d8d8} - Tango.Settings - - - {8491d07b-c1f6-4b62-a412-41b9fd2d6538} - Tango.SharedUI - - - {998f8471-dc1b-41b6-9d96-354e1b4e7a32} - Tango.TFS - - - {fd86424c-6e84-491b-8df9-3d0f5c236a2a} - Tango.Touch - - - {74e700b0-1156-4126-be40-ee450d3c3026} - Tango.Transport - - - {5001990f-977b-48ff-b217-0236a5022ad8} - Tango.Web - - - {0be74eee-22cb-4dba-b896-793b9e1a3ac0} - Tango.PPC.Common - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/ViewModelLocator.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/ViewModelLocator.cs index 24b222370..1f71ca2c1 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/ViewModelLocator.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/ViewModelLocator.cs @@ -16,7 +16,7 @@ namespace Tango.PPC.BugReporting /// static ViewModelLocator() { - TangoIOC.Default.Register(new TeamFoundationServicePPCClient("https://twinetfs.visualstudio.com", String.Empty, "pyulwgs7m3v7pizz3oxusypdkdfw43txggo5mjwu2ouyv2qwprhq")); + TangoIOC.Default.Register(new TeamFoundationServicePPCClient("https://twinetfs.visualstudio.com", String.Empty, "szzfokrceo4rhd4eqi5qpmxn3pa5iwl3q7tlqd36l2m7smz2ynoa")); TangoIOC.Default.Register(); } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Converters/MachineEventToViewConverter.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Converters/MachineEventToViewConverter.cs index 56d7149d3..47c9e0ddf 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Converters/MachineEventToViewConverter.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Converters/MachineEventToViewConverter.cs @@ -18,17 +18,10 @@ namespace Tango.PPC.Events.Converters static MachineEventToViewConverter() { - //Jobs _eventViews.Add(EventTypes.JOB_STARTED, typeof(JobEventView)); _eventViews.Add(EventTypes.JOB_ABORTED, typeof(JobEventView)); _eventViews.Add(EventTypes.JOB_COMPLETED, typeof(JobEventView)); _eventViews.Add(EventTypes.JOB_FAILED, typeof(JobEventView)); - - //Thread Break - _eventViews.Add(EventTypes.THREAD_BREAK, typeof(ThreadBreakView)); - _eventViews.Add(EventTypes.THREAD_TENSION_CONTROL_FAILURE_FEEDER_DANCER, typeof(ThreadBreakView)); - _eventViews.Add(EventTypes.THREAD_TENSION_CONTROL_FAILURE_PULLER_DANCER, typeof(ThreadBreakView)); - _eventViews.Add(EventTypes.THREAD_TENSION_CONTROL_FAILURE_WINDER_DANCER, typeof(ThreadBreakView)); } public object Convert(object value, Type targetType, object parameter, CultureInfo culture) diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/ThreadBreakView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/ThreadBreakView.xaml deleted file mode 100644 index 71c4ced07..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/ThreadBreakView.xaml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - LOAD THREAD BREAK WIZARD - - - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/ThreadBreakView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/ThreadBreakView.xaml.cs deleted file mode 100644 index 7e8337514..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/ThreadBreakView.xaml.cs +++ /dev/null @@ -1,49 +0,0 @@ -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.Core.DI; -using Tango.PPC.Common.ThreadLoading; - -namespace Tango.PPC.Events.EventsViews -{ - /// - /// Interaction logic for ThreadBreakView.xaml - /// - public partial class ThreadBreakView : UserControl - { - public ThreadBreakView() - { - InitializeComponent(); - - btnLoadThreadBreakWizard.Click += BtnLoadThreadBreakWizard_Click; - } - - private void BtnLoadThreadBreakWizard_Click(object sender, RoutedEventArgs e) - { - try - { - var threadLoadingService = TangoIOC.Default.GetInstance(); - - if (threadLoadingService != null) - { - threadLoadingService.StartThreadBreakWizard(); - } - } - catch (Exception ex) - { - Logging.LogManager.Default.Log(ex, "Error loading the thread break wizard."); - } - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Resources/Styles.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Resources/Styles.xaml index eaf621571..53102d8ec 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Resources/Styles.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Resources/Styles.xaml @@ -18,11 +18,11 @@ - + diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppBarItems/JobProgressAppBarItemView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppBarItems/JobProgressAppBarItemView.xaml index 16c6a42be..cdc28335d 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppBarItems/JobProgressAppBarItemView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppBarItems/JobProgressAppBarItemView.xaml @@ -5,12 +5,11 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" xmlns:local="clr-namespace:Tango.PPC.Jobs.AppBarItems" - mc:Ignorable="d" - d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=local:JobProgressAppBarItem, IsDesignTimeCreatable=False}"> + mc:Ignorable="d" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=local:JobProgressAppBarItem, IsDesignTimeCreatable=False}"> - + diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppButtons/StartPrintingButton.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppButtons/StartPrintingButton.cs index 4d6050639..001888c92 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppButtons/StartPrintingButton.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppButtons/StartPrintingButton.cs @@ -15,12 +15,12 @@ namespace Tango.PPC.Jobs.AppButtons { op.StatusChanged += Op_StatusChanged; - Op_StatusChanged(op, op.Status); + Op_StatusChanged(this, op.Status); } private void Op_StatusChanged(object sender, MachineStatuses status) { - IsEnabled = (sender as IMachineOperator).CanPrint; + IsEnabled = status == MachineStatuses.ReadyToDye; } } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobOutlineControl.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobOutlineControl.cs deleted file mode 100644 index 78f8c90a1..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobOutlineControl.cs +++ /dev/null @@ -1,319 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Reflection; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; -using System.Windows.Shapes; -using Tango.PMR.Printing; -using Tango.Touch.Controls; - -namespace Tango.PPC.Jobs -{ - public class JobOutlineControl : Control - { - #region Members - - private Size _sizeControl = new Size(0, 0); - ScrollViewer _parentScrollViewer = null; - public struct LevelOffset - { - public const double level_0 = 0.0; - public const double level_1 = 10.0; - public const double level_2 = 20.0; - public const double level_3 = 37.0; - public const double level_4 = 50.0; - public const double level_5 = 60.0; - public const double level_6 = 77.0; - public const double level_7 = 90.0; - public const double level_8 = 100.0; - } - private double _verticalOffset = 0; - private double _viewportHeight = 0; - private const double HEADER_FONT_HEIGHT = 35; - private const double TITLE_FONT_HEIGHT = 22; - private const double SUB_TITLE_FONT_HEIGHT = 19; - private const double NORMAL_FONT_HEIGHT = 17; - private const double WIDTH = 330; - - #endregion members - - public JobOutlineControl() : base() - { - Unloaded += JobOutlineControl_Unloaded; - DataContextChanged += JobOutlineControl_DataContextChanged; - Width = WIDTH; - } - - private void JobOutlineControl_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e) - { - if (DataContext == null) - { - return; - } - - if (_parentScrollViewer != null) - { - _parentScrollViewer.ScrollToTop(); - } - - InvalidateVisual(); - } - - #region events - private void JobOutlineControl_Unloaded(object sender, RoutedEventArgs e) - { - if (_parentScrollViewer != null) - { - _parentScrollViewer.ScrollChanged -= ScrollViewer_ScrollChanged; - } - } - - private void ScrollViewer_ScrollChanged(object sender, ScrollChangedEventArgs e) - { - if (e.VerticalChange == 0.0) - return; - - _verticalOffset = _parentScrollViewer.VerticalOffset; - _viewportHeight = _parentScrollViewer.ViewportHeight; - InvalidateVisual(); - } - #endregion events - - #region render - protected override void OnRender(DrawingContext drawingContext) - { - base.OnRender(drawingContext); - - if (!(DataContext is JobTicket job)) return; - if (_parentScrollViewer == null) - { - _parentScrollViewer = this.FindAncestor(); - _parentScrollViewer.ScrollChanged += ScrollViewer_ScrollChanged; - } - else if (_viewportHeight == 0) - { - _viewportHeight = _parentScrollViewer.ActualHeight; - } - _sizeControl = new Size(); - _sizeControl.Height += 10; - DrawHeaderText(drawingContext, "JOB OUTLINE", 30, LevelOffset.level_0); - _sizeControl.Height += HEADER_FONT_HEIGHT; - - _sizeControl.Height += 20; - DrawHeaderText(drawingContext, "BASIC", 17, LevelOffset.level_0); - _sizeControl.Height += TITLE_FONT_HEIGHT; - _sizeControl.Height += 5.0; - var basicProps = GetNameValueList(job); - foreach (var prop in basicProps) - { - DrawNameValueText(drawingContext, prop, LevelOffset.level_1, TouchIconKind.Pencil); - _sizeControl.Height += NORMAL_FONT_HEIGHT; - } - //JobTicket.Spool - if (job.Spool != null) - { - _sizeControl.Height += 20; - DrawHeaderText(drawingContext, "SPOOL", 17, LevelOffset.level_0); - _sizeControl.Height += TITLE_FONT_HEIGHT; - _sizeControl.Height += 5.0; - basicProps = GetNameValueList(job.Spool); - foreach (var prop in basicProps) - { - DrawNameValueText(drawingContext, prop, LevelOffset.level_1, TouchIconKind.Pencil); - _sizeControl.Height += NORMAL_FONT_HEIGHT; - } - } - //JobTicket.ProcessParameters - if (job.ProcessParameters != null) - { - _sizeControl.Height += 20; - DrawHeaderText(drawingContext, "PROCESS PARAMETERS", 17, LevelOffset.level_0); - _sizeControl.Height += TITLE_FONT_HEIGHT; - _sizeControl.Height += 5.0; - basicProps = GetNameValueList(job.ProcessParameters); - foreach (var prop in basicProps) - { - DrawNameValueText(drawingContext, prop, LevelOffset.level_1, TouchIconKind.Settings); - _sizeControl.Height += NORMAL_FONT_HEIGHT; - } - } - //JobTicket.ThreadParameters - if (job.ThreadParameters != null) - { - _sizeControl.Height += 20; - DrawHeaderText(drawingContext, "THREAD PARAMETERS", 17, LevelOffset.level_0); - _sizeControl.Height += TITLE_FONT_HEIGHT; - _sizeControl.Height += 5.0; - basicProps = GetNameValueList(job.ThreadParameters); - foreach (var prop in basicProps) - { - DrawNameValueText(drawingContext, prop, LevelOffset.level_1, TouchIconKind.Settings); - _sizeControl.Height += NORMAL_FONT_HEIGHT; - } - } - //JobTicket.HeadCleaningParameters - if (job.HeadCleaningParameters != null) - { - _sizeControl.Height += 20; - DrawHeaderText(drawingContext, "HEAD CLEANING PARAMETERS", 17, LevelOffset.level_0); - _sizeControl.Height += TITLE_FONT_HEIGHT; - _sizeControl.Height += 5.0; - basicProps = GetNameValueList(job.HeadCleaningParameters); - foreach (var prop in basicProps) - { - DrawNameValueText(drawingContext, prop, LevelOffset.level_1, TouchIconKind.Settings); - _sizeControl.Height += NORMAL_FONT_HEIGHT; - } - } - //JobTicket.Segments - if (job.Segments != null) - { - _sizeControl.Height += 20; - DrawHeaderText(drawingContext, "SEGMENTS", 17, LevelOffset.level_0); - _sizeControl.Height += TITLE_FONT_HEIGHT; - _sizeControl.Height += 10.0; - int index = 0; - foreach (JobSegment seg in job.Segments) - { - DrawHeaderText(drawingContext, string.Format("#{0} SEGMENT", ++index), 14, LevelOffset.level_1); - _sizeControl.Height += SUB_TITLE_FONT_HEIGHT; - basicProps = GetNameValueList(seg); - foreach (var prop in basicProps) - { - DrawNameValueText(drawingContext, prop, LevelOffset.level_2, TouchIconKind.Pencil); - _sizeControl.Height += NORMAL_FONT_HEIGHT; - } - //BrushStops - DrawHeaderText(drawingContext, "BRUSH STOPS", 12, LevelOffset.level_3); - _sizeControl.Height += NORMAL_FONT_HEIGHT; - int indexBrush = 0; - foreach (JobBrushStop brushstop in seg.BrushStops) - { - _sizeControl.Height += 5.0; - DrawHeaderText(drawingContext, string.Format("#{0} STOP", ++indexBrush), 11, LevelOffset.level_4); - _sizeControl.Height += NORMAL_FONT_HEIGHT; - var brushStops = GetNameValueList(brushstop); - foreach (var brushstopprop in brushStops) - { - DrawNameValueText(drawingContext, brushstopprop, LevelOffset.level_5, TouchIconKind.Pencil); - _sizeControl.Height += NORMAL_FONT_HEIGHT; - } - DrawHeaderText(drawingContext, "DISPENSERS", 12, LevelOffset.level_6); - _sizeControl.Height += NORMAL_FONT_HEIGHT; - _sizeControl.Height += 5.0; - int indexDispenser = 0; - foreach (JobDispenser disp in brushstop.Dispensers) - { - DrawHeaderText(drawingContext, string.Format("#{0} DISPENSER", ++indexDispenser), 11, LevelOffset.level_6); - _sizeControl.Height += NORMAL_FONT_HEIGHT; - var dispProperties = GetNameValueList(disp); - foreach (var dispprop in dispProperties) - { - DrawNameValueText(drawingContext, dispprop, LevelOffset.level_7, TouchIconKind.ArrowRightBoldCircle); - _sizeControl.Height += NORMAL_FONT_HEIGHT; - } - } - } - } - } - - if (Height != _sizeControl.Height) - { - Height = _sizeControl.Height; - } - } - public IEnumerable> GetNameValueList(object value) - { - if (value != null) - { - var properties = value.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(x => (!x.PropertyType.IsClass && !typeof(IEnumerable).IsAssignableFrom(x.PropertyType)) || x.PropertyType == typeof(String)).ToList(); - return properties.Select(x => new Tuple(x.Name, x.GetValue(value).ToString())); - } - else - { - return null; - } - } - #endregion render - - #region drawing - protected void DrawNameValueText(DrawingContext drawingContext, Tuple text, double levelOfOffset, TouchIconKind? icon) - { - if (IsInViewPort()) - { - FormattedText formattedName = new FormattedText(text.Item1 + ": ", System.Globalization.CultureInfo.InvariantCulture, System.Windows.FlowDirection.LeftToRight, new Typeface(this.FontFamily, FontStyles.Normal, FontWeights.Normal, FontStretches.Normal), - 12, Foreground); - DrawIconTextIfVisible(drawingContext, levelOfOffset, formattedName, icon); - double widthOfNameText = formattedName.WidthIncludingTrailingWhitespace + 17 + levelOfOffset;//17 pix for draw icon before text - - FormattedText formattedValue = new FormattedText(text.Item2, System.Globalization.CultureInfo.InvariantCulture, System.Windows.FlowDirection.LeftToRight, new Typeface(this.FontFamily, FontStyles.Normal, FontWeights.SemiBold, FontStretches.Normal), - 12, Foreground); - DrawIconTextIfVisible(drawingContext, widthOfNameText, formattedValue); - _sizeControl.Width = Math.Max(_sizeControl.Width, (widthOfNameText + formattedValue.WidthIncludingTrailingWhitespace)); - } - } - - private bool IsInViewPort() - { - return (_sizeControl.Height >= _verticalOffset && _sizeControl.Height <= (_verticalOffset + _viewportHeight + 5)); - } - - protected void DrawHeaderText(DrawingContext drawingContext, string text, int fontSize, double levelOfOffset) - { - if (IsInViewPort()) - { - FormattedText formattedtext = new FormattedText(text, System.Globalization.CultureInfo.InvariantCulture, System.Windows.FlowDirection.LeftToRight, new Typeface(this.FontFamily, FontStyles.Normal, FontWeights.SemiBold, FontStretches.Normal), - fontSize, Foreground); - DrawIconTextIfVisible(drawingContext, levelOfOffset, formattedtext); - _sizeControl.Width = Math.Max(_sizeControl.Width, (formattedtext.Width + levelOfOffset)); - } - } - - private void DrawIconTextIfVisible(DrawingContext drawingContext, double levelOfOffset, FormattedText formattedText, TouchIconKind? icon = null) - { - if (icon is TouchIconKind) - { - DrawIcon(drawingContext, (TouchIconKind)icon, new Point(levelOfOffset, _sizeControl.Height)); - levelOfOffset += 17; - } - drawingContext.DrawText(formattedText, new Point(levelOfOffset, _sizeControl.Height)); - } - private void DrawIcon(DrawingContext drawingContext, TouchIconKind kind, Point point) - { - GeometryGroup group = GetGeometryByIcon(kind); - SetGeometryPosition(group, point); - drawingContext.DrawGeometry(Foreground, new Pen(Brushes.White, 1), group); - - } - private GeometryGroup GetGeometryByIcon(TouchIconKind kind) - { - Geometry geometry = Geometry.Parse(TouchIcon.Icons[kind]); - GeometryGroup group = new GeometryGroup(); - group.Children.Add(geometry); - - TransformGroup tg = new TransformGroup(); - tg.Children.Add(new ScaleTransform() - { - ScaleX = 10d / geometry.Bounds.Width, - ScaleY = 10d / geometry.Bounds.Height, - }); - tg.Children.Add(new TranslateTransform() { }); - - group.Transform = tg; - return group; - } - private void SetGeometryPosition(GeometryGroup group, Point point) - { - TransformGroup tg = group.Transform as TransformGroup; - (tg.Children[1] as TranslateTransform).X = point.X; - (tg.Children[1] as TranslateTransform).Y = point.Y + 1; - } - #endregion drawing - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobSummeryViewer.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobSummeryViewer.xaml index afe331145..ba6c13e91 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobSummeryViewer.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobSummeryViewer.xaml @@ -66,9 +66,6 @@ - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/RunningJobViewer.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/RunningJobViewer.xaml index 5d3f3f1fc..97aedcf89 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/RunningJobViewer.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/RunningJobViewer.xaml @@ -57,9 +57,6 @@ - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToVisibilityConverter.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToVisibilityConverter.cs index b1be93793..a8ba66eda 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToVisibilityConverter.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToVisibilityConverter.cs @@ -18,17 +18,9 @@ namespace Tango.PPC.Jobs.Converters if (colorSpace != null) { - if (String.IsNullOrWhiteSpace(parameter.ToStringSafe())) + if (colorSpace.Space == BL.Enumerations.ColorSpaces.Catalog) { - if (colorSpace.Space == BL.Enumerations.ColorSpaces.Catalog) - { - return Visibility.Collapsed; - } - } - else - { - String[] spaces = parameter.ToString().Split(','); - return spaces.Contains(colorSpace.Space.ToString()) ? Visibility.Visible : Visibility.Collapsed; + return Visibility.Collapsed; } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/AdvancedColorCorrectionView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/AdvancedColorCorrectionView.xaml index da6989ff6..69eb1fd72 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/AdvancedColorCorrectionView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/AdvancedColorCorrectionView.xaml @@ -19,85 +19,23 @@ - - - - - + Color is out of range - + - - - , , - - - - - , - , - - - - - - - - - - - - + Please select the best alternative diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/AdvancedColorCorrectionViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/AdvancedColorCorrectionViewVM.cs index db8573322..887e62dd7 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/AdvancedColorCorrectionViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/AdvancedColorCorrectionViewVM.cs @@ -14,6 +14,6 @@ namespace Tango.PPC.Jobs.Dialogs /// public class AdvancedColorCorrectionViewVM : BasicColorCorrectionViewVM { - public bool IsOutOfGamut { get; set; } + } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/BasicColorCorrectionView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/BasicColorCorrectionView.xaml index bd31b88ce..4c100c2fc 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/BasicColorCorrectionView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/BasicColorCorrectionView.xaml @@ -59,7 +59,7 @@ - Please use the closest alternative + Please select an alternative @@ -81,7 +81,7 @@ - + @@ -147,10 +147,7 @@ - - - More Options - + More Options diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/CatalogSelectionView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/CatalogSelectionView.xaml index 128a93548..ded395e08 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/CatalogSelectionView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/CatalogSelectionView.xaml @@ -56,7 +56,7 @@ - + diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/ImportJobView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/ImportJobView.xaml index da51bba27..ac27cc00d 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/ImportJobView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/ImportJobView.xaml @@ -18,7 +18,7 @@ IMPORT JOB A job file has been selected from the storage device. press 'IMPORT' to add the job to your job list. - Edit this job after import + Edit this job after import diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/transparent.jpg b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/transparent.jpg deleted file mode 100644 index cf1d94d12..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/transparent.jpg and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/transparent_small.jpg b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/transparent_small.jpg deleted file mode 100644 index c682a4c7e..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/transparent_small.jpg and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/color-picker.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/color-picker.png deleted file mode 100644 index d8d6f8470..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/color-picker.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/sync.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/sync.png deleted file mode 100644 index 46059c5c0..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/sync.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/sync_job.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/sync_job.png deleted file mode 100644 index 4e46ee447..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/sync_job.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NotificationItems/NewSynchronizardJobsNotificationItem.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NotificationItems/NewSynchronizardJobsNotificationItem.cs deleted file mode 100644 index 4e3137e1c..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NotificationItems/NewSynchronizardJobsNotificationItem.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.PPC.Common.Notifications; - -namespace Tango.PPC.Jobs.NotificationItems -{ - /// - /// Represents a simple text message notification item which can be inserted into the application notifications panel. - /// - /// - public class NewSynchronizardJobsNotificationItem : NotificationItem - { - /// - /// Initializes a new instance of the class. - /// - public NewSynchronizardJobsNotificationItem() - { - CanClose = true; - } - - /// - /// Gets or sets the view type. - /// - public override Type ViewType - { - get { return typeof(NewSynchronizardJobsNotificationItemView); } - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NotificationItems/NewSynchronizardJobsNotificationItemView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NotificationItems/NewSynchronizardJobsNotificationItemView.xaml deleted file mode 100644 index 5a57e3db7..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NotificationItems/NewSynchronizardJobsNotificationItemView.xaml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - New job definitions were synchronized with your machine. Tap to refresh your job list. - - - - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NotificationItems/NewSynchronizardJobsNotificationItemView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NotificationItems/NewSynchronizardJobsNotificationItemView.xaml.cs deleted file mode 100644 index 33db09386..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NotificationItems/NewSynchronizardJobsNotificationItemView.xaml.cs +++ /dev/null @@ -1,30 +0,0 @@ -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.Jobs.NotificationItems -{ - /// - /// Represents the view. - /// - /// - /// - public partial class NewSynchronizardJobsNotificationItemView : UserControl - { - public NewSynchronizardJobsNotificationItemView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj index 33b9de808..aedf09ce7 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj @@ -124,10 +124,6 @@ Designer MSBuild:Compile - - MSBuild:Compile - Designer - Designer MSBuild:Compile @@ -167,7 +163,6 @@ - RunningJobViewer.xaml @@ -232,10 +227,6 @@ - - - NewSynchronizardJobsNotificationItemView.xaml - Code @@ -491,25 +482,10 @@ - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs index 8d5bd284d..103a10b28 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs @@ -6,10 +6,8 @@ using System.Threading.Tasks; using Tango.BL.Entities; using Tango.Core.Commands; using Tango.Integration.Operation; -using Tango.PMR.Printing; using Tango.PPC.Common; using Tango.PPC.Common.Navigation; -using Tango.PPC.Common.Notifications; using Tango.PPC.Jobs.AppBarItems; using Tango.PPC.Jobs.AppButtons; using Tango.PPC.Jobs.Dialogs; @@ -49,26 +47,6 @@ namespace Tango.PPC.Jobs.ViewModels set { _runningJobStatus = value; RaisePropertyChangedAuto(); } } - private bool _isDisplayJobOutline; - /// - /// Gets or sets a value indicating whether to display the job outline. - /// - public bool IsDisplayJobOutline - { - get { return _isDisplayJobOutline; } - set { _isDisplayJobOutline = value; RaisePropertyChangedAuto(); } - } - - private JobTicket _jobOutlineTicket; - /// - /// Gets or sets the job outline ticket. - /// - public JobTicket JobOutlineTicket - { - get { return _jobOutlineTicket; } - set { _jobOutlineTicket = value; RaisePropertyChangedAuto(); } - } - #endregion #region Commands @@ -81,16 +59,6 @@ namespace Tango.PPC.Jobs.ViewModels /// public RelayCommand GoToJobCommand { get; set; } - /// - /// Gets or sets the display job outline command. - /// - public RelayCommand DisplayJobOutlineCommand { get; set; } - - /// - /// Gets or sets the hide job outline command. - /// - public RelayCommand HideJobOutlineCommand { get; set; } - #endregion public JobProgressViewVM() @@ -99,21 +67,14 @@ namespace Tango.PPC.Jobs.ViewModels _stop_job_btn.Pressed += _stop_job_btn_Pressed; GoToJobCommand = new RelayCommand(GoToJob); - DisplayJobOutlineCommand = new RelayCommand(DisplayJobOutline); - HideJobOutlineCommand = new RelayCommand(HideJobOutline); } - #region Private Methods - - private void HideJobOutline() - { - IsDisplayJobOutline = false; - } - - private void DisplayJobOutline() + private void _stop_job_btn_Pressed() { - JobOutlineTicket = _handler.JobTicket; - IsDisplayJobOutline = true; + if (_handler != null) + { + _handler.Cancel(); + } } private void GoToJob() @@ -122,8 +83,6 @@ namespace Tango.PPC.Jobs.ViewModels NavigationManager.ClearHistoryExcept(); } - #endregion - #region Override Methods /// @@ -134,6 +93,23 @@ namespace Tango.PPC.Jobs.ViewModels MachineProvider.MachineOperator.PrintingStarted += MachineOperator_PrintingStarted; } + /// + /// Called when the navigation system has navigated from this VM view. + /// + public override void OnNavigatedFrom() + { + base.OnNavigatedFrom(); + + if (MachineProvider.MachineOperator.IsPrinting && _handler != null && !_handler.IsCanceled) + { + NotificationProvider.PushAppBarItem().Pressed += (_, __) => + { + NotificationProvider.CurrentAppBarItem.Close(); + NavigationManager.NavigateTo(nameof(JobProgressView)); + }; + } + } + /// /// Called when the navigation system has navigated to this VM view. /// @@ -141,26 +117,18 @@ namespace Tango.PPC.Jobs.ViewModels { base.OnNavigatedTo(); - IsDisplayJobOutline = false; - - if (_handler != null && !_handler.Status.IsFailed) + if (NotificationProvider.HasAppBarItem && NotificationProvider.CurrentAppBarItem is JobProgressAppBarItem) { - _stop_job_btn.Push(); + NotificationProvider.CurrentAppBarItem.Close(); } + + _stop_job_btn.Push(); } #endregion #region Event Handlers - private void _stop_job_btn_Pressed() - { - if (_handler != null) - { - _handler.Cancel(); - } - } - /// /// Handles the PrintingStarted event of the MachineOperator. /// @@ -173,10 +141,8 @@ namespace Tango.PPC.Jobs.ViewModels e.JobHandler.StatusChanged += JobHandler_StatusChanged; e.JobHandler.SpoolChangeRequired += JobHandler_SpoolChangeRequired; e.JobHandler.Stopped += JobHandler_Stopped; - e.JobHandler.CanCancelChanged += JobHandler_CanCancelChanged; _stop_job_btn.Push(); - _stop_job_btn.IsEnabled = true; } /// @@ -206,18 +172,12 @@ namespace Tango.PPC.Jobs.ViewModels /// The instance containing the event data. private void JobHandler_Stopped(object sender, EventArgs e) { - if (_stop_job_btn != null) + if (NotificationProvider.HasAppBarItem && NotificationProvider.CurrentAppBarItem is JobProgressAppBarItem) { - _stop_job_btn.Pop(); + NotificationProvider.CurrentAppBarItem.Close(); } - if (_handler != null) - { - _handler.StatusChanged -= JobHandler_StatusChanged; - _handler.SpoolChangeRequired -= JobHandler_SpoolChangeRequired; - _handler.Stopped -= JobHandler_Stopped; - _handler.CanCancelChanged -= JobHandler_CanCancelChanged; - } + _stop_job_btn.Pop(); } /// @@ -233,16 +193,6 @@ namespace Tango.PPC.Jobs.ViewModels }); } - /// - /// Handles the CanCancelChanged event of the JobHandler control. - /// - /// The source of the event. - /// The instance containing the event data. - private void JobHandler_CanCancelChanged(object sender, EventArgs e) - { - _stop_job_btn.IsEnabled = _handler.CanCancel; - } - #endregion } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs index a2acf5893..bff6beff5 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs @@ -26,7 +26,6 @@ namespace Tango.PPC.Jobs.ViewModels { private ObservablesContext _context; private bool _canStartJob; - private bool _startingJob; private bool _isPreparingJob; /// @@ -60,6 +59,7 @@ namespace Tango.PPC.Jobs.ViewModels set { _estimatedDuration = value; RaisePropertyChangedAuto(); } } + /// /// Gets or sets the dye command. /// @@ -96,20 +96,12 @@ namespace Tango.PPC.Jobs.ViewModels /// private async void StartJob() { - if (_startingJob) return; - - _startingJob = true; - _canStartJob = false; - InvalidateRelayCommands(); - NavigationManager.IsBackEnabled = false; - try { LogManager.Log("Start job command pressed. Starting job and navigating to job progress view..."); await PrintingManager.Print(Job, _context); await NavigationManager.NavigateTo(false, nameof(JobProgressView)); - _startingJob = false; } catch (InsufficientLiquidQuantityException) { @@ -120,13 +112,6 @@ namespace Tango.PPC.Jobs.ViewModels LogManager.Log(ex, "Could not start the current job."); await NotificationProvider.ShowError($"{ex.Message}"); } - finally - { - _startingJob = false; - _canStartJob = true; - NavigationManager.IsBackEnabled = true; - InvalidateRelayCommands(); - } } /// @@ -145,6 +130,16 @@ namespace Tango.PPC.Jobs.ViewModels _context = obj.Context; Job = obj.Job; + if (Job.ColorSpace.Space == BL.Enumerations.ColorSpaces.Catalog) + { + if (_context.ColorCatalogs.SingleOrDefault(x => x.Guid == Job.ColorCatalogGuid) == null) + { + await NotificationProvider.ShowError("The selected color catalog for this job could not be found.\nCannot load job."); + await NavigationManager.NavigateBack(); + return; + } + } + IsPreparingJob = true; Job = await new JobBuilder(_context).Set(Job.Guid) @@ -155,15 +150,7 @@ namespace Tango.PPC.Jobs.ViewModels .WithBrushStops() .BuildAsync(); - if (Job.ColorSpace.Space == BL.Enumerations.ColorSpaces.Catalog) - { - if (_context.ColorCatalogs.SingleOrDefault(x => x.Guid == Job.ColorCatalogGuid) == null) - { - await NotificationProvider.ShowError("The selected color catalog for this job could not be found.\nCannot load job."); - await NavigationManager.NavigateBack(); - return; - } - } + await Task.Delay(2000); await Task.Factory.StartNew(() => { diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs index 5e90d3b5b..4e1e58dba 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs @@ -56,7 +56,6 @@ namespace Tango.PPC.Jobs.ViewModels private ActionTimer _volumeConversionTimer; private IColorConverter _converter; private string _current_job_string; - private bool startingJob = false; #region Properties @@ -413,7 +412,7 @@ namespace Tango.PPC.Jobs.ViewModels RepeatSampleDyeCommand = new RelayCommand(RepeatSampleDye); AnotherSampleCommand = new RelayCommand(DyeAnotherSample); InvokeFineTuningPaletteCommand = new RelayCommand(InvokeFineTuningPalette); - ResetFineTuningCommand = new RelayCommand(() => ResetFineTuning(true)); + ResetFineTuningCommand = new RelayCommand(ResetFineTuning); StartFineTuningCommand = new RelayCommand(StartFineTuning, () => FineTuneItems.Any(x => x.IsSelected) && CanStartJob()); RepeatFineTuningCommand = new RelayCommand(RepeatFineTuning); ApproveFineTuningCommand = new RelayCommand(ApproveFineTuning); @@ -469,7 +468,7 @@ namespace Tango.PPC.Jobs.ViewModels Job.ValidateOnPropertyChanged = true; LogManager.Log("Loading RMLS..."); - Rmls = (await new RmlsCollectionBuilder(_db).SetAll().WithActiveParametersGroup().WithCAT(Job.MachineGuid).WithCCT().WithLiquidFactors().WithSpools().ForHeadType(MachineProvider.Machine.MachineHeadType).ForSite(MachineProvider.Machine.SiteGuid).BuildAsync()).ToList(); + Rmls = (await new RmlsCollectionBuilder(_db).SetAll().WithActiveParametersGroup().WithCAT(Job.MachineGuid).WithCCT().WithLiquidFactors().BuildAsync()).ToList(); LogManager.Log("Loading Color Spaces..."); ColorSpaces = await _db.ColorSpaces.ToListAsync(); LogManager.Log("Loading Spool Types..."); @@ -479,7 +478,7 @@ namespace Tango.PPC.Jobs.ViewModels if (Job.ColorSpace.Space == BL.Enumerations.ColorSpaces.Catalog) { - SelectedCatalog = await new CatalogBuilder(_db).Set(Job.ColorCatalogGuid).WithGroups().WithItems().BuildAsync(); + SelectedCatalog = await new ColorCatalogBuilder(_db).Set(Job.ColorCatalogGuid).WithGroups().WithItems().BuildAsync(); if (SelectedCatalog != null) { @@ -546,15 +545,18 @@ namespace Tango.PPC.Jobs.ViewModels } catch (Exception ex) { - IsFree = true; - LogManager.Log(ex, $"Error loading job '{(_job_to_load != null ? _job_to_load.Name : "null")}'"); + LogManager.Log(ex, $"Error loading job '{_job_to_load.Name}'"); await NotificationProvider.ShowError("An error occurred while trying to load the selected job."); _can_navigate_back = true; await NavigationManager.NavigateBack(); } finally { - IsFree = true; + InvokeUI(() => + { + IsFree = true; + //NotificationProvider.ReleaseGlobalBusyMessage(); + }); } } @@ -591,9 +593,7 @@ namespace Tango.PPC.Jobs.ViewModels } Job.LastUpdated = DateTime.UtcNow; - Job.IsSynchronized = false; Job.JobStatus = BL.Enumerations.JobStatuses.Draft; - Job.MarkModified(_db); await _db.SaveChangesAsync(); _current_job_string = Job.ToJobFileWhenLoaded().ToString(); @@ -645,16 +645,11 @@ namespace Tango.PPC.Jobs.ViewModels /// private async void StartJob() { - if (startingJob) return; - try { - Debug.WriteLine("Job Starting..."); - startingJob = true; LogManager.Log("Start job command pressed. Starting job and navigating to job progress view..."); - var handler = await PrintingManager.Print(Job, _db); + await PrintingManager.Print(Job, _db); await NavigationManager.NavigateTo(nameof(JobProgressView)); - startingJob = false; } catch (InsufficientLiquidQuantityException) { @@ -665,10 +660,6 @@ namespace Tango.PPC.Jobs.ViewModels LogManager.Log(ex, "Could not start the current job."); await NotificationProvider.ShowError($"{ex.Message}."); } - finally - { - startingJob = false; - } } /// @@ -677,7 +668,8 @@ namespace Tango.PPC.Jobs.ViewModels private bool CanStartJob() { return - Job != null && Job.Validate(_db) && !Job.Segments.SelectMany(x => x.BrushStops).Where(x => !x.IsTransparent && !x.IsWhite).ToList().Exists(x => x.IsOutOfGamut || x.IsLiquidVolumesOutOfRange); + Job != null && Job.Validate(_db) && + !Job.Segments.SelectMany(x => x.BrushStops).ToList().Exists(x => x.IsOutOfGamut); } #endregion @@ -717,7 +709,7 @@ namespace Tango.PPC.Jobs.ViewModels try { LogManager.Log("Adding new solid segment..."); - var s = Job.AddSolidSegment(Settings.DefaultSegmentLength > 0 ? Settings.DefaultSegmentLength : 10); + var s = Job.AddSolidSegment(MachineProvider.Machine.DefaultSegmentLength > 0 ? MachineProvider.Machine.DefaultSegmentLength : 10); SetSegmentLiquidVolumesIfVolume(s); return s; } @@ -737,7 +729,7 @@ namespace Tango.PPC.Jobs.ViewModels try { LogManager.Log("Adding new gradient segment..."); - var s = Job.AddGradientSegment(Settings.DefaultSegmentLength > 0 ? Settings.DefaultSegmentLength : 10); + var s = Job.AddGradientSegment(MachineProvider.Machine.DefaultSegmentLength > 0 ? MachineProvider.Machine.DefaultSegmentLength : 10); SetSegmentLiquidVolumesIfVolume(s); return s; } @@ -767,7 +759,14 @@ namespace Tango.PPC.Jobs.ViewModels draggedSegment.SegmentIndex = droppedSegment.SegmentIndex + 1; } - ArrangeSegmentsIndices(); + int index = 1; + + foreach (var segment in Job.Segments.OrderBy(x => x.SegmentIndex)) + { + segment.SegmentIndex = index++; + } + + SegmentsCollectionView.Refresh(); } /// @@ -830,14 +829,10 @@ namespace Tango.PPC.Jobs.ViewModels private void ArrangeSegmentsIndices() { - int index = 1; - - foreach (var segment in Job.Segments.OrderBy(x => x.SegmentIndex)) + for (int i = 0; i < Job.Segments.Count; i++) { - segment.SegmentIndex = index++; + Job.Segments[i].SegmentIndex = i + 1; } - - SegmentsCollectionView.Refresh(); } #endregion @@ -885,55 +880,23 @@ namespace Tango.PPC.Jobs.ViewModels LogManager.Log($"Invoking triplet color adjustment dialog for brush stop {brushStop.StopIndex} at segment {brushStop.Segment.SegmentIndex}."); LogManager.Log("Retrieving color conversion suggestions for brush stop..."); - PMR.ColorLab.ConversionOutput conversionOutput = null; - - if (brushStop.IsOutOfGamut) - { - conversionOutput = _converter.Convert(brushStop, false); - } + var conversionOutput = _converter.Convert(brushStop, true); BasicColorCorrectionViewVM vm = null; - List suggestions = null; - if (brushStop.IsOutOfGamut) + vm = await NotificationProvider.ShowDialog(new BasicColorCorrectionViewVM() { - vm = await NotificationProvider.ShowDialog(new BasicColorCorrectionViewVM() - { - InvalidBrushStop = brushStop, - Suggestions = new List() { new ColorConversionSuggestion(conversionOutput.SingleCoordinates, 0, 0) }, - }); - } + InvalidBrushStop = brushStop, + Suggestions = conversionOutput.CreateTrippletSuggestions(), + }); - if (vm == null || vm.Result == BasicColorCorrectionViewVM.ColorCorrectionDialogResult.MoreOptions) + if (vm.Result == BasicColorCorrectionViewVM.ColorCorrectionDialogResult.MoreOptions) { - NotificationProvider.SetGlobalBusyMessage("Generating color hive..."); - - await Task.Factory.StartNew(() => - { - conversionOutput = _converter.Convert(brushStop, true); - - suggestions = conversionOutput.CreateHiveSuggestions(); - - if (vm == null) - { - var center = suggestions.GetCenterSuggestion(); - center.Coordinates.Red = brushStop.Red; - center.Coordinates.Green = brushStop.Green; - center.Coordinates.Blue = brushStop.Blue; - - center.Coordinates.L = brushStop.L; - center.Coordinates.A = brushStop.A; - center.Coordinates.B = brushStop.B; - } - }); - - NotificationProvider.ReleaseGlobalBusyMessage(); LogManager.Log("Invoking hive color conversion dialog..."); vm = await NotificationProvider.ShowDialog(new AdvancedColorCorrectionViewVM() { InvalidBrushStop = brushStop, - Suggestions = suggestions, - IsOutOfGamut = brushStop.IsOutOfGamut, + Suggestions = conversionOutput.CreateHiveSuggestions(), }); } @@ -953,13 +916,6 @@ namespace Tango.PPC.Jobs.ViewModels brushStop.A = vm.SelectedSuggestion.Coordinates.A; brushStop.B = vm.SelectedSuggestion.Coordinates.B; } - else if (brushStop.BrushColorSpace == BL.Enumerations.ColorSpaces.Volume) - { - if (vm.SelectedSuggestion != suggestions.GetCenterSuggestion()) - { - vm.SelectedSuggestion.ApplyOnBrushStop(brushStop); - } - } brushStop.Corrected = true; brushStop.IsOutOfGamut = false; @@ -971,11 +927,6 @@ namespace Tango.PPC.Jobs.ViewModels LogManager.Log(ex, "Error while invoking color adjustment dialog."); await NotificationProvider.ShowError("An error occurred while trying to convert the selected color."); } - finally - { - NotificationProvider.ReleaseGlobalBusyMessage(); - DyeCommand.RaiseCanExecuteChanged(); - } } /// @@ -985,7 +936,7 @@ namespace Tango.PPC.Jobs.ViewModels [HandleProcessCorruptedStateExceptions] public void OnBrushStopFieldValueChanged(BrushStop stop) { - if (stop != null && stop.ColorSpace != null) + if (stop != null) { stop.Corrected = false; stop.OutOfGamutChecked = false; @@ -1003,11 +954,6 @@ namespace Tango.PPC.Jobs.ViewModels stop.Blue = output.SingleCoordinates.Blue; stop.Corrected = true; stop.IsOutOfGamut = false; - - InvokeUI(() => - { - DyeCommand.RaiseCanExecuteChanged(); - }); } catch (Exception ex) { @@ -1128,7 +1074,7 @@ namespace Tango.PPC.Jobs.ViewModels /// /// Synchronizes the fine tune items to brush stops. /// - private async void SyncFineTuneItemsToBrushStops(bool displayBusy = false) + private void SyncFineTuneItemsToBrushStops() { try { @@ -1140,27 +1086,18 @@ namespace Tango.PPC.Jobs.ViewModels } else { - if (displayBusy) - { - NotificationProvider.SetGlobalBusyMessage("Generating suggestions..."); - } - FineTuneItems.Clear(); - foreach (var stop in Job.Segments.SelectMany(x => x.BrushStops).Where(x => !x.IsTransparent).Where(x => x.ColorSpace.Space == BL.Enumerations.ColorSpaces.RGB || x.ColorSpace.Space == BL.Enumerations.ColorSpaces.LAB).DistinctBy(x => x.Color)) + foreach (var stop in Job.Segments.SelectMany(x => x.BrushStops).Where(x => x.ColorSpace.Space == BL.Enumerations.ColorSpaces.RGB || x.ColorSpace.Space == BL.Enumerations.ColorSpaces.LAB).DistinctBy(x => x.Color)) { - var conversionoutput = await _converter.ConvertAsync(stop, true); - FineTuneItem item = new FineTuneItem(conversionoutput); - item.BrushStop = stop; + FineTuneItem item = new FineTuneItem(_converter.Convert(stop, true)); item.BrushStops = Job.Segments.SelectMany(x => x.BrushStops).Where(x => x.Color == stop.Color).ToList(); - item.SelectedSuggestion = item.Suggestions.GetCenterSuggestion(); + item.SelectedSuggestion = item.Suggestions[item.Suggestions.Count / 2]; item.SelectedChanged += () => StartFineTuningCommand.RaiseCanExecuteChanged(); FineTuneItems.Add(item); } _jobs_fine_tune_items[Job.Guid] = FineTuneItems.ToList(); - - NotificationProvider.ReleaseGlobalBusyMessage(); } ApprovalFineTuneItems = FineTuneItems.Where(x => x.IsSelected).ToObservableCollection(); @@ -1172,10 +1109,6 @@ namespace Tango.PPC.Jobs.ViewModels { LogManager.Log(ex, "Error while trying to synchronize fine tuning items with brush stops."); } - finally - { - NotificationProvider.ReleaseGlobalBusyMessage(); - } } /// @@ -1202,23 +1135,19 @@ namespace Tango.PPC.Jobs.ViewModels LogManager.Log(ex, "Error invoking the fine tunning palette"); await NotificationProvider.ShowError("An error occurred while trying to display the fine tunning palette."); } - finally - { - NotificationProvider.ReleaseGlobalBusyMessage(); - } } /// /// Resets the fine tuning. /// - private void ResetFineTuning(bool displayBusy = false) + private void ResetFineTuning() { if (Job != null && _jobs_fine_tune_items.ContainsKey(Job.Guid)) { _jobs_fine_tune_items.Remove(Job.Guid); } - SyncFineTuneItemsToBrushStops(displayBusy); + SyncFineTuneItemsToBrushStops(); } /// @@ -1428,8 +1357,6 @@ namespace Tango.PPC.Jobs.ViewModels { bool result = true; - if (!IsFree) return false; - if (!_can_navigate_back) { bool jobChainged = false; diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs index 64931cbe3..a7b06f6eb 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs @@ -36,9 +36,6 @@ using System.Windows.Media.Imaging; using Tango.Touch.Components; using Tango.PPC.Jobs.ViewContracts; using Tango.Core.ExtensionMethods; -using Tango.PPC.Common.Synchronization; -using Tango.PPC.Jobs.NotificationItems; -using Tango.PPC.Storage.Models; namespace Tango.PPC.Jobs.ViewModels { @@ -49,10 +46,7 @@ namespace Tango.PPC.Jobs.ViewModels public class JobsViewVM : PPCViewModel { private ObservablesContext _db; //Holds the db context for the job list. - private ObservableCollection _catalogs; //Holds the available color catalogs for the site. - private ObservableCollection _rmls; //Holds the available RML for the site. - private List _colorSpaces; //Holds the available color spaces. - private bool _isJobsSynchronizationNotificationActive; + private ObservableCollection _catalogs; //Holds the available color catalogs. public enum JobsCategory { @@ -324,7 +318,7 @@ namespace Tango.PPC.Jobs.ViewModels RaiseMessage(new JobSelectedMessage() { Job = job, Context = _db }); - if (!directlyToEdit && MachineProvider.MachineOperator.CanPrint) + if (!directlyToEdit && MachineProvider.MachineOperator.Status == Integration.Operation.MachineStatuses.ReadyToDye) { await NavigationManager.NavigateWithObject(new JobSummeryNavigationObject() { @@ -355,8 +349,6 @@ namespace Tango.PPC.Jobs.ViewModels _db = ObservablesContext.CreateDefault(); - _colorSpaces = _db.ColorSpaces.ToList(); - var jobs = new JobsCollectionBuilder(_db).Set(x => x.MachineGuid == MachineProvider.Machine.Guid).WithSegments().WithBrushStops().WithCustomer().WithColorSpace().Build(); InvokeUI(() => @@ -415,15 +407,10 @@ namespace Tango.PPC.Jobs.ViewModels var machine = MachineProvider.Machine; JobCreationViewVM vm = new JobCreationViewVM( - Settings.SupportedJobTypes.Count > 0 ? Settings.SupportedJobTypes : Enum.GetValues(typeof(JobTypes)).Cast().ToList(), - Settings.SupportedColorSpaces.Count > 0 ? Settings.SupportedColorSpaces : Enum.GetValues(typeof(ColorSpaces)).Cast().Where(x => x.IsUserSpace() || (ApplicationManager.IsInTechnicianMode && x == ColorSpaces.Volume)).ToList() + machine.SupportedJobTypes.Count > 0 ? machine.SupportedJobTypes : Enum.GetValues(typeof(JobTypes)).Cast().ToList(), + machine.SupportedColorSpaces.Count > 0 ? machine.SupportedColorSpaces : Enum.GetValues(typeof(ColorSpaces)).Cast().Where(x => x.IsUserSpace() || (ApplicationManager.IsInTechnicianMode && x == ColorSpaces.Volume)).ToList() ); - if (_catalogs.Count == 0) - { - vm.SupportedColorSpaces.Remove(ColorSpaces.Catalog); - } - CatalogSelectionViewVM catalogVM = new CatalogSelectionViewVM(_catalogs.ToList(), _catalogs.ToList().SingleOrDefault(x => x.Guid == settings.LastSelectedCatalogGuid)); if (settings.LastJobType != null) @@ -432,7 +419,7 @@ namespace Tango.PPC.Jobs.ViewModels } else { - vm.SelectedJobType = Settings.SupportedJobTypes.FirstOrDefault(); + vm.SelectedJobType = machine.SupportedJobTypes.FirstOrDefault(); } if (settings.LastJobColorSpace != null) @@ -441,7 +428,7 @@ namespace Tango.PPC.Jobs.ViewModels } else { - var space = Settings.SupportedColorSpaces.FirstOrDefault(); + var space = machine.SupportedColorSpaces.FirstOrDefault(); vm.SelectedColorSpace = space.IsUserSpace() ? space : ColorSpaces.Catalog; } @@ -459,7 +446,7 @@ namespace Tango.PPC.Jobs.ViewModels if (twnFile == null) { - if (Settings.SupportedJobTypes.Count != 1 || Settings.SupportedColorSpaces.Count != 1) + if (machine.SupportedJobTypes.Count != 1 || machine.SupportedColorSpaces.Count != 1) { vm = await NotificationProvider.ShowDialog(vm); if (!vm.DialogResult) return; @@ -489,14 +476,14 @@ namespace Tango.PPC.Jobs.ViewModels } else { - vm.SelectedJobType = Settings.SupportedJobTypes.First(); - vm.SelectedColorSpace = Settings.SupportedColorSpaces.First(); + vm.SelectedJobType = machine.SupportedJobTypes.First(); + vm.SelectedColorSpace = machine.SupportedColorSpaces.First(); } } settings.LastJobType = vm.SelectedJobType; settings.LastJobColorSpace = vm.SelectedColorSpace; - + if (vm.SelectedColorSpace == ColorSpaces.Catalog) { settings.LastSelectedCatalogGuid = catalogVM.SelectedCatalog.Guid; @@ -505,8 +492,6 @@ namespace Tango.PPC.Jobs.ViewModels settings.Save(); Job job = new Job(); - job.LastUpdated = DateTime.UtcNow; - job.JobSource = JobSource.Local; job.Name = "untitled"; job.NumberOfHeads = 1; job.NumberOfUnits = 1; @@ -516,12 +501,11 @@ namespace Tango.PPC.Jobs.ViewModels job.JobType = vm.SelectedJobType; job.EnableLubrication = true; job.ColorSpaceGuid = Adapter.ColorSpaces.FirstOrDefault(x => x.Code == vm.SelectedColorSpace.ToInt32()).Guid; - job.ColorSpace = _colorSpaces.SingleOrDefault(x => x.Guid == job.ColorSpaceGuid); job.MachineGuid = MachineProvider.Machine.Guid; - job.UserGuid = null; - job.RmlGuid = (Settings.DefaultRmlGuid != null && _rmls.Select(x => x.Guid).Contains(Settings.DefaultRmlGuid)) ? Settings.DefaultRmlGuid : _rmls.FirstOrDefault().Guid; + job.UserGuid = AuthenticationProvider.CurrentUser.Guid; + job.RmlGuid = machine.DefaultRml != null ? machine.DefaultRmlGuid : Adapter.Rmls.FirstOrDefault().Guid; job.WindingMethodGuid = Adapter.WindingMethods.FirstOrDefault().Guid; - job.SpoolTypeGuid = Settings.DefaultSpoolTypeGuid != null ? Settings.DefaultSpoolTypeGuid : Adapter.SpoolTypes.FirstOrDefault().Guid; + job.SpoolTypeGuid = machine.DefaultSpoolType != null ? machine.DefaultSpoolTypeGuid : Adapter.SpoolTypes.FirstOrDefault().Guid; if (vm.SelectedColorSpace == ColorSpaces.Catalog) { @@ -535,11 +519,11 @@ namespace Tango.PPC.Jobs.ViewModels if (colorProfile == null) { - job.AddSolidSegment(Settings.DefaultSegmentLength > 0 ? Settings.DefaultSegmentLength : 100); + job.AddSolidSegment(machine.DefaultSegmentLength > 0 ? machine.DefaultSegmentLength : 100); } else { - job.AddSolidSegment(colorProfile.Value, Settings.DefaultSegmentLength > 0 ? Settings.DefaultSegmentLength : 100); + job.AddSolidSegment(colorProfile.Value, machine.DefaultSegmentLength > 0 ? machine.DefaultSegmentLength : 100); job.Name = $"SnapMatch {colorProfile.Value.R}, {colorProfile.Value.G}, {colorProfile.Value.B}"; } @@ -740,13 +724,10 @@ namespace Tango.PPC.Jobs.ViewModels StorageProvider.RegisterFileHandler(ExplorerFileDefinition.Pulse.Extension, HandlePulseFileLoaded); //Load catalogs. - using (ObservablesContext db = ObservablesContext.CreateDefault()) + using (ObservablesContext c = ObservablesContext.CreateDefault()) { - _catalogs = await new CatalogsCollectionBuilder(db).SetAll().ForSite(MachineProvider.Machine.SiteGuid).BuildAsync(); - _rmls = await new RmlsCollectionBuilder(db).SetAll().ForHeadType(MachineProvider.Machine.MachineHeadType).ForSite(MachineProvider.Machine.SiteGuid).BuildAsync(); + _catalogs = (await c.ColorCatalogs.ToListAsync()).ToObservableCollection(); } - - MachineDataSynchronizer.SynchronizationEnded += MachineDataSynchronizer_SynchronizationEnded; } public override void OnNavigatedTo() @@ -764,64 +745,37 @@ namespace Tango.PPC.Jobs.ViewModels var selected_job = SelectedJobs.FirstOrDefault(); if (selected_job == null) return; - var selectedJobs = SelectedJobs.ToList(); - ClearSelection(); var result = await NavigationManager. NavigateForResult( - new StorageNavigationRequest() + Storage.Models.StorageNavigationRequest>( + new Storage.Models.StorageNavigationRequest() { - Intent = selectedJobs.Count == 1 ? StorageNavigationIntent.SaveFile : StorageNavigationIntent.SaveFiles, + Intent = Storage.Models.StorageNavigationIntent.SaveFile, DefaultFileName = selected_job.Name, Filter = ExplorerFileDefinition.Job.Extension, - Title = selectedJobs.Count == 1 ? "Save Job File" : "Save Job Files", + Title = "Save Job File", }); if (result != null) { - if (selectedJobs.Count == 1) + try { - try - { - var jobFile = await selected_job.ToJobFile(); + var jobFile = await selected_job.ToJobFile(); - using (FileStream fs = new FileStream(result.Path + ExplorerFileDefinition.Job.Extension, FileMode.Create)) - { - jobFile.WriteTo(fs); - } - - await NotificationProvider.ShowSuccess("Job saved successfully."); - } - catch (Exception ex) + using (FileStream fs = new FileStream(result.Path + ExplorerFileDefinition.Job.Extension, FileMode.Create)) { - LogManager.Log(ex, $"Error saving job {selected_job.Name} to file."); - await NotificationProvider.ShowError($"An error occurred while trying to save the job.\n{ex.Message}"); + jobFile.WriteTo(fs); } + + await NotificationProvider.ShowSuccess("Job saved successfully."); } - else + catch (Exception ex) { - foreach (var job in selectedJobs) - { - try - { - var jobFile = await job.ToJobFile(); - - using (FileStream fs = new FileStream(Path.Combine(result.Path, jobFile.Name.ToValidFileName()) + ExplorerFileDefinition.Job.Extension, FileMode.Create)) - { - jobFile.WriteTo(fs); - } - } - catch (Exception ex) - { - LogManager.Log(ex, $"Error saving job {job.Name} to file."); - await NotificationProvider.ShowError($"An error occurred while trying to save the job.\n{ex.Message}"); - } - } - - await NotificationProvider.ShowSuccess("Jobs saved successfully."); + LogManager.Log(ex, $"Error saving job {selected_job.Name} to file."); + await NotificationProvider.ShowError($"An error occurred while trying to save the job.\n{ex.Message}"); } } } @@ -830,7 +784,7 @@ namespace Tango.PPC.Jobs.ViewModels #region Handle Job File Loading From Storage - private async void HandleJobFileLoaded(List jobFiles) + private async void HandleJobFileLoaded(ExplorerFileItem jobFile) { var vm = await NotificationProvider.ShowDialog(); @@ -838,35 +792,29 @@ namespace Tango.PPC.Jobs.ViewModels { using (ObservablesContext jobContext = ObservablesContext.CreateDefault()) { - foreach (var jobFile in jobFiles) + try { - try + JobFile jFile = JobFile.Parser.ParseFrom(File.ReadAllBytes(jobFile.Path)); + var job = await Job.FromJobFile(jFile, MachineProvider.Machine.Guid, AuthenticationProvider.CurrentUser.Guid); + jobContext.Jobs.Add(job); + await jobContext.SaveChangesAsync(); + LoadJobs(() => { - JobFile jFile = JobFile.Parser.ParseFrom(File.ReadAllBytes(jobFile.Path)); - var job = await Job.FromJobFile(jFile, MachineProvider.Machine.Guid, null); - job.JobSource = JobSource.Local; - jobContext.Jobs.Add(job); - await jobContext.SaveChangesAsync(); - } - catch (Exception ex) - { - LogManager.Log(ex, $"Error occurred while trying to import job from file {jobFile.Path}."); - await NotificationProvider.ShowError($"An error occurred while trying to import the selected job file.\n{ex.Message}"); - } + if (vm.ImportAndEdit) + { + var postJob = Jobs.SingleOrDefault(x => x.Guid == job.Guid); + if (postJob != null) + { + SelectJob(postJob, true); + } + } + }); } - - LoadJobs(() => + catch (Exception ex) { - //Editing of a job is currently deprecated due to enabling multiple job imports. - //if (vm.ImportAndEdit) - //{ - // var postJob = Jobs.SingleOrDefault(x => x.Guid == job.Guid); - // if (postJob != null) - // { - // SelectJob(postJob, true); - // } - //} - }); + LogManager.Log(ex, $"Error occurred while trying to import job from file {jobFile.Path}."); + await NotificationProvider.ShowError($"An error occurred while trying to import the selected job file.\n{ex.Message}"); + } } } } @@ -875,10 +823,8 @@ namespace Tango.PPC.Jobs.ViewModels #region Handle TCC File Loading From Storage - private async void HandleColorProfileFileLoaded(List tccFiles) + private async void HandleColorProfileFileLoaded(ExplorerFileItem tccFile) { - var tccFile = tccFiles.FirstOrDefault(); - try { DetectionColorFile tcc = DetectionColorFile.Parser.ParseFrom(File.ReadAllBytes(tccFile.Path)); @@ -907,10 +853,8 @@ namespace Tango.PPC.Jobs.ViewModels #region Handle Pulse TWN Loading From Storage - private async void HandlePulseFileLoaded(List twnFiles) + private async void HandlePulseFileLoaded(ExplorerFileItem twnFile) { - var twnFile = twnFiles.FirstOrDefault(); - TwnFile twn = TwnFile.FromFile(twnFile.Path); BitmapSource preview = twn.Thumbnail.ToBitmapSource(); @@ -927,32 +871,6 @@ namespace Tango.PPC.Jobs.ViewModels #endregion - #region Handle New Synchronized Jobs - - private void MachineDataSynchronizer_SynchronizationEnded(object sender, SynchronizationEndedEventArgs e) - { - if (e.NewChangedJobs > 0 && !_isJobsSynchronizationNotificationActive) - { - _isJobsSynchronizationNotificationActive = true; - - var item = NotificationProvider.PushNotification(); - item.Pressed += (_, __) => - { - _isJobsSynchronizationNotificationActive = false; - LoadJobs(() => - { - NotificationProvider.ShowSuccess("Your job list is now synchronized."); - }); - }; - item.Closed += (_, __) => - { - _isJobsSynchronizationNotificationActive = false; - }; - } - } - - #endregion - #region Color Profile Request private void ExternalBridgeService_ColorProfileRequest(object sender, ColorProfileRequestEventArgs e) diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/MainViewVM.cs index 579e1e2f7..ed1e28f55 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/MainViewVM.cs @@ -11,7 +11,6 @@ using Tango.Integration.Operation; using Tango.PPC.Common; using Tango.PPC.Common.Notifications; using Tango.PPC.Common.Notifications.NotificationItems; -using Tango.PPC.Jobs.AppBarItems; using Tango.PPC.Jobs.Messages; using Tango.PPC.Jobs.NavigationObjects; using Tango.PPC.Jobs.Views; @@ -25,9 +24,6 @@ namespace Tango.PPC.Jobs.ViewModels public class MainViewVM : PPCViewModel { private NotificationItem _last_failed_job_notification; - private JobHandler _handler; - private bool resuming; - private JobProgressAppBarItem _appBarItem; /// /// Called when the application has been started. @@ -37,42 +33,23 @@ namespace Tango.PPC.Jobs.ViewModels MachineProvider.MachineOperator.PrintingCompleted += MachineOperator_PrintingCompleted; MachineProvider.MachineOperator.PrintingFailed += MachineOperator_PrintingFailed; MachineProvider.MachineOperator.ResumingJob += MachineOperator_ResumingJob; - MachineProvider.MachineOperator.PrintingStarted += MachineOperator_PrintingStarted; - MachineProvider.MachineOperator.PrintingEnded += MachineOperator_PrintingEnded; - NavigationManager.CurrentVMChanged += NavigationManager_CurrentVMChanged; } - private void MachineOperator_PrintingEnded(object sender, PrintingEventArgs e) + private async void MachineOperator_ResumingJob(object sender, ResumingJobEventArgs e) { - _appBarItem?.Close(); - _appBarItem = null; - } + LogManager.Log($"Trying to resume job '{e.JobGuid}'..."); - private void NavigationManager_CurrentVMChanged(object sender, PPCViewModel vm) - { - if (vm.GetType() == typeof(JobProgressViewVM)) - { - _appBarItem?.Close(); - _appBarItem = null; - } - else if (vm.GetType() != typeof(JobSummeryViewVM) && _appBarItem == null && MachineProvider.MachineOperator.IsPrinting && _handler != null && !_handler.IsCanceled) + try { - _appBarItem = NotificationProvider.PushAppBarItem(); - _appBarItem.Pressed += (_, __) => - { - _appBarItem?.Close(); - NavigationManager.NavigateTo(nameof(JobProgressView)); - }; - } - } + var job = await new JobBuilder(ObservablesContext.CreateDefault()).Set(e.JobGuid) + .WithConfiguration() + .WithRML() + .WithUser() + .WithSegments() + .WithBrushStops() + .BuildAsync(); - private void MachineOperator_PrintingStarted(object sender, PrintingEventArgs e) - { - _handler = e.JobHandler; - - if (resuming) - { - resuming = false; + e.Approve(job); InvokeUI(() => { @@ -85,17 +62,6 @@ namespace Tango.PPC.Jobs.ViewModels } }); } - } - - private void MachineOperator_ResumingJob(object sender, ResumingJobEventArgs e) - { - LogManager.Log($"Job resume request '{e.JobGuid}' approving..."); - - try - { - e.Approve(); - resuming = true; - } catch (Exception ex) { LogManager.Log(ex, "An error occurred while trying to resume the job."); @@ -113,15 +79,13 @@ namespace Tango.PPC.Jobs.ViewModels /// The instance containing the event data. private void MachineOperator_PrintingFailed(object sender, PrintingFailedEventArgs e) { - String message = $"{e.Exception.FlattenMessage()}"; - _last_failed_job_notification = NotificationProvider.PushNotification(new MessageNotificationItem( - $"'{e.Job.Name}' failed at position {e.JobHandler.Status.ProgressMinusSettingUp.ToString("0.0")} out of {e.JobHandler.Status.TotalProgressMinusSettingUp.ToString("0.0")} meters.", - message, MessageNotificationItem.MessageNotificationItemTypes.Error, () => + String.Format("'{0}' failed.", e.Job.Name), + String.Format("The job '{1}' has failed due to unexpected error.{0}{2}{0}{0}Tap to view this job details.", Environment.NewLine, e.Job.Name, e.Exception), MessageNotificationItem.MessageNotificationItemTypes.Error, () => { NavigationManager.NavigateWithObject(e.Job); NavigationManager.ClearHistoryExcept(); - }, NotificationItem.NotificationPriority.VeryHigh)); + })); } /// @@ -155,7 +119,7 @@ namespace Tango.PPC.Jobs.ViewModels { NavigationManager.NavigateWithObject(new JobNavigationObject() { Job = e.Job }); NavigationManager.ClearHistoryExcept(); - }, NotificationItem.NotificationPriority.VeryHigh)); + })); } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobProgressView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobProgressView.xaml index 40cfc40f9..3b92581bc 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobProgressView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobProgressView.xaml @@ -19,7 +19,7 @@ - + (Sample) (Fine Tuning) @@ -38,8 +38,6 @@ - - @@ -100,7 +98,7 @@ - Getting Ready... + Getting ready... @@ -119,8 +117,8 @@ - - + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + job canceled + + + + + + + + + + job failed + + + + + + + + + + job completed + + + + + + + + + @@ -210,23 +214,5 @@ Go to job - - - Display Job Outline - - - - - - - - - - - - - Hide Job Outline - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobSummeryView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobSummeryView.xaml index 4785805a6..80a427714 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobSummeryView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobSummeryView.xaml @@ -54,7 +54,7 @@ - + diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml index 6a94034db..57101569a 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml @@ -26,8 +26,6 @@ - - - + + + @@ -164,17 +147,6 @@ - - - - - - Transparent - - - - - @@ -200,10 +172,7 @@ - - - - + @@ -245,11 +214,7 @@ - - - - - + - - - - - @@ -302,90 +247,77 @@ - - - - - - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -402,27 +334,23 @@ - - - - - - - - - + + @@ -526,9 +454,9 @@ Comment: - + - + @@ -631,6 +559,7 @@ @@ -718,61 +647,63 @@ - - - - - Job Summary - + + + + + + Job Summary + - - - - + + + + - + - - + + - - - - - + + + + + (+%) - - + + - - + + - + - + - % + % - - - + + + + - - + + - + Additional Tools - + diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml.cs index 86a8d2a37..880aa8a3a 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml.cs @@ -54,16 +54,16 @@ namespace Tango.PPC.Jobs.Views public async void DisplaySampleDye() { - //expander_sample_dye.IsExpanded = true; - //await Task.Delay(500); - //scrollViewer.ScrollToElement(expander_sample_dye); + expander_sample_dye.IsExpanded = true; + await Task.Delay(500); + scrollViewer.ScrollToElement(expander_sample_dye); } public async void DisplayFineTuning() { - //expander_fine_tuning.IsExpanded = true; - //await Task.Delay(500); - //scrollViewer.ScrollToElement(expander_fine_tuning); + expander_fine_tuning.IsExpanded = true; + await Task.Delay(500); + scrollViewer.ScrollToElement(expander_fine_tuning); } public void OnNavigatedFrom() @@ -94,10 +94,6 @@ namespace Tango.PPC.Jobs.Views borderEditDock.Visibility = Visibility.Collapsed; } } - else if (_is_edit_docked) - { - FloatEditing(); - } } private void DockEditing() diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobsView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobsView.xaml index 94abe6b83..c615583bc 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobsView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobsView.xaml @@ -214,14 +214,14 @@ - + - + @@ -235,7 +235,7 @@ - + @@ -314,21 +314,21 @@ - + - + - + @@ -342,7 +342,7 @@ - + diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/MachineSettingsModule.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/MachineSettingsModule.cs index 807a70b10..477340357 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/MachineSettingsModule.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/MachineSettingsModule.cs @@ -15,7 +15,7 @@ namespace Tango.PPC.MachineSettings /// Represents a PPC . /// /// - [PPCModule(4)] + [PPCModule(2)] public class MachineSettingsModule : PPCModuleBase { /// diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs index 20cfd6bf4..8ed512670 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs @@ -9,7 +9,6 @@ using System.Text; using System.Threading.Tasks; using System.Windows.Data; using Tango.BL; -using Tango.BL.Builders; using Tango.BL.Entities; using Tango.BL.Enumerations; using Tango.Core.Commands; @@ -19,8 +18,6 @@ using Tango.PPC.Common; using Tango.PPC.Common.Connection; using Tango.PPC.Common.ExternalBridge; using Tango.PPC.Common.Messages; -using Tango.PPC.Common.OS; -using Tango.PPC.Common.UWF; using Tango.SharedUI.Components; using Tango.WiFi; @@ -32,17 +29,8 @@ namespace Tango.PPC.MachineSettings.ViewModels /// public class MainViewVM : PPCViewModel { - private TimeZoneInfo _previousTimeZone; - private bool _previousEnableUWF; - #region Properties - [TangoInject] - private IOperationSystemManager OperationSystemManager { get; set; } - - [TangoInject] - private IUnifiedWriteFilterManager UnifiedWriteFilterManager { get; set; } - private Machine _machine; public Machine Machine { @@ -64,13 +52,6 @@ namespace Tango.PPC.MachineSettings.ViewModels set { _selectedColorSpaces = value; RaisePropertyChangedAuto(); } } - private ObservableCollection _rmls; - public ObservableCollection Rmls - { - get { return _rmls; } - set { _rmls = value; RaisePropertyChangedAuto(); } - } - private bool _enableHotSpot; public bool EnableHotSpot { @@ -127,69 +108,6 @@ namespace Tango.PPC.MachineSettings.ViewModels set { _lockScreenPassword = value; RaisePropertyChangedAuto(); } } - private Rml _defaultRML; - public Rml DefaultRML - { - get { return _defaultRML; } - set { _defaultRML = value; RaisePropertyChangedAuto(); } - } - - private SpoolType _defaultSpoolType; - public SpoolType DefaultSpoolType - { - get { return _defaultSpoolType; } - set { _defaultSpoolType = value; RaisePropertyChangedAuto(); } - } - - private bool _synchronizeJobs; - public bool SynchronizeJobs - { - get { return _synchronizeJobs; } - set { _synchronizeJobs = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); } - } - - private bool _synchronizeDiagnostics; - public bool SynchronizeDiagnostics - { - get { return _synchronizeDiagnostics; } - set { _synchronizeDiagnostics = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); } - } - - private bool _autoCheckForUpdates; - public bool AutoCheckForUpdates - { - get { return _autoCheckForUpdates; } - set { _autoCheckForUpdates = value; RaisePropertyChangedAuto(); } - } - - private List _timeZones; - /// - /// Gets or sets the available time zones. - /// - public List TimeZones - { - get { return _timeZones; } - set { _timeZones = value; RaisePropertyChangedAuto(); } - } - - private TimeZoneInfo _selectedTimeZone; - /// - /// Gets or sets the selected time zone. - /// - public TimeZoneInfo SelectedTimeZone - { - get { return _selectedTimeZone; } - set { _selectedTimeZone = value; RaisePropertyChangedAuto(); } - } - - private bool _enableUWF; - public bool EnableUWF - { - get { return _enableUWF; } - set { _enableUWF = value; RaisePropertyChangedAuto(); } - } - - #endregion #region Commands @@ -204,18 +122,12 @@ namespace Tango.PPC.MachineSettings.ViewModels /// public RelayCommand DiscardCommand { get; set; } - /// - /// Gets or sets the synchronize command. - /// - public RelayCommand SynchronizeCommand { get; set; } - #endregion public MainViewVM() { SaveCommand = new RelayCommand(Save); DiscardCommand = new RelayCommand(Discard); - SynchronizeCommand = new RelayCommand(Synchronize, () => !MachineDataSynchronizer.IsSynchronizing && IsFree); } private void Discard() @@ -227,9 +139,9 @@ namespace Tango.PPC.MachineSettings.ViewModels { if (Validate()) { - Settings.SupportedJobTypes = SelectedJobTypes.SynchedSource.ToList(); - Settings.SupportedColorSpaces = SelectedColorSpaces.SynchedSource.ToList(); - Machine.MapPropertiesTo(MachineProvider.Machine, MappingFlags.NoReferenceTypes); + Machine.SupportedJobTypes = SelectedJobTypes.SynchedSource.ToList(); + Machine.SupportedColorSpaces = SelectedColorSpaces.SynchedSource.ToList(); + Machine.MapPrimitivesWithStrings(MachineProvider.Machine); Settings.EnableHotSpot = EnableHotSpot; Settings.HotSpotPassword = HotSpotPassword; @@ -238,73 +150,10 @@ namespace Tango.PPC.MachineSettings.ViewModels Settings.EnableLockScreen = EnableLockScreen; Settings.LockScreenTimeout = TimeSpan.FromMinutes(LockScreenTimeoutMinutes); Settings.LockScreenPassword = LockScreenPassword; - Settings.DefaultRmlGuid = DefaultRML?.Guid; - Settings.DefaultSpoolTypeGuid = DefaultSpoolType?.Guid; - Settings.SynchronizeJobs = SynchronizeJobs; - Settings.SynchronizeDiagnostics = SynchronizeDiagnostics; - Settings.AutoCheckForUpdates = AutoCheckForUpdates; - - MachineDataSynchronizer.IsEnabled = SynchronizeJobs || SynchronizeDiagnostics; - Settings.Save(); await MachineProvider.SaveMachine(); - - bool isRestarting = false; - - if (_previousTimeZone.ToStringSafe() != SelectedTimeZone.ToStringSafe()) - { - if (await NotificationProvider.ShowQuestion("Changing the time zone requires the application to restart. Do you wish to restart the application?")) - { - try - { - LogManager.Log($"Setting new time zone to '{SelectedTimeZone.ToString()}'."); - NotificationProvider.SetGlobalBusyMessage("Setting new time zone..."); - await OperationSystemManager.ChangeTimeZone(SelectedTimeZone); - NotificationProvider.ReleaseGlobalBusyMessage(); - isRestarting = true; - ApplicationManager.Restart(); - } - catch (Exception ex) - { - LogManager.Log(ex, "Error changing the time zone."); - NotificationProvider.ReleaseGlobalBusyMessage(); - await NotificationProvider.ShowError($"Error setting timezone.\n{ex.FlattenMessage()}"); - } - } - } - - if (_previousEnableUWF != EnableUWF) - { - await NotificationProvider.ShowWarning("Changes to disk protection (UWF) will take effect only after a full system restart."); - - try - { - LogManager.Log($"Changing UWF mode to '{EnableUWF}'."); - if (EnableUWF) - { - NotificationProvider.SetGlobalBusyMessage("Enabling disk protection (UWF)..."); - await UnifiedWriteFilterManager.Enable(); - } - else - { - NotificationProvider.SetGlobalBusyMessage("Disabling disk protection (UWF)..."); - await UnifiedWriteFilterManager.Disable(); - } - NotificationProvider.ReleaseGlobalBusyMessage(); - } - catch (Exception ex) - { - NotificationProvider.ReleaseGlobalBusyMessage(); - LogManager.Log(ex, "Error setting UWF mode."); - await NotificationProvider.ShowError($"Could not change the disk protection mode\n{ex.FlattenMessage()}"); - } - } - - if (!isRestarting) - { - await NavigationManager.NavigateBack(); - } + await NavigationManager.NavigateBack(); } } @@ -318,29 +167,10 @@ namespace Tango.PPC.MachineSettings.ViewModels /// public override void OnApplicationStarted() { - try - { - TimeZones = OperationSystemManager.GetAvailableTimeZones().ToList(); - } - catch (Exception ex) - { - LogManager.Log(ex, "Error retrieving available time zones."); - } - } - public async override void OnApplicationReady() - { - base.OnApplicationReady(); - MachineDataSynchronizer.SynchronizationStarted += (_, __) => InvalidateRelayCommands(); - MachineDataSynchronizer.SynchronizationEnded += (_, __) => InvalidateRelayCommands(); - - using (ObservablesContext db = ObservablesContext.CreateDefault()) - { - Rmls = await new RmlsCollectionBuilder(db).SetAll().ForHeadType(MachineProvider.Machine.MachineHeadType).ForSite(MachineProvider.Machine.SiteGuid).BuildAsync(); - } } - public async override void OnNavigatedTo() + public override void OnNavigatedTo() { base.OnNavigatedTo(); @@ -365,29 +195,8 @@ namespace Tango.PPC.MachineSettings.ViewModels LockScreenTimeoutMinutes = (int)Settings.LockScreenTimeout.TotalMinutes; LockScreenPassword = Settings.LockScreenPassword; - SelectedJobTypes = new SelectedObjectCollection(Enum.GetValues(typeof(JobTypes)).Cast().ToObservableCollection(), Settings.SupportedJobTypes.ToObservableCollection()); - SelectedColorSpaces = new SelectedObjectCollection(Enum.GetValues(typeof(ColorSpaces)).Cast().Where(x => x.IsUserSpace()).ToObservableCollection(), Settings.SupportedColorSpaces.ToObservableCollection()); - - DefaultRML = Adapter.Rmls.SingleOrDefault(x => x.Guid == Settings.DefaultRmlGuid); - DefaultSpoolType = Adapter.SpoolTypes.SingleOrDefault(x => x.Guid == Settings.DefaultSpoolTypeGuid); - - SynchronizeJobs = Settings.SynchronizeJobs; - SynchronizeDiagnostics = Settings.SynchronizeDiagnostics; - - AutoCheckForUpdates = Settings.AutoCheckForUpdates; - - SelectedTimeZone = TimeZones.SingleOrDefault(x => x.StandardName == TimeZone.CurrentTimeZone.StandardName); - _previousTimeZone = SelectedTimeZone; - - try - { - EnableUWF = await UnifiedWriteFilterManager.IsEnabled(); - _previousEnableUWF = EnableUWF; - } - catch (Exception ex) - { - LogManager.Log(ex, "Error getting UWF status."); - } + SelectedJobTypes = new SelectedObjectCollection(Enum.GetValues(typeof(JobTypes)).Cast().ToObservableCollection(), Machine.SupportedJobTypes.ToObservableCollection()); + SelectedColorSpaces = new SelectedObjectCollection(Enum.GetValues(typeof(ColorSpaces)).Cast().Where(x => x.IsUserSpace()).ToObservableCollection(), Machine.SupportedColorSpaces.ToObservableCollection()); } private async void OnEnableRemoteAssistanceChanged() @@ -462,29 +271,5 @@ namespace Tango.PPC.MachineSettings.ViewModels { ExternalBridgeService.Enabled = EnableExternalBridge; } - - private async void Synchronize() - { - try - { - IsFree = false; - NotificationProvider.SetGlobalBusyMessage("Synchronizing..."); - - await MachineDataSynchronizer.Synchronize(); - - NotificationProvider.ReleaseGlobalBusyMessage(); - await NotificationProvider.ShowSuccess("Synchronization completed successfully."); - } - catch (Exception ex) - { - NotificationProvider.ReleaseGlobalBusyMessage(); - await NotificationProvider.ShowError($"Error occurred while trying to synchronize.\n{ex.FlattenMessage()}"); - } - finally - { - NotificationProvider.ReleaseGlobalBusyMessage(); - IsFree = true; - } - } } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml index ba3516be4..dd5f89bb2 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml @@ -5,19 +5,15 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:enumerations="clr-namespace:Tango.BL.Enumerations;assembly=Tango.BL" xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" - xmlns:keyboard="clr-namespace:Tango.Touch.Keyboard;assembly=Tango.Touch" - xmlns:sys="clr-namespace:System.Collections;assembly=mscorlib" xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" xmlns:vm="clr-namespace:Tango.PPC.MachineSettings.ViewModels" xmlns:connectivity="clr-namespace:Tango.PPC.Common.Connectivity;assembly=Tango.PPC.Common" - xmlns:adapters="clr-namespace:Tango.Transport.Adapters;assembly=Tango.Transport" xmlns:global="clr-namespace:Tango.PPC.MachineSettings" - xmlns:integrationPMR="clr-namespace:Tango.PMR.Integration;assembly=Tango.PMR" xmlns:local="clr-namespace:Tango.PPC.MachineSettings.Views" mc:Ignorable="d" - d:DesignHeight="4500" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}"> + d:DesignHeight="2500" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}"> - + @@ -87,7 +83,7 @@ - + Supported Job Types @@ -140,14 +136,14 @@ - Default Thread - + Default Thread Type + - Default Spool - + Default Segment Length - + @@ -199,172 +195,6 @@ - - - - - - - - Auto Update Check - - - - Automatically check for software and database updates. - - - - - - - - - Synchronize Jobs - - - - Synchronize your jobs with twine's cloud services. - - - - - - - - - Synchronize Diagnostics Data - - - - Help us improve your experience using this system. - - - - - - - - - - Once enabled, synchronization occurs automatically in the background. you can choose to synchronize right now. - - - Synchronize Now - - - - - - - - - - Time Zone - - - - - - - - - - - - - - Embedded COM Port - - - - - Emergency COM Port - - - - - Enable Emergency Screen - - - - - Enable Embedded Debug Logs - - - - - Enable Automatic Thread Loading Support - - - - - Display PowerUp Screen - - - - - Enable Job Liquid Quantity Validation - - - - - Always Start in Technician Mode - - - - - Enable External Bridge SignalR - - - - - Auto Update Check Interval Minutes - - - - - Bypass Internet Connectivity Checks - - - - - Gradient Resolution CM - - - - - Enable Insights - - - - - Insights Sampling Interval (sec) - - - - - Insights Storage Cleanup Interval (min) - - - - - Insights Max Storage Duration (days) - - - - - Enable UWF (Disk Protection) - - - - - - - Please restart the application for advanced settings to take effect. - - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/App.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/App.xaml deleted file mode 100644 index cb7592abd..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/App.xaml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Commands/HomingMotorCommand.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Commands/HomingMotorCommand.cs deleted file mode 100644 index d3f44fe7e..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Commands/HomingMotorCommand.cs +++ /dev/null @@ -1,80 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.PMR.Diagnostics; -using Tango.PMR.Hardware; - -namespace Tango.PPC.Maintenance.Commands -{ - public abstract class HomingMotorCommand : MaintenanceCommand - { - public HardwareMotorType Motor { get; set; } - - public MotorDirection Direction { get; set; } - - public double Speed { get; set; } - - public String HomingMessage { get; set; } - - public String ErrorMessage { get; set; } - - public String SuccessMessage { get; set; } - - public HomingMotorCommand(HardwareMotorType motor, - MotorDirection direction, - double speed, - string homingMessage, - string errorMessage, - string successMessage) - { - Motor = motor; - Direction = direction; - Speed = speed; - HomingMessage = homingMessage; - ErrorMessage = errorMessage; - SuccessMessage = successMessage; - } - - protected override void OnExecute() - { - IsEnabled = false; - - try - { - NotificationProvider.SetGlobalBusyMessage(HomingMessage); - - MachineProvider.MachineOperator.StartMotorHoming(new PMR.Diagnostics.MotorHomingRequest() - { - Direction = Direction, - MotorType = Motor, - Speed = Speed, - }).Subscribe((response) => - { - //Next - }, (ex) => - { - //Error - IsEnabled = true; - NotificationProvider.ReleaseGlobalBusyMessage(); - LogManager.Log(ex, ErrorMessage); - NotificationProvider.ShowError(ex.FlattenMessage()); - }, () => - { - //Complete - IsEnabled = true; - NotificationProvider.ReleaseGlobalBusyMessage(); - NotificationProvider.ShowSuccess(SuccessMessage); - }); - } - catch (Exception ex) - { - LogManager.Log(ex, ErrorMessage); - NotificationProvider.ReleaseGlobalBusyMessage(); - NotificationProvider.ShowError(ex.FlattenMessage()); - IsEnabled = true; - } - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Commands/OpenCloseDyeingHeadCommand.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Commands/OpenCloseDyeingHeadCommand.cs deleted file mode 100644 index 5c482e04c..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Commands/OpenCloseDyeingHeadCommand.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.Integration.Operation; -using Tango.PMR.Diagnostics; -using Tango.PMR.Hardware; - -namespace Tango.PPC.Maintenance.Commands -{ - public class OpenCloseDyeingHeadCommand : OpenCloseMotorCommand - { - public OpenCloseDyeingHeadCommand() : base( - HardwareMotorType.MotoDhLid, - MotorDirection.Backward, - 400, - 400, - MotorState.Closed, - "Opening dyeing head lid...", - "Closing dyeing head lid...", - "Error opening dyeing head lid.", - "Error closing dyeing head lid.", - "The dyeing head lid is now opened.", - "The dyeing head lid is now closed." - ) - { - - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Commands/OpenCloseLeftLeadingWheelsCommand.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Commands/OpenCloseLeftLeadingWheelsCommand.cs deleted file mode 100644 index b0d8c1dc5..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Commands/OpenCloseLeftLeadingWheelsCommand.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.PMR.Diagnostics; -using Tango.PMR.Hardware; - -namespace Tango.PPC.Maintenance.Commands -{ - public class OpenCloseLeftLeadingWheelsCommand : OpenCloseMotorCommand - { - public OpenCloseLeftLeadingWheelsCommand() : base( - HardwareMotorType.MotoLloading, - MotorDirection.Backward, - 250, - 250, - MotorState.Closed, - "Opening left leading wheels...", - "Closing left leading wheels...", - "Error opening left leading wheels.", - "Error closing left leading wheels.", - "The left leading wheels are now opened.", - "The left leading wheels are now closed." - ) - { - - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Commands/OpenCloseMotorCommand.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Commands/OpenCloseMotorCommand.cs deleted file mode 100644 index 149c3675d..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Commands/OpenCloseMotorCommand.cs +++ /dev/null @@ -1,158 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.PMR.Diagnostics; -using Tango.PMR.Hardware; - -namespace Tango.PPC.Maintenance.Commands -{ - public abstract class OpenCloseMotorCommand : MaintenanceCommand - { - public enum MotorState - { - Closed, - Opened, - } - - public HardwareMotorType Motor { get; set; } - - public MotorDirection OpenDirection { get; set; } - - public MotorDirection CloseDirection - { - get - { - return OpenDirection == MotorDirection.Forward ? MotorDirection.Backward : MotorDirection.Forward; - } - } - - public double OpeningSpeed { get; set; } - - public double ClosingSpeed { get; set; } - - public String OpeningMessage { get; set; } - - public String ClosingMessage { get; set; } - - public String OpeningErrorMessage { get; set; } - - public String ClosingErrorMessage { get; set; } - - public String OpeningSuccessMessage { get; set; } - - public String ClosingSuccessMessage { get; set; } - - public OpenCloseMotorCommand( - HardwareMotorType motor, - MotorDirection openDirection, - double openingSpeed, - double closingSpeed, - MotorState defaultState, - String openingMessage, - String closingMessage, - String openingErrorMessage, - String closingErrorMessage, - String openingSuccessMessage, - String closingSuccessMessage) - { - - Motor = motor; - OpenDirection = openDirection; - OpeningSpeed = openingSpeed; - ClosingSpeed = closingSpeed; - State = defaultState; - OpeningMessage = openingMessage; - ClosingMessage = closingMessage; - OpeningErrorMessage = openingErrorMessage; - ClosingErrorMessage = closingErrorMessage; - OpeningSuccessMessage = openingSuccessMessage; - ClosingSuccessMessage = closingSuccessMessage; - } - - protected override void OnExecute() - { - if (State == MotorState.Closed) - { - IsEnabled = false; - - try - { - NotificationProvider.SetGlobalBusyMessage(OpeningMessage); - - MachineProvider.MachineOperator.StartMotorHoming(new PMR.Diagnostics.MotorHomingRequest() - { - Direction = OpenDirection, - MotorType = Motor, - Speed = OpeningSpeed, - }).Subscribe((response) => - { - //Next - }, (ex) => - { - //Error - IsEnabled = true; - NotificationProvider.ReleaseGlobalBusyMessage(); - LogManager.Log(ex, OpeningErrorMessage); - NotificationProvider.ShowError(ex.FlattenMessage()); - }, () => - { - //Complete - IsEnabled = true; - State = MotorState.Opened; - NotificationProvider.ReleaseGlobalBusyMessage(); - NotificationProvider.ShowSuccess(OpeningSuccessMessage); - }); - } - catch (Exception ex) - { - LogManager.Log(ex, OpeningErrorMessage); - NotificationProvider.ReleaseGlobalBusyMessage(); - NotificationProvider.ShowError(ex.FlattenMessage()); - IsEnabled = true; - } - } - else - { - IsEnabled = false; - - try - { - NotificationProvider.SetGlobalBusyMessage(ClosingMessage); - - MachineProvider.MachineOperator.StartMotorHoming(new PMR.Diagnostics.MotorHomingRequest() - { - Direction = CloseDirection, - MotorType = Motor, - Speed = ClosingSpeed, - }).Subscribe((response) => - { - //Next - }, (ex) => - { - //Error - IsEnabled = true; - NotificationProvider.ReleaseGlobalBusyMessage(); - LogManager.Log(ex, ClosingErrorMessage); - NotificationProvider.ShowError(ex.FlattenMessage()); - }, () => - { - //Complete - IsEnabled = true; - State = MotorState.Closed; - NotificationProvider.ReleaseGlobalBusyMessage(); - NotificationProvider.ShowSuccess(ClosingSuccessMessage); - }); - } - catch (Exception ex) - { - LogManager.Log(ex, ClosingErrorMessage); - NotificationProvider.ReleaseGlobalBusyMessage(); - NotificationProvider.ShowError(ex.FlattenMessage()); - IsEnabled = true; - } - } - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Commands/OpenCloseRightLeadingWheelsCommand.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Commands/OpenCloseRightLeadingWheelsCommand.cs deleted file mode 100644 index ced9eea60..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Commands/OpenCloseRightLeadingWheelsCommand.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.PMR.Diagnostics; -using Tango.PMR.Hardware; - -namespace Tango.PPC.Maintenance.Commands -{ - public class OpenCloseRightLeadingWheelsCommand : OpenCloseMotorCommand - { - public OpenCloseRightLeadingWheelsCommand() : base( - HardwareMotorType.MotoRloading, - MotorDirection.Backward, - 250, - 250, - MotorState.Closed, - "Opening right leading wheels...", - "Closing right leading wheels...", - "Error opening right leading wheels.", - "Error closing right leading wheels.", - "The right leading wheels are now opened.", - "The right leading wheels are now closed." - ) - { - - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Commands/ResetThreadLoadingCommand.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Commands/ResetThreadLoadingCommand.cs deleted file mode 100644 index 0078cd546..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Commands/ResetThreadLoadingCommand.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.PMR.Diagnostics; -using Tango.PMR.Hardware; - -namespace Tango.PPC.Maintenance.Commands -{ - public class ResetThreadLoadingCommand : HomingMotorCommand - { - public ResetThreadLoadingCommand() : base( - HardwareMotorType.MotoDryerLoadarm, - MotorDirection.Backward, - 200, - "Resetting thread loading arm...", - "Error resetting thread loading arm.", - "Thread loading arm in now in place.") - { - - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Controls/StateTouchButton.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Controls/StateTouchButton.cs deleted file mode 100644 index 9a259482b..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Controls/StateTouchButton.cs +++ /dev/null @@ -1,109 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Collections.Specialized; -using System.ComponentModel; -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.Markup; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; -using Tango.Touch.Controls; - -namespace Tango.PPC.Maintenance.Controls -{ - public class ButtonState : DependencyObject - { - public Object Value - { - get { return (Object)GetValue(ValueProperty); } - set { SetValue(ValueProperty, value); } - } - public static readonly DependencyProperty ValueProperty = - DependencyProperty.Register("Value", typeof(Object), typeof(ButtonState), new PropertyMetadata(null)); - - public Object Content - { - get { return (Object)GetValue(ContentProperty); } - set { SetValue(ContentProperty, value); } - } - public static readonly DependencyProperty ContentProperty = - DependencyProperty.Register("Content", typeof(Object), typeof(ButtonState), new PropertyMetadata(null)); - } - - [ContentProperty(nameof(States))] - public class StateTouchButton : TouchButton - { - public ObservableCollection States - { - get { return (ObservableCollection)GetValue(StatesProperty); } - set { SetValue(StatesProperty, value); } - } - public static readonly DependencyProperty StatesProperty = - DependencyProperty.Register("States", typeof(ObservableCollection), typeof(StateTouchButton), new PropertyMetadata(null, (d, e) => (d as StateTouchButton).OnStatesChanged())); - - public Object SelectedState - { - get { return (Object)GetValue(SelectedStateProperty); } - set { SetValue(SelectedStateProperty, value); } - } - public static readonly DependencyProperty SelectedStateProperty = - DependencyProperty.Register("SelectedState", typeof(Object), typeof(StateTouchButton), new PropertyMetadata(null, (d, e) => (d as StateTouchButton).OnSelectedStateChanged())); - - public StateTouchButton() - { - States = new ObservableCollection(); - } - - private void OnStatesChanged() - { - if (States != null) - { - States.CollectionChanged -= States_CollectionChanged; - States.CollectionChanged += States_CollectionChanged; - OnSelectedStateChanged(); - } - } - - private void OnSelectedStateChanged() - { - if (SelectedState == null) - { - Content = null; - return; - } - - if (States != null) - { - var converter = TypeDescriptor.GetConverter(SelectedState.GetType()); - var matchingState = States.OfType().ToList().FirstOrDefault(x => x.Value != null && converter.ConvertFrom(x.Value).Equals(SelectedState)); - if (matchingState != null) - { - Content = matchingState.Content; - } - else - { - Content = null; - } - } - else - { - Content = null; - } - } - - private void States_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e) - { - OnSelectedStateChanged(); - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/LiquidTypeToBrushConverter.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/LiquidTypeToBrushConverter.cs deleted file mode 100644 index c33efdca6..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/LiquidTypeToBrushConverter.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Data; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using Tango.BL.Entities; -using Tango.SharedUI.Helpers; - -namespace Tango.PPC.Maintenance.Converters -{ - public class LiquidTypeToBrushConverter : IValueConverter - { - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value is LiquidType) - { - LiquidType type = value as LiquidType; - switch (type.Type) - { - case BL.Enumerations.LiquidTypes.Lubricant: - { - - ImageBrush lubricantBrush = new ImageBrush() { Stretch = Stretch.None, TileMode = TileMode.Tile, ViewportUnits = BrushMappingMode.Absolute }; - - BitmapSource bit_source = ResourceHelper.GetImageFromResources(@"Images/lubricant2.png"); - var targetBitmap = new WriteableBitmap(new TransformedBitmap(bit_source, new ScaleTransform(0.2, 0.2))); - lubricantBrush.ImageSource = targetBitmap; - lubricantBrush.Viewport = new System.Windows.Rect(2, 2, targetBitmap.Width, targetBitmap.Height); - return lubricantBrush; - } - case BL.Enumerations.LiquidTypes.Cleaner: - { - ImageBrush cleanerBrush = new ImageBrush() { Stretch = Stretch.None, TileMode = TileMode.Tile, ViewportUnits = BrushMappingMode.Absolute }; - BitmapSource bit_source = ResourceHelper.GetImageFromResources(@"Images/cl-full.png"); - var targetBitmap = new WriteableBitmap(new TransformedBitmap(bit_source, new ScaleTransform(0.3, 0.3))); - - cleanerBrush.ImageSource = targetBitmap; - cleanerBrush.Viewport = new System.Windows.Rect(0, 0, targetBitmap.Width, targetBitmap.Height); - return cleanerBrush; - } - case BL.Enumerations.LiquidTypes.Yellow: - { - return new SolidColorBrush(Color.FromRgb(232, 225, 12)); - } - case BL.Enumerations.LiquidTypes.Cyan: - { - return new SolidColorBrush(Color.FromRgb(22, 98, 235)); - } - case BL.Enumerations.LiquidTypes.Magenta: - { - return new SolidColorBrush(Color.FromRgb(237, 0, 140)); - } - } - - - return new SolidColorBrush(type.LiquidTypeColor); - } - return null; - - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - throw new NotImplementedException(); - } - - } -} - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/LiquidTypeToShortNameConverter.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/LiquidTypeToShortNameConverter.cs deleted file mode 100644 index 15041bf17..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/LiquidTypeToShortNameConverter.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Data; -using Tango.BL.Entities; - -namespace Tango.PPC.Maintenance.Converters -{ - class LiquidTypeToShortNameConverter : IValueConverter - { - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value is LiquidType) - { - LiquidType type = value as LiquidType; - switch (type.Type) - { - case BL.Enumerations.LiquidTypes.Cleaner: - return "CL"; - case BL.Enumerations.LiquidTypes.TransparentInk: - return "TI"; - case BL.Enumerations.LiquidTypes.Black: - return "K"; - } - return type.Name.First().ToString(); - } - else - { - return value; - } - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - throw new NotImplementedException(); - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/MidTankLevelToElementHeightConverter.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/MidTankLevelToElementHeightConverter.cs deleted file mode 100644 index 94d1ed8b8..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/MidTankLevelToElementHeightConverter.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Data; -using Tango.Integration.Operation; - -namespace Tango.PPC.Maintenance.Converters -{ - public class MidTankLevelToElementHeightConverter : IMultiValueConverter - { - public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) - { - try - { - double parentActualHeight = (double)values[0]; - double midTankLevel = Math.Min((double)values[1], MachineOperator.MAX_MIDTANK_LITERS); - //var test = (parentActualHeight - (midTankLevel / MachineOperator.MAX_MIDTANK_LITERS) * parentActualHeight); - return (parentActualHeight - (midTankLevel / MachineOperator.MAX_MIDTANK_LITERS) * parentActualHeight); - } - catch - { - return 0d; - } - } - - public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) - { - throw new NotImplementedException(); - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/StringToFirstLetterConverter.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/StringToFirstLetterConverter.cs deleted file mode 100644 index 0922af78d..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/StringToFirstLetterConverter.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Data; - -namespace Tango.PPC.Maintenance.Converters -{ - public class StringToFirstLetterConverter : IValueConverter - { - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value != null && value.ToString().Length > 1) - { - return value.ToString().First().ToString(); - } - else - { - return value; - } - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - throw new NotImplementedException(); - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Dialogs/CleanerDispensingView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Dialogs/CleanerDispensingView.xaml deleted file mode 100644 index 98be45608..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Dialogs/CleanerDispensingView.xaml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - Dispense Cleaning Liquid - - - - - Please put on safety glasses - - - - - - START - - - - - - - - - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Dialogs/CleanerDispensingView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Dialogs/CleanerDispensingView.xaml.cs deleted file mode 100644 index 6f1ebb4ed..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Dialogs/CleanerDispensingView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -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.Maintenance.Dialogs -{ - /// - /// Interaction logic for PowerUpView.xaml - /// - public partial class CleanerDispensingView : UserControl - { - public CleanerDispensingView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Dialogs/CleanerDispensingViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Dialogs/CleanerDispensingViewVM.cs deleted file mode 100644 index e37be417f..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Dialogs/CleanerDispensingViewVM.cs +++ /dev/null @@ -1,128 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Timers; -using Tango.BL.Entities; -using Tango.Core.Commands; -using Tango.Core.DI; -using Tango.Integration.Operation; -using Tango.PMR.Printing; -using Tango.PPC.Common; -using Tango.PPC.Common.Connection; -using Tango.PPC.Common.Notifications; -using Tango.Settings; -using Tango.SharedUI; - -namespace Tango.PPC.Maintenance.Dialogs -{ - public class CleanerDispensingViewVM : DialogViewVM - { - private const int JOGGING_TIME_SEC = 10; - private const int JOGGING_SPEED = 400; - - [TangoInject] - public IMachineProvider MachineProvider { get; set; } - - [TangoInject] - private INotificationProvider NotificationProvider { get; set; } - - private bool _isStarted; - public bool IsStarted - { - get { return _isStarted; } - set { _isStarted = value; RaisePropertyChangedAuto(); } - } - - private bool _isCompleted; - public bool IsCompleted - { - get { return _isCompleted; } - set { _isCompleted = value; RaisePropertyChangedAuto(); } - } - - private bool _isFailed; - public bool IsFailed - { - get { return _isFailed; } - set { _isFailed = value; RaisePropertyChangedAuto(); } - } - - private String _status; - public String Status - { - get { return _status; } - set { _status = value; RaisePropertyChangedAuto(); } - } - - public RelayCommand StartCommand { get; set; } - - public CleanerDispensingViewVM() - { - Status = "Ready..."; - CanClose = true; - TangoIOC.Default.Inject(this); - StartCommand = new RelayCommand(Start, () => !IsStarted); - } - - private async void Start() - { - try - { - CanClose = false; - IsStarted = true; - IsCompleted = false; - IsFailed = false; - InvalidateRelayCommands(); - - Status = "Dispensing cleaner liquid..."; - - var cleanerPack = MachineProvider.Machine.Configuration.NoneEmptyIdsPacks.FirstOrDefault(x => x.LiquidType.Type == BL.Enumerations.LiquidTypes.Cleaner); - - if (cleanerPack == null) - { - throw new InvalidOperationException("'Cleaner' liquid type was not found on the machine configuration."); - } - - var cleanerIndex = cleanerPack.PackIndex; - - await MachineProvider.MachineOperator.StartDispenserJogging(new PMR.Diagnostics.DispenserJoggingRequest() - { - Direction = PMR.Diagnostics.MotorDirection.Forward, - Speed = JOGGING_SPEED, - Index = cleanerIndex - }); - - await Task.Delay(TimeSpan.FromSeconds(JOGGING_TIME_SEC)); - - await MachineProvider.MachineOperator.StopDispenserJogging(new PMR.Diagnostics.DispenserAbortJoggingRequest() - { - Index = cleanerIndex - }); - - IsCompleted = true; - Status = "Cleaner liquid dispensing completed."; - } - catch (Exception ex) - { - Status = "Cleaner liquid dispensing failed."; - IsFailed = true; - await NotificationProvider.ShowError($"Error occurred while trying to perform the cleaner liquid dispensing.\n{ex.FlattenMessage()}"); - } - finally - { - CanClose = true; - IsStarted = false; - } - } - - protected override void Cancel() - { - if (CanClose) - { - base.Cancel(); - } - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Dialogs/HeadCleaningView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Dialogs/HeadCleaningView.xaml deleted file mode 100644 index f640d5cec..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Dialogs/HeadCleaningView.xaml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - Head Cleaning - - - - - - - - - START - ABORT - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Dialogs/HeadCleaningView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Dialogs/HeadCleaningView.xaml.cs deleted file mode 100644 index c715bf5cf..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Dialogs/HeadCleaningView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -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.Maintenance.Dialogs -{ - /// - /// Interaction logic for PowerUpView.xaml - /// - public partial class HeadCleaningView : UserControl - { - public HeadCleaningView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Dialogs/HeadCleaningViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Dialogs/HeadCleaningViewVM.cs deleted file mode 100644 index 59d119f21..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Dialogs/HeadCleaningViewVM.cs +++ /dev/null @@ -1,150 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Timers; -using Tango.BL.Entities; -using Tango.Core.Commands; -using Tango.Core.DI; -using Tango.Integration.Operation; -using Tango.PMR.Printing; -using Tango.PPC.Common; -using Tango.PPC.Common.Connection; -using Tango.PPC.Common.Notifications; -using Tango.Settings; -using Tango.SharedUI; - -namespace Tango.PPC.Maintenance.Dialogs -{ - public class HeadCleaningViewVM : DialogViewVM - { - private HeadCleaningHandler _handler; - - [TangoInject] - private IMachineProvider MachineProvider { get; set; } - - [TangoInject] - private INotificationProvider NotificationProvider { get; set; } - - private bool _isStarted; - public bool IsStarted - { - get { return _isStarted; } - set { _isStarted = value; RaisePropertyChangedAuto(); } - } - - private bool _isCompleted; - public bool IsCompleted - { - get { return _isCompleted; } - set { _isCompleted = value; RaisePropertyChangedAuto(); } - } - - private bool _isAborting; - public bool IsAborting - { - get { return _isAborting; } - set { _isAborting = value; RaisePropertyChangedAuto(); } - } - - private bool _isFailed; - public bool IsFailed - { - get { return _isFailed; } - set { _isFailed = value; RaisePropertyChangedAuto(); } - } - - private StartHeadCleaningResponse _status; - public StartHeadCleaningResponse Status - { - get { return _status; } - set { _status = value; RaisePropertyChangedAuto(); } - } - - public RelayCommand StartCommand { get; set; } - public RelayCommand AbortCommand { get; set; } - - public HeadCleaningViewVM() - { - CanClose = true; - TangoIOC.Default.Inject(this); - StartCommand = new RelayCommand(Start); - AbortCommand = new RelayCommand(Abort); - } - - private async void Start() - { - try - { - CanClose = false; - IsStarted = true; - _handler = await MachineProvider.MachineOperator.PerformHeadCleaning(); - _handler.Completed += _handler_Completed; - _handler.Failed += _handler_Failed; - _handler.StatusChanged += _handler_StatusChanged; - } - catch (Exception ex) - { - _handler_Failed(this, ex); - } - } - - private void _handler_StatusChanged(object sender, HeadCleaningStatusChangedEventArgs e) - { - Status = e.Status; - } - - private void _handler_Failed(object sender, Exception e) - { - IsStarted = false; - IsFailed = true; - InvokeUI(() => - { - CanClose = true; - Cancel(); - NotificationProvider.ShowError($"Error occurred while trying to perform the head cleaning.\n{e.FlattenMessage()}"); - }); - } - - private void _handler_Completed(object sender, EventArgs e) - { - IsStarted = false; - IsCompleted = true; - InvokeUI(() => - { - Accept(); - NotificationProvider.ShowSuccess("Head cleaning completed successfully."); - }); - } - - protected override void Cancel() - { - if (CanClose) - { - base.Cancel(); - } - } - - private async void Abort() - { - IsAborting = true; - try - { - await _handler.Abort(); - CanClose = true; - Cancel(); - await NotificationProvider.ShowInfo("Head cleaning aborted."); - } - catch (Exception ex) - { - if (!IsCompleted) - { - CanClose = true; - IsAborting = false; - await NotificationProvider.ShowError($"Error occurred while trying to abort the head cleaning.\n{ex.FlattenMessage()}"); - } - } - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/GuideBase.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/GuideBase.cs deleted file mode 100644 index 438375c72..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/GuideBase.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Media.Imaging; - -namespace Tango.PPC.Maintenance -{ - public abstract class GuideBase - { - public abstract String Name { get; } - public abstract BitmapSource Icon { get; } - public abstract String Image { get; } - public abstract List Steps { get; } - - protected virtual List GetStepsFromResource(String key) - { - List list = new List(); - - var arr = (Application.Current.Resources[key] as Array); - - foreach (var item in arr) - { - list.Add(new GuideStep() - { - Text = item - }); - } - - return list; - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/GuideStep.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/GuideStep.cs deleted file mode 100644 index 71a70d9db..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/GuideStep.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.Core; - -namespace Tango.PPC.Maintenance -{ - public class GuideStep : ExtendedObject - { - public Object Text { get; set; } - - private bool _isChecked; - public bool IsChecked - { - get { return _isChecked; } - set { _isChecked = value; RaisePropertyChangedAuto(); } - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/HandleWasteCartridgeGuide.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/HandleWasteCartridgeGuide.cs deleted file mode 100644 index a4820e349..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/HandleWasteCartridgeGuide.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Media.Imaging; -using Tango.SharedUI.Helpers; - -namespace Tango.PPC.Maintenance.Guides -{ - public class HandleWasteCartridgeGuide : GuideBase - { - public override string Name => "Handling the Waste Cartridges"; - public override String Image => "../Images/Guides/Residue-Cartridges-A.gif"; - - private BitmapSource _icon; - public override BitmapSource Icon - { - get - { - if (_icon == null) - { - _icon = ResourceHelper.GetImageFromResources("Images/Guides/handling-the-waste-cartridges.png"); - } - return _icon; - } - } - - private List _steps; - public override List Steps - { - get - { - if (_steps == null) - { - _steps = GetStepsFromResource("HandleWasteCartridge"); - } - return _steps; - } - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/LoadInkCartridgeGuide.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/LoadInkCartridgeGuide.cs deleted file mode 100644 index 1a6ed8321..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/LoadInkCartridgeGuide.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Media.Imaging; -using Tango.SharedUI.Helpers; - -namespace Tango.PPC.Maintenance.Guides -{ - public class LoadInkCartridgeGuide : GuideBase - { - public override string Name => "Loading an Ink Cartridge"; - public override String Image => "../Images/Guides/Loading-an-Ink-Cartridge.gif"; - - private BitmapSource _icon; - public override BitmapSource Icon - { - get - { - if (_icon == null) - { - _icon = ResourceHelper.GetImageFromResources("Images/Guides/loading-an-ink-cartridge.png"); - } - return _icon; - } - } - - private List _steps; - public override List Steps - { - get - { - if (_steps == null) - { - _steps = GetStepsFromResource("LoadInkCartridge"); - } - return _steps; - } - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/LoadNewThreadGuide.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/LoadNewThreadGuide.cs deleted file mode 100644 index d5115a748..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/LoadNewThreadGuide.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Media.Imaging; -using Tango.SharedUI.Helpers; - -namespace Tango.PPC.Maintenance.Guides -{ - public class LoadNewThreadGuide : GuideBase - { - public override string Name => "Loading New Thread"; - public override String Image => "../Images/Guides/Loading-New-Thread.gif"; - - private BitmapSource _icon; - public override BitmapSource Icon - { - get - { - if (_icon == null) - { - _icon = ResourceHelper.GetImageFromResources("Images/Guides/loading-new-thread.png"); - } - return _icon; - } - } - - private List _steps; - public override List Steps - { - get - { - if (_steps == null) - { - _steps = GetStepsFromResource("LoadNewThread"); - } - return _steps; - } - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/ReplaceAirFilterGuide.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/ReplaceAirFilterGuide.cs deleted file mode 100644 index d335867ca..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/ReplaceAirFilterGuide.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Media.Imaging; -using Tango.SharedUI.Helpers; - -namespace Tango.PPC.Maintenance.Guides -{ - public class ReplaceAirFilterGuide : GuideBase - { - public override string Name => "Replacing the Air Filter"; - public override String Image => "../Images/Guides/Replacing-the-Air-Filter.gif"; - - private BitmapSource _icon; - public override BitmapSource Icon - { - get - { - if (_icon == null) - { - _icon = ResourceHelper.GetImageFromResources("Images/Guides/replacing-the-air-filter.png"); - } - return _icon; - } - } - - private List _steps; - public override List Steps - { - get - { - if (_steps == null) - { - _steps = GetStepsFromResource("ReplaceAirFilter"); - } - return _steps; - } - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/ReplaceThreadGuide.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/ReplaceThreadGuide.cs deleted file mode 100644 index ecc3f6026..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/ReplaceThreadGuide.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Media.Imaging; -using Tango.SharedUI.Helpers; - -namespace Tango.PPC.Maintenance.Guides -{ - public class ReplaceThreadGuide : GuideBase - { - public override string Name => "Replacing the Thread"; - public override String Image => "../Images/Guides/Replacing-the-Thread.gif"; - - private BitmapSource _icon; - public override BitmapSource Icon - { - get - { - if (_icon == null) - { - _icon = ResourceHelper.GetImageFromResources("Images/Guides/replacing-the-thread.png"); - } - return _icon; - } - } - - private List _steps; - public override List Steps - { - get - { - if (_steps == null) - { - _steps = GetStepsFromResource("ReplaceThread"); - } - return _steps; - } - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Helpers/GuideHelper.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Helpers/GuideHelper.cs deleted file mode 100644 index 32518974d..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Helpers/GuideHelper.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; - -namespace Tango.PPC.Maintenance.Helpers -{ - public static class GuideHelper - { - public static List CreateAllGuides() - { - var resource = new ResourceDictionary - { - Source = new Uri("/Tango.PPC.Maintenance;component/Resources/Guides.xaml", UriKind.RelativeOrAbsolute) - }; - - Application.Current.Resources.MergedDictionaries.Add(resource); - - List guides = new List(); - - var callingAssembly = typeof(GuideHelper).Assembly; - - foreach (var guideType in callingAssembly.DefinedTypes.Where(x => x.Namespace == "Tango.PPC.Maintenance.Guides")) - { - guides.Add(Activator.CreateInstance(guideType) as GuideBase); - } - - return guides; - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Loading-New-Thread.gif b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Loading-New-Thread.gif deleted file mode 100644 index b6a974084..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Loading-New-Thread.gif and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Loading-an-Ink-Cartridge.gif b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Loading-an-Ink-Cartridge.gif deleted file mode 100644 index 7087ebc64..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Loading-an-Ink-Cartridge.gif and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Replacing-the-Air-Filter.gif b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Replacing-the-Air-Filter.gif deleted file mode 100644 index 023adb4a9..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Replacing-the-Air-Filter.gif and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Replacing-the-Thread.gif b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Replacing-the-Thread.gif deleted file mode 100644 index 8ab544d8b..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Replacing-the-Thread.gif and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Residue-Cartridges-A.gif b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Residue-Cartridges-A.gif deleted file mode 100644 index c310820b4..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Residue-Cartridges-A.gif and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/handling-the-waste-cartridges.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/handling-the-waste-cartridges.png deleted file mode 100644 index 188e881bb..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/handling-the-waste-cartridges.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/loading-an-ink-cartridge.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/loading-an-ink-cartridge.png deleted file mode 100644 index 4f4dfc375..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/loading-an-ink-cartridge.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/loading-new-thread.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/loading-new-thread.png deleted file mode 100644 index 1f508261b..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/loading-new-thread.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/machine-image.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/machine-image.png deleted file mode 100644 index 277599070..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/machine-image.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/replacing-the-air-filter.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/replacing-the-air-filter.png deleted file mode 100644 index eb8f518a3..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/replacing-the-air-filter.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/replacing-the-thread.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/replacing-the-thread.png deleted file mode 100644 index e858c3075..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/replacing-the-thread.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Waste/absent.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Waste/absent.png deleted file mode 100644 index 8fc4e1b33..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Waste/absent.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Waste/present_empty_error.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Waste/present_empty_error.png deleted file mode 100644 index ff2411eb5..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Waste/present_empty_error.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Waste/present_empty_right.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Waste/present_empty_right.png deleted file mode 100644 index 08b9a7076..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Waste/present_empty_right.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Waste/present_full_right.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Waste/present_full_right.png deleted file mode 100644 index a39b6f073..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Waste/present_full_right.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/action.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/action.png deleted file mode 100644 index 6d14ec5dc..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/action.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/cl-full.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/cl-full.png deleted file mode 100644 index 5aaea8e6c..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/cl-full.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/cone-empty.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/cone-empty.png deleted file mode 100644 index 17c3225ed..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/cone-empty.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/cone-full.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/cone-full.png deleted file mode 100644 index b4ed45d1e..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/cone-full.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/guides.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/guides.png deleted file mode 100644 index 13b9013d7..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/guides.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/head_cleaning.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/head_cleaning.png deleted file mode 100644 index 373cb78c1..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/head_cleaning.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/inks.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/inks.png deleted file mode 100644 index 3872a77e4..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/inks.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/l-full.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/l-full.png deleted file mode 100644 index 2607f4a26..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/l-full.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/lubricant2.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/lubricant2.png deleted file mode 100644 index 554c16305..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/lubricant2.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/maintenance.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/maintenance.png deleted file mode 100644 index 526284750..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/maintenance.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/status.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/status.png deleted file mode 100644 index 0cc205a6c..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/status.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/temperature-green.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/temperature-green.png deleted file mode 100644 index f67323dde..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/temperature-green.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/temperature-red.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/temperature-red.png deleted file mode 100644 index 5e6b505a3..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/temperature-red.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/temperature-yellow.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/temperature-yellow.png deleted file mode 100644 index 359e93d6d..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/temperature-yellow.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/thread_loading.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/thread_loading.png deleted file mode 100644 index 5d536e7ae..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/thread_loading.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/MaintenanceCommand.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/MaintenanceCommand.cs deleted file mode 100644 index 5c74d92cd..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/MaintenanceCommand.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.Core; -using Tango.Core.Commands; -using Tango.Core.DI; -using Tango.Integration.Operation; -using Tango.PPC.Common.Connection; -using Tango.PPC.Common.Notifications; - -namespace Tango.PPC.Maintenance -{ - public abstract class MaintenanceCommand : ExtendedObject - { - private IMachineProvider _machineProvider; - [TangoInject(Mode = TangoInjectMode.WhenAvailable)] - protected IMachineProvider MachineProvider - { - get { return _machineProvider; } - set - { - _machineProvider = value; RaisePropertyChangedAuto(); - _machineProvider.MachineOperator.StatusChanged += MachineOperator_StatusChanged; - } - } - - [TangoInject(Mode = TangoInjectMode.WhenAvailable)] - protected INotificationProvider NotificationProvider { get; set; } - - private RelayCommand _command; - public RelayCommand Command - { - get { return _command; } - set { _command = value; RaisePropertyChangedAuto(); } - } - - private bool _isEnabled; - public bool IsEnabled - { - get { return _isEnabled; } - set { _isEnabled = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); } - } - - private T _state; - public T State - { - get { return _state; } - set { _state = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); } - } - - private void MachineOperator_StatusChanged(object sender, MachineStatuses e) - { - InvalidateRelayCommands(); - } - - public MaintenanceCommand() - { - TangoIOC.Default.Inject(this); - IsEnabled = true; - Command = new RelayCommand(Execute, CanExecute); - } - - protected virtual bool CanExecute() - { - if (!IsEnabled) return false; - if (MachineProvider == null) return false; - if (!MachineProvider.MachineOperator.CanPrint) return false; - - return true; - } - - private void Execute() - { - OnExecute(); - } - - protected abstract void OnExecute(); - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/MaintenanceModule.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/MaintenanceModule.cs deleted file mode 100644 index 18871ac78..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/MaintenanceModule.cs +++ /dev/null @@ -1,84 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Media.Imaging; -using Tango.BL.Enumerations; -using Tango.PPC.Common; -using Tango.PPC.Maintenance.Views; -using Tango.SharedUI.Helpers; - -namespace Tango.PPC.Maintenance -{ - /// - /// Represents a PPC . - /// - /// - [PPCModule(3)] - public class MaintenanceModule : PPCModuleBase - { - /// - /// Gets the module name. - /// - public override string Name - { - get - { - return "Maintenance"; - } - } - - /// - /// Gets the module description. - /// - public override string Description - { - get - { - return "PPC maintenance module."; - } - } - - /// - /// Gets the module cover image. - /// - public override BitmapSource Image - { - get - { - return ResourceHelper.GetImageFromResources("Images/maintenance.png"); - } - } - - /// - /// Gets the module entry point view type. - /// - public override Type MainViewType - { - get - { - return typeof(MainView); - } - } - - /// - /// Gets the permission required to see and load this module. - /// - public override Permissions Permission - { - get - { - return Permissions.RunPPC; - } - } - - /// - /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - /// - public override void Dispose() - { - //Dispose module here... - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Models/MidTankLevelModel.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Models/MidTankLevelModel.cs deleted file mode 100644 index 93af310ba..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Models/MidTankLevelModel.cs +++ /dev/null @@ -1,35 +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; -using Tango.Integration.Operation; - -namespace Tango.PPC.Maintenance.Models -{ - public class MidTankLevelModel : ExtendedObject - { - public double Max { get; set; } - - private double _level; - public double Level - { - get { return _level; } - set { _level = value; RaisePropertyChangedAuto(); RaisePropertyChanged(nameof(IsLow)); RaisePropertyChanged(nameof(IsEmpty)); } - } - - public bool IsLow - { - get { return Level <= MachineOperator.LOW_MIDTANK_LITERS; } - } - - public bool IsEmpty - { - get { return Level <= MachineOperator.EMPTY_MIDTANK_LITERS; } - } - - public IdsPack IDSPack { get; set; } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Models/OverallTemperatureModel.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Models/OverallTemperatureModel.cs deleted file mode 100644 index 694071d0d..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Models/OverallTemperatureModel.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.Core; -using Tango.Integration.Operation; - -namespace Tango.PPC.Maintenance.Models -{ - public class OverallTemperatureModel : ExtendedObject - { - private double _temperature; - public double Temperature - { - get { return _temperature; } - set { _temperature = value; RaisePropertyChangedAuto(); RaisePropertyChanged(nameof(IsWarning)); RaisePropertyChanged(nameof(IsError)); } - } - - public bool IsWarning - { - get { return Temperature > MachineOperator.OVERALL_TEMPERATURE_WARNING; } - } - - public bool IsError - { - get { return Temperature >= MachineOperator.OVERALL_TEMPERATURE_ERROR; } - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/AssemblyInfo.cs deleted file mode 100644 index 52774bee8..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Reflection; -using System.Resources; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Windows; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Tango Module")] -[assembly: AssemblyVersion("2.0.1.1407")] - -[assembly: ThemeInfo( - ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located - //(used if a resource is not found in the page, - // or application resource dictionaries) - ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located - //(used if a resource is not found in the page, - // app, or any theme specific resource dictionaries) -)] diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/Resources.Designer.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/Resources.Designer.cs deleted file mode 100644 index 003dc17e5..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/Resources.Designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Tango.PPC.Maintenance.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.PPC.Maintenance.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/Resources.resx b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/Resources.resx deleted file mode 100644 index af7dbebba..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/Settings.Designer.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/Settings.Designer.cs deleted file mode 100644 index 7b549e7b7..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/Settings.Designer.cs +++ /dev/null @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Tango.PPC.Maintenance.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.8.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { - return defaultInstance; - } - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/Settings.settings b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/Settings.settings deleted file mode 100644 index 033d7a5e9..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Resources/Guides.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Resources/Guides.xaml deleted file mode 100644 index 24e1e0d71..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Resources/Guides.xaml +++ /dev/null @@ -1,60 +0,0 @@ - - - - 1. Loading New Thread - 2. Wait for a message indicating the system is ready to load the thread - 3. Place a cone with un-dyed thread into the thread feeding unit - 4. Feed the thread along the thread groove to the winder - 5. Place an empty collecting cone into the thread winder - 6. Insert the end of the thread into the empty collecting cone - 7. On the TS-1800 panel, press LOAD again - - - - 1. On the TS-1800 panel, press LOAD - 2. Wait for a message indicating the system is ready to load the thread - 3. Place a cone with un-dyed thread into the thread feeding unit - 4. Feed the tread along the feeding path up to the top cover - 5. Feed the thread along the thread groove to the winder - 6. Place an empty collecting cone into the thread winder - 7. Insert the end of the thread into the empty collecting cone - 8. On the TS-1800 panel, press LOAD again - - - - 1. Cut the current thread just after the feeding cone - 2. Remove the current feeding cone - 3. Place the new feeding cone into the thread feeding unit - 4. Tie the new thread to the current thread - 5. Cut off the ends of the thread leaving a small knot - 6. On the TS-1800 panel, press and hold the JOG button - 7. Hold the JOG button until the knot appears at the collecting cone - 8. Cut the thread at the collecting cone after the knot - 9. Remove the collecting cone - 10. Place an empty collecting cone into the winder - 11. Insert the end of the new thread into the empty collecting cone - - - - 1. Open the air filter cover - 2. Remove the old air filter - 3. Insert a new air filter - 4. Close the air filter cover - - - - 1. Open the cartridge cover - 2. Insert a full ink cartridge into the ink-loading slot - 3. Close the cartridge cover - 4. When ink loading is complete, open the cartridge cover - 5. Remove the empty ink cartridge - 6. Remove the stopper from the residue-filling opening - 7. Place the stopper into its allocated position on the top side of the empty ink cartridge - 8. Put the empty ink cartridge into storage. Optional: if an empty recycling slot is available - 9. Insert the empty ink cartridge into the slot for ink recycling - - - \ No newline at end of file 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 deleted file mode 100644 index 9dd45add4..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Tango.PPC.Maintenance.csproj +++ /dev/null @@ -1,320 +0,0 @@ - - - - - Debug - AnyCPU - {011470AC-6BD6-4366-B5F2-C82C065D4A84} - library - Tango.PPC.Maintenance - Tango.PPC.Maintenance - v4.6.1 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - - - - true - full - false - ..\..\..\Build\PPC\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - ..\..\..\Build\PPC\Release\ - TRACE - prompt - 4 - - - - ..\..\..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll - - - ..\..\..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll - - - ..\..\..\packages\FontAwesome.WPF.4.7.0.9\lib\net40\FontAwesome.WPF.dll - - - ..\..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll - - - ..\..\..\packages\Ionic.Zip.1.9.1.8\lib\Ionic.Zip.dll - - - - - - ..\..\..\packages\System.Reactive.Core.3.1.1\lib\net46\System.Reactive.Core.dll - - - ..\..\..\packages\System.Reactive.Interfaces.3.1.1\lib\net45\System.Reactive.Interfaces.dll - - - ..\..\..\packages\System.Reactive.Linq.3.1.1\lib\net46\System.Reactive.Linq.dll - - - ..\..\..\packages\Expression.Blend.Sdk.1.0.2\lib\net45\System.Windows.Interactivity.dll - - - - - - - - - 4.0 - - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - - - GlobalVersionInfo.cs - - - - - - - - - - - - - - CleanerDispensingView.xaml - - - HeadCleaningView.xaml - - - - - - - - - - - - - - - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - - - GeneralGuideView.xaml - - - MaintenanceView.xaml - - - MainView.xaml - - - ResXFileCodeGenerator - Resources.Designer.cs - - - Designer - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - {f441feee-322a-4943-b566-110e12fd3b72} - Tango.BL - - - {a34ee0f0-649d-41c8-8489-b6f1cc6924ee} - Tango.Core - - - {b112d89a-a106-41ae-a0c1-4abc84c477f5} - Tango.DragAndDrop - - - {4399af76-db52-4cfb-8020-6f85bdb29fd5} - Tango.Explorer - - - {4206ac58-3b57-4699-8835-90bf6db01a61} - Tango.Integration - - - {bc932dbd-7cdb-488c-99e4-f02cf441f55e} - Tango.Logging - - - {e4927038-348d-4295-aaf4-861c58cb3943} - Tango.PMR - - - {d8f1ad85-526a-4f50-b6dc-d437af63d8d8} - Tango.Settings - - - {8491d07b-c1f6-4b62-a412-41b9fd2d6538} - Tango.SharedUI - - - {fd86424c-6e84-491b-8df9-3d0f5c236a2a} - Tango.Touch - - - {74e700b0-1156-4126-be40-ee450d3c3026} - Tango.Transport - - - {0be74eee-22cb-4dba-b896-793b9e1a3ac0} - Tango.PPC.Common - - - {04febb02-f782-4b96-b47d-f6902afa43be} - Tango.PPC.Storage - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Themes/Generic.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Themes/Generic.xaml deleted file mode 100644 index a77cc2281..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Themes/Generic.xaml +++ /dev/null @@ -1,9 +0,0 @@ - - - - \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModelLocator.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModelLocator.cs deleted file mode 100644 index 1db63a9e4..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModelLocator.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.Core.DI; -using Tango.PPC.Maintenance.ViewModels; - -namespace Tango.PPC.Maintenance -{ - public static class ViewModelLocator - { - /// - /// Initializes a new instance of the ViewModelLocator class. - /// - static ViewModelLocator() - { - TangoIOC.Default.Register(); - TangoIOC.Default.Register(); - TangoIOC.Default.Register(); - } - - /// - /// Gets the main view VM. - /// - public static MainViewVM MainViewVM - { - get - { - return TangoIOC.Default.GetInstance(); - } - } - - /// - /// Gets the maintenance view VM. - /// - public static MaintenanceViewVM MaintenanceViewVM - { - get - { - return TangoIOC.Default.GetInstance(); - } - } - - /// - /// Gets the general guide view VM. - /// - public static GeneralGuideViewVM GeneralGuideViewVM - { - get - { - return TangoIOC.Default.GetInstance(); - } - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/GeneralGuideViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/GeneralGuideViewVM.cs deleted file mode 100644 index fd0475817..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/GeneralGuideViewVM.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.PPC.Common; -using Tango.PPC.Common.Navigation; - -namespace Tango.PPC.Maintenance.ViewModels -{ - public class GeneralGuideViewVM : PPCViewModel, INavigationObjectReceiver - { - private DateTime _lastTime; - - private GuideBase _guide; - public GuideBase Guide - { - get { return _guide; } - set { _guide = value; RaisePropertyChangedAuto(); } - } - - - public override void OnApplicationStarted() - { - _lastTime = DateTime.Now; - } - - public void OnNavigatedToWithObject(GuideBase guide) - { - if (Guide != guide || (DateTime.Now - _lastTime) > TimeSpan.FromHours(1)) - { - guide.Steps.ForEach(x => x.IsChecked = false); - } - - Guide = guide; - - _lastTime = DateTime.Now; - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MainViewVM.cs deleted file mode 100644 index a614f7be2..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MainViewVM.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.PPC.Common; -using Tango.PPC.Maintenance.Views; - -namespace Tango.PPC.Maintenance.ViewModels -{ - /// - /// Represents the main view VM and entry point for . - /// - /// - public class MainViewVM : PPCViewModel - { - /// - /// Called when the application has been started - /// - public override void OnApplicationStarted() - { - //Start initializing here rather then in the constructor. - } - - public override void OnNavigatedTo() - { - base.OnNavigatedTo(); - NavigationManager.NavigateTo(nameof(MaintenanceView), false); - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MaintenanceViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MaintenanceViewVM.cs deleted file mode 100644 index c0dc61150..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MaintenanceViewVM.cs +++ /dev/null @@ -1,324 +0,0 @@ -using Ionic.Zip; -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Data.Entity; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.BL; -using Tango.Core; -using Tango.Core.Commands; -using Tango.Explorer; -using Tango.Integration.Operation; -using Tango.Logging; -using Tango.PMR.Diagnostics; -using Tango.PMR.IFS; -using Tango.PMR.MachineStatus; -using Tango.PPC.Common; -using Tango.PPC.Maintenance.Commands; -using Tango.PPC.Maintenance.Dialogs; -using Tango.PPC.Maintenance.Helpers; -using Tango.PPC.Maintenance.Models; -using Tango.PPC.Maintenance.Views; -using Tango.PPC.Storage; - -namespace Tango.PPC.Maintenance.ViewModels -{ - public class MaintenanceViewVM : PPCViewModel - { - public class WasteStateModel : ExtendedObject - { - private CartridgeState _state; - public CartridgeState State - { - get { return _state; } - set { _state = value; RaisePropertyChangedAuto(); } - } - - public CartridgeSlot Slot { get; set; } - } - - public ObservableCollection Guides { get; set; } - - public RelayCommand OpenGuideCommand { get; set; } - - private List _midTankLevels; - public List MidTankLevels - { - get { return _midTankLevels; } - set { _midTankLevels = value; RaisePropertyChangedAuto(); } - } - - private OverallTemperatureModel _overallTemperature; - public OverallTemperatureModel OverallTemperature - { - get { return _overallTemperature; } - set { _overallTemperature = value; RaisePropertyChangedAuto(); } - } - - private String _totalDyeTime; - public String TotalDyeTime - { - get { return _totalDyeTime; } - set { _totalDyeTime = value; RaisePropertyChangedAuto(); } - } - - private String _totalDyeMeters; - public String TotalDyeMeters - { - get { return _totalDyeMeters; } - set { _totalDyeMeters = value; RaisePropertyChangedAuto(); } - } - - private SpoolState _spoolState; - public SpoolState SpoolState - { - get { return _spoolState; } - set - { - if (_spoolState != value) - { - _spoolState = value; - RaisePropertyChangedAuto(); - } - } - } - - private List _wasteStates; - public List WasteStates - { - get { return _wasteStates; } - set { _wasteStates = value; RaisePropertyChangedAuto(); } - } - - public RelayCommand ExportLogsCommand { get; set; } - - public OpenCloseDyeingHeadCommand OpenCloseDyeingHeadCommand { get; set; } - - public OpenCloseLeftLeadingWheelsCommand OpenCloseLeftLeadingWheelsCommand { get; set; } - - public OpenCloseRightLeadingWheelsCommand OpenCloseRightLeadingWheelsCommand { get; set; } - - public ResetThreadLoadingCommand ResetThreadLoadingCommand { get; set; } - - public RelayCommand HeadCleaningCommand { get; set; } - - public RelayCommand StartThreadLoadingCommand { get; set; } - - public RelayCommand StartThreadBreakCommand { get; set; } - - public RelayCommand DispenseCleanerLiquidCommand { get; set; } - - public MaintenanceViewVM() - { - Guides = new ObservableCollection(GuideHelper.CreateAllGuides()); - OverallTemperature = new OverallTemperatureModel(); - - OpenGuideCommand = new RelayCommand(OpenGuide); - ExportLogsCommand = new RelayCommand(ExportLogsToStorage); - - OpenCloseDyeingHeadCommand = new OpenCloseDyeingHeadCommand(); - OpenCloseLeftLeadingWheelsCommand = new OpenCloseLeftLeadingWheelsCommand(); - OpenCloseRightLeadingWheelsCommand = new OpenCloseRightLeadingWheelsCommand(); - ResetThreadLoadingCommand = new ResetThreadLoadingCommand(); - HeadCleaningCommand = new RelayCommand(PerformHeadCleaning, () => MachineProvider.MachineOperator.CanPrint); - StartThreadLoadingCommand = new RelayCommand(StartThreadLoadingWizard, () => MachineProvider.MachineOperator.CanPrint); - StartThreadBreakCommand = new RelayCommand(StartThreadBreakWizard, () => MachineProvider.MachineOperator.CanPrint); - - WasteStates = new List() - { - new WasteStateModel() { Slot = CartridgeSlot.WasteMiddle, State = CartridgeState.Absent }, - new WasteStateModel() { Slot = CartridgeSlot.WasteLower, State = CartridgeState.Absent } - }; - } - - public override void OnApplicationStarted() - { - MachineProvider.MachineOperator.InkFillingStatusChanged += MachineOperator_InkFillingStatusChanged; - MachineProvider.MachineOperator.MachineStatusChanged += MachineOperator_MachineStatusChanged; - MachineProvider.MachineOperator.MachineEventsStateProvider.EventsChanged += MachineEventsStateProvider_EventsChanged; - - DispenseCleanerLiquidCommand = new RelayCommand(DispenseCleanerLiquid, () => - { - if (MachineProvider.Machine.MachineHeadType == BL.Enumerations.HeadTypes.Arc) - { - return MachineProvider.MachineOperator.MachineEventsStateProvider.Events.Any(x => x.Type == BL.Enumerations.EventTypes.DYEING_HEAD_ARC_LID_IS_OPEN); - } - else - { - return MachineProvider.MachineOperator.MachineEventsStateProvider.Events.Any(x => x.Type == BL.Enumerations.EventTypes.DYEING_HEAD_COVER_IS_OPEN); - } - }); - - RaisePropertyChanged(nameof(DispenseCleanerLiquidCommand)); - } - - public override void OnApplicationReady() - { - base.OnApplicationReady(); - - MidTankLevels = MachineProvider.Machine.Configuration.NoneEmptyIdsPacks.OrderBy(x => x.PackIndex).Select(x => new MidTankLevelModel() - { - Max = MachineOperator.MAX_MIDTANK_LITERS, - IDSPack = x, - }).OrderBy(y => y.IDSPack.LiquidType.Code).ToList(); - } - - private void MachineEventsStateProvider_EventsChanged(object sender, IEnumerable e) - { - OpenCloseDyeingHeadCommand.IsEnabled = !e.Any(x => x.Type == BL.Enumerations.EventTypes.DRYER_DOOR_OPEN); - - InvokeUI(() => - { - DispenseCleanerLiquidCommand.RaiseCanExecuteChanged(); - }); - } - - private void MachineOperator_MachineStatusChanged(object sender, MachineStatus status) - { - UpdateMidTankLevels(status); - OverallTemperature.Temperature = status.OverallTemperature; - SpoolState = status.SpoolState; - InvalidateRelayCommands(); - } - - private void MachineOperator_InkFillingStatusChanged(object sender, InkFillingStatusChangedEventArgs e) - { - foreach (var cartridge in e.Status.CartridgesStatuses.Where(x => x.Cartridge.Slot != CartridgeSlot.Ink)) - { - var wasteState = WasteStates.SingleOrDefault(x => x.Slot == cartridge.Cartridge.Slot); - - if (wasteState != null) - { - wasteState.State = cartridge.State; - } - } - } - - public async void OpenGuide(GuideBase guide) - { - await NavigationManager.NavigateWithObject(guide); - } - - private void UpdateMidTankLevels(MachineStatus status) - { - if (IsVisible) - { - foreach (var item in status.IDSPacksLevels) - { - var model = MidTankLevels.SingleOrDefault(x => x.IDSPack.PackIndex == item.Index); - - if (model != null) - { - model.Level = item.MidTankLevel; - } - } - } - } - - private async void ExportLogsToStorage() - { - var result = await NavigationManager. - NavigateForResult( - new Storage.Models.StorageNavigationRequest() - { - Intent = Storage.Models.StorageNavigationIntent.SaveFile, - DefaultFileName = $"Tango-Logs-{DateTime.Now.ToFileName()}", - Filter = "do not display anything", - Title = "Export System Logs", - }); - - if (result != null) - { - String file = result.Path + ".zip"; - - IsFree = false; - - try - { - NotificationProvider.SetGlobalBusyMessage("Exporting system logs..."); - - var appFileLogger = LogManager.RegisteredLoggers.FirstOrDefault(x => x is FileLogger) as FileLogger; - - await Task.Factory.StartNew(() => - { - using (ZipFile zip = new ZipFile(file)) - { - zip.Password = "1Creativity"; - - if (appFileLogger != null) - { - zip.AddDirectory(appFileLogger.Folder); - } - - zip.ParallelDeflateThreshold = -1; - zip.Save(); - } - }); - - NotificationProvider.ReleaseGlobalBusyMessage(); - - await NotificationProvider.ShowSuccess("System logs exported successfully."); - } - catch (Exception ex) - { - NotificationProvider.ReleaseGlobalBusyMessage(); - LogManager.Log(ex, "Error exporting system logs."); - await NotificationProvider.ShowError($"An error occurred while trying to export the system logs.\n{ex.FlattenMessage()}"); - } - finally - { - NotificationProvider.ReleaseGlobalBusyMessage(); - IsFree = true; - } - } - } - - public async override void OnNavigatedTo() - { - base.OnNavigatedTo(); - - try - { - using (ObservablesContext db = ObservablesContext.CreateDefault()) - { - var jobRuns = await db.JobRuns.Select(x => new { x.StartDate, x.EndDate, x.EndPosition }).ToListAsync(); - - TotalDyeTime = TimeSpan.FromHours(jobRuns.Select(x => x.EndDate - x.StartDate).Sum(x => x.TotalHours)).ToStringUnlimitedHours(); - - int meters = (int)jobRuns.Select(x => x.EndPosition).Sum(); - TotalDyeMeters = $"{meters.ToString("N0")} meters"; - } - } - catch (Exception ex) - { - LogManager.Log(ex, "Error loading machine counters."); - TotalDyeTime = "error!"; - TotalDyeMeters = "error!"; - } - } - - private async void PerformHeadCleaning() - { - await NotificationProvider.ShowDialog(); - } - - private void StartThreadLoadingWizard() - { - ThreadLoadingService.StartThreadLoadingWizard(); - } - - private void StartThreadBreakWizard() - { - ThreadLoadingService.StartThreadBreakWizard(); - } - - private async void DispenseCleanerLiquid() - { - await NotificationProvider.ShowDialog(); - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/GeneralGuideView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/GeneralGuideView.xaml deleted file mode 100644 index ecff03b58..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/GeneralGuideView.xaml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/GeneralGuideView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/GeneralGuideView.xaml.cs deleted file mode 100644 index 10b5337ce..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/GeneralGuideView.xaml.cs +++ /dev/null @@ -1,33 +0,0 @@ -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.Maintenance.Views -{ - /// - /// Interaction logic for GeneralGuideView.xaml - /// - public partial class GeneralGuideView : UserControl - { - public GeneralGuideView() - { - InitializeComponent(); - } - - private void TouchCheckBox_Loaded(object sender, RoutedEventArgs e) - { - - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MainView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MainView.xaml deleted file mode 100644 index be6161952..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MainView.xaml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MainView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MainView.xaml.cs deleted file mode 100644 index f859c9524..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MainView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -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.Maintenance.Views -{ - /// - /// Interaction logic for MainView.xaml - /// - public partial class MainView : UserControl - { - public MainView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml deleted file mode 100644 index d00b4abb2..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml +++ /dev/null @@ -1,341 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Maintenance - - - - - - - - - - - - Current Status - - - - - - - - - - - - - - - - - - - - - - - - º - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Temperature - Inks - Collecting Cone - Waste - - - - - - - - - - - Actions - - - - - - - - - - - - - - - - - - - - - RUN HEAD CLEANING - - DISPENSE CLEANING LIQUID - - EXPORT SYSTEM LOGS - - - - - - - - - - - Thread Loading - - - - - - THREAD BREAK WIZARD - - - This wizard will help you resolve thread breaking issues - - - - - THREAD LOADING WIZARD - - - This wizard will help you load a new thread in to the system - - - - RESET THREAD LOADING - - - - - - - - - - - Guides - - - - - - - - - - - - - - - - - - - - - - - - - Total Dyeing Time: - - - - - Total Dyed Length: - - - - - - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml.cs deleted file mode 100644 index 8fb9bd7ca..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml.cs +++ /dev/null @@ -1,30 +0,0 @@ -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.Integration.Operation; -using Tango.PPC.Maintenance.Models; - -namespace Tango.PPC.Maintenance.Views -{ - /// - /// Interaction logic for MainView.xaml - /// - public partial class MaintenanceView : UserControl - { - public MaintenanceView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/app.config b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/app.config deleted file mode 100644 index 1e22e6a88..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/app.config +++ /dev/null @@ -1,61 +0,0 @@ - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/packages.config b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/packages.config deleted file mode 100644 index 468d4f366..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/packages.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Models/StorageNavigationIntent.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Models/StorageNavigationIntent.cs index 3ec14cc6f..2c2a7f10d 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Models/StorageNavigationIntent.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Models/StorageNavigationIntent.cs @@ -9,8 +9,6 @@ namespace Tango.PPC.Storage.Models public enum StorageNavigationIntent { LoadFile, - LoadFiles, - SaveFile, - SaveFiles + SaveFile } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/StorageModule.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/StorageModule.cs index 8bbeb4fe2..b3553e666 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/StorageModule.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/StorageModule.cs @@ -15,7 +15,7 @@ namespace Tango.PPC.Storage /// Represents a PPC . /// /// - [PPCModule(5)] + [PPCModule(3)] public class StorageModule : PPCModuleBase { /// diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/ViewModels/MainViewVM.cs index 9b22fcdb5..4a756e7ea 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/ViewModels/MainViewVM.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -22,6 +21,7 @@ namespace Tango.PPC.Storage.ViewModels { private bool _allow_exit; private ExplorerFileItem _selectedItem; + private static char[] _invalidChars = System.IO.Path.GetInvalidFileNameChars(); private String _currentPath; public String CurrentPath @@ -63,28 +63,15 @@ namespace Tango.PPC.Storage.ViewModels } } - private bool _displayItems; - public bool DisplayItems - { - get { return _displayItems; } - set { _displayItems = value; RaisePropertyChangedAuto(); } - } - public RelayCommand FileSelectedCommand { get; set; } - public ObservableCollection SelectedItems { get; set; } - public RelayCommand SaveCommand { get; set; } - public RelayCommand OpenCommand { get; set; } - public MainViewVM() { - SelectedItems = new ObservableCollection(); FileSelectedCommand = new RelayCommand(OnFileSelected); - SaveCommand = new RelayCommand(OnSaveCommand, (x) => !String.IsNullOrWhiteSpace(FileName) || Request.Intent == StorageNavigationIntent.SaveFiles); - Request = new StorageNavigationRequest() { Intent = StorageNavigationIntent.LoadFiles }; - OpenCommand = new RelayCommand(OnOpenCommand, () => Request.Intent == StorageNavigationIntent.LoadFiles); + SaveCommand = new RelayCommand(OnSaveCommand, (x) => !String.IsNullOrWhiteSpace(FileName)); + Request = new StorageNavigationRequest(); } public override void OnApplicationStarted() @@ -117,8 +104,6 @@ namespace Tango.PPC.Storage.ViewModels { View.EditFileName(); } - - DisplayItems = true; } else { @@ -131,9 +116,7 @@ namespace Tango.PPC.Storage.ViewModels public override void OnNavigatedFrom() { base.OnNavigatedFrom(); - DisplayItems = false; - Request = null; - Request = new StorageNavigationRequest() { Intent = StorageNavigationIntent.LoadFiles }; + Request = new StorageNavigationRequest(); } /// @@ -175,6 +158,7 @@ namespace Tango.PPC.Storage.ViewModels { if (_allow_exit || CurrentPath == StorageProvider.Drive.RootDirectory.FullName) { + Request = null; return Task.FromResult(true); } else @@ -185,18 +169,10 @@ namespace Tango.PPC.Storage.ViewModels } private async void OnFileSelected(ExplorerFileItem fileItem) - { - _selectedItem = fileItem; - _allow_exit = true; - await NavigationManager.NavigateBack(); - StorageProvider.SubmitFileSelection(new List() { fileItem }); - } - - private async void OnOpenCommand() { _allow_exit = true; await NavigationManager.NavigateBack(); - StorageProvider.SubmitFileSelection(SelectedItems.ToList()); + StorageProvider.SubmitFileSelection(fileItem); } public ExplorerFileItem GetNavigationResult() @@ -211,23 +187,10 @@ namespace Tango.PPC.Storage.ViewModels private void OnSaveCommand() { - _allow_exit = true; - - if (Request.Intent == StorageNavigationIntent.SaveFile) - { - _selectedItem = new ExplorerFileItem() - { - Path = CurrentPath + "\\" + FileName, - }; - } - else if (Request.Intent == StorageNavigationIntent.SaveFiles) + _selectedItem = new ExplorerFileItem() { - _selectedItem = new ExplorerFileItem() - { - Path = CurrentPath, - }; - } - + Path = CurrentPath + "\\" + FileName, + }; NavigationManager.NavigateBack(); } @@ -237,7 +200,10 @@ namespace Tango.PPC.Storage.ViewModels if (text != null) { - text = text.ToValidFileName(); + foreach (var c in _invalidChars) + { + text = text.Replace(c.ToString(), ""); + } _fileName = text; RaisePropertyChanged(nameof(FileName)); diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Views/MainView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Views/MainView.xaml index c57735a7b..74307c9ce 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Views/MainView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Views/MainView.xaml @@ -16,7 +16,7 @@ - + @@ -32,89 +32,31 @@ - - - - - - - - - - OPEN - - - - - - files selected - - - - - - - - - - - + + - + SAVE - - - Select destination folder - + - + diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/EmbeddedLogItemDetailsView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/EmbeddedLogItemDetailsView.xaml deleted file mode 100644 index 25227fc60..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/EmbeddedLogItemDetailsView.xaml +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CLOSE - - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/EmbeddedLogItemDetailsView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/EmbeddedLogItemDetailsView.xaml.cs deleted file mode 100644 index 83ec6d362..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/EmbeddedLogItemDetailsView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -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.Technician.Dialogs -{ - /// - /// Interaction logic for LogItemDetailsView.xaml - /// - public partial class EmbeddedLogItemDetailsView : UserControl - { - public EmbeddedLogItemDetailsView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/EmbeddedLogItemDetailsViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/EmbeddedLogItemDetailsViewVM.cs deleted file mode 100644 index 8dc745263..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/EmbeddedLogItemDetailsViewVM.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.Integration.Logging; -using Tango.Logging; -using Tango.SharedUI; - -namespace Tango.PPC.Technician.Dialogs -{ - public class EmbeddedLogItemDetailsViewVM : DialogViewVM - { - private EmbeddedLogItem _log; - public EmbeddedLogItem Log - { - get { return _log; } - set { _log = value; RaisePropertyChangedAuto(); } - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsView.xaml deleted file mode 100644 index 37fa8b05c..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsView.xaml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CLOSE - - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsView.xaml.cs deleted file mode 100644 index 40f7a536c..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -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.Technician.Dialogs -{ - /// - /// Interaction logic for LogItemDetailsView.xaml - /// - public partial class SynchronizationDetailsView : UserControl - { - public SynchronizationDetailsView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsViewVM.cs deleted file mode 100644 index 392c8dd3a..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsViewVM.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.BL.Entities; -using Tango.Logging; -using Tango.PPC.Common.Synchronization; -using Tango.SharedUI; - -namespace Tango.PPC.Technician.Dialogs -{ - public class SynchronizationDetailsViewVM : DialogViewVM - { - private SynchronizationStatus _status; - public SynchronizationStatus Status - { - get { return _status; } - set { _status = value; RaisePropertyChangedAuto(); } - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsView.xaml deleted file mode 100644 index ccf2062c1..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsView.xaml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CLOSE - - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsView.xaml.cs deleted file mode 100644 index f2a06aedf..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -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.Technician.Dialogs -{ - /// - /// Interaction logic for LogItemDetailsView.xaml - /// - public partial class UpdateDetailsView : UserControl - { - public UpdateDetailsView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsViewVM.cs deleted file mode 100644 index 36c0fc6d7..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsViewVM.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.BL.Entities; -using Tango.Logging; -using Tango.SharedUI; - -namespace Tango.PPC.Technician.Dialogs -{ - public class UpdateDetailsViewVM : DialogViewVM - { - private TangoUpdate _update; - public TangoUpdate Update - { - get { return _update; } - set { _update = value; RaisePropertyChangedAuto(); } - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/browser.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/browser.png deleted file mode 100644 index ebb975b6f..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/browser.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/circuit-board.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/circuit-board.png deleted file mode 100644 index 28b535f54..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/circuit-board.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/conveyor.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/conveyor.png deleted file mode 100644 index 1cd649a88..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/conveyor.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/exit.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/exit.png deleted file mode 100644 index e05db36d4..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/exit.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/mobile-phone.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/mobile-phone.png deleted file mode 100644 index ea4e685dc..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/mobile-phone.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/packages.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/packages.png deleted file mode 100644 index cf0e936d8..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/packages.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/remote_connections.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/remote_connections.png deleted file mode 100644 index d9d4a1d45..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/remote_connections.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/shutdown.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/shutdown.png deleted file mode 100644 index abc4d1a1a..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/shutdown.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/sync.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/sync.png deleted file mode 100644 index 46059c5c0..000000000 Binary files a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/sync.png and /dev/null differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Tango.PPC.Technician.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Tango.PPC.Technician.csproj index fc00f83d4..d135142c4 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Tango.PPC.Technician.csproj +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Tango.PPC.Technician.csproj @@ -69,21 +69,9 @@ - - EmbeddedLogItemDetailsView.xaml - - - SynchronizationDetailsView.xaml - - - UpdateDetailsView.xaml - LogItemDetailsView.xaml - - - @@ -105,22 +93,10 @@ - - - CatalogView.xaml - - RemoteConnectionsView.xaml - - - UpdatesView.xaml - - - PackagesView.xaml - DispensersView.xaml @@ -185,10 +161,6 @@ {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0} Tango.PPC.Common - - {208C8BD8-72C6-4E3C-ACAA-351091A2ACC7} - Tango.PPC.Shared - @@ -199,18 +171,6 @@ Designer MSBuild:Compile - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - Designer MSBuild:Compile @@ -219,18 +179,6 @@ Designer MSBuild:Compile - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - Designer MSBuild:Compile @@ -260,24 +208,5 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModelLocator.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModelLocator.cs index 9a8b63c91..ae4678e60 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModelLocator.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModelLocator.cs @@ -20,9 +20,6 @@ namespace Tango.PPC.Technician TangoIOC.Default.Register(); TangoIOC.Default.Register(); TangoIOC.Default.Register(); - TangoIOC.Default.Register(); - TangoIOC.Default.Register(); - TangoIOC.Default.Register(); } /// @@ -79,38 +76,5 @@ namespace Tango.PPC.Technician return TangoIOC.Default.GetInstance(); } } - - /// - /// Gets the system view VM. - /// - public static PackagesViewVM PackagesViewVM - { - get - { - return TangoIOC.Default.GetInstance(); - } - } - - /// - /// Gets the synchronization view vm. - /// - public static UpdatesViewVM UpdatesViewVM - { - get - { - return TangoIOC.Default.GetInstance(); - } - } - - /// - /// Gets the remote connections view vm. - /// - public static RemoteConnectionsViewVM RemoteConnectionsViewVM - { - get - { - return TangoIOC.Default.GetInstance(); - } - } } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/CatalogViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/CatalogViewVM.cs index dbc99fa87..97bae6f5b 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/CatalogViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/CatalogViewVM.cs @@ -4,9 +4,6 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Tango.Core.Commands; -//using Tango.PPC.Browser; -//using Tango.PPC.Browser.Navigation; -//using Tango.PPC.Browser.Views; using Tango.PPC.Common; namespace Tango.PPC.Technician.ViewModels @@ -18,23 +15,17 @@ namespace Tango.PPC.Technician.ViewModels /// public RelayCommand NavigationCommand { get; set; } - /// - /// Gets or sets the browser command. - /// - public RelayCommand BrowserCommand { get; set; } - /// /// Initializes a new instance of the class. /// public CatalogViewVM() { NavigationCommand = new RelayCommand(NavigateToView); - BrowserCommand = new RelayCommand(OpenBrowserModule); } public override void OnApplicationStarted() { - + } /// @@ -45,17 +36,5 @@ namespace Tango.PPC.Technician.ViewModels { NavigationManager.NavigateTo(view); } - - /// - /// Opens the browser module. - /// - private void OpenBrowserModule() - { - //NavigationManager.NavigateWithObject(new BrowserNavigationRequest() - //{ - // Address = "https://twine-s.com/", - // DisplayAddressBar = true, - //}, true); - } } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/LoggingViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/LoggingViewVM.cs index 2aee7f561..6ca693af6 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/LoggingViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/LoggingViewVM.cs @@ -8,11 +8,8 @@ using System.Threading.Tasks; using System.Windows.Data; using Tango.Core; using Tango.Core.Commands; -using Tango.Integration.Logging; -using Tango.Integration.Operation; using Tango.Logging; using Tango.PPC.Common; -using Tango.PPC.Common.Helpers; using Tango.PPC.Technician.Dialogs; namespace Tango.PPC.Technician.ViewModels @@ -20,28 +17,12 @@ namespace Tango.PPC.Technician.ViewModels public class LoggingViewVM : PPCViewModel { private const int MAX_LOGS = 1000; - private List paused_logs; - private List paused_embedded_logs; public SynchronizedObservableCollection ApplicationLogs { get; set; } public SynchronizedObservableCollection EmbeddedLogs { get; set; } - private ICollectionView _applicationLogsViewSource; - public ICollectionView ApplicationLogsViewSource - { - get { return _applicationLogsViewSource; } - set { _applicationLogsViewSource = value; RaisePropertyChangedAuto(); } - } - - private ICollectionView _embeddedLogsViewSource; - public ICollectionView EmbeddedLogsViewSource - { - get { return _embeddedLogsViewSource; } - set { _embeddedLogsViewSource = value; RaisePropertyChangedAuto(); } - } - private LogItemBase _selectedLog; public LogItemBase SelectedLog { @@ -49,6 +30,13 @@ namespace Tango.PPC.Technician.ViewModels set { _selectedLog = value; RaisePropertyChangedAuto(); OnSelectedLogChanged(); } } + private ICollectionView _applicationLogsViewSource; + public ICollectionView ApplicationLogsViewSource + { + get { return _applicationLogsViewSource; } + set { _applicationLogsViewSource = value; RaisePropertyChangedAuto(); } + } + private String _filter; public String Filter { @@ -58,7 +46,6 @@ namespace Tango.PPC.Technician.ViewModels _filter = value; RaisePropertyChangedAuto(); ApplicationLogsViewSource.Refresh(); - EmbeddedLogsViewSource.Refresh(); } } @@ -69,13 +56,6 @@ namespace Tango.PPC.Technician.ViewModels set { _isPaused = value; RaisePropertyChangedAuto(); OnIsPausedChanged(); } } - private bool _processDebugLogs; - public bool ProcessDebugLogs - { - get { return _processDebugLogs; } - set { _processDebugLogs = value; RaisePropertyChangedAuto(); OnProcessDebugLogsChanged(); } - } - public RelayCommand ClearCommand { get; set; } public LoggingViewVM() @@ -83,19 +63,8 @@ namespace Tango.PPC.Technician.ViewModels ApplicationLogs = new SynchronizedObservableCollection(); EmbeddedLogs = new SynchronizedObservableCollection(); ApplicationLogsViewSource = CollectionViewSource.GetDefaultView(ApplicationLogs); - EmbeddedLogsViewSource = CollectionViewSource.GetDefaultView(EmbeddedLogs); paused_logs = new List(); - paused_embedded_logs = new List(); - - var appStartLogs = LogsHelper.GetLogSafe().EmptyAndDispose(); - - foreach (var log in appStartLogs) - { - ApplicationLogs.Insert(0, log); - } - LogManager.NewLog += LogManager_NewLog; - MachineOperator.EmbeddedLogManager.NewLog += EmbeddedLogManager_NewLog; ClearCommand = new RelayCommand(ClearLogs); Filter = "error"; @@ -112,31 +81,6 @@ namespace Tango.PPC.Technician.ViewModels return false; } }; - - EmbeddedLogsViewSource.Filter = (x) => - { - try - { - LogItemBase log = x as LogItemBase; - return String.IsNullOrWhiteSpace(Filter) || log.Category.ToString().ToLower().Contains(Filter.ToLower()) || log.Message.ToLower().Contains(Filter.ToLower()); - } - catch - { - return false; - } - }; - } - - private void OnProcessDebugLogsChanged() - { - if (ProcessDebugLogs) - { - LogManager.Categories.Add(LogCategory.Debug); - } - else - { - LogManager.Categories.RemoveAll(x => x == LogCategory.Debug); - } } private void OnIsPausedChanged() @@ -147,14 +91,6 @@ namespace Tango.PPC.Technician.ViewModels } paused_logs.Clear(); - - - foreach (var log in paused_embedded_logs) - { - EmbeddedLogManager_NewLog(this, log); - } - - paused_embedded_logs.Clear(); } private void LogManager_NewLog(object sender, LogItemBase log) @@ -184,59 +120,22 @@ namespace Tango.PPC.Technician.ViewModels } } - private void EmbeddedLogManager_NewLog(object sender, LogItemBase log) - { - if (!IsPaused) - { - InvokeUI(() => - { - EmbeddedLogs.Insert(0, log); - - try - { - if (EmbeddedLogs.Count > MAX_LOGS) - { - EmbeddedLogs.Remove(EmbeddedLogs.Last()); - } - } - catch - { - //I don't know if this will cause an exception but I'm tired. - } - }); - } - else - { - paused_embedded_logs.Add(log); - } - } - private void ClearLogs() { ApplicationLogs.Clear(); - EmbeddedLogs.Clear(); paused_logs.Clear(); - paused_embedded_logs.Clear(); } private async void OnSelectedLogChanged() { if (SelectedLog != null) { - if (SelectedLog.GetType() == typeof(EmbeddedLogItem)) - { - await NotificationProvider.ShowDialog(new EmbeddedLogItemDetailsViewVM() - { - Log = SelectedLog as EmbeddedLogItem, - }); - } - else + await NotificationProvider.ShowDialog(new LogItemDetailsViewVM() { - await NotificationProvider.ShowDialog(new LogItemDetailsViewVM() - { - Log = SelectedLog, - }); - } + Log = SelectedLog, + }); + + SelectedLog = null; } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/MainViewVM.cs index 4f8aba952..d63a89f3b 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/MainViewVM.cs @@ -12,13 +12,13 @@ namespace Tango.PPC.Technician.ViewModels { public override void OnApplicationStarted() { - + } public override void OnNavigatedTo() { base.OnNavigatedTo(); - NavigationManager.NavigateTo(nameof(CatalogView), false); + NavigationManager.NavigateTo(nameof(CatalogView)); } } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/PackagesViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/PackagesViewVM.cs deleted file mode 100644 index 1d7e1780a..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/PackagesViewVM.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.Core.DI; -using Tango.PPC.Common; -using Tango.PPC.Common.UpdatePackages; -using Tango.PPC.Shared.Updates; - -namespace Tango.PPC.Technician.ViewModels -{ - public class PackagesViewVM : PPCViewModel - { - [TangoInject(TangoInjectMode.WhenAvailable)] - public IPackageRunner PackageRunner { get; set; } - - private List _packages; - public List Packages - { - get { return _packages; } - set { _packages = value; RaisePropertyChangedAuto(); } - } - - public override void OnApplicationStarted() - { - - } - - public async override void OnApplicationReady() - { - base.OnApplicationReady(); - - try - { - Packages = (await PackageRunner.GetPackagesFile()).PackageInstallations; - } - catch (Exception ex) - { - LogManager.Log(ex, "An error occurred while trying to list the installed update packages."); - } - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/RemoteConnectionsViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/RemoteConnectionsViewVM.cs deleted file mode 100644 index 2d8857329..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/RemoteConnectionsViewVM.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.Core.Commands; -using Tango.Integration.ExternalBridge; -using Tango.PPC.Common; - -namespace Tango.PPC.Technician.ViewModels -{ - public class RemoteConnectionsViewVM : PPCViewModel - { - public RelayCommand DisconnectCommand { get; set; } - - private ExternalBridgeReceiver _selectedReceiver; - public ExternalBridgeReceiver SelectedReceiver - { - get { return _selectedReceiver; } - set - { - if (value != null) - { - _selectedReceiver = value; - InvalidateRelayCommands(); - } - } - } - - public RemoteConnectionsViewVM() - { - DisconnectCommand = new RelayCommand(DisconnectReceiver, () => SelectedReceiver != null); - } - - private async void DisconnectReceiver() - { - if (SelectedReceiver != null) - { - try - { - await Task.Factory.StartNew(() => - { - SelectedReceiver.Disconnect().Wait(); - }); - } - catch (Exception ex) - { - LogManager.Log(ex, "Error disconnecting the specified receiver."); - } - finally - { - _selectedReceiver = null; - RaisePropertyChanged(nameof(SelectedReceiver)); - InvalidateRelayCommands(); - } - } - } - - public override void OnApplicationStarted() - { - - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/SystemViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/SystemViewVM.cs index 452907366..444c1d09e 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/SystemViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/SystemViewVM.cs @@ -8,20 +8,16 @@ using System.Net.Sockets; using System.Text; using System.Threading.Tasks; using System.Timers; -using Tango.BL; using Tango.Core.Commands; using Tango.PPC.Common; using Tango.PPC.Common.OS; using Tango.Settings; -using System.Data.Entity; -using Tango.PPC.Common.UWF; namespace Tango.PPC.Technician.ViewModels { public class SystemViewVM : PPCViewModel { private IOperationSystemManager _os; - private IUnifiedWriteFilterManager _uwf; private Timer _statsTimer; private bool _resettingDevice; @@ -60,20 +56,6 @@ namespace Tango.PPC.Technician.ViewModels set { _ipAddress = value; RaisePropertyChangedAuto(); } } - private String _totalDyeTime; - public String TotalDyeTime - { - get { return _totalDyeTime; } - set { _totalDyeTime = value; RaisePropertyChangedAuto(); } - } - - private String _totalDyeMeters; - public String TotalDyeMeters - { - get { return _totalDyeMeters; } - set { _totalDyeMeters = value; RaisePropertyChangedAuto(); } - } - public RelayCommand ResetDeviceCommand { get; set; } public RelayCommand RestartCommand { get; set; } @@ -84,10 +66,9 @@ namespace Tango.PPC.Technician.ViewModels public RelayCommand ExitToExplorerCommand { get; set; } - public SystemViewVM(IOperationSystemManager os, IUnifiedWriteFilterManager uwf) + public SystemViewVM(IOperationSystemManager os) { _os = os; - _uwf = uwf; CPU = 0; RAM = 0; @@ -105,7 +86,7 @@ namespace Tango.PPC.Technician.ViewModels { _resettingDevice = true; ResetDeviceCommand.RaiseCanExecuteChanged(); - await MachineProvider.MachineOperator.Reset(); + await MachineProvider.MachineOperator.ResetDFU(); await NotificationProvider.ShowInfo("Embedded device has been reset successfully."); } catch (Exception ex) @@ -121,30 +102,11 @@ namespace Tango.PPC.Technician.ViewModels private async void FactoryReset() { - if (await NotificationProvider.ShowQuestion("Are you sure you want to reset this device back to factory settings?")) + if (await NotificationProvider.ShowQuestion("Are you sure you want to reset this device and back to factory settings?")) { Settings.ApplicationState = ApplicationStates.FactoryRestore; Settings.Save(); - try - { - NotificationProvider.SetGlobalBusyMessage("Disabling write filter protection..."); - await _uwf.Disable(); - await Task.Delay(2000); - NotificationProvider.ReleaseGlobalBusyMessage(); - await NavigationManager.NavigateTo(Common.Navigation.NavigationView.RestartingSystemView); - await Task.Delay(4000); - _os.Restart(); - } - catch (Exception ex) - { - LogManager.Log(ex, "Error executing factory reset."); - NotificationProvider.ReleaseGlobalBusyMessage(); - await NotificationProvider.ShowError($"Error executing factory reset.\n{ex.FlattenMessage()}"); - } - finally - { - NotificationProvider.ReleaseGlobalBusyMessage(); - } + ApplicationManager.Restart(); } } @@ -160,8 +122,6 @@ namespace Tango.PPC.Technician.ViewModels { if (await NotificationProvider.ShowQuestion("Are you sure you want to restart the device?")) { - await NavigationManager.NavigateTo(Common.Navigation.NavigationView.RestartingSystemView); - await Task.Delay(4000); _os.Restart(); } } @@ -170,7 +130,12 @@ namespace Tango.PPC.Technician.ViewModels { if (await NotificationProvider.ShowQuestion("Close the application and start OS shell?")) { - _os.OpenShell(); + Process.Start(new ProcessStartInfo() + { + UseShellExecute = true, + FileName = "explorer.exe", + }); + ApplicationManager.ShutDown(); } } @@ -183,6 +148,12 @@ namespace Tango.PPC.Technician.ViewModels _statsTimer.Start(); } + public override void OnApplicationReady() + { + base.OnApplicationReady(); + IPAddress = GetIpv4Address(); + } + private void _statsTimer_Elapsed(object sender, ElapsedEventArgs e) { if (IsVisible) @@ -273,31 +244,5 @@ namespace Tango.PPC.Technician.ViewModels return "N/A"; } } - - public async override void OnNavigatedTo() - { - base.OnNavigatedTo(); - - IPAddress = GetIpv4Address(); - - try - { - using (ObservablesContext db = ObservablesContext.CreateDefault()) - { - var jobRuns = await db.JobRuns.Select(x => new { x.StartDate, x.EndDate, x.EndPosition }).ToListAsync(); - - TotalDyeTime = TimeSpan.FromHours(jobRuns.Select(x => x.EndDate - x.StartDate).Sum(x => x.TotalHours)).ToStringUnlimitedHours(); - - int meters = (int)jobRuns.Select(x => x.EndPosition).Sum(); - TotalDyeMeters = $"{meters.ToString("N0")} meters"; - } - } - catch (Exception ex) - { - LogManager.Log(ex, "Error loading machine counters."); - TotalDyeTime = "error!"; - TotalDyeMeters = "error!"; - } - } } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/UpdatesViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/UpdatesViewVM.cs deleted file mode 100644 index 3f4232252..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/UpdatesViewVM.cs +++ /dev/null @@ -1,107 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.BL; -using Tango.BL.Entities; -using Tango.BL.Enumerations; -using Tango.Core.Commands; -using Tango.PPC.Common; -using System.Data.Entity; -using Tango.PPC.Technician.Dialogs; -using Tango.PPC.Common.Synchronization; - -namespace Tango.PPC.Technician.ViewModels -{ - public class UpdatesViewVM : PPCViewModel - { - public RelayCommand SynchronizeCommand { get; set; } - - private List _updates; - public List Updates - { - get { return _updates; } - set { _updates = value; RaisePropertyChangedAuto(); } - } - - private TangoUpdate _selectedUpdate; - public TangoUpdate SelectedUpdate - { - get { return _selectedUpdate; } - set { _selectedUpdate = value; OnSelectedUpdateChanged(); } - } - - private SynchronizationStatus _selectedSynchronization; - public SynchronizationStatus SelectedSynchronization - { - get { return _selectedSynchronization; } - set { _selectedSynchronization = value; OnSelectedSynchronizationChanged(); } - } - - public UpdatesViewVM() - { - Updates = new List(); - SynchronizeCommand = new RelayCommand(Synchronize, () => !MachineDataSynchronizer.IsSynchronizing); - } - - public override void OnApplicationStarted() - { - - } - - public override void OnApplicationReady() - { - base.OnApplicationReady(); - MachineDataSynchronizer.SynchronizationStarted += (_, __) => InvalidateRelayCommands(); - MachineDataSynchronizer.SynchronizationEnded += (_, __) => InvalidateRelayCommands(); - } - - private async void Synchronize() - { - try - { - await MachineDataSynchronizer.Synchronize(); - } - catch { } - } - - public async override void OnNavigatedTo() - { - base.OnNavigatedTo(); - - try - { - using (ObservablesContext db = ObservablesContext.CreateDefault()) - { - Updates = await db.TangoUpdates.Where(x => - x.Status != (int)TangoUpdateStatuses.SynchronizationCompleted && - x.Status != (int)TangoUpdateStatuses.SynchronizationFailed && - x.Status != (int)TangoUpdateStatuses.SynchronizationStarted - ).OrderByDescending(x => x.StartDate).ToListAsync(); - } - } - catch (Exception ex) - { - LogManager.Log(ex, "Error loading update history."); - } - } - - private async void OnSelectedUpdateChanged() - { - if (SelectedUpdate != null) - { - await NotificationProvider.ShowDialog(new UpdateDetailsViewVM() { Update = SelectedUpdate }); - } - } - - private async void OnSelectedSynchronizationChanged() - { - if (SelectedSynchronization != null) - { - await NotificationProvider.ShowDialog(new SynchronizationDetailsViewVM() { Status = SelectedSynchronization }); - } - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/CatalogView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/CatalogView.xaml index 78fa17979..58c88324f 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/CatalogView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/CatalogView.xaml @@ -20,116 +20,32 @@ - Technician + Technician Mode - - - - - - - - - The technician module enables additional diagnostic tools. - - - - - - Logging - - Display and investigate issues using application and embedded device logs. - - - - - - - - - - System - - Display system properties, perform system actions, reset, shutdown etc... - - - - - - - - - - Dispensers - - Perform manual dispensers homing priming. - - - - - - - - - - Installed Packages - - View the history of update packages installation. - - - - - - - - - - Updates & Synchronization - - View the current status and history of update and synchronization operations. - - - - - - - - - - Remote Connections - - View the current status of remote connections to this machine. - - - - - - - - - + + + + + Logging + + + + + + + System + + + + + + + Dispensers + + + + + diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml index 8393349ea..39353c286 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml @@ -34,7 +34,7 @@ - + Application Embedded @@ -47,109 +47,91 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/MainView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/MainView.xaml index d4235341c..08f9a335a 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/MainView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/MainView.xaml @@ -17,9 +17,6 @@ - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/PackagesView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/PackagesView.xaml deleted file mode 100644 index a7944497b..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/PackagesView.xaml +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - - - - Installed Packages - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/PackagesView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/PackagesView.xaml.cs deleted file mode 100644 index 52384fe73..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/PackagesView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -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.Technician.Views -{ - /// - /// Interaction logic for DispensersView.xaml - /// - public partial class PackagesView : UserControl - { - public PackagesView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/RemoteConnectionsView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/RemoteConnectionsView.xaml deleted file mode 100644 index af93a56e5..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/RemoteConnectionsView.xaml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - Remote Connections - - - - - - DISCONNECT - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/RemoteConnectionsView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/RemoteConnectionsView.xaml.cs deleted file mode 100644 index 5d8e32444..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/RemoteConnectionsView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -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.Technician.Views -{ - /// - /// Interaction logic for RemoteConnectionsView.xaml - /// - public partial class RemoteConnectionsView : UserControl - { - public RemoteConnectionsView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/SystemView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/SystemView.xaml index 52abfc239..f2bfcdf7d 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/SystemView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/SystemView.xaml @@ -8,10 +8,9 @@ xmlns:vm="clr-namespace:Tango.PPC.Technician.ViewModels" xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" - xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" xmlns:global="clr-namespace:Tango.PPC.Technician" mc:Ignorable="d" - d:DesignHeight="1260" d:DesignWidth="600" d:DataContext="{d:DesignInstance Type=vm:SystemViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.SystemViewVM}" x:Name="view"> + d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:SystemViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.SystemViewVM}" x:Name="view"> @@ -30,283 +29,55 @@ System - - - - - - - - - - - - - - - Reset Embedded Device - - Resets the embedded device using the DFU channel. - - - - + + + + + + CPU: + % + + + + RAM: + + + + + TEMP: + + + + + + + + + UP TIME: + + + + + IP ADDRESS: + + + - - - - - Restart Panel PC - - Restarts the panel PC operation system. - - - - - - - - - Shutdown Panel PC - - Turns off the panel PC (requires turning on from reset button). - - - - - - - - - Factory Reset - - Removes all data associated with this machine and installs the latest version. - - - - - - - - - Exit To Shell - - Closes the PPC application and opens the windows shell. - - - + + + + + + Restart Device + Shutdown Device + Factory Reset + Exit To Shell - - - - - - - - - - - - - - - - - - - - Application Version: - - - - - - - - - - - - - - Firmware Version: - - - - - - - - - - - - - - FPGA 1: - - - - - - - - - - - - - - FPGA 2: - - - - - - - - - - - - - - FPGA 3: - - - - - - - - - - - - - - CPU: - - - - - - - - % - - - - - - - - - RAM: - - - - - - - - - - - - - - Temperature: - - - - - - - - - - - - - - Up Time: - - - - - - - - - - - - - - IP Address: - - - - - - - - - - - - - - Total Dye Time: - - - - - - - - - - - - - - Total Dye Meters: - - - - - - - - - - -
-
-
-
+
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/UpdatesView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/UpdatesView.xaml deleted file mode 100644 index 501632bfa..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/UpdatesView.xaml +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - Updates & Synchronization - - - - - - - Updates - Synchronization - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Synchronize Now - Synchronization occurres automatically in the background. You can choose to synchronize now. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/UpdatesView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/UpdatesView.xaml.cs deleted file mode 100644 index cdac5cbbb..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/UpdatesView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -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.Technician.Views -{ - /// - /// Interaction logic for UpdatesView.xaml - /// - public partial class UpdatesView : UserControl - { - public UpdatesView() - { - InitializeComponent(); - } - } -} -- cgit v1.3.1