From 3d295abe86e811f36aa0ccacc8883a8f7067e75a Mon Sep 17 00:00:00 2001 From: Luc Vandenbroucke Date: Thu, 16 May 2024 15:56:07 +0200 Subject: [PATCH] reconnect --- CompareDef/Program.cs | 8 +- EpdBase/EpdBase.cpp | 7 +- EpdBase/EpdBase.h | 2 + EpdBase3/Epd3Base.cpp | 49 ++++- EpdBase3/Epd3Base.h | 3 + EpdBaseClr/EpdBaseClr.cpp | 8 +- TestEPD3Dll/Program.cs | 4 +- TestMK3/{Reader32.dll => Reader3.dll} | Bin TestMK3/TestMK3.cpp | 217 ++++++++++--------- eDosStation/About.xaml | 2 +- eDosStation/About.xaml.cs | 94 ++++---- eDosStation/App.Debug.config | 29 ++- eDosStation/App.config | 8 +- eDosStation/EntryBadge.xaml.cs | 2 +- eDosStation/Properties/AssemblyInfo.cs | 8 +- eDosStation/Properties/Resources.Designer.cs | 10 + eDosStation/Properties/Resources.resx | 17 +- eDosStation/Resources/BuildDate.txt | 1 + eDosStation/Settings.xaml | 8 +- eDosStation/Settings.xaml.cs | 3 + eDosStation/Station.cs | 4 + eDosStation/User.cs | 2 + eDosStation/eDosStation.csproj | 180 +++++++++++++-- eDosStation/packages.config | 66 +++++- syncEdosLocal/App.config | 26 ++- syncEdosLocal/packages.config | 58 ++++- syncEdosLocal/syncEdosLocal.csproj | 158 +++++++++++++- 27 files changed, 742 insertions(+), 232 deletions(-) rename TestMK3/{Reader32.dll => Reader3.dll} (100%) create mode 100644 eDosStation/Resources/BuildDate.txt diff --git a/CompareDef/Program.cs b/CompareDef/Program.cs index 0f037a3..1c26e66 100644 --- a/CompareDef/Program.cs +++ b/CompareDef/Program.cs @@ -31,7 +31,13 @@ namespace CompareDef int i = a[0].IndexOf('='); if (i >= 0) a[0] = a[0].Substring(0, i ); - list.Add(a[0], int.Parse(a[1].Substring(1))); + i = a[0].LastIndexOf('@'); + if (i >= 0) a[0] = a[0].Substring(0, i); + + if (a[0].StartsWith("Begin", StringComparison.CurrentCultureIgnoreCase)) a[0] = a[0].Substring(5); + else if (a[0].StartsWith("End", StringComparison.CurrentCultureIgnoreCase)) a[0] = a[0].Substring(3); + + if (!list.ContainsKey(a[0])) list.Add(a[0], int.Parse(a[1].Substring(1))); } diff --git a/EpdBase/EpdBase.cpp b/EpdBase/EpdBase.cpp index 4c0be3e..0c21598 100644 --- a/EpdBase/EpdBase.cpp +++ b/EpdBase/EpdBase.cpp @@ -21,7 +21,7 @@ EpdBase::Epd2U::Epd2U(int comport) } WORD EpdBase::Epd2U::WriteConfig() { - if (port == 0) return 1; + if (port == 0 ) return 1; return WriteDisplayConfig(00,2,40,10, 2,displayConfig, 56); } DWORD EpdBase::Epd2U::StartCom() @@ -479,9 +479,12 @@ WORD EpdBase::Epd2U::PrepareForIssue() { int rv = 0; if (port == 0) return 0; + CommitRV = WriteConfig(); + CommitRV = 0; ClearAlarms(); - if (CommitRV) CommitRV = Commit(); + Commit(); + //if (CommitRV) CommitRV = Commit(); if (CommitRV) CommitRV = ClearDose(); if (CommitRV) CommitRV = ClearTotalDose(); if (CommitRV) CommitRV = ClearPeakRates(); diff --git a/EpdBase/EpdBase.h b/EpdBase/EpdBase.h index 6bd6c10..88b7b26 100644 --- a/EpdBase/EpdBase.h +++ b/EpdBase/EpdBase.h @@ -38,6 +38,8 @@ namespace EpdBase WORD OtherAlarms; WORD EEPROMBadSectors; + WORD WriteConfig32 = 0; + WORD CommsInitialized = 0; WORD InitRv = 0; WORD DiscRV = 0; diff --git a/EpdBase3/Epd3Base.cpp b/EpdBase3/Epd3Base.cpp index 36436b3..a35d208 100644 --- a/EpdBase3/Epd3Base.cpp +++ b/EpdBase3/Epd3Base.cpp @@ -187,6 +187,16 @@ int Epd3Base::Epd3U::OpenDev(DiscoveryId DeviceID) return Dll3RV; } +int Epd3Base::Epd3U::ReOpenDev() +{ + if (epdComsHandle != INVALID_HANDLE_VALUE) + { + Dll3RV = Connect3(epdComsHandle, Epd, true); + } + else { Dll3RV = 0; } + return Dll3RV; +} + int Epd3Base::Epd3U::DisCon(UINT16 alarm) { int rv = 0; @@ -870,19 +880,30 @@ error: WORD Epd3Base::Epd3U::PrepareForIssue() { int rv = 0; + int step = 0; if (port == 0) return 0; - rv = WriteConfig(); - + + rv = ReOpenDev(); ++step; + if (WriteConfig32) + rv = WriteConfig(); + if (rv != 0) + goto error; + + ++step; if (DetectorsOn) { + token = BeginEpdOnOff(epdComsHandle, 0, nullptr); rv = Commit3(epdComsHandle); if (!rv) rv = EndEpdOnOff(epdComsHandle, token); } - + ++step; + rv = ReOpenDev(); + ++step; rv = ClearDoses(); + if (rv != 0) goto error; - + ++step; rv = ClearAlarms(); if (rv != 0) goto error; @@ -1046,6 +1067,7 @@ WORD Epd3Base::Epd3U::WriteWearer() { WORD Epd3Base::Epd3U::Issue(bool PrepareDone) { int r=0; + int step = 0; int tries = 0; if (port == 0) return r; @@ -1055,6 +1077,7 @@ WORD Epd3Base::Epd3U::Issue(bool PrepareDone) if (r != 0) goto error; } + ++step; //1 /*if (isMK3) { token = BeginEnableProtectedSession_R3(epdComsHandle, 1, nullptr); @@ -1067,6 +1090,7 @@ WORD Epd3Base::Epd3U::Issue(bool PrepareDone) r = WriteAlarmTresholds(); if (r != 0) goto error; + ++step;//2 r = WriteWearer(); if (r != 0) goto error; @@ -1075,7 +1099,7 @@ WORD Epd3Base::Epd3U::Issue(bool PrepareDone) goto error;*/ - + ++step;//3 //EPDIssued //if (!DetectorsOn) { token = BeginEpdOnOff(epdComsHandle, 1, nullptr); @@ -1087,7 +1111,7 @@ WORD Epd3Base::Epd3U::Issue(bool PrepareDone) r=0; //} - + ++step;//4 tries = 1; token = BeginIssueEPD(epdComsHandle, nullptr); r = Commit3(epdComsHandle); @@ -1110,12 +1134,13 @@ WORD Epd3Base::Epd3U::Issue(bool PrepareDone) goto error; }*/ + ++step;//5 if (isMK3) { - r = DisCon(EndSessionControl); //stops protected session if (r) goto error; } + ++step; EndCom(); return r; @@ -1207,10 +1232,13 @@ int Epd3Base::Epd3U::GetAllDeissue() int Epd3Base::Epd3U::IssueAndCheck(float gain,float ChirpRate) { int rv = 0; + int step = 0; + if (isNG) { float kx = gain; rv = ReadCal(); if (rv != 0 || K6 != 1310) { rv = 1; goto error; } + ++step; if (K3 != kx || K4 != kx) { K3 = K4 = kx; @@ -1218,9 +1246,14 @@ int Epd3Base::Epd3U::IssueAndCheck(float gain,float ChirpRate) if (rv != 0) goto error; } } + ++step; SetChirp( ChirpRate); + ++step; rv = PrepareForIssue(); + if (rv != 0) goto error; + ++step; if (!rv) rv = Issue(true); // data already loaded + if (rv != 0) goto error; return rv; error: return rv; @@ -1228,7 +1261,7 @@ error: int Epd3Base::Epd3U::WriteConfig(void) { - if (port == 0) return 1; + if (port == 0 || WriteConfig32==0) return 1; int32_t r = 0; ECLen = 32; diff --git a/EpdBase3/Epd3Base.h b/EpdBase3/Epd3Base.h index a54aa0f..40e0656 100644 --- a/EpdBase3/Epd3Base.h +++ b/EpdBase3/Epd3Base.h @@ -29,6 +29,8 @@ namespace Epd3Base { WORD DeviceCount = 0; DWORD DeviceIDs[10]; + WORD WriteConfig32 = 1; + WORD Error = 0; WORD ErrorSource; WORD ErrorReason; @@ -243,6 +245,7 @@ namespace Epd3Base { //Functions int OpenDev(DiscoveryId DeviceID); + int ReOpenDev(); int DisCon(UINT16 alarm); void CloseDev(bool CloseAll); diff --git a/EpdBaseClr/EpdBaseClr.cpp b/EpdBaseClr/EpdBaseClr.cpp index 98f6d8f..8836873 100644 --- a/EpdBaseClr/EpdBaseClr.cpp +++ b/EpdBaseClr/EpdBaseClr.cpp @@ -9,7 +9,12 @@ EpdBaseClr::Epd2::Epd2(int port, bool OnlyMK2) isMK3 = EPDIssued = isBG = 0; onlyMK2 = OnlyMK2; epd = new EpdBase::Epd2U(port); - if (!OnlyMK2) epd3 = new Epd3Base::Epd3U(port); else epd3 = nullptr; + if (!OnlyMK2) { + epd3 = new Epd3Base::Epd3U(port); + if (epd3) epd3->WriteConfig32 = 0; + } + else epd3 = nullptr; + this->InitRV = epd->InitRv; Hp10Name = gcnew String(tHp10); Hp07Name = gcnew String(tHp07); @@ -801,6 +806,7 @@ void EpdBaseClr::Epd2::InitData() SoftVersion = 0; FunctionFlags = 0; CountsClock = 0; + } /// /// connect to Epd and read status diff --git a/TestEPD3Dll/Program.cs b/TestEPD3Dll/Program.cs index 576be8e..3eae45b 100644 --- a/TestEPD3Dll/Program.cs +++ b/TestEPD3Dll/Program.cs @@ -17,7 +17,7 @@ namespace TestEPD3Dll //254245176 int rv; - MK3.Epd2 x = new MK3.Epd2(5); + MK3.Epd2 x = new MK3.Epd2(7); x.Connect(false); x.ECIn = System.Security.Cryptography.SHA256.Create().ComputeHash(System.Text.Encoding.UTF8.GetBytes("Administrator")); @@ -29,7 +29,7 @@ namespace TestEPD3Dll //rv= x.SetChirp(5); - + //x.SetSettings(); x.ReadDisplay(); // ToDo list diff --git a/TestMK3/Reader32.dll b/TestMK3/Reader3.dll similarity index 100% rename from TestMK3/Reader32.dll rename to TestMK3/Reader3.dll diff --git a/TestMK3/TestMK3.cpp b/TestMK3/TestMK3.cpp index a1fb131..1f754b8 100644 --- a/TestMK3/TestMK3.cpp +++ b/TestMK3/TestMK3.cpp @@ -1,99 +1,118 @@ -// TestMK3.cpp : This file contains the 'main' function. Program execution begins and ends there. -// -#include -#include -#include -#include "EpdCommon.h" - - - -char comPort[] = "COM4"; -CommsHandle epdComsHandle; -uint32_t EpdID; -EpdGeneration EpdGen; -DiscoveryId Epd; - -HANDLE Ev1 = INVALID_HANDLE_VALUE; -CompletionToken token; -StatusData_t status; -MeasValue_t doses[4]; -uint8_t numDoses; -uint32_t utc; - - -void WINAPI discovery(CommsHandle hComms, DiscoveryId const discovered[], int32_t count) -{ - EpdID = 0; - if (count > 0) { - EpdID = discovered[0].Id; - EpdGen = discovered[0].Gen; - } - memcpy(&Epd,&discovered[0],sizeof(DiscoveryId)); - SetEvent(Ev1); -} - -void WINAPI completion(CommsHandle hComms, CompletionToken token) -{ - SetEvent(Ev1); -} - -void GetEPD() -{ - epdComsHandle = CreateReaderInterface(); - int r = OpenReader(epdComsHandle, comPort); - Ev1 = CreateEvent( - NULL, // default security attributes - TRUE, // manual-reset event - FALSE, // initial state is nonsignaled - TEXT("WriteEvent") // object name - ); - r = StartDiscovery(epdComsHandle, discovery); - - std::cout << "wacht effen!\n"; - r = WaitForSingleObject(Ev1, 10000); // no time-out interval - - std::cout << "ok!\n"; - r = Connect(epdComsHandle,Epd, true); - - ResetEvent(Ev1); - std::cout << "get status\n"; - token = BeginReadStatus(epdComsHandle, completion); - r = Commit(epdComsHandle); - r = WaitForSingleObject(Ev1, 10000); // no time-out interval - std::cout << "got status\n"; - r = EndReadStatus(epdComsHandle, token, &status); - - - numDoses = 0; utc = 0; - ResetEvent(Ev1); - //token = BeginReadDoses(epdComsHandle, new uint8_t[]{ 0, 1 }, 2 , completion); - token = BeginReadDoses(epdComsHandle, nullptr, 0 , completion); - r = Commit(epdComsHandle); - r = WaitForSingleObject(Ev1, 10000); // no time-out interval - std::cout << "got doses\n"; - r = EndReadDoses(epdComsHandle, token, doses, 2, &numDoses, &utc); - - -} - - -int main() -{ - - - GetEPD(); - std::cout << "Hello World!\n"; - std::getchar(); -} - -// Run program: Ctrl + F5 or Debug > Start Without Debugging menu -// Debug program: F5 or Debug > Start Debugging menu -//C:\Program Files (x86)\Thermo Scientific\Unmanaged HtmlFiles -// -// Tips for Getting Started: -// 1. Use the Solution Explorer window to add/manage files -// 2. Use the Team Explorer window to connect to source control -// 3. Use the Output window to see build output and other messages -// 4. Use the Error List window to view errors -// 5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project -// 6. In the future, to open this project again, go to File > Open > Project and select the .sln file +// TestMK3.cpp : This file contains the 'main' function. Program execution begins and ends there. +// +#include +#include +#include +#include "EpdCommon.h" + + + +char comPort[] = "COM7"; +CommsHandle epdComsHandle; +uint32_t EpdID; +EpdGeneration EpdGen; +DiscoveryId Epd; +int DeviceCount; + +HANDLE Ev1 = INVALID_HANDLE_VALUE; +CompletionToken token; +StatusData_t status; +MeasValue_t doses[4]; +uint8_t numDoses; +uint32_t utc; +uint8_t EC[]{ 0xE7 ,0xD3 ,0xE7 ,0x69 ,0xF3 ,0xF5 ,0x93 ,0xDA ,0xDC ,0xB8 ,0x63 ,0x4C ,0xC5 ,0xB0 ,0x9F ,0xC9 ,0x0D ,0xD3 ,0xA6 ,0x1C ,0x4A ,0x06 ,0xA7 ,0x9C ,0xB0 ,0x92 ,0x36 ,0x62 ,0xFE ,0x6F ,0xAE ,0x6B }; + + +void WINAPI discovery(CommsHandle hComms, DiscoveryId const discovered[], int32_t count) +{ + EpdID = 0; + DeviceCount = count; + if (count > 0) { + EpdID = discovered[0].Id; + EpdGen = discovered[0].Gen; + } + memcpy(&Epd,&discovered[0],sizeof(DiscoveryId)); + SetEvent(Ev1); +} + +void WINAPI completion(CommsHandle hComms, CompletionToken token) +{ + SetEvent(Ev1); +} + +void GetEPD() +{ + epdComsHandle = CreateReaderInterface(); + int r = OpenReader(epdComsHandle, comPort); + Ev1 = CreateEvent( + NULL, // default security attributes + TRUE, // manual-reset event + FALSE, // initial state is nonsignaled + TEXT("WriteEvent") // object name + ); + + int tries = 5; DeviceCount = 0; + while (tries-- > 0 && DeviceCount == 0) + { + //memset(DevceIDs, 0, sizeof(DeviceIDs)); + r = StartDiscovery(epdComsHandle, discovery); + if (r == 0) r = WaitForSingleObject(Ev1, 10000); + } + + + std::cout << "wacht effen!\n"; + r = WaitForSingleObject(Ev1, 10000); // no time-out interval + + std::cout << "ok!\n"; + r = Connect(epdComsHandle,Epd, true); + // -9 = r_OperationTimeout + std::cout << "Connect rv " << r << "\n"; + ResetEvent(Ev1); + std::cout << "get status\n"; + token = BeginReadStatus(epdComsHandle, completion); + r = Commit(epdComsHandle); + r = WaitForSingleObject(Ev1, 1000); // no time-out interval + r = EndReadStatus(epdComsHandle, token, &status); + std::cout << "got status "< Start Without Debugging menu +// Debug program: F5 or Debug > Start Debugging menu +//C:\Program Files (x86)\Thermo Scientific\Unmanaged HtmlFiles +// +// Tips for Getting Started: +// 1. Use the Solution Explorer window to add/manage files +// 2. Use the Team Explorer window to connect to source control +// 3. Use the Output window to see build output and other messages +// 4. Use the Error List window to view errors +// 5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project +// 6. In the future, to open this project again, go to File > Open > Project and select the .sln file diff --git a/eDosStation/About.xaml b/eDosStation/About.xaml index 03530d5..beab610 100644 --- a/eDosStation/About.xaml +++ b/eDosStation/About.xaml @@ -21,7 +21,7 @@ eDos EPD station - 2021-2022 Version + 2021-2024 Version diff --git a/eDosStation/About.xaml.cs b/eDosStation/About.xaml.cs index 9a61df9..47ee0c7 100644 --- a/eDosStation/About.xaml.cs +++ b/eDosStation/About.xaml.cs @@ -1,47 +1,47 @@ -using Microsoft.Win32; -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.Shapes; - -namespace eDosStation -{ - /// - /// Interaction logic for About.xaml - /// - public partial class About : Window - { - public About(Station station) - { - InitializeComponent(); - aVersion.Text = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); - stationID.Text = station.ID_Station.ToString(); - ReadAlias(); - if (station.checkUser) checkUser.Text = "Yes"; else checkUser.Text = "No"; - } - - private void RadButton_Click(object sender, RoutedEventArgs e) - { - this.Close(); - } - - private void ReadAlias() - { - using (RegistryKey key = Registry.LocalMachine.OpenSubKey("SOFTWARE\\WOW6432Node\\Microsoft\\MSSQLServer\\Client\\ConnectTo",false)) - { - remoteSql.Text = key.GetValue("eDos").ToString(); - localSql.Text = key.GetValue("eDosLocal").ToString(); - } - - } - } -} +using Microsoft.Win32; +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.Shapes; + +namespace eDosStation +{ + /// + /// Interaction logic for About.xaml + /// + public partial class About : Window + { + public About(Station station) + { + InitializeComponent(); + aVersion.Text = "2021 - 2024 Version " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString()+ " (Build "+Properties.Resources.BuildDate+")"; + stationID.Text = station.ID_Station.ToString(); + ReadAlias(); + if (station.checkUser) checkUser.Text = "Yes"; else checkUser.Text = "No"; + } + + private void RadButton_Click(object sender, RoutedEventArgs e) + { + this.Close(); + } + + private void ReadAlias() + { + using (RegistryKey key = Registry.LocalMachine.OpenSubKey("SOFTWARE\\WOW6432Node\\Microsoft\\MSSQLServer\\Client\\ConnectTo",false)) + { + remoteSql.Text = key.GetValue("eDos").ToString(); + localSql.Text = key.GetValue("eDosLocal").ToString(); + } + + } + } +} diff --git a/eDosStation/App.Debug.config b/eDosStation/App.Debug.config index 22daa4e..fc1eaf7 100644 --- a/eDosStation/App.Debug.config +++ b/eDosStation/App.Debug.config @@ -1,12 +1,19 @@ - - - - - - - - - - - + + + + + + + + + + 7 + + + + + + + + \ No newline at end of file diff --git a/eDosStation/App.config b/eDosStation/App.config index e6b44ca..d7140bf 100644 --- a/eDosStation/App.config +++ b/eDosStation/App.config @@ -1,4 +1,4 @@ - + @@ -58,5 +58,11 @@ + + + + + + \ No newline at end of file diff --git a/eDosStation/EntryBadge.xaml.cs b/eDosStation/EntryBadge.xaml.cs index b78c35a..c51e6ab 100644 --- a/eDosStation/EntryBadge.xaml.cs +++ b/eDosStation/EntryBadge.xaml.cs @@ -455,7 +455,7 @@ namespace eDosStation if (_User.VisitIDLocked > 0 || _User.AccessAllow == false) ReasonNoAccess = _User.ReasonNoAccess; else if (_User.hasEPD) - ReasonNoAccess = "EPD in use"; + ReasonNoAccess = User.ErrorEPDInUse; else ReasonNoAccess = getCommentOnEvent(string.Empty, 3); } diff --git a/eDosStation/Properties/AssemblyInfo.cs b/eDosStation/Properties/AssemblyInfo.cs index f4b3522..f628de4 100644 --- a/eDosStation/Properties/AssemblyInfo.cs +++ b/eDosStation/Properties/AssemblyInfo.cs @@ -8,11 +8,11 @@ using System.Windows; // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("eDosStation")] -[assembly: AssemblyDescription("MK2/MK3 epd station 2023 Isabelle Majkowski, Luc Praet, Luc Vandenbroucke")] +[assembly: AssemblyDescription("MK2/MK3 epd station 2024 Isabelle Majkowski, Luc Praet, Luc Vandenbroucke")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("SCK CEN")] [assembly: AssemblyProduct("eDosStation")] -[assembly: AssemblyCopyright("Copyright © 2019-2023 Luc Vandenbroucke")] +[assembly: AssemblyCopyright("Copyright © 2019-2024 Luc Vandenbroucke")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -51,5 +51,5 @@ using System.Windows; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.13.4.0")] -[assembly: AssemblyFileVersion("2.13.4.0")] +[assembly: AssemblyVersion("2.14.0.0")] +[assembly: AssemblyFileVersion("2.14.0.0")] diff --git a/eDosStation/Properties/Resources.Designer.cs b/eDosStation/Properties/Resources.Designer.cs index 417ddc7..9eec954 100644 --- a/eDosStation/Properties/Resources.Designer.cs +++ b/eDosStation/Properties/Resources.Designer.cs @@ -59,5 +59,15 @@ namespace eDosStation.Properties { resourceCulture = value; } } + + /// + /// Looks up a localized string similar to Thu 05/16/2024 15:48:58.18 + ///. + /// + internal static string BuildDate { + get { + return ResourceManager.GetString("BuildDate", resourceCulture); + } + } } } diff --git a/eDosStation/Properties/Resources.resx b/eDosStation/Properties/Resources.resx index ffecec8..8a639f7 100644 --- a/eDosStation/Properties/Resources.resx +++ b/eDosStation/Properties/Resources.resx @@ -46,7 +46,7 @@ mimetype: application/x-microsoft.net.object.binary.base64 value : The object must be serialized with - : System.Serialization.Formatters.Binary.BinaryFormatter + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.soap.base64 @@ -60,6 +60,7 @@ : and then encoded with base64 encoding. --> + @@ -68,9 +69,10 @@ - + + @@ -85,9 +87,10 @@ - + + @@ -109,9 +112,13 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\BuildDate.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + \ No newline at end of file diff --git a/eDosStation/Resources/BuildDate.txt b/eDosStation/Resources/BuildDate.txt new file mode 100644 index 0000000..6baa7e1 --- /dev/null +++ b/eDosStation/Resources/BuildDate.txt @@ -0,0 +1 @@ +Thu 05/16/2024 15:51:50.20 diff --git a/eDosStation/Settings.xaml b/eDosStation/Settings.xaml index 2d12336..e3a5b56 100644 --- a/eDosStation/Settings.xaml +++ b/eDosStation/Settings.xaml @@ -24,6 +24,7 @@ + @@ -69,8 +70,11 @@ + + - - + + + diff --git a/eDosStation/Settings.xaml.cs b/eDosStation/Settings.xaml.cs index 811c8bc..78aadd3 100644 --- a/eDosStation/Settings.xaml.cs +++ b/eDosStation/Settings.xaml.cs @@ -70,6 +70,9 @@ namespace eDosStation thisStation.AllowMultipleEPD = cbAllowMultipleEPD.IsChecked != null ? cbAllowMultipleEPD.IsChecked.Value : false; + + thisStation.WriteConfig32 = cbWriteConfig32.IsChecked != null ? cbWriteConfig32.IsChecked.Value : false; + thisStation.Update(); this.Close(); if (thisStation.Error > 0) diff --git a/eDosStation/Station.cs b/eDosStation/Station.cs index c2cdfa1..a21ad48 100644 --- a/eDosStation/Station.cs +++ b/eDosStation/Station.cs @@ -39,6 +39,8 @@ namespace eDosStation public TimeSpan ShowTimeoutTime { get; internal set; } public TimeSpan InfoProgressbarInterval { get; internal set; } public double InfoScreenTimeout { get; internal set; } + public bool WriteConfig32 { get; internal set; } + public bool Changed = false; public int Error = 0; public string ErrorMessage; @@ -119,6 +121,7 @@ namespace eDosStation RestartComFirst = rs.BoolOrDefault("RestartComFirst", false); OnlyMK2 = rs.BoolOrDefault("OnlyMK2", false); AllowMultipleEPD = rs.BoolOrDefault("AllowMultipleEPD", false); + WriteConfig32 = false; // rs.BoolOrDefault("WriteConfig32", false); } else { @@ -135,6 +138,7 @@ namespace eDosStation EPDTimeOut = 10000; EPDRetries = 2; AllowMultipleEPD = false; + WriteConfig32 = false; } rs.Close(); splunkLog.WriteSplunkLog("StationInit", spl1.iseverity.info); diff --git a/eDosStation/User.cs b/eDosStation/User.cs index 8344d29..bcf68a3 100644 --- a/eDosStation/User.cs +++ b/eDosStation/User.cs @@ -9,6 +9,8 @@ namespace eDosStation { public class User { + public const string ErrorEPDInUse = "EPD in use"; + public int PersID { get; set; } public string LastName { get; set; } public string FirstName { get; set; } diff --git a/eDosStation/eDosStation.csproj b/eDosStation/eDosStation.csproj index d727fa6..129d025 100644 --- a/eDosStation/eDosStation.csproj +++ b/eDosStation/eDosStation.csproj @@ -91,24 +91,166 @@ app.manifest - - ..\packages\LSWLib2.4.0.10\lib\net48\LSWLib.dll + + ..\packages\LSWLib2.4.0.25\lib\net48\LSWLib.dll + + + ..\packages\Microsoft.Win32.Registry.5.0.0\lib\net461\Microsoft.Win32.Registry.dll + + + ..\packages\Microsoft.Win32.Registry.AccessControl.8.0.0\lib\net462\Microsoft.Win32.Registry.AccessControl.dll + + + ..\packages\Microsoft.Win32.SystemEvents.8.0.0\lib\net462\Microsoft.Win32.SystemEvents.dll + + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + + ..\packages\System.CodeDom.8.0.0\lib\net462\System.CodeDom.dll + + + + ..\packages\System.Configuration.ConfigurationManager.8.0.0\lib\net462\System.Configuration.ConfigurationManager.dll + - - ..\packages\System.Data.OleDb.7.0.0\lib\net462\System.Data.OleDb.dll + + ..\packages\System.Data.Odbc.8.0.0\lib\net462\System.Data.Odbc.dll - - ..\packages\System.Data.SqlClient.4.8.5\lib\net461\System.Data.SqlClient.dll + + ..\packages\System.Data.OleDb.8.0.0\lib\net462\System.Data.OleDb.dll + + + ..\packages\System.Data.SqlClient.4.8.6\lib\net461\System.Data.SqlClient.dll + + + ..\packages\System.Diagnostics.EventLog.8.0.0\lib\net462\System.Diagnostics.EventLog.dll + + + ..\packages\System.Diagnostics.PerformanceCounter.8.0.0\lib\net462\System.Diagnostics.PerformanceCounter.dll + + + + + + ..\packages\System.Drawing.Common.8.0.4\lib\net462\System.Drawing.Common.dll + + + + ..\packages\System.IO.4.3.0\lib\net462\System.IO.dll + True + True + + + ..\packages\System.IO.FileSystem.AccessControl.5.0.0\lib\net461\System.IO.FileSystem.AccessControl.dll + + + ..\packages\System.IO.Packaging.8.0.0\lib\net462\System.IO.Packaging.dll + + + ..\packages\System.IO.Pipes.AccessControl.5.0.0\lib\net461\System.IO.Pipes.AccessControl.dll + + + ..\packages\System.IO.Ports.8.0.0\lib\net462\System.IO.Ports.dll + - + + ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll + + + + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + + ..\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll + True + True + + + + ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + + + ..\packages\System.Security.AccessControl.6.0.0\lib\net461\System.Security.AccessControl.dll + + + ..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net463\System.Security.Cryptography.Algorithms.dll + True + True + + + ..\packages\System.Security.Cryptography.Cng.5.0.0\lib\net47\System.Security.Cryptography.Cng.dll + + + ..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll + True + True + + + ..\packages\System.Security.Cryptography.Pkcs.8.0.0\lib\net462\System.Security.Cryptography.Pkcs.dll + + + ..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll + True + True + + + ..\packages\System.Security.Cryptography.ProtectedData.8.0.0\lib\net462\System.Security.Cryptography.ProtectedData.dll + + + ..\packages\System.Security.Cryptography.Xml.8.0.0\lib\net462\System.Security.Cryptography.Xml.dll + + + ..\packages\System.Security.Permissions.8.0.0\lib\net462\System.Security.Permissions.dll + + + ..\packages\System.Security.Principal.Windows.5.0.0\lib\net461\System.Security.Principal.Windows.dll + + + + ..\packages\System.ServiceModel.Duplex.4.10.0\lib\net461\System.ServiceModel.Duplex.dll + + + ..\packages\System.ServiceModel.Http.4.10.0\lib\net461\System.ServiceModel.Http.dll + + + ..\packages\System.ServiceModel.NetTcp.4.10.0\lib\net461\System.ServiceModel.NetTcp.dll + + + ..\packages\System.ServiceModel.Primitives.4.10.0\lib\net461\System.ServiceModel.Primitives.dll + + + ..\packages\System.ServiceModel.Security.4.10.0\lib\net461\System.ServiceModel.Security.dll + + + ..\packages\System.ServiceModel.Syndication.8.0.0\lib\net462\System.ServiceModel.Syndication.dll + + + + ..\packages\System.ServiceProcess.ServiceController.8.0.0\lib\net462\System.ServiceProcess.ServiceController.dll + + + + ..\packages\System.Text.Encoding.CodePages.8.0.0\lib\net462\System.Text.Encoding.CodePages.dll + + + ..\packages\System.Threading.AccessControl.8.0.0\lib\net462\System.Threading.AccessControl.dll + + + + + ..\packages\System.Web.Services.Description.4.10.0\lib\net461\System.Web.Services.Description.dll + @@ -119,21 +261,17 @@ 4.0 - - ..\lib\RCWPF\2023.2.718.45\Telerik.Windows.Controls.dll - True + + ..\packages\Telerik.Windows.Controls.for.Wpf.Xaml.2024.1.423\lib\net45\Telerik.Windows.Controls.dll - - ..\lib\RCWPF\2023.2.718.45\Telerik.Windows.Controls.GridView.dll - True + + ..\packages\Telerik.Windows.Controls.GridView.for.Wpf.Xaml.2024.1.423\lib\net45\Telerik.Windows.Controls.GridView.dll - - ..\lib\RCWPF\2023.2.718.45\Telerik.Windows.Controls.Input.dll - True + + ..\packages\Telerik.Windows.Controls.Input.for.Wpf.Xaml.2024.1.423\lib\net45\Telerik.Windows.Controls.Input.dll - - ..\lib\RCWPF\2023.2.718.45\Telerik.Windows.Data.dll - True + + ..\packages\Telerik.Windows.Data.for.Wpf.Xaml.2024.1.423\lib\net45\Telerik.Windows.Data.dll False @@ -305,6 +443,7 @@ Always + @@ -354,4 +493,7 @@ + + echo %25date%25 %25time%25 > "$(ProjectDir)\Resources\BuildDate.txt" + \ No newline at end of file diff --git a/eDosStation/packages.config b/eDosStation/packages.config index 3cbc8a7..87ad711 100644 --- a/eDosStation/packages.config +++ b/eDosStation/packages.config @@ -1,18 +1,70 @@  - + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/syncEdosLocal/App.config b/syncEdosLocal/App.config index bfcae45..913d78a 100644 --- a/syncEdosLocal/App.config +++ b/syncEdosLocal/App.config @@ -1,23 +1,27 @@ - + - - + + - + - - - + + + + + + + + + + + diff --git a/syncEdosLocal/packages.config b/syncEdosLocal/packages.config index afed282..415a685 100644 --- a/syncEdosLocal/packages.config +++ b/syncEdosLocal/packages.config @@ -1,7 +1,59 @@  - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/syncEdosLocal/syncEdosLocal.csproj b/syncEdosLocal/syncEdosLocal.csproj index 96d1755..771a728 100644 --- a/syncEdosLocal/syncEdosLocal.csproj +++ b/syncEdosLocal/syncEdosLocal.csproj @@ -37,26 +37,170 @@ false - - ..\packages\LSWLib2.4.0.10\lib\net48\LSWLib.dll + + ..\packages\LSWLib2.4.0.25\lib\net48\LSWLib.dll + + + ..\packages\Microsoft.Win32.Registry.5.0.0\lib\net461\Microsoft.Win32.Registry.dll + + + ..\packages\Microsoft.Win32.Registry.AccessControl.8.0.0\lib\net462\Microsoft.Win32.Registry.AccessControl.dll + + + ..\packages\Microsoft.Win32.SystemEvents.8.0.0\lib\net462\Microsoft.Win32.SystemEvents.dll + + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + + ..\packages\System.CodeDom.8.0.0\lib\net462\System.CodeDom.dll + + + + ..\packages\System.Configuration.ConfigurationManager.8.0.0\lib\net462\System.Configuration.ConfigurationManager.dll + - - ..\packages\System.Data.OleDb.7.0.0\lib\net462\System.Data.OleDb.dll + + ..\packages\System.Data.Odbc.8.0.0\lib\net462\System.Data.Odbc.dll - - ..\packages\System.Data.SqlClient.4.8.5\lib\net461\System.Data.SqlClient.dll + + ..\packages\System.Data.OleDb.8.0.0\lib\net462\System.Data.OleDb.dll + + + + ..\packages\System.Data.SqlClient.4.8.6\lib\net461\System.Data.SqlClient.dll + + + ..\packages\System.Diagnostics.EventLog.8.0.0\lib\net462\System.Diagnostics.EventLog.dll + + + ..\packages\System.Diagnostics.PerformanceCounter.8.0.0\lib\net462\System.Diagnostics.PerformanceCounter.dll + + + + + + ..\packages\System.Drawing.Common.8.0.4\lib\net462\System.Drawing.Common.dll + + + + ..\packages\System.IO.4.3.0\lib\net462\System.IO.dll + True + True + + + ..\packages\System.IO.FileSystem.AccessControl.5.0.0\lib\net461\System.IO.FileSystem.AccessControl.dll + + + ..\packages\System.IO.Packaging.8.0.0\lib\net462\System.IO.Packaging.dll + + + ..\packages\System.IO.Pipes.AccessControl.5.0.0\lib\net461\System.IO.Pipes.AccessControl.dll + + + ..\packages\System.IO.Ports.8.0.0\lib\net462\System.IO.Ports.dll + + + + ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll + + + + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + + ..\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll + True + True + + + + ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll - + + + ..\packages\System.Security.AccessControl.6.0.0\lib\net461\System.Security.AccessControl.dll + + + ..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net463\System.Security.Cryptography.Algorithms.dll + True + True + + + ..\packages\System.Security.Cryptography.Cng.5.0.0\lib\net47\System.Security.Cryptography.Cng.dll + + + ..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll + True + True + + + ..\packages\System.Security.Cryptography.Pkcs.8.0.0\lib\net462\System.Security.Cryptography.Pkcs.dll + + + ..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll + True + True + + + ..\packages\System.Security.Cryptography.ProtectedData.8.0.0\lib\net462\System.Security.Cryptography.ProtectedData.dll + + + ..\packages\System.Security.Cryptography.Xml.8.0.0\lib\net462\System.Security.Cryptography.Xml.dll + + + ..\packages\System.Security.Permissions.8.0.0\lib\net462\System.Security.Permissions.dll + + + ..\packages\System.Security.Principal.Windows.5.0.0\lib\net461\System.Security.Principal.Windows.dll + + + + ..\packages\System.ServiceModel.Duplex.4.10.0\lib\net461\System.ServiceModel.Duplex.dll + + + ..\packages\System.ServiceModel.Http.4.10.0\lib\net461\System.ServiceModel.Http.dll + + + ..\packages\System.ServiceModel.NetTcp.4.10.0\lib\net461\System.ServiceModel.NetTcp.dll + + + ..\packages\System.ServiceModel.Primitives.4.10.0\lib\net461\System.ServiceModel.Primitives.dll + + + ..\packages\System.ServiceModel.Security.4.10.0\lib\net461\System.ServiceModel.Security.dll + + + ..\packages\System.ServiceModel.Syndication.8.0.0\lib\net462\System.ServiceModel.Syndication.dll + + + + ..\packages\System.ServiceProcess.ServiceController.8.0.0\lib\net462\System.ServiceProcess.ServiceController.dll + + + + ..\packages\System.Text.Encoding.CodePages.8.0.0\lib\net462\System.Text.Encoding.CodePages.dll + + + ..\packages\System.Threading.AccessControl.8.0.0\lib\net462\System.Threading.AccessControl.dll + + + + + ..\packages\System.Web.Services.Description.4.10.0\lib\net461\System.Web.Services.Description.dll + +