From 698e2dd6c41871f251baf06d48134531a12db7d3 Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Thu, 23 Sep 2021 11:46:40 +0200 Subject: [PATCH] Test.TstTime -> TestTime, Config.Ent.Enums + Events.Ent.Enums + Users.Ent.Enums -> Common.Enums, IRegulValve -> IRegValve, etc. --- Common/Common.csproj | 1 + {Config/Entities => Common}/Enums.cs | 229 +++++++++++++++--- Config/Config.csproj | 2 - Config/DatabaseSettings.cs | 8 +- Config/Entities/Component.cs | 3 +- Config/Entities/Group.cs | 4 +- Config/Entities/IParamsProvider.cs | 1 + Config/Entities/IperlEnums.cs | 44 ---- Config/Entities/PTest.cs | 3 +- Config/Entities/Procedure.cs | 3 +- Config/Entities/Profile.cs | 1 + Config/Entities/Test.cs | 55 ++--- Config/FluentCommon.cs | 38 +-- Config/Mappings/TestMap.cs | 11 +- Config/Units.cs | 1 + Config/Utils.cs | 11 +- DeviceTest/DeviceTest.csproj | 4 + DeviceTest/DeviceTestDlg.cs | 20 +- EventViewer/EventViewerWnd.cs | 9 +- Events/DB.cs | 9 +- Events/Entities/Enums.cs | 58 ----- Events/Entities/Event.cs | 1 + Events/Events.csproj | 7 +- Events/Utils.cs | 1 + Results/BatchResults.cs | 19 +- Results/DB.cs | 8 +- Results/Entities/Batch.cs | 13 +- Results/Entities/MeterTestRslt.cs | 21 +- Results/Entities/TestData.cs | 2 +- Results/Entities/TestRslt.cs | 3 +- Results/Entities/WaterMeter.cs | 19 +- Results/Entities/WaterMeterData.cs | 14 +- Results/Forms/BatchResultsDlg.cs | 2 +- Results/Forms/ManualEntryConfigCtrl.cs | 3 +- Results/Forms/MoreWMResultsDlg.cs | 4 +- Results/Forms/OneWMResultsColumnsCtrl.cs | 5 +- Results/Forms/OneWMResultsRowsCtrl.cs | 5 +- Results/Forms/ResultsConfigCtrl.cs | 6 +- Results/Forms/ResultsConfigDlg.cs | 2 +- Results/ManualEntryItemSpec.cs | 2 +- .../Enhanced/EnhancedPrintDocument.cs | 2 +- .../Printers/Enhanced/EnhancedPrinterCfg.cs | 3 +- .../Printers/Label/LabelPrintDocument.cs | 2 +- .../Output/Printers/Label/LabelPrinterCfg.cs | 3 +- .../MultiLabel/MultiLabelPrintDocument.cs | 2 +- .../MultiLabel/MultiLabelPrinterCfg.cs | 3 +- .../Printers/Munich/MunichPrintDocument.cs | 8 +- .../OnePerBatch/OnePerBatchPrintDocument.cs | 2 +- .../OnePerBatch/OnePerBatchPrinterCfg.cs | 7 +- .../OnePerMeter/OnePerMeterPrintDocument.cs | 2 +- .../OnePerMeter/OnePerMeterPrinterCfg.cs | 7 +- Results/Output/Printers/PrintersCommon.cs | 2 +- .../Printers/Zapiska/ZapiskaPrintDocument.cs | 2 +- .../Printers/Zapiska/ZapiskaPrinterCfg.cs | 3 +- Results/Output/SensusTestInfo.cs | 2 +- Results/Output/Table.cs | 12 +- Results/Output/WMChart.cs | 2 +- Results/WMeterRsltItemSpec.cs | 18 +- ResultsBrowser/Forms/StatisticsDlg.cs | 7 +- .../Statistics/StatisticsPrintDocument.cs | 4 +- ResultsBrowser/ResultsBrowser.csproj | 4 + ResultsBrowser/ResultsBrowserWnd.cs | 15 +- TBF/BenchControl/Ambient/Comet/Ambient.cs | 1 + .../Ambient/Comet/AmbientCfgCtrl.cs | 1 + TBF/BenchControl/Ambient/Greco/Ambient.cs | 2 +- .../Ambient/Greco/AmbientCfgCtrl.cs | 1 + TBF/BenchControl/ComponentBase.cs | 1 + TBF/BenchControl/ComponentCfgBase.cs | 1 + TBF/BenchControl/Configs/ConfigCtrlUtils.cs | 1 + .../Configs/NameOnly/TestMethodCfgCtrl.cs | 1 + .../ParamsProvider/ComponentCfgCtrl.cs | 1 + TBF/BenchControl/Danfoss/VLT2800/Pump.cs | 2 +- .../Danfoss/VLT2800/PumpCfgCtrl.cs | 1 + .../BackupAndSecurityOptions/ComponentCfg.cs | 1 + .../BenchInfo/Extended/Component.cs | 3 +- .../BenchInfo/Extended/ComponentCfg.cs | 1 + .../BenchInfo/iPerl/Component.cs | 2 +- .../BenchInfo/iPerl/ComponentCfg.cs | 1 + .../DataContainers/Buoyancy/ComponentCfg.cs | 1 + .../DataContainers/Density/ComponentCfg.cs | 1 + .../Evaporation/EvaporationCfgCtrl.cs | 1 + .../DataEntry/Combined/EntryFormCfgCtrl.cs | 1 + .../DataEntry/DataStream/EntryFormCfg.cs | 1 + .../DataEntry/Fewa/EntryFormCfgCtrl.cs | 1 + .../HeatMeters12/EntryFormCfgCtrl.cs | 1 + .../DataEntry/HeatMeters6/EntryFormCfgCtrl.cs | 1 + .../DataEntry/Munich/EntryFormCfgCtrl.cs | 1 + .../DataEntry/Munich3/EntryFormCfgCtrl.cs | 1 + .../DataEntry/S620/EntryFormCfgCtrl.cs | 1 + .../DataEntry/Single/EntryFormCfgCtrl.cs | 1 + .../DataEntry/Standard12/EntryFormCfgCtrl.cs | 1 + .../DataEntry/Standard24/EntryFormCfgCtrl.cs | 1 + .../DataEntry/Standard48/EntryFormCfgCtrl.cs | 1 + .../DataEntry/Standard6/EntryFormCfgCtrl.cs | 1 + .../DataEntry/StandardCamera/EntryForm.cs | 1 + .../StandardCamera/EntryFormCfgCtrl.cs | 1 + .../DataEntry/WMStates/EntryFormCfgCtrl.cs | 1 + .../DataEntry/iPerl/CycleBeginningForm.cs | 11 +- .../DataEntry/iPerl/EntryFormCfgCtrl.cs | 1 + TBF/BenchControl/Dummy/Balance/Component.cs | 4 +- .../Dummy/FlowMeter/FlowMeterCfgCtrl.cs | 1 + .../Dummy/RegulValve/RegulValve.cs | 2 +- .../Dummy/RegulValve/RegulValveCfgCtrl.cs | 1 + .../Dummy/RegulValve/SetFlowOp.cs | 6 +- TBF/BenchControl/Elde/ControlBoardCfgCtrl.cs | 1 + TBF/BenchControl/Elde/ControlBoardDev.cs | 1 + TBF/BenchControl/Elde/CoverTest/CoverTest.cs | 2 +- .../Elde/CoverTest/CoverTestCfg.cs | 4 +- .../Elde/CoverTest/CoverTestCfgCtrl.cs | 7 +- .../Elde/CoverTest/CoverTestForm.cs | 4 +- .../Elde/Diverter/DiverterCfgCtrl.cs | 1 + .../RRProcedureParams.cs | 1 + .../RegisterReader.cs | 3 +- .../RegisterReaderCfgCtrl.cs | 1 + .../Elde/FlowMeter/FlowMeterCfgCtrl.cs | 1 + .../Elde/FlowMeterDewa/FlowMeterCfgCtrl.cs | 1 + .../Elde/FlowMeterTriplet/FlowMeterCfgCtrl.cs | 1 + .../Elde/FlowMeterTwins/FlowMeterCfgCtrl.cs | 1 + .../Elde/PressureMeter/PressureMeter.cs | 10 +- .../Elde/PressureMeter/PressureMeterCfg.cs | 2 +- .../PressureMeter/PressureMeterCfgCtrl.cs | 1 + .../PressureMeterCfgCtrl.cs | 1 + TBF/BenchControl/Elde/Pump/PumpCfgCtrl.cs | 1 + .../Elde/PumpTandem/PumpCfgCtrl.cs | 1 + .../Elde/PumpWithFM/PumpCfgCtrl.cs | 1 + .../Elde/RegulValve/RegulValve.cs | 2 +- .../Elde/RegulValve/RegulValveCfgCtrl.cs | 1 + TBF/BenchControl/Elde/RegulValve/SetFlowOp.cs | 6 +- .../Elde/RegulValveCoax/RegulValve.cs | 2 +- .../Elde/RegulValveCoax/RegulValveCfgCtrl.cs | 1 + .../Elde/RegulValveCoax/SetFlowOp.cs | 6 +- .../Elde/RegulValveMilwaukee/RegulValve.cs | 2 +- .../RegulValveMilwaukee/RegulValveCfgCtrl.cs | 1 + .../Elde/RegulValveMilwaukee/SetFlowOp.cs | 6 +- .../RegulValveTandem/ChangeValvePositionOp.cs | 2 +- .../Elde/RegulValveTandem/RegulValveTandem.cs | 2 +- .../RegulValveTandemCfgCtrl.cs | 1 + .../Elde/RegulValveTandem/SetFlowOp.cs | 6 +- .../SetRegulValvePositionOp.cs | 2 +- TBF/BenchControl/Elde/StartMeasurementOp.cs | 2 +- TBF/BenchControl/Elde/TempMeter/TempMeter.cs | 5 +- .../Elde/TempMeter/TempMeterCfgCtrl.cs | 1 + .../TempMeterInternal/TempMeterCfgCtrl.cs | 1 + .../Elde/TempMeterMeret/TempMeterCfg.cs | 1 + TBF/BenchControl/Elde/Valve/ValveCfgCtrl.cs | 1 + TBF/BenchControl/Elde/ValveEx/ValveCfgCtrl.cs | 1 + TBF/BenchControl/FeedingPath.cs | 6 +- TBF/BenchControl/Generic/IComponentCfg.cs | 1 + TBF/BenchControl/Generic/IComponentCfgCtrl.cs | 1 + TBF/BenchControl/GenericDevices/IBenchInfo.cs | 2 +- TBF/BenchControl/GenericDevices/ICamera.cs | 5 +- TBF/BenchControl/GenericDevices/IRegReader.cs | 3 +- .../GenericDevices/IRegReaderStillCamera.cs | 3 +- .../{IRegulValve.cs => IRegValve.cs} | 2 +- TBF/BenchControl/GenericDevices/IScale.cs | 3 +- .../GenericDevices/ITestMethod.cs | 1 + .../GenericDevices/IWaterMeter.cs | 2 +- TBF/BenchControl/Hart/Common/Hart.cs | 2 +- TBF/BenchControl/Hart/Common/HartCfg.cs | 1 + TBF/BenchControl/Hart/Nivotrack/Nivotrack.cs | 2 +- .../Hart/Nivotrack/NivotrackCfg.cs | 1 + .../Multimeter_2010_RS232/Multimeter.cs | 1 + .../MultimeterCfgCtrl.cs | 1 + .../Keithley/TempMeter/TempMeterCfgCtrl.cs | 1 + .../MettlerToledo/Multi/BalanceCfgCtrl.cs | 1 + .../MettlerToledo/Multi/BalanceDev.cs | 3 +- .../MettlerToledo/Multi/ReadStableMassOp.cs | 5 +- .../MettlerToledo/Standard/BalanceCfgCtrl.cs | 1 + .../MettlerToledo/Standard/BalanceDev.cs | 4 +- .../MettlerToledo/Standard/BalanceNewDev.cs | 1 + .../MettlerToledo/Standard/BalanceOld.cs | 1 + .../Standard/ReadStableMassOp.cs | 13 +- .../Modbus/CometAmbient/AmbientCfgCtrl.cs | 1 + TBF/BenchControl/Modbus/Common/Modbus.cs | 2 +- .../Modbus/Common/ModbusCfgCtrl.cs | 1 + .../Modbus/Easytherm/Easytherm.cs | 1 + .../Modbus/Easytherm/EasythermCfgCtrl.cs | 1 + .../Modbus/Easytherm/ProcParams.cs | 1 + TBF/BenchControl/Modbus/Novus/Novus.cs | 2 +- TBF/BenchControl/Modbus/Novus/NovusCfgCtrl.cs | 1 + TBF/BenchControl/Modbus/Novus/ProcParams.cs | 1 + .../PressureMeter/Meret/PressureMeter.cs | 9 +- .../Meret/PressureMeterCfgCtrl.cs | 1 + TBF/BenchControl/Modbus/QuidoRS/QuidoRS.cs | 3 +- .../Modbus/QuidoRS/QuidoRSCfgCtrl.cs | 1 + .../TankSelector/TankSelectorCfgCtrl.cs | 1 + .../Modbus/UltrasoundLevelMeter/LevelMeter.cs | 10 +- .../UltrasoundLevelMeter/LevelMeterCfg.cs | 1 + .../Modbus/WaterAnalyzer/Analyzer.cs | 9 +- .../Modbus/WaterAnalyzer/AnalyzerCfg.cs | 1 + .../Modbus/WaterAnalyzer2/Analyzer.cs | 10 +- .../Modbus/WaterAnalyzer2/AnalyzerCfg.cs | 1 + .../Network/Adapter/NetadapterCfgCtrl.cs | 1 + .../Network/Camera/CLP1611/Camera.cs | 1 + .../Network/Camera/CLP1611/CameraCfg.cs | 3 +- .../Network/Camera/CLP1611/CameraCfgCtrl.cs | 1 + .../Network/Camera/CLP1611/GrabImagesOp.cs | 10 +- .../Network/Camera/CLP1611/LiveStreamOp.cs | 5 +- .../Network/Camera/Display/DisplayCfgCtrl.cs | 1 + .../Network/Camera/Roi/ProcedureParams.cs | 1 + TBF/BenchControl/Network/Camera/Roi/Roi.cs | 4 +- TBF/BenchControl/Network/Camera/Roi/RoiCfg.cs | 1 + .../Network/Camera/Roi/RoiCfgCtrl.cs | 1 + .../RoiForFixedStart/ProcedureParams.cs | 1 + .../Network/Camera/RoiForFixedStart/Roi.cs | 6 +- .../Network/Camera/RoiForFixedStart/RoiCfg.cs | 3 +- .../Camera/RoiForFixedStart/RoiCfgCtrl.cs | 1 + .../Network/Comet/Ambient/Ambient.cs | 2 +- .../Network/Comet/Ambient/AmbientCfgCtrl.cs | 1 + .../Operations/SetAllRegulValvesOp.cs | 2 +- .../Output/DB/ProductionTracing/Tracing.cs | 1 + .../DB/ProductionTracing/TracingCfgCtrl.cs | 1 + .../SaveDiverterCorr.cs | 3 +- .../SaveDiverterCorrCfgCtrl.cs | 1 + .../SaveFlowmeterCorr.cs | 3 +- .../SaveFlowmeterCorrCfgCtrl.cs | 1 + .../Output/DB/SensusOracle/Database.cs | 1 + .../Output/DB/SensusOracle/DatabaseCfg.cs | 1 + .../Output/DB/SensusOracle/ProcedureParams.cs | 1 + .../Output/EventTriggers/Iperl/TriggerCfg.cs | 1 + .../Output/EventTriggers/Standard/Trigger.cs | 1 + .../EventTriggers/Standard/TriggerCfg.cs | 1 + .../FileWriters/Basic/FactoryCompound.cs | 5 +- .../FileWriters/Basic/FactoryHeatMeters.cs | 4 +- .../Output/FileWriters/Basic/FactorySingle.cs | 5 +- .../Output/FileWriters/Basic/WriterCfg.cs | 5 +- .../Output/FileWriters/Basic/WriterCfgCtrl.cs | 1 + .../Output/FileWriters/Elde/FactorySingle.cs | 5 +- .../Output/FileWriters/Elde/Writer.cs | 11 +- .../Output/FileWriters/Elde/WriterCfg.cs | 5 +- .../Output/FileWriters/Elde/WriterCfgCtrl.cs | 1 + .../FileWriters/Enhanced/FactoryCompound.cs | 5 +- .../FileWriters/Enhanced/FactoryHeatMeters.cs | 5 +- .../FileWriters/Enhanced/FactorySingle.cs | 5 +- .../Output/FileWriters/Enhanced/Writer.cs | 5 +- .../Output/FileWriters/Enhanced/WriterCfg.cs | 5 +- .../FileWriters/Enhanced/WriterCfgCtrl.cs | 1 + .../FileWriters/ImageArchiver/ArchiverCfg.cs | 5 +- .../ImageArchiver/ArchiverCfgCtrl.cs | 1 + .../FileWriters/ImageArchiver/Factory.cs | 5 +- .../Output/FileWriters/IperlLogger/Writer.cs | 1 + .../FileWriters/IperlLogger/WriterCfg.cs | 1 + .../OneFilePerMeter/FactoryCompound.cs | 5 +- .../OneFilePerMeter/FactoryHeatMeters.cs | 5 +- .../OneFilePerMeter/FactorySingle.cs | 5 +- .../FileWriters/OneFilePerMeter/Writer.cs | 5 +- .../FileWriters/OneFilePerMeter/WriterCfg.cs | 5 +- .../OneFilePerMeter/WriterCfgCtrl.cs | 1 + .../Output/FileWriters/Xml/FactoryCompound.cs | 5 +- .../FileWriters/Xml/FactoryHeatMeters.cs | 5 +- .../Output/FileWriters/Xml/FactorySingle.cs | 5 +- .../Output/FileWriters/Xml/Writer.cs | 4 +- .../Output/FileWriters/Xml/WriterCfg.cs | 5 +- .../Output/FileWriters/Xml/WriterCfgCtrl.cs | 1 + .../Output/FileWriters/XmlBatch/Factory.cs | 5 +- .../Output/FileWriters/XmlBatch/Writer.cs | 4 +- .../Output/FileWriters/XmlBatch/WriterCfg.cs | 5 +- .../FileWriters/XmlBatch/WriterCfgCtrl.cs | 1 + .../Printers/Enhanced/FactoryCompound.cs | 3 +- .../Printers/Enhanced/FactoryHeatMeters.cs | 2 +- .../Output/Printers/Enhanced/FactorySingle.cs | 3 +- .../Output/Printers/Enhanced/PrinterCfg.cs | 6 +- .../Printers/Enhanced/PrinterCfgCtrl.cs | 1 + .../Output/Printers/Label/PrinterCfg.cs | 2 +- .../Output/Printers/Label/PrinterCfgCtrl.cs | 1 + .../Output/Printers/MultiLabel/PrinterCfg.cs | 2 +- .../Printers/MultiLabel/PrinterCfgCtrl.cs | 1 + .../Output/Printers/Munich/PrinterCfg.cs | 2 +- .../Output/Printers/Munich/PrinterCfgCtrl.cs | 1 + .../Output/Printers/OnePerBatch/Factory.cs | 2 +- .../Output/Printers/OnePerBatch/PrinterCfg.cs | 6 +- .../Printers/OnePerBatch/PrinterCfgCtrl.cs | 1 + .../Printers/OnePerMeter/FactoryCompound.cs | 2 +- .../Printers/OnePerMeter/FactoryHeatMeters.cs | 2 +- .../Printers/OnePerMeter/FactorySingle.cs | 2 +- .../Output/Printers/OnePerMeter/PrinterCfg.cs | 6 +- .../Printers/OnePerMeter/PrinterCfgCtrl.cs | 1 + .../Printers/Zapiska/FactoryCompound.cs | 2 +- .../Printers/Zapiska/FactoryHeatMeters.cs | 2 +- .../Output/Printers/Zapiska/FactorySingle.cs | 2 +- .../Output/Printers/Zapiska/PrinterCfg.cs | 6 +- .../Output/Printers/Zapiska/PrinterCfgCtrl.cs | 1 + TBF/BenchControl/OutputPath.cs | 6 +- .../DataStream/MefImport/MefImport.cs | 2 +- .../DataStream/MefImport/MefImportCfg.cs | 1 + .../DataStream/Reader/Reader.cs | 2 +- .../DataStream/Reader/ReaderCfg.cs | 1 + .../DataEntryForRadio/EntryFormCfgCtrl.cs | 1 + .../RegisterReaders/KPackE/Radio/Radio.cs | 2 +- .../KPackE/Radio/RadioCfgCtrl.cs | 1 + .../KPackE/RegisterReader/ProcedureParams.cs | 1 + .../KPackE/RegisterReader/RegisterReader.cs | 3 +- .../RegisterReader/RegisterReaderCfgCtrl.cs | 1 + .../PulsesFromEldeCB/RRProcedureParams.cs | 1 + .../PulsesFromEldeCB/RegisterReader.cs | 3 +- .../PulsesFromEldeCB/RegisterReaderCfgCtrl.cs | 1 + .../SerialStream/ProcParams.cs | 1 + .../SerialStream/SerialStream.cs | 4 +- .../SerialStream/SerialStreamCfgCtrl.cs | 1 + TBF/BenchControl/Sequences/MainSeq.cs | 45 ++-- TBF/BenchControl/Sequences/MainSeqUtils.cs | 1 + TBF/BenchControl/Sequences/SequenceBase.cs | 29 +-- TBF/BenchControl/StateMachine.cs | 25 +- TBF/BenchControl/TbfComponents.cs | 10 +- .../TestMethods/Adjustment/AdjustmentSeq.cs | 27 ++- .../TestMethods/Adjustment/TestMethod.cs | 1 + .../TestMethods/Adjustment/WMErrorsForm.cs | 2 +- .../TestMethods/Adjustment/WMErrorsForm12.cs | 2 +- .../TestMethods/Adjustment/WMErrorsForm24.cs | 2 +- .../TestMethods/Adjustment/WMErrorsForm48.cs | 2 +- .../ChangeFlowDirectionSeq.cs | 9 +- .../ChangeFlowDirection/TestMethod.cs | 1 + .../CombinedWithDetTestParams.cs | 1 + .../CombinedWithDetectionSeq.cs | 49 ++-- .../CombinedWithDetection/TestMethod.cs | 1 + .../TestMethodCfgCtrl.cs | 1 + .../TestMethods/Counter/CounterSeq.cs | 1 + .../TestMethods/Counter/TestMethod.cs | 1 + .../TestMethods/DiverterTest/Component.cs | 1 + .../DiverterTest/DiverterTestSeq.cs | 34 +-- .../DiverterTest/TestMethodCfgCtrl.cs | 1 + .../TestMethods/DiverterTest/TestParams.cs | 1 + .../TestMethods/Dummy/DummySeq.cs | 5 +- .../TestMethods/Dummy/TestMethod.cs | 1 + .../TestMethods/Endurance/Component.cs | 1 + .../TestMethods/Endurance/CycleDlg.cs | 4 +- .../TestMethods/Endurance/EnduranceSeq.cs | 38 +-- .../Endurance/TestMethodCfgCtrl.cs | 1 + .../TestMethods/Endurance/TestParams.cs | 1 + .../FixedStart/Compound/Component.cs | 1 + .../TestMethods/FixedStart/FixedStartSeq.cs | 57 ++--- .../FixedStart/HeatMeters/Component.cs | 1 + .../HeatMeters/TestMethodCfgCtrl.cs | 1 + .../FixedStart/HeatMeters/TestParams.cs | 1 + .../FixedStart/Single/Component.cs | 1 + .../FixedStartAdvancedSeq.cs | 40 +-- .../FixedStartAdvanced/Single/Component.cs | 1 + .../Compound/Component.cs | 1 + .../FixedStartDeferredEvalSeq.cs | 62 ++--- .../HeatMeters/Component.cs | 1 + .../HeatMeters/TestMethodCfgCtrl.cs | 1 + .../HeatMeters/TestParams.cs | 1 + .../Single/Component.cs | 1 + .../Compound/Component.cs | 1 + .../FixedStartMassCollDeferredEvalSeq.cs | 66 ++--- .../HeatMeters/Component.cs | 1 + .../HeatMeters/TestMethodCfgCtrl.cs | 1 + .../HeatMeters/TestParams.cs | 1 + .../Single/Component.cs | 1 + .../Compound/Component.cs | 1 + .../FixedStartMassCollectionSeq.cs | 63 ++--- .../HeatMeters/Component.cs | 1 + .../HeatMeters/TestMethodCfgCtrl.cs | 1 + .../HeatMeters/TestParams.cs | 1 + .../Single/Component.cs | 1 + .../Compound/Component.cs | 1 + .../Compound/TestMethodCfgCtrl.cs | 1 + .../Compound/TestParams.cs | 1 + .../FixedStartTankCollectionSeq.cs | 56 ++--- .../Single/Component.cs | 1 + .../Single/TestMethodCfgCtrl.cs | 1 + .../Single/TestParams.cs | 1 + .../FlyingStart/Compound/Component.cs | 1 + .../FlyingStart/Compound/TestMethodCfgCtrl.cs | 1 + .../FlyingStart/Compound/TestParams.cs | 1 + .../TestMethods/FlyingStart/FlyingStartSeq.cs | 46 ++-- .../FlyingStart/HeatMeters/Component.cs | 1 + .../HeatMeters/TestMethodCfgCtrl.cs | 1 + .../FlyingStart/HeatMeters/TestParams.cs | 1 + .../FlyingStart/Single/Component.cs | 1 + .../Compound/Component.cs | 1 + .../Compound/TestMethodCfgCtrl.cs | 1 + .../Compound/TestParams.cs | 1 + .../FlyingStartFirstRepetWithMassCollSeq.cs | 52 ++-- .../HeatMeters/Component.cs | 1 + .../HeatMeters/TestMethodCfgCtrl.cs | 1 + .../HeatMeters/TestParams.cs | 1 + .../Single/Component.cs | 1 + .../Single/TestMethodCfgCtrl.cs | 1 + .../Single/TestParams.cs | 1 + .../Compound/Component.cs | 1 + .../Compound/TestMethodCfgCtrl.cs | 1 + .../Compound/TestParams.cs | 1 + .../FlyingStartMassCollComparativeSeq.cs | 43 ++-- .../HeatMeters/Component.cs | 1 + .../HeatMeters/TestMethodCfgCtrl.cs | 1 + .../HeatMeters/TestParams.cs | 1 + .../Single/Component.cs | 1 + .../Single/TestMethodCfgCtrl.cs | 1 + .../Single/TestParams.cs | 1 + .../Compound/Component.cs | 1 + .../Compound/TestMethodCfgCtrl.cs | 1 + .../Compound/TestParams.cs | 1 + .../FlyingStartMassCollProlongedSeq.cs | 49 ++-- .../HeatMeters/Component.cs | 1 + .../HeatMeters/TestMethodCfgCtrl.cs | 1 + .../HeatMeters/TestParams.cs | 1 + .../Single/Component.cs | 1 + .../Single/TestMethodCfgCtrl.cs | 1 + .../Single/TestParams.cs | 1 + .../Compound/CombinedTestParams.cs | 1 + .../Compound/Component.cs | 1 + .../Compound/TestMethodCfgCtrl.cs | 1 + .../FlyingStartMassCollectionSeq.cs | 66 ++--- .../HeatMeters/Component.cs | 1 + .../HeatMeters/TestMethodCfgCtrl.cs | 1 + .../HeatMeters/TestParams.cs | 1 + .../Single/Component.cs | 1 + .../Compound/Component.cs | 1 + .../Compound/TestMethodCfgCtrl.cs | 1 + .../Compound/TestParams.cs | 1 + .../FlyingStartTankCollectionSeq.cs | 45 ++-- .../Single/Component.cs | 1 + .../Single/TestMethodCfgCtrl.cs | 1 + .../Single/TestParams.cs | 1 + .../TestMethods/GrabImage/Component.cs | 1 + .../TestMethods/GrabImage/GrabImageCfg.cs | 2 +- .../TestMethods/GrabImage/GrabImageCfgCtrl.cs | 1 + .../TestMethods/GrabImage/GrabImageSeq.cs | 7 +- .../TestMethods/LeakTest/LeakTestParams.cs | 1 + .../TestMethods/LeakTest/LeakTestSeq.cs | 19 +- .../TestMethods/LeakTest/TestMethod.cs | 1 + .../TestMethods/LeakTest/TestMethodCfgCtrl.cs | 1 + .../TestMethods/LiveStream/CfgCtrl.cs | 1 + .../TestMethods/LiveStream/Component.cs | 1 + .../TestMethods/LiveStream/LiveStreamSeq.cs | 5 +- .../TestMethods/ManualEntry/Component.cs | 1 + .../ManualEntry/ManualEntryCfgCtrl.cs | 1 + .../TestMethods/ManualEntry/ManualEntrySeq.cs | 1 + .../TestMethods/OuterLoop/End/Component.cs | 1 + .../TestMethods/OuterLoop/Start/Component.cs | 1 + .../TestMethods/PMaxTest/PMaxTestParams.cs | 1 + .../TestMethods/PMaxTest/PMaxTestSeq.cs | 19 +- .../TestMethods/PMaxTest/TestMethod.cs | 1 + .../TestMethods/PMaxTest/TestMethodCfgCtrl.cs | 1 + .../TestMethods/PulsesTest/PulsesTestSeq.cs | 29 +-- .../TestMethods/PulsesTest/TestMethod.cs | 1 + .../TestMethods/PulsesTest/TestParams.cs | 1 + .../TestMethods/PulsesTest/WMPulsesForm.cs | 2 +- .../TestMethods/PulsesTest/WMPulsesForm12.cs | 2 +- .../TestMethods/PulsesTest/WMPulsesForm24.cs | 2 +- .../PulsesTestManual/PulsesTestManualSeq.cs | 29 +-- .../PulsesTestManual/TestMethod.cs | 1 + .../Q2CorrectionFromHistory/Component.cs | 1 + .../FromHistoryCfgCtrl.cs | 1 + .../Q2CorrectionFromHistory/FromHistorySeq.cs | 7 +- .../TestMethods/RoiDetection/RoiDetection.cs | 1 + .../RoiDetection/RoiDetectionCfgCtrl.cs | 1 + .../RoiDetection/RoiDetectionSeq.cs | 15 +- .../SensitivityTest/SensitivityTestSeq.cs | 28 ++- .../TestMethods/SensitivityTest/TestMethod.cs | 1 + .../SensitivityTest/TestMethodCfgCtrl.cs | 1 + .../TestMethods/SensitivityTest/TestParams.cs | 1 + .../iPerlCommunication/TestMethod.cs | 1 + .../iPerlCommunication/TestMethodCfgCtrl.cs | 1 + .../iPerlCommunicationForm.cs | 3 +- .../iPerlCommunicationParams.cs | 1 + .../iPerlCommunicationSeq.cs | 3 +- .../iPerlHead/FlowDirectionDetection.cs | 2 +- .../iPerlCommunication/iPerlHead/IperlHead.cs | 1 + .../iPerlHead/IperlHeadCfgCtrl.cs | 1 + .../iPerlHead/ProcParams.cs | 1 + TBF/BenchControl/Various/ErrorFlags/Errors.cs | 2 +- .../Various/ErrorFlags/ErrorsCfg.cs | 1 + .../Various/ErrorFlags/TestParams.cs | 1 + .../StatisticsMonitoring/ProcessStatistics.cs | 1 + .../StatisticsMonitoring/StatisticsCfg.cs | 1 + .../TankWithLevelMsrmnt/TankCfgCtrl.cs | 1 + .../WaterMeters/Munich/ProcParams.cs | 1 + .../WaterMeters/Munich/WaterMeter.cs | 14 +- .../WaterMeters/Munich/WaterMeterCfgCtrl.cs | 1 + .../WaterMeters/WaterMeter/ProcParams.cs | 1 + .../WaterMeters/WaterMeter/WaterMeter.cs | 4 +- .../WaterMeter/WaterMeterCfgCtrl.cs | 1 + TBF/DB.cs | 1 + TBF/LocalSettings.cs | 9 +- TBF/Program.cs | 29 +-- TBF/TBF.csproj | 5 +- .../Components/ComponentParametersDlg.cs | 1 + .../Bench/Components/ComponentsManagerDlg.cs | 5 +- TBF/UI/Bench/Metrology/MetrologyDlg.cs | 4 +- .../Bench/Metrology/MetrologyDlgDensityTab.cs | 1 + TBF/UI/Bench/Paths/PathsDlg.cs | 16 +- TBF/UI/Bench/Paths/PathsOutputCtrl.cs | 2 +- TBF/UI/Bench/TestProfiles/TestProfileDlg.cs | 11 +- TBF/UI/Bench/TestProfiles/TestProfilesCtrl.cs | 2 +- TBF/UI/Bench/TestProfiles/TestProfilesDlg.cs | 2 +- TBF/UI/Bench/Transitions/TransitionsDlg.cs | 36 +-- .../Bench/Uncertainties/UncertaintiesDlg.cs | 6 +- TBF/UI/Calendar/CalendarTabPageCtrl.cs | 21 +- TBF/UI/Camera/PicturesTabPageCtrl.cs | 1 + TBF/UI/MainWnd.cs | 37 +-- TBF/UI/Procedures/ProcedureDlg.cs | 59 ++--- TBF/UI/Procedures/ProcedureParamsCtrl.cs | 6 +- TBF/UI/Procedures/ProcedureParamsMixedCtrl.cs | 1 - TBF/UI/Procedures/ProceduresCtrl.cs | 3 +- TBF/UI/Procedures/ProceduresDlg.cs | 3 +- TBF/UI/Procedures/ProviderAndIx.cs | 5 +- TBF/UI/Procedures/TestParamsCtrl.cs | 1 + .../TestWizard/OracleWZTypSelection.cs | 5 +- .../TestWizard/TestProfileSelection.cs | 1 + .../TestWizard/VolumeAndErrorSelection.cs | 4 +- TBF/UI/Process/ProcessTabPageCtrl24.cs | 9 +- TBF/UI/Process/ProcessTabPageCtrl48.cs | 9 +- TBF/UI/Process/ProcessTabPageCtrl6.cs | 9 +- TBF/UI/Process/ProcessTabPageExCtrl.cs | 9 +- TBF/UI/ResultsMI/DeleteFromOracleForm.cs | 2 +- TBF/UI/ResultsMI/PreviousResultCtrl.cs | 2 +- TBF/UI/ResultsMI/PreviousResultsDlg.cs | 5 +- TBF/UI/ResultsMI/ResultsArrangementDlg.cs | 4 +- TBF/UI/ResultsMI/ResultsTabPageCtrl.cs | 4 +- TBF/UI/Settings/DatabaseSettingsDlg.cs | 15 +- TBF/UI/Settings/GroupTableRow.cs | 4 +- TBF/UI/Settings/UpgradeSelectionDlg.cs | 10 +- TBF/UI/Shared/BenchControlPanel.cs | 16 +- TBF/UI/Shared/LoginDlgWithBenchSelection.cs | 10 +- TBF/UI/Shared/SharedButtons.cs | 2 +- TBF/UiBridge/Bridge.cs | 1 + TBF/UiBridge/ProcessDataEventArgs.cs | 3 +- TBF/UiBridge/TestProgressEventArgs.cs | 31 +-- UserManagement/LocalSettings.cs | 3 +- UserManagement/UserManagement.csproj | 4 + Users/DB.cs | 1 + Users/DBSettings.cs | 7 +- Users/Entities/Enums.cs | 59 ----- Users/Entities/Group.cs | 1 + Users/Entities/User.cs | 1 + Users/Forms/ListViewExtensions.cs | 1 + Users/Forms/LoginDlg.cs | 27 ++- Users/Forms/LviIntColumnComparer.cs | 1 + Users/Forms/LviNameSurnameColumnComparer.cs | 1 + Users/Forms/LviTextColumnComparer.cs | 1 + Users/Forms/PasswordChangeDlg.cs | 5 +- Users/Forms/UserManagementDlg.cs | 14 +- Users/GlobalData.cs | 3 +- Users/Users.csproj | 5 +- 536 files changed, 1795 insertions(+), 1364 deletions(-) rename {Config/Entities => Common}/Enums.cs (81%) delete mode 100644 Config/Entities/IperlEnums.cs delete mode 100644 Events/Entities/Enums.cs rename TBF/BenchControl/GenericDevices/{IRegulValve.cs => IRegValve.cs} (98%) delete mode 100644 Users/Entities/Enums.cs diff --git a/Common/Common.csproj b/Common/Common.csproj index c09591d31..ff7aa24ea 100644 --- a/Common/Common.csproj +++ b/Common/Common.csproj @@ -42,6 +42,7 @@ + diff --git a/Config/Entities/Enums.cs b/Common/Enums.cs similarity index 81% rename from Config/Entities/Enums.cs rename to Common/Enums.cs index 8d26c9906..76a1de453 100644 --- a/Config/Entities/Enums.cs +++ b/Common/Enums.cs @@ -1,11 +1,11 @@ /// -/// Copyright (c) 2013-2018 Sensus Slovensko a.s. +/// Copyright (c) 2013-2021 Sensus Slovensko a.s. /// using System; using System.Collections.Generic; using System.Reflection; -namespace Config.Entities +namespace Common { /// /// Helper class to assign descriptions to enum values @@ -38,6 +38,115 @@ namespace Config.Entities } } + /// + /// Identifies the type of a database + /// + public enum DBType + { + None, /// Database disabled + MySql, /// MySQL database + SQLite, /// SQLite + Count + } + + /// Identifies the database based on the content + public enum DBKind + { + Config, + Results, + RemoteConfig, + Count + } + + public enum ProcedureSelection + { +#if LANG_CS + [Description("Žádné")] None, + [Description("Lokální postupy")] FromLocalDB, + [Description("Postupy ze sdílené databázy")] FromSharedDB, + [Description("Zakázky z Oracle databázy")] OrderNrFromOracleDB, + [Description("Zakázky ze sledovací databázy")] OrderNrFromTracingDB, +#else + [Description("None")] None, + [Description("Local procedures")] FromLocalDB, + [Description("Shared procedures")] FromSharedDB, + [Description("Orders from Oracle DB")] OrderNrFromOracleDB, + [Description("Orders from Tracing DB")] OrderNrFromTracingDB, +#endif + Count + } + + /// + /// Obsolete - replaced by enum ProcedureSelection (above) in 3.1 and newer + /// + public enum RemoteDBUse + { + [Description("Local DB only")] LocalDBOnly, + [Description("Remote DB only")] RemoteDBOnly, + [Description("Both DB-s, local 1st")] BothDBsLocalFirst, + [Description("Both DB-s, remote 1st")] BothDBsRemoteFirst, + Count + } + + /// + /// Obsolete - Contains a procedure name and a database specification (local/remote). + /// + public class ProcedureInfo + { + public readonly string Name; + public readonly bool IsRemote; + + public ProcedureInfo(string name, bool isRemote) + { + Name = name; + IsRemote = isRemote; + } + } + + public enum LoginMethod + { + UserName, /// = alias, abbreviation + FullName, /// = description + Number, + Count + } + + public enum AuthorizedAs + { + PowerUser, + LocalUser, + RemoteUser, + Count + } + + /// + /// GID-s of user groups, each user is member of one or more groups. + /// + public enum GID + { + Testers, + TestingSpecialists, + HeadOfLab, + MaintenanceSpecialists, + Metrologists, + CalibrationSpecialists, + Administrators, /// application / network / database administrator + TraceabilityManagement, + MetrologicalAuthority, + WaterMeterAuthority, + NrOfGroups, /// Number of groups (this is not a GroupID) + None, + } + + public enum MySortOrder + { + None, + Ascending, /// The same like SortOrder.Ascending + Descending, /// The same like SortOrder.Descending + Ascending2, /// Sorts by a surname in ascending order in case or 'Name Surname' column + Descending2, /// Sorts by a surname in descending order in case or 'Name Surname' column + } + /// /// Flags returned by each device configuration control Verify(...) function. /// @@ -52,28 +161,48 @@ namespace Config.Entities InvokeCfgChange = 0x20, /// Invoke CfgChange handler of the component } - public enum RemoteDBUse + /// + /// Event severity + /// + public enum Severity { - [Description("Local DB only")] LocalDBOnly, - [Description("Remote DB only")] RemoteDBOnly, - [Description("Both DB-s, local 1st")] BothDBsLocalFirst, - [Description("Both DB-s, remote 1st")] BothDBsRemoteFirst, + Undefined, + Notification, + Warning, + Error, + FatalError, Count } - /// - /// Contains a procedure name and a database specification (local/remote). - /// - public class ProcedureInfo + public enum EventClass { - public readonly string Name; - public readonly bool IsRemote; + Undefined, + EquipmentHW, + Metrology, + TestingProcess, + BadResults, + ComputerResources, + Network, + Other, + Count + } - public ProcedureInfo(string name, bool isRemote) - { - Name = name; - IsRemote = isRemote; - } + public enum SubscriberGroup : long + { + None = 0, + Metrology = 1, + Maintenance = 2, + Production = 4, + Management = 8, + Finish = 16, + } + + public enum EViewerOption + { + Undefined, + AllEvents, + RecentEvents, + UnreadEvents, } public enum ProcedureState @@ -424,7 +553,7 @@ namespace Config.Entities [Description("Fehler")] FailureDuringOperation, /// Failure during operation -> disabled [Description("Aus")] Off, /// The component is off [Description("Aufzeichnen")] Record, - [Description("Reply")] Reply, + [Description("Abspielen")] Replay, [Description("Simuliert")] Simulate, /// Test bench simulation, this mode does not require any hardware [Description("Geerbt")] Inherit, #elif LANG_FR @@ -435,7 +564,7 @@ namespace Config.Entities [Description("Erreur d'exécution")] FailureDuringOperation, [Description("Éteindre")] Off, [Description("Record")] Record, - [Description("Répondre")] Reply, + [Description("Répondre")] Replay, [Description("Simuler")] Simulate, [Description("Hériter")] Inherit, #else @@ -446,7 +575,7 @@ namespace Config.Entities [Description("Run-time error")] FailureDuringOperation, /// Failure during operation -> disabled [Description("Off")] Off, /// The component is off [Description("Record")] Record, - [Description("Reply")] Reply, + [Description("Replay")] Replay, [Description("Simulate")] Simulate, /// Test bench simulation, this mode does not require any hardware [Description("Inherit")] Inherit, #endif @@ -584,15 +713,15 @@ namespace Config.Entities public enum ErrorFlagMask : long { - E1 = (1L << 0), /// shift = 0, E1 = 1L - E2 = (1L << 1), - E3 = (1L << 2), - E4 = (1L << 3), - E5 = (1L << 4), - E6 = (1L << 5), - E7 = (1L << 6), - E8 = (1L << 7), - E9 = (1L << 8), + E1 = (1L << 0), /// shift = 0, E1 = 1L + E2 = (1L << 1), + E3 = (1L << 2), + E4 = (1L << 3), + E5 = (1L << 4), + E6 = (1L << 5), + E7 = (1L << 6), + E8 = (1L << 7), + E9 = (1L << 8), E10 = (1L << 9), E11 = (1L << 10), E12 = (1L << 11), @@ -648,4 +777,44 @@ namespace Config.Entities E62 = (1L << 61), E63 = (1L << 62), } + + #region iPERL enums + + public enum Side + { +#if LANG_CS + [Description("Levá")] Left, + [Description("Pravá")] Right, +#else + [Description("Left")] Left, + [Description("Right")] Right, +#endif + Count + } + + public enum FlowDir + { + R_L, + L_R, + Count + } + + public enum Counting + { + Arbitrary, + Positive, + Negative, + Count + } + + public enum OptoHeadState + { + Disabled, + OptoAndDirOK, + OptoNok, + DirNok, + Count + } + + #endregion iPERL enums } diff --git a/Config/Config.csproj b/Config/Config.csproj index 0f527134e..a074e9fca 100644 --- a/Config/Config.csproj +++ b/Config/Config.csproj @@ -75,7 +75,6 @@ - @@ -83,7 +82,6 @@ - diff --git a/Config/DatabaseSettings.cs b/Config/DatabaseSettings.cs index 7c813ead1..3db4dbd2d 100644 --- a/Config/DatabaseSettings.cs +++ b/Config/DatabaseSettings.cs @@ -25,10 +25,10 @@ namespace Config { BenchName = String.Empty; /// Empty string (avoid null) IsRealBench = false; - ProceduresDBSettings = new Users.DBSettings(Users.Entities.DBType.MySql, string.Empty); - WaterMetersDBSettings = new Users.DBSettings(Users.Entities.DBType.MySql, string.Empty); - EventsDBSettings = new Users.DBSettings(Users.Entities.DBType.MySql, string.Empty); - UsersDBSettings = new Users.DBSettings(Users.Entities.DBType.MySql, string.Empty); + ProceduresDBSettings = new Users.DBSettings(Common.DBType.MySql, string.Empty); + WaterMetersDBSettings = new Users.DBSettings(Common.DBType.MySql, string.Empty); + EventsDBSettings = new Users.DBSettings(Common.DBType.MySql, string.Empty); + UsersDBSettings = new Users.DBSettings(Common.DBType.MySql, string.Empty); } public object Clone() diff --git a/Config/Entities/Component.cs b/Config/Entities/Component.cs index 165bd8acb..4846a831a 100644 --- a/Config/Entities/Component.cs +++ b/Config/Entities/Component.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.IO; +using Common; namespace Config.Entities { @@ -86,7 +87,7 @@ namespace Config.Entities else if (line.Equals(DebugMode.FailureDuringOperation.ToString())) result.Mode = DebugMode.FailureDuringOperation; else if (line.Equals(DebugMode.Off.ToString())) result.Mode = DebugMode.Off; else if (line.Equals(DebugMode.Record.ToString())) result.Mode = DebugMode.Record; - else if (line.Equals(DebugMode.Reply.ToString())) result.Mode = DebugMode.Reply; + else if (line.Equals(DebugMode.Replay.ToString())) result.Mode = DebugMode.Replay; else if (line.Equals(DebugMode.Simulate.ToString())) result.Mode = DebugMode.Simulate; else if (line.Equals(DebugMode.Inherit.ToString())) result.Mode = DebugMode.Inherit; diff --git a/Config/Entities/Group.cs b/Config/Entities/Group.cs index 755e45a18..b68594c1b 100644 --- a/Config/Entities/Group.cs +++ b/Config/Entities/Group.cs @@ -9,7 +9,7 @@ namespace Config.Entities public class Group { public virtual int Id { get; protected set; } - public virtual Users.Entities.GID GID { get; set; } + public virtual Common.GID GID { get; set; } public virtual long AccessFlags { get; set; } /// Bitfield of access flags: bit0 .. bit62 public virtual IList Users { get; set; } /// Group can be a member of a list of users @@ -18,7 +18,7 @@ namespace Config.Entities Users = new List(); } - public Group(Users.Entities.GID gid) + public Group(Common.GID gid) : this() { GID = gid; diff --git a/Config/Entities/IParamsProvider.cs b/Config/Entities/IParamsProvider.cs index 2df3de028..2a92d5421 100644 --- a/Config/Entities/IParamsProvider.cs +++ b/Config/Entities/IParamsProvider.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Xml.Serialization; +using Common; namespace Config.Entities { diff --git a/Config/Entities/IperlEnums.cs b/Config/Entities/IperlEnums.cs deleted file mode 100644 index 3a3bf135b..000000000 --- a/Config/Entities/IperlEnums.cs +++ /dev/null @@ -1,44 +0,0 @@ -/// -/// Copyright (c) 2018 Sensus Slovensko a.s. -/// -using System; - -namespace Config.Entities -{ - - public enum Side - { -#if LANG_CS - [Description("Levá")] Left, - [Description("Pravá")] Right, -#else - [Description("Left")] Left, - [Description("Right")] Right, -#endif - Count - } - - public enum FlowDir - { - R_L, - L_R, - Count - } - - public enum Counting - { - Arbitrary, - Positive, - Negative, - Count - } - - public enum OptoHeadState - { - Disabled, - OptoAndDirOK, - OptoNok, - DirNok, - Count - } -} diff --git a/Config/Entities/PTest.cs b/Config/Entities/PTest.cs index 3a074540e..513fdd201 100644 --- a/Config/Entities/PTest.cs +++ b/Config/Entities/PTest.cs @@ -4,6 +4,7 @@ using System; using System.Globalization; using System.IO; +using Common; namespace Config.Entities { @@ -78,7 +79,7 @@ namespace Config.Entities TempLimHi = 25.0; /// [°C] PressLimLo = 0; /// [bar] PressLimHi = 16.0; /// [bar] - Publish = (sbyte)Config.Entities.Publish.Always; + Publish = (sbyte)Common.Publish.Always; Evaluate = true; E1 = (sbyte)ErrorFlagsMode.On; diff --git a/Config/Entities/Procedure.cs b/Config/Entities/Procedure.cs index 66a7f86cd..1bf4fccf6 100644 --- a/Config/Entities/Procedure.cs +++ b/Config/Entities/Procedure.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.Globalization; using System.IO; +using Common; namespace Config.Entities { @@ -78,7 +79,7 @@ namespace Config.Entities CreationTime = DateTime.Now; LastChgUser = CreationUser; LastChgTime = CreationTime; - MetersKind = Entities.MetersKind.Single; + MetersKind = MetersKind.Single; Watermeters = string.Empty; Description = string.Empty; LongDescription = string.Empty; diff --git a/Config/Entities/Profile.cs b/Config/Entities/Profile.cs index cc11fd36e..13672a0b3 100644 --- a/Config/Entities/Profile.cs +++ b/Config/Entities/Profile.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.Globalization; using System.IO; +using Common; namespace Config.Entities { diff --git a/Config/Entities/Test.cs b/Config/Entities/Test.cs index f678f1b34..9608390ed 100644 --- a/Config/Entities/Test.cs +++ b/Config/Entities/Test.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.Globalization; using System.IO; +using Common; namespace Config.Entities { @@ -25,7 +26,7 @@ namespace Config.Entities public virtual float Qfrom { get; set; } /// Water flow low limit in [m3/h] public virtual float Qto { get; set; } /// Water flow high limit in [m3/h] public virtual float Volume { get; set; } /// Test volume (target) in [l] - public virtual float TstTime { get; set; } /// Test time (estimate) in [s] + public virtual float TestTime { get; set; } /// Test time (estimate) in [s] public virtual string Method { get; set; } public virtual float ErrLimLo { get; set; } /// in [%] usually < 0, in case of heat meters: 1=class1, 2=class2, 3=class3 public virtual float ErrLimHi { get; set; } /// in [%] usually > 0, in case of heat meters: -Qn in m3/h @@ -44,7 +45,7 @@ namespace Config.Entities public virtual int TimeFlow2Mass { get; set; } /// Delay time from the flow stable to the 1st mass measurement in [s] public virtual int TimePump2StartV { get; set; } /// Delay time from the start of the pump to opening the start valve in [s] public virtual int TimeStop2Mass { get; set; } /// Delay time from the test end (diverted) to the 2nd mass measuremen in [s] - public virtual double TolerRed { get; set; } /// = Filter + public virtual double ShortPulses { get; set; } /// = Filter public virtual string RedType { get; set; } public virtual string FeedingPath { get; set; } public virtual string BenchPath { get; set; } @@ -53,9 +54,9 @@ namespace Config.Entities #if HEAT_METERS public virtual string HeatMetersPath { get; set; } #endif - public virtual string RelTransBefore { get; set; } - public virtual string RelTransBetween { get; set; } - public virtual string TransitionAfter { get; set; } + public virtual string TransBefore { get; set; } + public virtual string TransBetween { get; set; } + public virtual string TransAfter { get; set; } public virtual bool IsOuterLoopStart { get; set; } /// Not mapped to database public virtual bool IsOuterLoopEnd { get; set; } /// Not mapped to database @@ -75,7 +76,7 @@ namespace Config.Entities /// Part = 0; Profile = TestProfile.UserDefined; - Publish = (sbyte)Config.Entities.Publish.Always; + Publish = (sbyte)Common.Publish.Always; DoEvaluate = true; Repeats = 1; DoDraining = false; @@ -94,10 +95,10 @@ namespace Config.Entities TimeFlow2Mass = 5; /// [s] time from the flow stable to the 1st mass measurement in [s] TimePump2StartV = 1; /// [s] time from the 1st mass measurement to the test start in [s] TimeStop2Mass = 5; /// [s] between the test end and the final mass measurement - TolerRed = 0; /// = Filter parameter - RelTransBefore = string.Empty; - RelTransBetween = string.Empty; - TransitionAfter = string.Empty; + ShortPulses = 0; /// = Filter parameter + TransBefore = string.Empty; + TransBetween = string.Empty; + TransAfter = string.Empty; } public Test(string name, int itemNr, Procedure procedure) @@ -137,7 +138,7 @@ namespace Config.Entities result.Qfrom = Qfrom; result.Qto = Qto; result.Volume = Volume; - result.TstTime = TstTime; + result.TestTime = TestTime; result.Method = Method; result.ErrLimLo = ErrLimLo; result.ErrLimHi = ErrLimHi; @@ -156,7 +157,7 @@ namespace Config.Entities result.TimeFlow2Mass = TimeFlow2Mass; result.TimePump2StartV = TimePump2StartV; result.TimeStop2Mass = TimeStop2Mass; - result.TolerRed = TolerRed; + result.ShortPulses = ShortPulses; result.RedType = RedType; result.FeedingPath = FeedingPath; result.BenchPath = BenchPath; @@ -165,9 +166,9 @@ namespace Config.Entities #if HEAT_METERS result.HeatMetersPath = HeatMetersPath; #endif - result.RelTransBefore = RelTransBefore; - result.RelTransBetween = RelTransBetween; - result.TransitionAfter = TransitionAfter; + result.TransBefore = TransBefore; + result.TransBetween = TransBetween; + result.TransAfter = TransAfter; foreach (var prms in MoreParams) { result.MoreParams.Add(prms.Clone()); } return result; @@ -185,7 +186,7 @@ namespace Config.Entities output.WriteLine(Qfrom.ToString(ci)); output.WriteLine(Qto.ToString(ci)); output.WriteLine(Volume.ToString(ci)); - output.WriteLine(TstTime.ToString(ci)); + output.WriteLine(TestTime.ToString(ci)); output.WriteLine(Method); output.WriteLine(ErrLimLo.ToString(ci)); output.WriteLine(ErrLimHi.ToString(ci)); @@ -208,10 +209,10 @@ namespace Config.Entities output.WriteLine(BenchPath); output.WriteLine(OutputPath); output.WriteLine(MetersPath); - output.WriteLine(RelTransBefore); - output.WriteLine(RelTransBetween); + output.WriteLine(TransBefore); + output.WriteLine(TransBetween); output.WriteLine(Profile); - output.WriteLine(TransitionAfter); + output.WriteLine(TransAfter); foreach (var prms in MoreParams) { prms.Export(output); } output.WriteLine(); @@ -236,7 +237,7 @@ namespace Config.Entities tst.Qfrom = float.Parse(input.ReadLine(), ci); tst.Qto = float.Parse(input.ReadLine(), ci); tst.Volume = float.Parse(input.ReadLine(), ci); - tst.TstTime = float.Parse(input.ReadLine(), ci); + tst.TestTime = float.Parse(input.ReadLine(), ci); tst.Method = input.ReadLine(); tst.ErrLimLo = float.Parse(input.ReadLine(), ci); tst.ErrLimHi = float.Parse(input.ReadLine(), ci); @@ -259,13 +260,13 @@ namespace Config.Entities tst.BenchPath = input.ReadLine(); tst.OutputPath = input.ReadLine(); tst.MetersPath = input.ReadLine(); - tst.RelTransBefore = input.ReadLine(); - tst.RelTransBetween = input.ReadLine(); + tst.TransBefore = input.ReadLine(); + tst.TransBetween = input.ReadLine(); string line = input.ReadLine(); tst.Profile = line.Equals(TestProfile.ProtectedHeatMeter.ToString()) ? TestProfile.ProtectedHeatMeter : line.Equals(TestProfile.UserDefinedHeatMeter.ToString()) ? TestProfile.UserDefinedHeatMeter : line.Equals(TestProfile.Protected.ToString()) ? TestProfile.Protected : TestProfile.UserDefined; /// UserDefined is the default - tst.TransitionAfter = input.ReadLine(); + tst.TransAfter = input.ReadLine(); while (true) { @@ -298,7 +299,7 @@ namespace Config.Entities ln = inp.ReadLine(); if (ln != Qfrom.ToString(ci)) { diff.AppendFormat(fmt, "Qfrom", Qfrom.ToString(ci), ln); }; ln = inp.ReadLine(); if (ln != Qto.ToString(ci)) { diff.AppendFormat(fmt, "Qto", Qto.ToString(ci), ln); }; ln = inp.ReadLine(); if (ln != Volume.ToString(ci)) { diff.AppendFormat(fmt, "Volume", Volume.ToString(ci), ln); }; - ln = inp.ReadLine(); if (ln != TstTime.ToString(ci)) { diff.AppendFormat(fmt, "TstTime", TstTime.ToString(ci), ln); }; + ln = inp.ReadLine(); if (ln != TestTime.ToString(ci)) { diff.AppendFormat(fmt, "TstTime", TestTime.ToString(ci), ln); }; ln = inp.ReadLine(); if (ln != Method) { diff.AppendFormat(fmt, "Method", Method, ln); }; ln = inp.ReadLine(); if (ln != ErrLimLo.ToString(ci)) { diff.AppendFormat(fmt, "ErrLimLo", ErrLimLo.ToString(ci), ln); }; ln = inp.ReadLine(); if (ln != ErrLimHi.ToString(ci)) { diff.AppendFormat(fmt, "ErrLimHi", ErrLimHi.ToString(ci), ln); }; @@ -321,10 +322,10 @@ namespace Config.Entities ln = inp.ReadLine(); if (ln != BenchPath) { diff.AppendFormat(fmt, "BenchPath", BenchPath, ln); }; ln = inp.ReadLine(); if (ln != OutputPath) { diff.AppendFormat(fmt, "OutputPath", OutputPath, ln); }; ln = inp.ReadLine(); if (ln != MetersPath) { diff.AppendFormat(fmt, "MetersPath", MetersPath, ln); }; - ln = inp.ReadLine(); if (ln != RelTransBefore) { diff.AppendFormat(fmt, "RelTransBefore", RelTransBefore, ln); }; - ln = inp.ReadLine(); if (ln != RelTransBetween) { diff.AppendFormat(fmt, "RelTransBetween", RelTransBetween, ln); }; + ln = inp.ReadLine(); if (ln != TransBefore) { diff.AppendFormat(fmt, "RelTransBefore", TransBefore, ln); }; + ln = inp.ReadLine(); if (ln != TransBetween) { diff.AppendFormat(fmt, "RelTransBetween", TransBetween, ln); }; ln = inp.ReadLine(); if (ln != Profile.ToString()) { diff.AppendFormat(fmt, "RelTransAfter", Profile, ln); }; - ln = inp.ReadLine(); if (ln != TransitionAfter) { diff.AppendFormat(fmt, "TransitionAfter", TransitionAfter, ln); }; + ln = inp.ReadLine(); if (ln != TransAfter) { diff.AppendFormat(fmt, "TransitionAfter", TransAfter, ln); }; return diff.ToString(); } diff --git a/Config/FluentCommon.cs b/Config/FluentCommon.cs index 54e321db1..fb1c82d06 100644 --- a/Config/FluentCommon.cs +++ b/Config/FluentCommon.cs @@ -18,7 +18,7 @@ namespace Config /// NHibernate session factory (to create the database session 'SessionFactory') /// /// A database session - public static ISessionFactory CreateSessionFactory(Users.Entities.DBKind database, Users.Entities.DBType dbType, string connectionString, bool createDB) + public static ISessionFactory CreateSessionFactory(Common.DBKind database, Common.DBType dbType, string connectionString, bool createDB) { try { @@ -27,10 +27,10 @@ namespace Config switch (dbType) { default: - case Users.Entities.DBType.SQLite: + case Common.DBType.SQLite: cfg = cfg.Database(SQLiteConfiguration.Standard.UsingFile(connectionString)); break; - case Users.Entities.DBType.MySql: + case Common.DBType.MySql: cfg = cfg.Database(MySQLConfiguration.Standard.ConnectionString(connectionString)); break; } @@ -38,11 +38,11 @@ namespace Config switch (database) { default: - case Users.Entities.DBKind.Config: - case Users.Entities.DBKind.RemoteConfig: + case Common.DBKind.Config: + case Common.DBKind.RemoteConfig: cfg = cfg.Mappings(m => m.FluentMappings.AddFromAssemblyOf()); break; - case Users.Entities.DBKind.Results: + case Common.DBKind.Results: cfg = cfg.Mappings(m => m.FluentMappings.AddFromAssemblyOf()); break; } @@ -89,9 +89,9 @@ namespace Config /// DBType.SQLite or DBType.MySql /// Connection string /// true=success, false=error - public static bool CreateEmptyConfigDB(Users.Entities.DBType dbType, string connectionString) + public static bool CreateEmptyConfigDB(Common.DBType dbType, string connectionString) { - ISessionFactory sessionFactory = CreateSessionFactory(Users.Entities.DBKind.Config, dbType, connectionString, true); + ISessionFactory sessionFactory = CreateSessionFactory(Common.DBKind.Config, dbType, connectionString, true); if (sessionFactory == null) return false; /// Populate the database @@ -113,23 +113,23 @@ namespace Config /// /// Prepare all groups, add some of them to admin /// - for (Users.Entities.GID gid = 0; gid < Users.Entities.GID.NrOfGroups; gid++) + for (Common.GID gid = 0; gid < Common.GID.NrOfGroups; gid++) { Config.Entities.Group group = new Config.Entities.Group(gid); switch (gid) { - case Users.Entities.GID.Testers: - case Users.Entities.GID.TestingSpecialists: - case Users.Entities.GID.HeadOfLab: - case Users.Entities.GID.MaintenanceSpecialists: - case Users.Entities.GID.Metrologists: - case Users.Entities.GID.CalibrationSpecialists: - case Users.Entities.GID.Administrators: + case Common.GID.Testers: + case Common.GID.TestingSpecialists: + case Common.GID.HeadOfLab: + case Common.GID.MaintenanceSpecialists: + case Common.GID.Metrologists: + case Common.GID.CalibrationSpecialists: + case Common.GID.Administrators: #if TURA_IPERL || TURA_IPERL_NEW || TURA_SPECIAL - case Users.Entities.GID.TraceabilityManagement: + case Common.GID.TraceabilityManagement: #elif KEMPNO_50 || KRAKOW_50 || TORUN_50 || WARSAW_END - case Users.Entities.GID.MetrologicalAuthority: - case Users.Entities.GID.WaterMeterAuthority: + case Common.GID.MetrologicalAuthority: + case Common.GID.WaterMeterAuthority: #endif admin.AddGroup(group); session.SaveOrUpdate(group); /// Save this group diff --git a/Config/Mappings/TestMap.cs b/Config/Mappings/TestMap.cs index 78956e81f..e48139e66 100644 --- a/Config/Mappings/TestMap.cs +++ b/Config/Mappings/TestMap.cs @@ -22,7 +22,8 @@ namespace Config.Mappings Map(x => x.Qfrom); Map(x => x.Qto); Map(x => x.Volume); - Map(x => x.TstTime); + Map(x => x.TestTime) + .Column("TstTime"); Map(x => x.Repeats); Map(x => x.DoDraining) .Column("Emptying"); @@ -45,7 +46,7 @@ namespace Config.Mappings Map(x => x.ErrLimLo); Map(x => x.ErrLimHi); Map(x => x.Uncertainty); - Map(x => x.TolerRed) + Map(x => x.ShortPulses) .Column("TolerRed"); /// ??? Map(x => x.RedType); Map(x => x.FeedingPath); @@ -55,11 +56,11 @@ namespace Config.Mappings #if HEAT_METERS Map(x => x.HeatMetersPath); #endif - Map(x => x.RelTransBefore) + Map(x => x.TransBefore) .Column("RelTransBefore"); - Map(x => x.RelTransBetween) + Map(x => x.TransBetween) .Column("RelTransBetween"); - Map(x => x.TransitionAfter) + Map(x => x.TransAfter) .Column("TransitionAfter"); HasMany(x => x.MoreParams) diff --git a/Config/Units.cs b/Config/Units.cs index 70f21be2f..2f156c5fd 100644 --- a/Config/Units.cs +++ b/Config/Units.cs @@ -3,6 +3,7 @@ /// using System; using System.Reflection; +using Common; using Config.Entities; namespace Config diff --git a/Config/Utils.cs b/Config/Utils.cs index a5d732007..248fc8092 100644 --- a/Config/Utils.cs +++ b/Config/Utils.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; +using Common; namespace Config { @@ -147,7 +148,7 @@ namespace Config /// NotSpecified, ColdWater or HotWater /// Default flow when metrologic does not match pattern /// Q1 or Qmin flow in m3/h - public static double GetQ1Qmin(double Qn, string metroClass, Entities.Medium medium = Entities.Medium.ColdWater, double Qdflt = 0) + public static double GetQ1Qmin(double Qn, string metroClass, Medium medium = Medium.ColdWater, double Qdflt = 0) { if (string.IsNullOrEmpty(metroClass)) return Qdflt; @@ -158,7 +159,7 @@ namespace Config } else { - if (medium == Entities.Medium.HotWater) + if (medium == Medium.HotWater) { switch (metroClass) { @@ -192,7 +193,7 @@ namespace Config /// NotSpecified, ColdWater or HotWater /// Default flow when metrologic does not match pattern /// Q2 or Qt flow in m3/h - public static double GetQ2Qt(double Qn, string metroClass, Entities.Medium medium = Entities.Medium.ColdWater, double Qdflt = 0) + public static double GetQ2Qt(double Qn, string metroClass, Medium medium = Medium.ColdWater, double Qdflt = 0) { if (string.IsNullOrEmpty(metroClass)) return Qdflt; @@ -202,7 +203,7 @@ namespace Config return 1.6 * Qn / (double)metroClassRatio; } - if (medium == Entities.Medium.HotWater) + if (medium == Medium.HotWater) { switch (metroClass) { @@ -235,7 +236,7 @@ namespace Config /// NotSpecified, ColdWater or HotWater /// Default flow when metrologic does not match pattern /// Q4 or Qmax flow in m3/h - public static double GetQ4Qmax(double Qn, string metroClass, Entities.Medium medium = Entities.Medium.ColdWater, double Qdflt = 0) + public static double GetQ4Qmax(double Qn, string metroClass, Medium medium = Medium.ColdWater, double Qdflt = 0) { if (string.IsNullOrEmpty(metroClass)) return Qdflt; diff --git a/DeviceTest/DeviceTest.csproj b/DeviceTest/DeviceTest.csproj index 71422376d..2575b3170 100644 --- a/DeviceTest/DeviceTest.csproj +++ b/DeviceTest/DeviceTest.csproj @@ -90,6 +90,10 @@ + + {c8939821-ba5c-4988-a3d0-bf53b74865c7} + Common + {743DF7DB-C7B6-42EB-986D-0F485E5588E4} Config diff --git a/DeviceTest/DeviceTestDlg.cs b/DeviceTest/DeviceTestDlg.cs index 572358f1d..f2baca06d 100644 --- a/DeviceTest/DeviceTestDlg.cs +++ b/DeviceTest/DeviceTestDlg.cs @@ -2,13 +2,13 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; -using System.Text; using System.Threading; +using System.Xml.Serialization; using System.Windows.Forms; +using Common; using TBF.BenchControl; using TBF.BenchControl.Generic; using TBF.UI.Bench.Components; -using System.Xml.Serialization; namespace DeviceTest @@ -109,8 +109,8 @@ namespace DeviceTest config.Name = Program.LocalSettings.ParentName; config.ParentName = string.Empty; config.ItemNr = 0; - config.DebugLevel = Config.Entities.DebugMode.Normal; - config.LogLevel = Config.Entities.LogLevel.Debug; + config.DebugLevel = DebugMode.Normal; + config.LogLevel = LogLevel.Debug; config.Corrections = null; config.Factory = parentFactory; parentCfg = config; @@ -142,8 +142,8 @@ namespace DeviceTest config.Name = Program.LocalSettings.ComponentName; config.ParentName = string.IsNullOrEmpty(Program.LocalSettings.ComponentParentName) ? string.Empty : Program.LocalSettings.ComponentParentName; config.ItemNr = 1; - config.DebugLevel = Config.Entities.DebugMode.Normal; - config.LogLevel = Config.Entities.LogLevel.Debug; + config.DebugLevel = DebugMode.Normal; + config.LogLevel = LogLevel.Debug; config.Corrections = null; config.Factory = component1Factory; component1Cfg = config; @@ -177,8 +177,8 @@ namespace DeviceTest config.Name = Program.LocalSettings.Component2Name; config.ParentName = string.IsNullOrEmpty(Program.LocalSettings.Component2ParentName) ? string.Empty : Program.LocalSettings.Component2ParentName; config.ItemNr = 2; - config.DebugLevel = Config.Entities.DebugMode.Normal; - config.LogLevel = Config.Entities.LogLevel.Debug; + config.DebugLevel = DebugMode.Normal; + config.LogLevel = LogLevel.Debug; config.Corrections = null; config.Factory = component2Factory; component2Cfg = config; @@ -212,8 +212,8 @@ namespace DeviceTest config.Name = Program.LocalSettings.Component3Name; config.ParentName = string.IsNullOrEmpty(Program.LocalSettings.Component3ParentName) ? string.Empty : Program.LocalSettings.Component3ParentName; config.ItemNr = 3; - config.DebugLevel = Config.Entities.DebugMode.Normal; - config.LogLevel = Config.Entities.LogLevel.Debug; + config.DebugLevel = DebugMode.Normal; + config.LogLevel = LogLevel.Debug; config.Corrections = null; config.Factory = component3Factory; component3Cfg = config; diff --git a/EventViewer/EventViewerWnd.cs b/EventViewer/EventViewerWnd.cs index 73505a48c..4a354d8f7 100644 --- a/EventViewer/EventViewerWnd.cs +++ b/EventViewer/EventViewerWnd.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.Windows.Forms; using NHibernate; +using Common; using Common.UIControls; using Events; using Events.Entities; @@ -210,8 +211,8 @@ namespace EventViewer { lvi.UseItemStyleForSubItems = false; lvi.SubItems.Add(evnt.Severity.ToString()); - lvi.SubItems[lvi.SubItems.Count - 1].BackColor = Utils.GetSeverityColor(evnt.Severity); - lvi.SubItems[lvi.SubItems.Count - 1].ForeColor = Utils.GetSeverityColor(evnt.Severity, true); + lvi.SubItems[lvi.SubItems.Count - 1].BackColor = global::Events.Utils.GetSeverityColor(evnt.Severity); + lvi.SubItems[lvi.SubItems.Count - 1].ForeColor = global::Events.Utils.GetSeverityColor(evnt.Severity, true); } lvi.SubItems.Add(evnt.Message); eventsListView.Items.Add(lvi); @@ -275,7 +276,7 @@ namespace EventViewer private void settingsButton_Click(object sender, EventArgs e) { - //Users.Entities.GID[] groupsWithAccess = new Users.Entities.GID[] { Users.Entities.GID.Administrators }; + //Common.GID[] groupsWithAccess = new Common.GID[] { Common.GID.Administrators }; Users.Forms.LoginDlg dlg = new Users.Forms.LoginDlg(true); if (dlg.ShowDialog() == DialogResult.OK) { @@ -290,7 +291,7 @@ namespace EventViewer { try { - Users.GlobalData.RemoteUsersDB = new Users.DBSettings(Users.Entities.DBType.MySql, Program.LocalSettings.UsersDBConnString); + Users.GlobalData.RemoteUsersDB = new Users.DBSettings(Common.DBType.MySql, Program.LocalSettings.UsersDBConnString); Users.Forms.LoginDlg dlg = new Users.Forms.LoginDlg(); if (dlg.ShowDialog() == DialogResult.OK) { diff --git a/Events/DB.cs b/Events/DB.cs index 871434943..55bd153fa 100644 --- a/Events/DB.cs +++ b/Events/DB.cs @@ -8,6 +8,7 @@ using FluentNHibernate.Cfg.Db; using NHibernate; using NHibernate.Cfg; using NHibernate.Tool.hbm2ddl; +using Common; using Events.Entities; namespace Events @@ -34,9 +35,9 @@ namespace Events } /// Database type (MySQL or SQLite) for all sessions - private static Entities.DBType dbType; + private static DBType dbType; /// - public static Entities.DBType DbType + public static DBType DbType { get { return dbType; } set { dbType = value; SessionFactory = null; } @@ -63,10 +64,10 @@ namespace Events switch (dbType) { default: - case Entities.DBType.SQLite: + case DBType.SQLite: cfg = cfg.Database(SQLiteConfiguration.Standard.UsingFile(connectionString)); break; - case Entities.DBType.MySql: + case DBType.MySql: cfg = cfg.Database(MySQLConfiguration.Standard.ConnectionString(connectionString)); break; } diff --git a/Events/Entities/Enums.cs b/Events/Entities/Enums.cs deleted file mode 100644 index b0d388193..000000000 --- a/Events/Entities/Enums.cs +++ /dev/null @@ -1,58 +0,0 @@ -/// -/// Copyright (c) 2020 Sensus Slovensko a.s. -/// -namespace Events.Entities -{ - /// - /// Identifies the type of a database - /// - public enum DBType - { - None, /// Database disabled - MySql, /// MySQL database - SQLite, /// SQLite - Count - } - - - public enum Severity - { - Undefined, - Notification, - Warning, - Error, - FatalError, - Count - } - - public enum EventClass - { - Undefined, - EquipmentHW, - Metrology, - TestingProcess, - BadResults, - ComputerResources, - Network, - Other, - Count - } - - public enum SubscriberGroup : long - { - None = 0, - Metrology = 1, - Maintenance = 2, - Production = 4, - Management = 8, - Finish = 16, - } - - public enum EViewerOption - { - Undefined, - AllEvents, - RecentEvents, - UnreadEvents, - } -} diff --git a/Events/Entities/Event.cs b/Events/Entities/Event.cs index bb8c4d827..47ce4a25c 100644 --- a/Events/Entities/Event.cs +++ b/Events/Entities/Event.cs @@ -3,6 +3,7 @@ /// using System; using System.Collections.Generic; +using Common; namespace Events.Entities { diff --git a/Events/Events.csproj b/Events/Events.csproj index 834daf68b..346e8e7af 100644 --- a/Events/Events.csproj +++ b/Events/Events.csproj @@ -56,7 +56,6 @@ - @@ -67,6 +66,12 @@ + + + {c8939821-ba5c-4988-a3d0-bf53b74865c7} + Common + +