diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2022-04-28 02:30:11 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2022-04-28 02:30:11 +0300 |
| commit | 357d86202db77f6860b8f514e910b967ce4c3034 (patch) | |
| tree | accd34365d7450d82544ec2b287db87549355b1a /Software/Visual_Studio/PPC/Tango.PPC.Common | |
| parent | 59aa6065ebb3481e50c13ec6b4850448fe66186a (diff) | |
| download | Tango-357d86202db77f6860b8f514e910b967ce4c3034.tar.gz Tango-357d86202db77f6860b8f514e910b967ce4c3034.zip | |
Spool Type Firmware Notifications.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs index fe0de64f9..18c0f6202 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs @@ -160,6 +160,22 @@ namespace Tango.PPC.Common.Connection var settings = SettingsManager.Default.GetOrCreate<PPCSettings>(); + if (Machine != null) + { + try + { + using (var db = ObservablesContext.CreateDefault()) + { + var spoolType = db.SpoolTypes.FirstOrDefault(x => x.Guid == settings.SpoolTypeGuid); + await MachineOperator.SetSpoolType((PMR.Printing.JobSpoolType)spoolType.Code); + } + } + catch (Exception ex) + { + LogManager.Log(ex, "Error setting machine spool type before connection."); + } + } + if (!Machine.IsDemo) { if (String.IsNullOrWhiteSpace(settings.EmbeddedComPort)) @@ -210,7 +226,7 @@ namespace Tango.PPC.Common.Connection preCheckSerialPort.Close(); fileLoggingDisabled = false; Thread.Sleep(500); //Wait a little while to not scare the other side?.. - } + } LogManager.Log($"Connecting to machine on {settings.EmbeddedComPort}...", LogCategory.Info); |
