aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-01-03 13:36:10 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-01-03 13:36:10 +0200
commit185865c043b5fdaffef5356e305e0cc553ccc126 (patch)
tree307084e5e9eb63e68356a1b5908edde068ca7a21 /Software/Visual_Studio
parent25f5e6ddef7ef2fa0a747305847eeb4ceee5a2c9 (diff)
downloadTango-185865c043b5fdaffef5356e305e0cc553ccc126.tar.gz
Tango-185865c043b5fdaffef5356e305e0cc553ccc126.zip
Added new BL entities with inheritance !!!!
Diffstat (limited to 'Software/Visual_Studio')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB_lk2htmvj_wpftmp.csproj530
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/ActionType.cs175
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/ActionTypeBase.cs188
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/Address.cs403
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/AddressBase.cs416
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/ApplicationDisplayPanelVersion.cs137
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/ApplicationDisplayPanelVersionBase.cs150
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/ApplicationFirmwareVersion.cs137
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/ApplicationFirmwareVersionBase.cs150
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/ApplicationOsVersion.cs137
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/ApplicationOsVersionBase.cs150
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs1427
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/BrushStopBase.cs1364
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/CartridgeType.cs137
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/CartridgeTypeBase.cs150
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/Cat.cs292
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/CatBase.cs300
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/Cct.cs353
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/CctBase.cs364
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/ColorCatalog.cs655
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/ColorCatalogBase.cs669
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/ColorSpace.cs365
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/ColorSpaceBase.cs378
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/Configuration.cs425
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/ConfigurationBase.cs427
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/Contact.cs358
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/ContactBase.cs378
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/Customer.cs162
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/CustomerBase.cs175
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/Dispenser.cs239
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/DispenserBase.cs251
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/DispenserType.cs175
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/DispenserTypeBase.cs188
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/EmbeddedFirmwareVersion.cs137
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/EmbeddedFirmwareVersionBase.cs150
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/EventType.cs479
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/EventTypeBase.cs491
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/EventTypesAction.cs150
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/EventTypesActionBase.cs161
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/EventTypesCategory.cs175
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/EventTypesCategoryBase.cs188
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/EventTypesGroup.cs175
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/EventTypesGroupBase.cs188
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/FiberShape.cs137
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/FiberShapeBase.cs150
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/FiberSynth.cs137
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/FiberSynthBase.cs150
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HardwareBlower.cs302
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HardwareBlowerBase.cs313
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HardwareBlowerType.cs175
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HardwareBlowerTypeBase.cs188
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HardwareBreakSensor.cs264
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HardwareBreakSensorBase.cs275
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HardwareBreakSensorType.cs175
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HardwareBreakSensorTypeBase.cs188
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HardwareDancer.cs568
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HardwareDancerBase.cs579
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HardwareDancerType.cs175
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HardwareDancerTypeBase.cs188
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HardwareMotor.cs1105
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HardwareMotorBase.cs1116
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HardwareMotorType.cs213
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HardwareMotorTypeBase.cs226
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HardwarePidControl.cs910
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HardwarePidControlBase.cs921
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HardwarePidControlType.cs175
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HardwarePidControlTypeBase.cs188
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HardwareSpeedSensor.cs264
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HardwareSpeedSensorBase.cs275
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HardwareSpeedSensorType.cs175
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HardwareSpeedSensorTypeBase.cs188
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HardwareVersion.cs416
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HardwareVersionBase.cs416
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HardwareWinder.cs226
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HardwareWinderBase.cs237
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HardwareWinderType.cs175
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HardwareWinderTypeBase.cs188
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HtmlPage.cs213
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HtmlPageBase.cs226
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/IdsPack.cs483
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/IdsPackBase.cs489
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/IdsPackFormula.cs213
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/IdsPackFormulaBase.cs226
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/Job.cs1623
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/JobBase.cs1519
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/JobRun.cs285
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/JobRunBase.cs295
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/LinearMassDensityUnit.cs137
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/LinearMassDensityUnitBase.cs150
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/LiquidType.cs288
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/LiquidTypeBase.cs302
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/LiquidTypesRml.cs225
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/LiquidTypesRmlBase.cs237
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/Machine.cs1173
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/MachineBase.cs1160
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/MachineStudioVersion.cs277
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/MachineStudioVersionBase.cs288
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/MachineVersion.cs221
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/MachineVersionBase.cs226
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/MachinesEvent.cs328
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/MachinesEventBase.cs338
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/MediaColor.cs215
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/MediaColorBase.cs226
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/MediaCondition.cs137
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/MediaConditionBase.cs150
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/MediaMaterial.cs137
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/MediaMaterialBase.cs150
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/MediaPurpos.cs137
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/MediaPurposBase.cs150
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/MidTankType.cs175
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/MidTankTypeBase.cs188
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/Organization.cs301
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/OrganizationBase.cs314
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/Permission.cs175
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/PermissionBase.cs188
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/ProcessParametersTable.cs882
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/ProcessParametersTableBase.cs896
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/ProcessParametersTablesGroup.cs238
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/ProcessParametersTablesGroupBase.cs251
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/Rml.cs1262
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/RmlBase.cs1275
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/Role.cs213
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/RoleBase.cs226
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/RolesPermission.cs150
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/RolesPermissionBase.cs161
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/Segment.cs387
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/SegmentBase.cs251
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/Spool.cs305
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/SpoolBase.cs313
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/SpoolType.cs365
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/SpoolTypeBase.cs378
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/SyncConfiguration.cs24
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/SyncConfigurationBase.cs35
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/Sysdiagram.cs99
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/SysdiagramBase.cs112
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/TangoVersion.cs264
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/TangoVersionBase.cs275
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/TechController.cs252
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/TechControllerBase.cs263
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/TechDispenser.cs138
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/TechDispenserBase.cs149
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/TechHeater.cs138
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/TechHeaterBase.cs149
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/TechIo.cs442
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/TechIoBase.cs453
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/TechMonitor.cs366
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/TechMonitorBase.cs377
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/TechValve.cs258
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/TechValveBase.cs269
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/User.cs547
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/UserBase.cs567
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/UsersRole.cs188
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/UsersRoleBase.cs199
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/WindingMethod.cs175
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/WindingMethodBase.cs188
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/BrushStop.cs516
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/Cat.cs56
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/ColorCatalog.cs32
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/Configuration.cs80
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/Contact.cs52
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/Dispenser.cs38
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/EventType.cs22
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/HardwareVersion.cs44
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/IdsPack.cs24
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/Job.cs671
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/JobRun.cs32
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/LiquidType.cs16
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/LiquidTypesRml.cs26
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/Machine.cs153
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/MachineEvent.cs78
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/MachineVersion.cs55
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/MediaColor.cs37
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/ProcessParametersTable.cs28
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/ProcessParametersTablesGroup.cs29
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/Segment.cs324
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/Spool.cs27
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/User.cs138
-rw-r--r--Software/Visual_Studio/Tango.BL/Tango.BL.csproj101
-rw-r--r--Software/Visual_Studio/Tango.CodeGeneration/EntityInheritedCodeFile.cs19
-rw-r--r--Software/Visual_Studio/Tango.CodeGeneration/Tango.CodeGeneration.csproj4
-rw-r--r--Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFile.cshtml2
-rw-r--r--Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityInheritedCodeFile.cshtml19
-rw-r--r--Software/Visual_Studio/Tango.Transport/TransporterBase.cs33
-rw-r--r--Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/ObservablesGenerator.cs11
184 files changed, 28511 insertions, 26678 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB_lk2htmvj_wpftmp.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB_lk2htmvj_wpftmp.csproj
new file mode 100644
index 000000000..464e03c3c
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB_lk2htmvj_wpftmp.csproj
@@ -0,0 +1,530 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{94F7ACF8-55E1-4A02-B9BC-A818413FDBBF}</ProjectGuid>
+ <OutputType>library</OutputType>
+ <RootNamespace>Tango.MachineStudio.DB</RootNamespace>
+ <AssemblyName>Tango.MachineStudio.DB</AssemblyName>
+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\..\Build\Machine Studio\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\..\Build\Machine Studio\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="..\..\..\Versioning\GlobalVersionInfo.cs">
+ <Link>GlobalVersionInfo.cs</Link>
+ </Compile>
+ <Compile Include="Converters\ByteArrayToFileSizeConverter.cs" />
+ <Compile Include="Converters\EntityFieldNameToFriendlyStringConverter.cs" />
+ <Compile Include="Converters\EventTypeActionsToStringConverter.cs" />
+ <Compile Include="Converters\LiquidTypeRmlsToStringConverter.cs" />
+ <Compile Include="Converters\RolesPermissionsToStringConverter.cs" />
+ <Compile Include="DBModule.cs" />
+ <Compile Include="Messages\CloseEntityEditViewMessage.cs" />
+ <Compile Include="Messages\OpenEntityEditViewMessage.cs" />
+ <Compile Include="ViewModels\ActionTypesViewVM.cs" />
+ <Compile Include="ViewModels\AddressesViewVM.cs" />
+ <Compile Include="ViewModels\ApplicationDisplayPanelVersionsViewVM.cs" />
+ <Compile Include="ViewModels\ApplicationFirmwareVersionsViewVM.cs" />
+ <Compile Include="ViewModels\ApplicationOsVersionsViewVM.cs" />
+ <Compile Include="ViewModels\CartridgeTypesViewVM.cs" />
+ <Compile Include="ViewModels\CatsViewVM.cs" />
+ <Compile Include="ViewModels\CctsViewVM.cs" />
+ <Compile Include="ViewModels\ConfigurationsViewVM.cs" />
+ <Compile Include="ViewModels\ContactsViewVM.cs" />
+ <Compile Include="ViewModels\EventTypesGroupsViewVM.cs" />
+ <Compile Include="ViewModels\HardwareDancerTypesViewVM.cs" />
+ <Compile Include="ViewModels\DbTableViewModel.cs" />
+ <Compile Include="ViewModels\DialogOpenMode.cs" />
+ <Compile Include="ViewModels\DispenserTypesViewVM.cs" />
+ <Compile Include="ViewModels\EmbeddedFirmwareVersionsViewVM.cs" />
+ <Compile Include="ViewModels\EventTypesViewVM.cs" />
+ <Compile Include="ViewModels\FiberShapesViewVM.cs" />
+ <Compile Include="ViewModels\FiberSynthsViewVM.cs" />
+ <Compile Include="ViewModels\HardwareVersionsViewVM.cs" />
+ <Compile Include="ViewModels\IdsPackFormulasViewVM.cs" />
+ <Compile Include="ViewModels\IdsPacksViewVM.cs" />
+ <Compile Include="ViewModels\LinearMassDensityUnitsViewVM.cs" />
+ <Compile Include="ViewModels\LiquidTypesRmlsViewVM.cs" />
+ <Compile Include="ViewModels\LiquidTypesViewVM.cs" />
+ <Compile Include="ViewModels\MachinesViewVM.cs" />
+ <Compile Include="ViewModels\MachineVersionsViewVM.cs" />
+ <Compile Include="ViewModels\MediaColorsViewVM.cs" />
+ <Compile Include="ViewModels\MediaConditionsViewVM.cs" />
+ <Compile Include="ViewModels\MediaMaterialsViewVM.cs" />
+ <Compile Include="ViewModels\MediaPurposesViewVM.cs" />
+ <Compile Include="ViewModels\MidTankTypesViewVM.cs" />
+ <Compile Include="ViewModels\HardwareMotorTypesViewVM.cs" />
+ <Compile Include="ViewModels\MultiComboVM.cs" />
+ <Compile Include="ViewModels\OrganizationsViewVM.cs" />
+ <Compile Include="ViewModels\PermissionsViewVM.cs" />
+ <Compile Include="ViewModels\HardwarePidControlTypesViewVM.cs" />
+ <Compile Include="ViewModels\ProcessParametersTablesViewVM.cs" />
+ <Compile Include="ViewModels\ProcessParametersTablesGroupsViewVM.cs" />
+ <Compile Include="ViewModels\RmlsViewVM.cs" />
+ <Compile Include="ViewModels\RolesViewVM.cs" />
+ <Compile Include="ViewModels\SpoolTypesViewVM.cs" />
+ <Compile Include="ViewModels\UsersViewVM.cs" />
+ <Compile Include="ViewModels\EntityViewModel.cs" />
+ <Compile Include="ViewModels\MainViewVM.cs" />
+ <Compile Include="ViewModelLocator.cs" />
+ <Compile Include="Views\DBViews\ActionTypesView.xaml.cs">
+ <DependentUpon>ActionTypesView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\ActionTypeView.xaml.cs">
+ <DependentUpon>ActionTypeView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\SpoolTypesView.xaml.cs">
+ <DependentUpon>SpoolTypesView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\SpoolTypeView.xaml.cs">
+ <DependentUpon>SpoolTypeView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\EventTypesGroupsView.xaml.cs">
+ <DependentUpon>EventTypesGroupsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\EventTypesGroupView.xaml.cs">
+ <DependentUpon>EventTypesGroupView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\HardwarePidControlTypesView.xaml.cs">
+ <DependentUpon>HardwarePidControlTypesView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\HardwareDancerTypesView.xaml.cs">
+ <DependentUpon>HardwareDancerTypesView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\HardwarePidControlTypeView.xaml.cs">
+ <DependentUpon>HardwarePidControlTypeView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\HardwareDancerTypeView.xaml.cs">
+ <DependentUpon>HardwareDancerTypeView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\HardwareMotorTypeView.xaml.cs">
+ <DependentUpon>HardwareMotorTypeView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\HardwareMotorTypesView.xaml.cs">
+ <DependentUpon>HardwareMotorTypesView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\IdsPackFormulasView.xaml.cs">
+ <DependentUpon>IdsPackFormulasView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\IdsPackFormulaView.xaml.cs">
+ <DependentUpon>IdsPackFormulaView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\ProcessParametersTablesGroupsView.xaml.cs">
+ <DependentUpon>ProcessParametersTablesGroupsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\ProcessParametersTablesGroupView.xaml.cs">
+ <DependentUpon>ProcessParametersTablesGroupView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\ProcessParametersTablesView.xaml.cs">
+ <DependentUpon>ProcessParametersTablesView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\ProcessParametersTableView.xaml.cs">
+ <DependentUpon>ProcessParametersTableView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\MidTankTypesView.xaml.cs">
+ <DependentUpon>MidTankTypesView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\MidTankTypeView.xaml.cs">
+ <DependentUpon>MidTankTypeView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\CatsView.xaml.cs">
+ <DependentUpon>CatsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\CctsView.xaml.cs">
+ <DependentUpon>CctsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\CatView.xaml.cs">
+ <DependentUpon>CatView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\CctView.xaml.cs">
+ <DependentUpon>CctView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\RmlView.xaml.cs">
+ <DependentUpon>RmlView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\RmlsView.xaml.cs">
+ <DependentUpon>RmlsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\ContactView.xaml.cs">
+ <DependentUpon>ContactView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\ContactsView.xaml.cs">
+ <DependentUpon>ContactsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\MediaConditionsView.xaml.cs">
+ <DependentUpon>MediaConditionsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\MediaConditionView.xaml.cs">
+ <DependentUpon>MediaConditionView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\LinearMassDensityUnitsView.xaml.cs">
+ <DependentUpon>LinearMassDensityUnitsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\LinearMassDensityUnitView.xaml.cs">
+ <DependentUpon>LinearMassDensityUnitView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\FiberShapesView.xaml.cs">
+ <DependentUpon>FiberShapesView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\FiberShapeView.xaml.cs">
+ <DependentUpon>FiberShapeView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\FiberSynthsView.xaml.cs">
+ <DependentUpon>FiberSynthsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\FiberSynthView.xaml.cs">
+ <DependentUpon>FiberSynthView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\MediaPurposesView.xaml.cs">
+ <DependentUpon>MediaPurposesView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\MediaMaterialsView.xaml.cs">
+ <DependentUpon>MediaMaterialsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\MediaColorView.xaml.cs">
+ <DependentUpon>MediaColorView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\MediaPurposView.xaml.cs">
+ <DependentUpon>MediaPurposView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\MediaMaterialView.xaml.cs">
+ <DependentUpon>MediaMaterialView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\MediaColorsView.xaml.cs">
+ <DependentUpon>MediaColorsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\IdsPacksView.xaml.cs">
+ <DependentUpon>IdsPacksView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\CartridgeTypesView.xaml.cs">
+ <DependentUpon>CartridgeTypesView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\DispenserTypesView.xaml.cs">
+ <DependentUpon>DispenserTypesView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\CartridgeTypeView.xaml.cs">
+ <DependentUpon>CartridgeTypeView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\DispenserTypeView.xaml.cs">
+ <DependentUpon>DispenserTypeView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\IdsPackView.xaml.cs">
+ <DependentUpon>IdsPackView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\LiquidTypeView.xaml.cs">
+ <DependentUpon>LiquidTypeView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\LiquidTypesView.xaml.cs">
+ <DependentUpon>LiquidTypesView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\HardwareVersionView.xaml.cs">
+ <DependentUpon>HardwareVersionView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\EmbeddedFirmwareVersionView.xaml.cs">
+ <DependentUpon>EmbeddedFirmwareVersionView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\ApplicationOsVersionView.xaml.cs">
+ <DependentUpon>ApplicationOsVersionView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\ApplicationFirmwareVersionView.xaml.cs">
+ <DependentUpon>ApplicationFirmwareVersionView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\HardwareVersionsView.xaml.cs">
+ <DependentUpon>HardwareVersionsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\EmbeddedFirmwareVersionsView.xaml.cs">
+ <DependentUpon>EmbeddedFirmwareVersionsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\ApplicationOsVersionsView.xaml.cs">
+ <DependentUpon>ApplicationOsVersionsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\ApplicationFirmwareVersionsView.xaml.cs">
+ <DependentUpon>ApplicationFirmwareVersionsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\ConfigurationsView.xaml.cs">
+ <DependentUpon>ConfigurationsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\ApplicationDisplayPanelVersionsView.xaml.cs">
+ <DependentUpon>ApplicationDisplayPanelVersionsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\MachineVersionsView.xaml.cs">
+ <DependentUpon>MachineVersionsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\ApplicationDisplayPanelVersionView.xaml.cs">
+ <DependentUpon>ApplicationDisplayPanelVersionView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\MachineVersionView.xaml.cs">
+ <DependentUpon>MachineVersionView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\ConfigurationView.xaml.cs">
+ <DependentUpon>ConfigurationView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\PermissionView.xaml.cs">
+ <DependentUpon>PermissionView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\PermissionsView.xaml.cs">
+ <DependentUpon>PermissionsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\RoleView.xaml.cs">
+ <DependentUpon>RoleView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\RolesView.xaml.cs">
+ <DependentUpon>RolesView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\AddressesView.xaml.cs">
+ <DependentUpon>AddressesView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\AddressView.xaml.cs">
+ <DependentUpon>AddressView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\MachinesView.xaml.cs">
+ <DependentUpon>MachinesView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\MachineView.xaml.cs">
+ <DependentUpon>MachineView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\OrganizationsView.xaml.cs">
+ <DependentUpon>OrganizationsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\OrganizationView.xaml.cs">
+ <DependentUpon>OrganizationView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\EventTypesView.xaml.cs">
+ <DependentUpon>EventTypesView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\LiquidTypesRmlsView.xaml.cs">
+ <DependentUpon>LiquidTypesRmlsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\UsersView.xaml.cs">
+ <DependentUpon>UsersView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\EventTypeView.xaml.cs">
+ <DependentUpon>EventTypeView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\LiquidTypesRmlView.xaml.cs">
+ <DependentUpon>LiquidTypesRmlView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\UserView.xaml.cs">
+ <DependentUpon>UserView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\MainDBView.xaml.cs">
+ <DependentUpon>MainDBView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Controls\DbTableView.xaml.cs">
+ <DependentUpon>DbTableView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Controls\TableGrid.cs" />
+ <Compile Include="Converters\UsersRolesToStringConverter.cs" />
+ <Compile Include="CustomAttributes\DBViewAttribute.cs" />
+ <Compile Include="Managers\RegisteredView.cs" />
+ <Compile Include="Managers\ViewsManager.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Properties\AssemblyInfo.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Properties\Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>Resources.resx</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\Settings.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Settings.settings</DependentUpon>
+ <DesignTimeSharedInput>True</DesignTimeSharedInput>
+ </Compile>
+ <EmbeddedResource Include="Properties\Resources.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ <None Include="App.config" />
+ <None Include="packages.config" />
+ <None Include="Properties\Settings.settings">
+ <Generator>SettingsSingleFileGenerator</Generator>
+ <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Tango.BL\Tango.BL.csproj">
+ <Project>{f441feee-322a-4943-b566-110e12fd3b72}</Project>
+ <Name>Tango.BL</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.ColorPicker\Tango.ColorPicker.csproj">
+ <Project>{a2f5af44-29ff-45d6-9d25-ecda5cce88b5}</Project>
+ <Name>Tango.ColorPicker</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Core\Tango.Core.csproj">
+ <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project>
+ <Name>Tango.Core</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.DAL.Remote\Tango.DAL.Remote.csproj">
+ <Project>{38197109-8610-4d3f-92b9-16d48df94d7c}</Project>
+ <Name>Tango.DAL.Remote</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Integration\Tango.Integration.csproj">
+ <Project>{4206ac58-3b57-4699-8835-90bf6db01a61}</Project>
+ <Name>Tango.Integration</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.SharedUI\Tango.SharedUI.csproj">
+ <Project>{8491d07b-c1f6-4b62-a412-41b9fd2d6538}</Project>
+ <Name>Tango.SharedUI</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Tango.MachineStudio.Common\Tango.MachineStudio.Common.csproj">
+ <Project>{cb0b0aa2-bb24-4bca-a720-45e397684e12}</Project>
+ <Name>Tango.MachineStudio.Common</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ </ItemGroup>
+ <ItemGroup>
+ </ItemGroup>
+ <ItemGroup>
+ </ItemGroup>
+ <ItemGroup />
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
+ </VisualStudio>
+ </ProjectExtensions>
+ <ItemGroup>
+ <ReferencePath Include="D:\Development\Tango\Software\Visual_Studio\packages\Dragablz.0.0.3.197\lib\net45\Dragablz.dll" />
+ <ReferencePath Include="D:\Development\Tango\Software\Visual_Studio\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.dll" />
+ <ReferencePath Include="D:\Development\Tango\Software\Visual_Studio\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.SqlServer.dll" />
+ <ReferencePath Include="D:\Development\Tango\Software\Visual_Studio\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll" />
+ <ReferencePath Include="D:\Development\Tango\Software\Visual_Studio\packages\MaterialDesignColors.1.1.2\lib\net45\MaterialDesignColors.dll" />
+ <ReferencePath Include="D:\Development\Tango\Software\Visual_Studio\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll" />
+ <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Microsoft.CSharp.dll" />
+ <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\mscorlib.dll" />
+ <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\PresentationCore.dll" />
+ <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\PresentationFramework.dll" />
+ <ReferencePath Include="D:\Development\Tango\Software\Visual_Studio\packages\SimpleValidator.0.6.1.0\lib\net40\SimpleValidator.dll" />
+ <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.ComponentModel.DataAnnotations.dll" />
+ <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Core.dll" />
+ <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Data.DataSetExtensions.dll" />
+ <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Data.dll" />
+ <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.dll" />
+ <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Net.Http.dll" />
+ <ReferencePath Include="D:\Development\Tango\Software\Visual_Studio\packages\Expression.Blend.Sdk.1.0.2\lib\net45\System.Windows.Interactivity.dll" />
+ <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Xaml.dll" />
+ <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Xml.dll" />
+ <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Xml.Linq.dll" />
+ <ReferencePath Include="D:\Development\Tango\Software\Visual_Studio\Build\Core\Debug\Tango.BL.dll" />
+ <ReferencePath Include="D:\Development\Tango\Software\Visual_Studio\Build\Core\Debug\Tango.ColorPicker.dll" />
+ <ReferencePath Include="D:\Development\Tango\Software\Visual_Studio\Build\Core\Debug\Tango.Core.dll" />
+ <ReferencePath Include="D:\Development\Tango\Software\Visual_Studio\Build\Core\Debug\Tango.DAL.Remote.dll" />
+ <ReferencePath Include="D:\Development\Tango\Software\Visual_Studio\Build\Core\Debug\Tango.Integration.dll" />
+ <ReferencePath Include="D:\Development\Tango\Software\Visual_Studio\Build\Machine Studio\Debug\Tango.MachineStudio.Common.dll" />
+ <ReferencePath Include="D:\Development\Tango\Software\Visual_Studio\Build\Core\Debug\Tango.SharedUI.dll" />
+ <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\WindowsBase.dll" />
+ <ReferencePath Include="D:\Development\Tango\Software\Visual_Studio\packages\WriteableBitmapEx.1.5.0.0\lib\net40\WriteableBitmapEx.Wpf.dll" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Controls\DbTableView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\ActionTypesView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\ActionTypeView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\SpoolTypesView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\SpoolTypeView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\EventTypesGroupsView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\EventTypesGroupView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\HardwarePidControlTypesView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\HardwareDancerTypesView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\HardwarePidControlTypeView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\HardwareDancerTypeView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\HardwareMotorTypeView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\HardwareMotorTypesView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\IdsPackFormulasView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\IdsPackFormulaView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\ProcessParametersTablesGroupsView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\ProcessParametersTablesGroupView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\ProcessParametersTablesView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\ProcessParametersTableView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\MidTankTypesView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\MidTankTypeView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\CatsView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\CctsView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\CatView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\CctView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\RmlView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\RmlsView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\ContactView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\ContactsView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\MediaConditionsView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\MediaConditionView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\LinearMassDensityUnitsView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\LinearMassDensityUnitView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\FiberShapesView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\FiberShapeView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\FiberSynthsView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\FiberSynthView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\MediaPurposesView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\MediaMaterialsView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\MediaColorView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\MediaPurposView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\MediaMaterialView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\MediaColorsView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\IdsPacksView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\CartridgeTypesView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\DispenserTypesView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\CartridgeTypeView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\DispenserTypeView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\IdsPackView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\LiquidTypeView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\LiquidTypesView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\HardwareVersionView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\EmbeddedFirmwareVersionView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\ApplicationOsVersionView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\ApplicationFirmwareVersionView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\HardwareVersionsView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\EmbeddedFirmwareVersionsView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\ApplicationOsVersionsView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\ApplicationFirmwareVersionsView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\ConfigurationsView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\ApplicationDisplayPanelVersionsView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\MachineVersionsView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\ApplicationDisplayPanelVersionView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\MachineVersionView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\ConfigurationView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\PermissionView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\PermissionsView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\RoleView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\RolesView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\AddressesView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\AddressView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\MachinesView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\MachineView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\OrganizationsView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\OrganizationView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\EventTypesView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\LiquidTypesRmlsView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\UsersView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\EventTypeView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\LiquidTypesRmlView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\DBViews\UserView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\Views\MainDBView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.DB\obj\Debug\GeneratedInternalTypeHelper.g.cs" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.BL/Entities/ActionType.cs b/Software/Visual_Studio/Tango.BL/Entities/ActionType.cs
index a6d3d549f..a5f6f9f4d 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/ActionType.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/ActionType.cs
@@ -1,188 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("ACTION_TYPES")]
- public partial class ActionType : ObservableEntity<ActionType>
+ public partial class ActionType : ActionTypeBase
{
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<String> DescriptionChanged;
-
- public event EventHandler<SynchronizedObservableCollection<EventTypesAction>> EventTypesActionsChanged;
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the actiontype code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the actiontype name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected String _description;
-
- /// <summary>
- /// Gets or sets the actiontype description.
- /// </summary>
-
- [Column("DESCRIPTION")]
-
- public String Description
- {
- get
- {
- return _description;
- }
-
- set
- {
- if (_description != value)
- {
- _description = value;
-
- OnDescriptionChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<EventTypesAction> _eventtypesactions;
-
- /// <summary>
- /// Gets or sets the actiontype event types actions.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<EventTypesAction> EventTypesActions
- {
- get
- {
- return _eventtypesactions;
- }
-
- set
- {
- if (_eventtypesactions != value)
- {
- _eventtypesactions = value;
-
- OnEventTypesActionsChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Description has changed.
- /// </summary>
- protected virtual void OnDescriptionChanged(String description)
- {
- DescriptionChanged?.Invoke(this, description);
- RaisePropertyChanged(nameof(Description));
- }
-
- /// <summary>
- /// Called when the EventTypesActions has changed.
- /// </summary>
- protected virtual void OnEventTypesActionsChanged(SynchronizedObservableCollection<EventTypesAction> eventtypesactions)
- {
- EventTypesActionsChanged?.Invoke(this, eventtypesactions);
- RaisePropertyChanged(nameof(EventTypesActions));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="ActionType" /> class.
/// </summary>
public ActionType() : base()
{
- EventTypesActions = new SynchronizedObservableCollection<EventTypesAction>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/ActionTypeBase.cs b/Software/Visual_Studio/Tango.BL/Entities/ActionTypeBase.cs
new file mode 100644
index 000000000..48357ed4d
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/ActionTypeBase.cs
@@ -0,0 +1,188 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("ACTION_TYPES")]
+ public abstract class ActionTypeBase : ObservableEntity<ActionType>
+ {
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<String> DescriptionChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<EventTypesAction>> EventTypesActionsChanged;
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the actiontypebase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the actiontypebase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _description;
+
+ /// <summary>
+ /// Gets or sets the actiontypebase description.
+ /// </summary>
+
+ [Column("DESCRIPTION")]
+
+ public String Description
+ {
+ get
+ {
+ return _description;
+ }
+
+ set
+ {
+ if (_description != value)
+ {
+ _description = value;
+
+ OnDescriptionChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<EventTypesAction> _eventtypesactions;
+
+ /// <summary>
+ /// Gets or sets the actiontypebase event types actions.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<EventTypesAction> EventTypesActions
+ {
+ get
+ {
+ return _eventtypesactions;
+ }
+
+ set
+ {
+ if (_eventtypesactions != value)
+ {
+ _eventtypesactions = value;
+
+ OnEventTypesActionsChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Description has changed.
+ /// </summary>
+ protected virtual void OnDescriptionChanged(String description)
+ {
+ DescriptionChanged?.Invoke(this, description);
+ RaisePropertyChanged(nameof(Description));
+ }
+
+ /// <summary>
+ /// Called when the EventTypesActions has changed.
+ /// </summary>
+ protected virtual void OnEventTypesActionsChanged(SynchronizedObservableCollection<EventTypesAction> eventtypesactions)
+ {
+ EventTypesActionsChanged?.Invoke(this, eventtypesactions);
+ RaisePropertyChanged(nameof(EventTypesActions));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ActionTypeBase" /> class.
+ /// </summary>
+ public ActionTypeBase() : base()
+ {
+
+ EventTypesActions = new SynchronizedObservableCollection<EventTypesAction>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/Address.cs b/Software/Visual_Studio/Tango.BL/Entities/Address.cs
index 1d93a21e3..642533715 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/Address.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/Address.cs
@@ -1,416 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("ADDRESSES")]
- public partial class Address : ObservableEntity<Address>
+ public partial class Address : AddressBase
{
-
- public event EventHandler<Boolean> DeletedChanged;
-
- public event EventHandler<String> AddressStringChanged;
-
- public event EventHandler<String> LocalityChanged;
-
- public event EventHandler<String> CountryChanged;
-
- public event EventHandler<String> CityChanged;
-
- public event EventHandler<String> StateChanged;
-
- public event EventHandler<String> CountryCodeChanged;
-
- public event EventHandler<String> PostalCodeChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Organization>> OrganizationsChanged;
-
- public event EventHandler<SynchronizedObservableCollection<User>> UsersChanged;
-
- protected Boolean _deleted;
-
- /// <summary>
- /// Gets or sets the address deleted.
- /// </summary>
-
- [Column("DELETED")]
-
- public Boolean Deleted
- {
- get
- {
- return _deleted;
- }
-
- set
- {
- if (_deleted != value)
- {
- _deleted = value;
-
- OnDeletedChanged(value);
-
- }
- }
- }
-
- protected String _addressstring;
-
- /// <summary>
- /// Gets or sets the address address string.
- /// </summary>
-
- [Column("ADDRESS_STRING")]
-
- public String AddressString
- {
- get
- {
- return _addressstring;
- }
-
- set
- {
- if (_addressstring != value)
- {
- _addressstring = value;
-
- OnAddressStringChanged(value);
-
- }
- }
- }
-
- protected String _locality;
-
- /// <summary>
- /// Gets or sets the address locality.
- /// </summary>
-
- [Column("LOCALITY")]
-
- public String Locality
- {
- get
- {
- return _locality;
- }
-
- set
- {
- if (_locality != value)
- {
- _locality = value;
-
- OnLocalityChanged(value);
-
- }
- }
- }
-
- protected String _country;
-
- /// <summary>
- /// Gets or sets the address country.
- /// </summary>
-
- [Column("COUNTRY")]
-
- public String Country
- {
- get
- {
- return _country;
- }
-
- set
- {
- if (_country != value)
- {
- _country = value;
-
- OnCountryChanged(value);
-
- }
- }
- }
-
- protected String _city;
-
- /// <summary>
- /// Gets or sets the address city.
- /// </summary>
-
- [Column("CITY")]
-
- public String City
- {
- get
- {
- return _city;
- }
-
- set
- {
- if (_city != value)
- {
- _city = value;
-
- OnCityChanged(value);
-
- }
- }
- }
-
- protected String _state;
-
- /// <summary>
- /// Gets or sets the address state.
- /// </summary>
-
- [Column("STATE")]
-
- public String State
- {
- get
- {
- return _state;
- }
-
- set
- {
- if (_state != value)
- {
- _state = value;
-
- OnStateChanged(value);
-
- }
- }
- }
-
- protected String _countrycode;
-
- /// <summary>
- /// Gets or sets the address country code.
- /// </summary>
-
- [Column("COUNTRY_CODE")]
-
- public String CountryCode
- {
- get
- {
- return _countrycode;
- }
-
- set
- {
- if (_countrycode != value)
- {
- _countrycode = value;
-
- OnCountryCodeChanged(value);
-
- }
- }
- }
-
- protected String _postalcode;
-
- /// <summary>
- /// Gets or sets the address postal code.
- /// </summary>
-
- [Column("POSTAL_CODE")]
-
- public String PostalCode
- {
- get
- {
- return _postalcode;
- }
-
- set
- {
- if (_postalcode != value)
- {
- _postalcode = value;
-
- OnPostalCodeChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<Organization> _organizations;
-
- /// <summary>
- /// Gets or sets the address organizations.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Organization> Organizations
- {
- get
- {
- return _organizations;
- }
-
- set
- {
- if (_organizations != value)
- {
- _organizations = value;
-
- OnOrganizationsChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<User> _users;
-
- /// <summary>
- /// Gets or sets the address users.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<User> Users
- {
- get
- {
- return _users;
- }
-
- set
- {
- if (_users != value)
- {
- _users = value;
-
- OnUsersChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Deleted has changed.
- /// </summary>
- protected virtual void OnDeletedChanged(Boolean deleted)
- {
- DeletedChanged?.Invoke(this, deleted);
- RaisePropertyChanged(nameof(Deleted));
- }
-
- /// <summary>
- /// Called when the AddressString has changed.
- /// </summary>
- protected virtual void OnAddressStringChanged(String addressstring)
- {
- AddressStringChanged?.Invoke(this, addressstring);
- RaisePropertyChanged(nameof(AddressString));
- }
-
- /// <summary>
- /// Called when the Locality has changed.
- /// </summary>
- protected virtual void OnLocalityChanged(String locality)
- {
- LocalityChanged?.Invoke(this, locality);
- RaisePropertyChanged(nameof(Locality));
- }
-
- /// <summary>
- /// Called when the Country has changed.
- /// </summary>
- protected virtual void OnCountryChanged(String country)
- {
- CountryChanged?.Invoke(this, country);
- RaisePropertyChanged(nameof(Country));
- }
-
- /// <summary>
- /// Called when the City has changed.
- /// </summary>
- protected virtual void OnCityChanged(String city)
- {
- CityChanged?.Invoke(this, city);
- RaisePropertyChanged(nameof(City));
- }
-
- /// <summary>
- /// Called when the State has changed.
- /// </summary>
- protected virtual void OnStateChanged(String state)
- {
- StateChanged?.Invoke(this, state);
- RaisePropertyChanged(nameof(State));
- }
-
- /// <summary>
- /// Called when the CountryCode has changed.
- /// </summary>
- protected virtual void OnCountryCodeChanged(String countrycode)
- {
- CountryCodeChanged?.Invoke(this, countrycode);
- RaisePropertyChanged(nameof(CountryCode));
- }
-
- /// <summary>
- /// Called when the PostalCode has changed.
- /// </summary>
- protected virtual void OnPostalCodeChanged(String postalcode)
- {
- PostalCodeChanged?.Invoke(this, postalcode);
- RaisePropertyChanged(nameof(PostalCode));
- }
-
- /// <summary>
- /// Called when the Organizations has changed.
- /// </summary>
- protected virtual void OnOrganizationsChanged(SynchronizedObservableCollection<Organization> organizations)
- {
- OrganizationsChanged?.Invoke(this, organizations);
- RaisePropertyChanged(nameof(Organizations));
- }
-
- /// <summary>
- /// Called when the Users has changed.
- /// </summary>
- protected virtual void OnUsersChanged(SynchronizedObservableCollection<User> users)
- {
- UsersChanged?.Invoke(this, users);
- RaisePropertyChanged(nameof(Users));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="Address" /> class.
/// </summary>
public Address() : base()
{
- Organizations = new SynchronizedObservableCollection<Organization>();
-
- Users = new SynchronizedObservableCollection<User>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/AddressBase.cs b/Software/Visual_Studio/Tango.BL/Entities/AddressBase.cs
new file mode 100644
index 000000000..6266c7778
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/AddressBase.cs
@@ -0,0 +1,416 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("ADDRESSES")]
+ public abstract class AddressBase : ObservableEntity<Address>
+ {
+
+ public event EventHandler<Boolean> DeletedChanged;
+
+ public event EventHandler<String> AddressStringChanged;
+
+ public event EventHandler<String> LocalityChanged;
+
+ public event EventHandler<String> CountryChanged;
+
+ public event EventHandler<String> CityChanged;
+
+ public event EventHandler<String> StateChanged;
+
+ public event EventHandler<String> CountryCodeChanged;
+
+ public event EventHandler<String> PostalCodeChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Organization>> OrganizationsChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<User>> UsersChanged;
+
+ protected Boolean _deleted;
+
+ /// <summary>
+ /// Gets or sets the addressbase deleted.
+ /// </summary>
+
+ [Column("DELETED")]
+
+ public Boolean Deleted
+ {
+ get
+ {
+ return _deleted;
+ }
+
+ set
+ {
+ if (_deleted != value)
+ {
+ _deleted = value;
+
+ OnDeletedChanged(value);
+
+ }
+ }
+ }
+
+ protected String _addressstring;
+
+ /// <summary>
+ /// Gets or sets the addressbase address string.
+ /// </summary>
+
+ [Column("ADDRESS_STRING")]
+
+ public String AddressString
+ {
+ get
+ {
+ return _addressstring;
+ }
+
+ set
+ {
+ if (_addressstring != value)
+ {
+ _addressstring = value;
+
+ OnAddressStringChanged(value);
+
+ }
+ }
+ }
+
+ protected String _locality;
+
+ /// <summary>
+ /// Gets or sets the addressbase locality.
+ /// </summary>
+
+ [Column("LOCALITY")]
+
+ public String Locality
+ {
+ get
+ {
+ return _locality;
+ }
+
+ set
+ {
+ if (_locality != value)
+ {
+ _locality = value;
+
+ OnLocalityChanged(value);
+
+ }
+ }
+ }
+
+ protected String _country;
+
+ /// <summary>
+ /// Gets or sets the addressbase country.
+ /// </summary>
+
+ [Column("COUNTRY")]
+
+ public String Country
+ {
+ get
+ {
+ return _country;
+ }
+
+ set
+ {
+ if (_country != value)
+ {
+ _country = value;
+
+ OnCountryChanged(value);
+
+ }
+ }
+ }
+
+ protected String _city;
+
+ /// <summary>
+ /// Gets or sets the addressbase city.
+ /// </summary>
+
+ [Column("CITY")]
+
+ public String City
+ {
+ get
+ {
+ return _city;
+ }
+
+ set
+ {
+ if (_city != value)
+ {
+ _city = value;
+
+ OnCityChanged(value);
+
+ }
+ }
+ }
+
+ protected String _state;
+
+ /// <summary>
+ /// Gets or sets the addressbase state.
+ /// </summary>
+
+ [Column("STATE")]
+
+ public String State
+ {
+ get
+ {
+ return _state;
+ }
+
+ set
+ {
+ if (_state != value)
+ {
+ _state = value;
+
+ OnStateChanged(value);
+
+ }
+ }
+ }
+
+ protected String _countrycode;
+
+ /// <summary>
+ /// Gets or sets the addressbase country code.
+ /// </summary>
+
+ [Column("COUNTRY_CODE")]
+
+ public String CountryCode
+ {
+ get
+ {
+ return _countrycode;
+ }
+
+ set
+ {
+ if (_countrycode != value)
+ {
+ _countrycode = value;
+
+ OnCountryCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _postalcode;
+
+ /// <summary>
+ /// Gets or sets the addressbase postal code.
+ /// </summary>
+
+ [Column("POSTAL_CODE")]
+
+ public String PostalCode
+ {
+ get
+ {
+ return _postalcode;
+ }
+
+ set
+ {
+ if (_postalcode != value)
+ {
+ _postalcode = value;
+
+ OnPostalCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Organization> _organizations;
+
+ /// <summary>
+ /// Gets or sets the addressbase organizations.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Organization> Organizations
+ {
+ get
+ {
+ return _organizations;
+ }
+
+ set
+ {
+ if (_organizations != value)
+ {
+ _organizations = value;
+
+ OnOrganizationsChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<User> _users;
+
+ /// <summary>
+ /// Gets or sets the addressbase users.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<User> Users
+ {
+ get
+ {
+ return _users;
+ }
+
+ set
+ {
+ if (_users != value)
+ {
+ _users = value;
+
+ OnUsersChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Deleted has changed.
+ /// </summary>
+ protected virtual void OnDeletedChanged(Boolean deleted)
+ {
+ DeletedChanged?.Invoke(this, deleted);
+ RaisePropertyChanged(nameof(Deleted));
+ }
+
+ /// <summary>
+ /// Called when the AddressString has changed.
+ /// </summary>
+ protected virtual void OnAddressStringChanged(String addressstring)
+ {
+ AddressStringChanged?.Invoke(this, addressstring);
+ RaisePropertyChanged(nameof(AddressString));
+ }
+
+ /// <summary>
+ /// Called when the Locality has changed.
+ /// </summary>
+ protected virtual void OnLocalityChanged(String locality)
+ {
+ LocalityChanged?.Invoke(this, locality);
+ RaisePropertyChanged(nameof(Locality));
+ }
+
+ /// <summary>
+ /// Called when the Country has changed.
+ /// </summary>
+ protected virtual void OnCountryChanged(String country)
+ {
+ CountryChanged?.Invoke(this, country);
+ RaisePropertyChanged(nameof(Country));
+ }
+
+ /// <summary>
+ /// Called when the City has changed.
+ /// </summary>
+ protected virtual void OnCityChanged(String city)
+ {
+ CityChanged?.Invoke(this, city);
+ RaisePropertyChanged(nameof(City));
+ }
+
+ /// <summary>
+ /// Called when the State has changed.
+ /// </summary>
+ protected virtual void OnStateChanged(String state)
+ {
+ StateChanged?.Invoke(this, state);
+ RaisePropertyChanged(nameof(State));
+ }
+
+ /// <summary>
+ /// Called when the CountryCode has changed.
+ /// </summary>
+ protected virtual void OnCountryCodeChanged(String countrycode)
+ {
+ CountryCodeChanged?.Invoke(this, countrycode);
+ RaisePropertyChanged(nameof(CountryCode));
+ }
+
+ /// <summary>
+ /// Called when the PostalCode has changed.
+ /// </summary>
+ protected virtual void OnPostalCodeChanged(String postalcode)
+ {
+ PostalCodeChanged?.Invoke(this, postalcode);
+ RaisePropertyChanged(nameof(PostalCode));
+ }
+
+ /// <summary>
+ /// Called when the Organizations has changed.
+ /// </summary>
+ protected virtual void OnOrganizationsChanged(SynchronizedObservableCollection<Organization> organizations)
+ {
+ OrganizationsChanged?.Invoke(this, organizations);
+ RaisePropertyChanged(nameof(Organizations));
+ }
+
+ /// <summary>
+ /// Called when the Users has changed.
+ /// </summary>
+ protected virtual void OnUsersChanged(SynchronizedObservableCollection<User> users)
+ {
+ UsersChanged?.Invoke(this, users);
+ RaisePropertyChanged(nameof(Users));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="AddressBase" /> class.
+ /// </summary>
+ public AddressBase() : base()
+ {
+
+ Organizations = new SynchronizedObservableCollection<Organization>();
+
+ Users = new SynchronizedObservableCollection<User>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/ApplicationDisplayPanelVersion.cs b/Software/Visual_Studio/Tango.BL/Entities/ApplicationDisplayPanelVersion.cs
index 607efd1c4..ae1e9fd51 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/ApplicationDisplayPanelVersion.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/ApplicationDisplayPanelVersion.cs
@@ -1,150 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("APPLICATION_DISPLAY_PANEL_VERSIONS")]
- public partial class ApplicationDisplayPanelVersion : ObservableEntity<ApplicationDisplayPanelVersion>
+ public partial class ApplicationDisplayPanelVersion : ApplicationDisplayPanelVersionBase
{
-
- public event EventHandler<Double> VersionChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Configuration>> ConfigurationsChanged;
-
- protected Double _version;
-
- /// <summary>
- /// Gets or sets the applicationdisplaypanelversion version.
- /// </summary>
-
- [Column("VERSION")]
-
- public Double Version
- {
- get
- {
- return _version;
- }
-
- set
- {
- if (_version != value)
- {
- _version = value;
-
- OnVersionChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the applicationdisplaypanelversion name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<Configuration> _configurations;
-
- /// <summary>
- /// Gets or sets the applicationdisplaypanelversion configurations.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Configuration> Configurations
- {
- get
- {
- return _configurations;
- }
-
- set
- {
- if (_configurations != value)
- {
- _configurations = value;
-
- OnConfigurationsChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Version has changed.
- /// </summary>
- protected virtual void OnVersionChanged(Double version)
- {
- VersionChanged?.Invoke(this, version);
- RaisePropertyChanged(nameof(Version));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Configurations has changed.
- /// </summary>
- protected virtual void OnConfigurationsChanged(SynchronizedObservableCollection<Configuration> configurations)
- {
- ConfigurationsChanged?.Invoke(this, configurations);
- RaisePropertyChanged(nameof(Configurations));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="ApplicationDisplayPanelVersion" /> class.
/// </summary>
public ApplicationDisplayPanelVersion() : base()
{
- Configurations = new SynchronizedObservableCollection<Configuration>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/ApplicationDisplayPanelVersionBase.cs b/Software/Visual_Studio/Tango.BL/Entities/ApplicationDisplayPanelVersionBase.cs
new file mode 100644
index 000000000..f6a8854df
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/ApplicationDisplayPanelVersionBase.cs
@@ -0,0 +1,150 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("APPLICATION_DISPLAY_PANEL_VERSIONS")]
+ public abstract class ApplicationDisplayPanelVersionBase : ObservableEntity<ApplicationDisplayPanelVersion>
+ {
+
+ public event EventHandler<Double> VersionChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Configuration>> ConfigurationsChanged;
+
+ protected Double _version;
+
+ /// <summary>
+ /// Gets or sets the applicationdisplaypanelversionbase version.
+ /// </summary>
+
+ [Column("VERSION")]
+
+ public Double Version
+ {
+ get
+ {
+ return _version;
+ }
+
+ set
+ {
+ if (_version != value)
+ {
+ _version = value;
+
+ OnVersionChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the applicationdisplaypanelversionbase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Configuration> _configurations;
+
+ /// <summary>
+ /// Gets or sets the applicationdisplaypanelversionbase configurations.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Configuration> Configurations
+ {
+ get
+ {
+ return _configurations;
+ }
+
+ set
+ {
+ if (_configurations != value)
+ {
+ _configurations = value;
+
+ OnConfigurationsChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Version has changed.
+ /// </summary>
+ protected virtual void OnVersionChanged(Double version)
+ {
+ VersionChanged?.Invoke(this, version);
+ RaisePropertyChanged(nameof(Version));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Configurations has changed.
+ /// </summary>
+ protected virtual void OnConfigurationsChanged(SynchronizedObservableCollection<Configuration> configurations)
+ {
+ ConfigurationsChanged?.Invoke(this, configurations);
+ RaisePropertyChanged(nameof(Configurations));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ApplicationDisplayPanelVersionBase" /> class.
+ /// </summary>
+ public ApplicationDisplayPanelVersionBase() : base()
+ {
+
+ Configurations = new SynchronizedObservableCollection<Configuration>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/ApplicationFirmwareVersion.cs b/Software/Visual_Studio/Tango.BL/Entities/ApplicationFirmwareVersion.cs
index 7948410cc..8ca291e77 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/ApplicationFirmwareVersion.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/ApplicationFirmwareVersion.cs
@@ -1,150 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("APPLICATION_FIRMWARE_VERSIONS")]
- public partial class ApplicationFirmwareVersion : ObservableEntity<ApplicationFirmwareVersion>
+ public partial class ApplicationFirmwareVersion : ApplicationFirmwareVersionBase
{
-
- public event EventHandler<Double> VersionChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Configuration>> ConfigurationsChanged;
-
- protected Double _version;
-
- /// <summary>
- /// Gets or sets the applicationfirmwareversion version.
- /// </summary>
-
- [Column("VERSION")]
-
- public Double Version
- {
- get
- {
- return _version;
- }
-
- set
- {
- if (_version != value)
- {
- _version = value;
-
- OnVersionChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the applicationfirmwareversion name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<Configuration> _configurations;
-
- /// <summary>
- /// Gets or sets the applicationfirmwareversion configurations.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Configuration> Configurations
- {
- get
- {
- return _configurations;
- }
-
- set
- {
- if (_configurations != value)
- {
- _configurations = value;
-
- OnConfigurationsChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Version has changed.
- /// </summary>
- protected virtual void OnVersionChanged(Double version)
- {
- VersionChanged?.Invoke(this, version);
- RaisePropertyChanged(nameof(Version));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Configurations has changed.
- /// </summary>
- protected virtual void OnConfigurationsChanged(SynchronizedObservableCollection<Configuration> configurations)
- {
- ConfigurationsChanged?.Invoke(this, configurations);
- RaisePropertyChanged(nameof(Configurations));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="ApplicationFirmwareVersion" /> class.
/// </summary>
public ApplicationFirmwareVersion() : base()
{
- Configurations = new SynchronizedObservableCollection<Configuration>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/ApplicationFirmwareVersionBase.cs b/Software/Visual_Studio/Tango.BL/Entities/ApplicationFirmwareVersionBase.cs
new file mode 100644
index 000000000..d47ba801f
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/ApplicationFirmwareVersionBase.cs
@@ -0,0 +1,150 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("APPLICATION_FIRMWARE_VERSIONS")]
+ public abstract class ApplicationFirmwareVersionBase : ObservableEntity<ApplicationFirmwareVersion>
+ {
+
+ public event EventHandler<Double> VersionChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Configuration>> ConfigurationsChanged;
+
+ protected Double _version;
+
+ /// <summary>
+ /// Gets or sets the applicationfirmwareversionbase version.
+ /// </summary>
+
+ [Column("VERSION")]
+
+ public Double Version
+ {
+ get
+ {
+ return _version;
+ }
+
+ set
+ {
+ if (_version != value)
+ {
+ _version = value;
+
+ OnVersionChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the applicationfirmwareversionbase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Configuration> _configurations;
+
+ /// <summary>
+ /// Gets or sets the applicationfirmwareversionbase configurations.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Configuration> Configurations
+ {
+ get
+ {
+ return _configurations;
+ }
+
+ set
+ {
+ if (_configurations != value)
+ {
+ _configurations = value;
+
+ OnConfigurationsChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Version has changed.
+ /// </summary>
+ protected virtual void OnVersionChanged(Double version)
+ {
+ VersionChanged?.Invoke(this, version);
+ RaisePropertyChanged(nameof(Version));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Configurations has changed.
+ /// </summary>
+ protected virtual void OnConfigurationsChanged(SynchronizedObservableCollection<Configuration> configurations)
+ {
+ ConfigurationsChanged?.Invoke(this, configurations);
+ RaisePropertyChanged(nameof(Configurations));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ApplicationFirmwareVersionBase" /> class.
+ /// </summary>
+ public ApplicationFirmwareVersionBase() : base()
+ {
+
+ Configurations = new SynchronizedObservableCollection<Configuration>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/ApplicationOsVersion.cs b/Software/Visual_Studio/Tango.BL/Entities/ApplicationOsVersion.cs
index 68fd2b500..87a58cebd 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/ApplicationOsVersion.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/ApplicationOsVersion.cs
@@ -1,150 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("APPLICATION_OS_VERSIONS")]
- public partial class ApplicationOsVersion : ObservableEntity<ApplicationOsVersion>
+ public partial class ApplicationOsVersion : ApplicationOsVersionBase
{
-
- public event EventHandler<Double> VersionChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Configuration>> ConfigurationsChanged;
-
- protected Double _version;
-
- /// <summary>
- /// Gets or sets the applicationosversion version.
- /// </summary>
-
- [Column("VERSION")]
-
- public Double Version
- {
- get
- {
- return _version;
- }
-
- set
- {
- if (_version != value)
- {
- _version = value;
-
- OnVersionChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the applicationosversion name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<Configuration> _configurations;
-
- /// <summary>
- /// Gets or sets the applicationosversion configurations.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Configuration> Configurations
- {
- get
- {
- return _configurations;
- }
-
- set
- {
- if (_configurations != value)
- {
- _configurations = value;
-
- OnConfigurationsChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Version has changed.
- /// </summary>
- protected virtual void OnVersionChanged(Double version)
- {
- VersionChanged?.Invoke(this, version);
- RaisePropertyChanged(nameof(Version));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Configurations has changed.
- /// </summary>
- protected virtual void OnConfigurationsChanged(SynchronizedObservableCollection<Configuration> configurations)
- {
- ConfigurationsChanged?.Invoke(this, configurations);
- RaisePropertyChanged(nameof(Configurations));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="ApplicationOsVersion" /> class.
/// </summary>
public ApplicationOsVersion() : base()
{
- Configurations = new SynchronizedObservableCollection<Configuration>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/ApplicationOsVersionBase.cs b/Software/Visual_Studio/Tango.BL/Entities/ApplicationOsVersionBase.cs
new file mode 100644
index 000000000..76c803d5f
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/ApplicationOsVersionBase.cs
@@ -0,0 +1,150 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("APPLICATION_OS_VERSIONS")]
+ public abstract class ApplicationOsVersionBase : ObservableEntity<ApplicationOsVersion>
+ {
+
+ public event EventHandler<Double> VersionChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Configuration>> ConfigurationsChanged;
+
+ protected Double _version;
+
+ /// <summary>
+ /// Gets or sets the applicationosversionbase version.
+ /// </summary>
+
+ [Column("VERSION")]
+
+ public Double Version
+ {
+ get
+ {
+ return _version;
+ }
+
+ set
+ {
+ if (_version != value)
+ {
+ _version = value;
+
+ OnVersionChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the applicationosversionbase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Configuration> _configurations;
+
+ /// <summary>
+ /// Gets or sets the applicationosversionbase configurations.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Configuration> Configurations
+ {
+ get
+ {
+ return _configurations;
+ }
+
+ set
+ {
+ if (_configurations != value)
+ {
+ _configurations = value;
+
+ OnConfigurationsChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Version has changed.
+ /// </summary>
+ protected virtual void OnVersionChanged(Double version)
+ {
+ VersionChanged?.Invoke(this, version);
+ RaisePropertyChanged(nameof(Version));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Configurations has changed.
+ /// </summary>
+ protected virtual void OnConfigurationsChanged(SynchronizedObservableCollection<Configuration> configurations)
+ {
+ ConfigurationsChanged?.Invoke(this, configurations);
+ RaisePropertyChanged(nameof(Configurations));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ApplicationOsVersionBase" /> class.
+ /// </summary>
+ public ApplicationOsVersionBase() : base()
+ {
+
+ Configurations = new SynchronizedObservableCollection<Configuration>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs b/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs
index c305d6312..ca724a730 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs
@@ -1,1364 +1,521 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
+using ColorMine.ColorSpaces;
+using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
+using System.Reflection;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Media;
using Tango.Core;
+using Tango.BL;
+using Tango.BL.Enumerations;
+using Tango.PMR.ColorLab;
+using Google.Protobuf;
+using System.Runtime.InteropServices;
+using Tango.PMR;
+using System.Diagnostics;
+using Tango.BL.ColorConversion;
+using System.Windows.Threading;
+using System.Timers;
+
namespace Tango.BL.Entities
{
- [Table("BRUSH_STOPS")]
- public partial class BrushStop : ObservableEntity<BrushStop>
+ public partial class BrushStop : BrushStopBase
{
+ private Timer _timer;
- public event EventHandler<Double> OffsetPercentChanged;
-
- public event EventHandler<Int32> StopIndexChanged;
-
- public event EventHandler<Double> CyanChanged;
-
- public event EventHandler<Double> MagentaChanged;
-
- public event EventHandler<Double> YellowChanged;
-
- public event EventHandler<Double> BlackChanged;
-
- public event EventHandler<Int32> RedChanged;
-
- public event EventHandler<Int32> GreenChanged;
-
- public event EventHandler<Int32> BlueChanged;
-
- public event EventHandler<Double> LChanged;
-
- public event EventHandler<Double> AChanged;
-
- public event EventHandler<Double> BChanged;
-
- public event EventHandler<Double> V0Changed;
-
- public event EventHandler<Int32> V0DivChanged;
-
- public event EventHandler<Double> V1Changed;
-
- public event EventHandler<Int32> V1DivChanged;
-
- public event EventHandler<Double> V2Changed;
+ [NotMapped]
+ private bool _ignorePropChanged;
- public event EventHandler<Int32> V2DivChanged;
+ private static List<String> _colorPropertyNames;
- public event EventHandler<Double> V3Changed;
-
- public event EventHandler<Int32> V3DivChanged;
-
- public event EventHandler<Double> V4Changed;
-
- public event EventHandler<Int32> V4DivChanged;
-
- public event EventHandler<Double> V5Changed;
-
- public event EventHandler<Int32> V5DivChanged;
-
- public event EventHandler<Double> V6Changed;
-
- public event EventHandler<Int32> V6DivChanged;
-
- public event EventHandler<Double> V7Changed;
-
- public event EventHandler<Int32> V7DivChanged;
-
- public event EventHandler<Boolean> CorrectedChanged;
+ static BrushStop()
+ {
+ _colorPropertyNames = new List<string>();
- public event EventHandler<Int32> ColorCatalogCodeChanged;
+ _colorPropertyNames.Add(nameof(Red));
+ _colorPropertyNames.Add(nameof(Green));
+ _colorPropertyNames.Add(nameof(Blue));
- public event EventHandler<ColorCatalog> ColorCatalogChanged;
+ _colorPropertyNames.Add(nameof(L));
+ _colorPropertyNames.Add(nameof(A));
+ _colorPropertyNames.Add(nameof(B));
- public event EventHandler<ColorSpace> ColorSpaceChanged;
+ _colorPropertyNames.Add(nameof(Cyan));
+ _colorPropertyNames.Add(nameof(Magenta));
+ _colorPropertyNames.Add(nameof(Yellow));
+ _colorPropertyNames.Add(nameof(Black));
- public event EventHandler<Segment> SegmentChanged;
+ _colorPropertyNames.Add(nameof(Color));
+ _colorPropertyNames.Add(nameof(ColorCatalog));
+ }
- protected String _segmentguid;
+ #region Properties
/// <summary>
- /// Gets or sets the brushstop segment guid.
+ /// Gets or sets a value indicating whether this instance is liquid volumes out of range.
/// </summary>
-
- [Column("SEGMENT_GUID")]
- [ForeignKey("Segment")]
-
- public String SegmentGuid
+ [NotMapped]
+ [JsonIgnore]
+ public bool IsLiquidVolumesOutOfRange
{
- get
+ get
{
- return _segmentguid;
- }
-
- set
- {
- if (_segmentguid != value)
- {
- _segmentguid = value;
- }
+ return LiquidVolumes != null ? LiquidVolumes.Where(x => x.IdsPack.IdsPackFormula.Code == IdsPackFormulas.StandardColor.ToInt32()).Sum(x => x.Volume) > 100 : false;
}
}
- protected String _colorspaceguid;
-
+ private ObservableCollection<LiquidVolume> _liquidVolumes;
/// <summary>
- /// Gets or sets the brushstop color space guid.
+ /// Gets or sets the collection of this brush stop liquid volumes.
/// </summary>
-
- [Column("COLOR_SPACE_GUID")]
- [ForeignKey("ColorSpace")]
-
- public String ColorSpaceGuid
+ [NotMapped]
+ [JsonIgnore]
+ public ObservableCollection<LiquidVolume> LiquidVolumes
{
- get
- {
- return _colorspaceguid;
- }
-
- set
- {
- if (_colorspaceguid != value)
- {
- _colorspaceguid = value;
- }
- }
+ get { return _liquidVolumes; }
+ set { _liquidVolumes = value; RaisePropertyChangedAuto(); }
}
- protected Double _offsetpercent;
-
/// <summary>
- /// Gets or sets the brushstop offset percent.
+ /// Gets or sets the brush stop color.
/// </summary>
-
- [Column("OFFSET_PERCENT")]
-
- public Double OffsetPercent
+ [NotMapped]
+ [JsonIgnore]
+ public Color Color
{
- get
+ get { return Color.FromRgb((byte)_red, (byte)_green, (byte)_blue); }
+ set
{
- return _offsetpercent;
- }
+ Rgb rgb = new Rgb(value.R, value.G, value.B);
+ _red = (byte)rgb.R;
+ _green = (byte)rgb.G;
+ _blue = (byte)rgb.B;
- set
- {
- if (_offsetpercent != value)
- {
- _offsetpercent = value;
+ Cmyk cmyk = rgb.To<Cmyk>();
+ _cyan = cmyk.C;
+ _magenta = cmyk.M;
+ _yellow = cmyk.Y;
+ _black = cmyk.K;
- OnOffsetPercentChanged(value);
+ Lab lab = rgb.To<Lab>();
+ _l = lab.L;
+ _a = lab.A;
+ _b = lab.B;
- }
+ RaisePropertyChanged(nameof(Color));
}
}
- protected Int32 _stopindex;
-
/// <summary>
- /// Gets or sets the brushstop stop index.
+ /// Gets the stop color brush.
/// </summary>
-
- [Column("STOP_INDEX")]
-
- public Int32 StopIndex
+ [NotMapped]
+ [JsonIgnore]
+ public SolidColorBrush Brush
{
- get
- {
- return _stopindex;
- }
-
- set
- {
- if (_stopindex != value)
- {
- _stopindex = value;
-
- OnStopIndexChanged(value);
-
- }
- }
+ get { return new SolidColorBrush(Color); }
}
- protected Double _cyan;
-
/// <summary>
- /// Gets or sets the brushstop cyan.
+ /// Gets a value indicating whether this brush stop is the first one within its segment brush stops.
/// </summary>
-
- [Column("CYAN")]
-
- public Double Cyan
+ [NotMapped]
+ [JsonIgnore]
+ public bool IsFirst
{
- get
+ get
{
- return _cyan;
- }
-
- set
- {
- if (_cyan != value)
+ if (Segment != null && Segment.BrushStops.Count > 0)
{
- _cyan = value;
-
- OnCyanChanged(value);
-
+ return StopIndex == Segment.BrushStops.Min(x => x.StopIndex);
}
- }
- }
-
- protected Double _magenta;
-
- /// <summary>
- /// Gets or sets the brushstop magenta.
- /// </summary>
-
- [Column("MAGENTA")]
-
- public Double Magenta
- {
- get
- {
- return _magenta;
- }
-
- set
- {
- if (_magenta != value)
+ else
{
- _magenta = value;
-
- OnMagentaChanged(value);
-
+ return true;
}
}
}
- protected Double _yellow;
-
/// <summary>
- /// Gets or sets the brushstop yellow.
+ /// Gets a value indicating whether this brush stop is the last one within its segment brush stops.
/// </summary>
-
- [Column("YELLOW")]
-
- public Double Yellow
+ [NotMapped]
+ [JsonIgnore]
+ public bool IsLast
{
- get
- {
- return _yellow;
- }
-
- set
+ get
{
- if (_yellow != value)
+ if (Segment != null && Segment.BrushStops.Count > 0)
{
- _yellow = value;
-
- OnYellowChanged(value);
-
+ return StopIndex == Segment.BrushStops.Max(x => x.StopIndex);
}
- }
- }
-
- protected Double _black;
-
- /// <summary>
- /// Gets or sets the brushstop black.
- /// </summary>
-
- [Column("BLACK")]
-
- public Double Black
- {
- get
- {
- return _black;
- }
-
- set
- {
- if (_black != value)
+ else
{
- _black = value;
-
- OnBlackChanged(value);
-
+ return true;
}
}
}
- protected Int32 _red;
-
/// <summary>
- /// Gets or sets the brushstop red.
+ /// Gets a value indicating whether this brush stop is not the first nor last within its segment brush stops.
/// </summary>
-
- [Column("RED")]
-
- public Int32 Red
+ [NotMapped]
+ [JsonIgnore]
+ public bool IsMiddle
{
- get
- {
- return _red;
- }
-
- set
- {
- if (_red != value)
- {
- _red = value;
-
- OnRedChanged(value);
-
- }
- }
+ get { return !IsFirst && !IsLast; }
}
- protected Int32 _green;
-
/// <summary>
- /// Gets or sets the brushstop green.
+ /// Gets this brush stop offset in meters.
/// </summary>
-
- [Column("GREEN")]
-
- public Int32 Green
+ [NotMapped]
+ [JsonIgnore]
+ public double OffsetMeters
{
- get
+ get
{
- return _green;
- }
-
- set
- {
- if (_green != value)
+ if (Segment != null)
{
- _green = value;
-
- OnGreenChanged(value);
-
+ var a = Segment.Length * (OffsetPercent / 100d);
+ return a;
}
- }
- }
-
- protected Int32 _blue;
-
- /// <summary>
- /// Gets or sets the brushstop blue.
- /// </summary>
-
- [Column("BLUE")]
-
- public Int32 Blue
- {
- get
- {
- return _blue;
- }
-
- set
- {
- if (_blue != value)
+ else
{
- _blue = value;
-
- OnBlueChanged(value);
-
+ return 0;
}
}
- }
-
- protected Double _l;
-
- /// <summary>
- /// Gets or sets the brushstop l.
- /// </summary>
-
- [Column("L")]
-
- public Double L
- {
- get
- {
- return _l;
- }
-
- set
+ set
{
- if (_l != value)
+ if (Segment != null)
{
- _l = value;
-
- OnLChanged(value);
-
+ OffsetPercent = (value / Segment.Length) * 100d;
+ RaisePropertyChangedAuto();
}
}
}
- protected Double _a;
-
+ private bool _isOutOfGamut;
/// <summary>
- /// Gets or sets the brushstop a.
+ /// Gets or sets a value indicating whether this instance is out of gamut.
/// </summary>
-
- [Column("A")]
-
- public Double A
+ [NotMapped]
+ public bool IsOutOfGamut
{
- get
+ get { return _isOutOfGamut; }
+ set
{
- return _a;
- }
+ _isOutOfGamut = value; RaisePropertyChangedAuto();
- set
- {
- if (_a != value)
+ if (Segment != null)
{
- _a = value;
-
- OnAChanged(value);
-
+ Segment.RaiseHasOutOfGamutBrushStop();
}
}
}
- protected Double _b;
-
+ private bool _outOfGamutChecked;
/// <summary>
- /// Gets or sets the brushstop b.
+ /// Gets or sets a value indicating whether out of gamut has been checked.
/// </summary>
-
- [Column("B")]
-
- public Double B
+ [NotMapped]
+ public bool OutOfGamutChecked
{
- get
- {
- return _b;
- }
-
- set
- {
- if (_b != value)
- {
- _b = value;
-
- OnBChanged(value);
-
- }
- }
+ get { return _outOfGamutChecked; }
+ set { _outOfGamutChecked = value; RaisePropertyChangedAuto(); }
}
- protected Double _v0;
-
- /// <summary>
- /// Gets or sets the brushstop v0.
- /// </summary>
-
- [Column("V0")]
-
- public Double V0
+ [NotMapped]
+ public double TotalLiquidVolume
{
- get
+ get
{
- return _v0;
- }
-
- set
- {
- if (_v0 != value)
- {
- _v0 = value;
-
- OnV0Changed(value);
-
- }
+ return LiquidVolumes != null ? LiquidVolumes.Where(x => x.IdsPack.IdsPackFormula.Code != IdsPackFormulas.Lubricant.ToInt32()).Sum(x => x.Volume) : 0;
}
}
- protected Int32 _v0div;
-
- /// <summary>
- /// Gets or sets the brushstop v0 div.
- /// </summary>
-
- [Column("V0_DIV")]
-
- public Int32 V0Div
+ [NotMapped]
+ public double TotalLiquidNanoliterPerCentimeter
{
- get
- {
- return _v0div;
- }
-
- set
+ get
{
- if (_v0div != value)
- {
- _v0div = value;
-
- OnV0DivChanged(value);
-
- }
+ return LiquidVolumes != null ? LiquidVolumes.Where(x => x.IdsPack.IdsPackFormula.Code != IdsPackFormulas.Lubricant.ToInt32()).Sum(x => x.NanoliterPerCentimeter) : 0;
}
}
- protected Double _v1;
-
/// <summary>
- /// Gets or sets the brushstop v1.
+ /// Gets the brush color space as enum.
/// </summary>
-
- [Column("V1")]
-
- public Double V1
+ [NotMapped]
+ public ColorSpaces BrushColorSpace
{
- get
- {
- return _v1;
- }
-
- set
- {
- if (_v1 != value)
- {
- _v1 = value;
-
- OnV1Changed(value);
-
- }
- }
+ get { return (ColorSpaces)ColorSpace.Code; }
}
- protected Int32 _v1div;
+ #endregion
+
+ #region Public Methods
/// <summary>
- /// Gets or sets the brushstop v1 div.
+ /// Notifies about the offset percentage and offset meters changes.
/// </summary>
-
- [Column("V1_DIV")]
-
- public Int32 V1Div
+ public void RaiseOffsetChanged()
{
- get
- {
- return _v1div;
- }
-
- set
- {
- if (_v1div != value)
- {
- _v1div = value;
-
- OnV1DivChanged(value);
-
- }
- }
+ RaisePropertyChanged(nameof(OffsetPercent));
+ RaisePropertyChanged(nameof(OffsetMeters));
+ RaisePropertyChanged(nameof(IsFirst));
+ RaisePropertyChanged(nameof(IsLast));
+ RaisePropertyChanged(nameof(IsMiddle));
}
- protected Double _v2;
-
/// <summary>
- /// Gets or sets the brushstop v2.
+ /// Sets this brush stop liquid volumes.
/// </summary>
-
- [Column("V2")]
-
- public Double V2
+ /// <param name="configuration">The configuration.</param>
+ /// <param name="rml">The RML.</param>
+ /// <param name="processParametersTable">The process parameters table.</param>
+ public void SetLiquidVolumes(Configuration configuration, Rml rml, ProcessParametersTable processParametersTable)
{
- get
+ LiquidVolumes = new ObservableCollection<LiquidVolume>();
+
+ foreach (var idsPack in configuration.GetSupportedIdsPacks(rml))
{
- return _v2;
+ var liquidVolume = new LiquidVolume(configuration, idsPack, rml, processParametersTable, this);
+ liquidVolume.VolumeChanged += LiquidVolume_VolumeChanged;
+ LiquidVolumes.Add(liquidVolume);
}
- set
+ foreach (var volume in LiquidVolumes.ToList())
{
- if (_v2 != value)
- {
- _v2 = value;
-
- OnV2Changed(value);
-
- }
+ volume.Invalidate();
}
}
- protected Int32 _v2div;
-
- /// <summary>
- /// Gets or sets the brushstop v2 div.
- /// </summary>
-
- [Column("V2_DIV")]
-
- public Int32 V2Div
+ private void LiquidVolume_VolumeChanged()
{
- get
- {
- return _v2div;
- }
-
- set
- {
- if (_v2div != value)
- {
- _v2div = value;
-
- OnV2DivChanged(value);
-
- }
- }
+ RaisePropertyChanged(nameof(IsLiquidVolumesOutOfRange));
+ RaisePropertyChanged(nameof(TotalLiquidVolume));
+ RaisePropertyChanged(nameof(TotalLiquidNanoliterPerCentimeter));
}
- protected Double _v3;
-
- /// <summary>
- /// Gets or sets the brushstop v3.
- /// </summary>
-
- [Column("V3")]
-
- public Double V3
+ public double GetVolume(int packIndex)
{
- get
- {
- return _v3;
- }
-
- set
- {
- if (_v3 != value)
- {
- _v3 = value;
-
- OnV3Changed(value);
-
- }
- }
+ return (double)typeof(BrushStop).GetProperty("V" + packIndex).GetValue(this);
}
- protected Int32 _v3div;
-
- /// <summary>
- /// Gets or sets the brushstop v3 div.
- /// </summary>
-
- [Column("V3_DIV")]
-
- public Int32 V3Div
+ public void SetVolume(int packIndex, double volume)
{
- get
- {
- return _v3div;
- }
-
- set
- {
- if (_v3div != value)
- {
- _v3div = value;
-
- OnV3DivChanged(value);
-
- }
- }
+ typeof(BrushStop).GetProperty("V" + packIndex).SetValue(this, volume);
}
- protected Double _v4;
-
- /// <summary>
- /// Gets or sets the brushstop v4.
- /// </summary>
-
- [Column("V4")]
-
- public Double V4
+ public void SetVolume(LiquidTypes liquidType, double volume)
{
- get
- {
- return _v4;
- }
-
- set
- {
- if (_v4 != value)
- {
- _v4 = value;
-
- OnV4Changed(value);
-
- }
- }
+ SetVolume(Segment.Job.Machine.Configuration.IdsPacks.SingleOrDefault(x => x.LiquidType.Code == liquidType.ToInt32()).PackIndex, volume);
}
- protected Int32 _v4div;
-
- /// <summary>
- /// Gets or sets the brushstop v4 div.
- /// </summary>
-
- [Column("V4_DIV")]
-
- public Int32 V4Div
+ public double GetVolume(LiquidTypes liquidType)
{
- get
- {
- return _v4div;
- }
-
- set
- {
- if (_v4div != value)
- {
- _v4div = value;
-
- OnV4DivChanged(value);
-
- }
- }
+ return GetVolume(Segment.Job.Machine.Configuration.IdsPacks.SingleOrDefault(x => x.LiquidType.Code == liquidType.ToInt32()).PackIndex);
}
- protected Double _v5;
-
- /// <summary>
- /// Gets or sets the brushstop v5.
- /// </summary>
-
- [Column("V5")]
-
- public Double V5
+ public int GetDispensingDivision(int packIndex)
{
- get
- {
- return _v5;
- }
-
- set
- {
- if (_v5 != value)
- {
- _v5 = value;
-
- OnV5Changed(value);
-
- }
- }
+ return (int)typeof(BrushStop).GetProperty("V" + packIndex + "Div").GetValue(this);
}
- protected Int32 _v5div;
-
- /// <summary>
- /// Gets or sets the brushstop v5 div.
- /// </summary>
-
- [Column("V5_DIV")]
-
- public Int32 V5Div
+ public void SetDispensingDivision(int packIndex, int division)
{
- get
- {
- return _v5div;
- }
-
- set
- {
- if (_v5div != value)
- {
- _v5div = value;
-
- OnV5DivChanged(value);
-
- }
- }
+ typeof(BrushStop).GetProperty("V" + packIndex + "Div").SetValue(this, division);
}
- protected Double _v6;
-
- /// <summary>
- /// Gets or sets the brushstop v6.
- /// </summary>
-
- [Column("V6")]
-
- public Double V6
+ public void SetAllDispensingStepDivisions(Dispensing.DispenserStepDivisions division)
{
- get
+ for (int i = 0; i < 8; i++)
{
- return _v6;
- }
-
- set
- {
- if (_v6 != value)
- {
- _v6 = value;
-
- OnV6Changed(value);
-
- }
+ typeof(BrushStop).GetProperty("V" + i + "Div").SetValue(this, (int)division);
}
}
- protected Int32 _v6div;
-
- /// <summary>
- /// Gets or sets the brushstop v6 div.
- /// </summary>
-
- [Column("V6_DIV")]
-
- public Int32 V6Div
+ public void SetStopIndex(int index)
{
- get
- {
- return _v6div;
- }
-
- set
- {
- if (_v6div != value)
- {
- _v6div = value;
-
- OnV6DivChanged(value);
-
- }
- }
+ _stopindex = index;
}
- protected Double _v7;
-
- /// <summary>
- /// Gets or sets the brushstop v7.
- /// </summary>
-
- [Column("V7")]
-
- public Double V7
+ public void RaiseStopIndex()
{
- get
- {
- return _v7;
- }
-
- set
- {
- if (_v7 != value)
- {
- _v7 = value;
-
- OnV7Changed(value);
-
- }
- }
+ StopIndex = _stopindex;
}
- protected Int32 _v7div;
+ #endregion
+
+ #region Override Methods
/// <summary>
- /// Gets or sets the brushstop v7 div.
+ /// Raises the property changed event.
/// </summary>
-
- [Column("V7_DIV")]
-
- public Int32 V7Div
+ /// <param name="propName">Name of the property.</param>
+ protected override void RaisePropertyChanged(string propName)
{
- get
- {
- return _v7div;
- }
+ base.RaisePropertyChanged(propName);
- set
+ if (!_ignorePropChanged && propName != nameof(ColorSpace) && ColorSpace != null)
{
- if (_v7div != value)
+ if (_colorPropertyNames.Contains(propName))
{
- _v7div = value;
-
- OnV7DivChanged(value);
-
- }
- }
- }
+ if (_timer == null)
+ {
+ _timer = new Timer();
+ _timer.Interval = 10;
+ _timer.Elapsed += (x, y) =>
+ {
+ _timer.Stop();
- protected Boolean _corrected;
+ SynchronizeColorSpaces(() =>
+ {
- /// <summary>
- /// Gets or sets the brushstop corrected.
- /// </summary>
+ _ignorePropChanged = true;
- [Column("CORRECTED")]
+ foreach (var prop in _colorPropertyNames)
+ {
+ RaisePropertyChanged(prop);
+ }
- public Boolean Corrected
- {
- get
- {
- return _corrected;
- }
+ if (Segment != null)
+ {
+ Segment.RaiseSegmentBrushChanged();
+ }
- set
- {
- if (_corrected != value)
- {
- _corrected = value;
+ _ignorePropChanged = false;
- OnCorrectedChanged(value);
+ });
+ };
+ }
+ _timer.Stop();
+ _timer.Start();
}
}
- }
-
- protected String _colorcatalogguid;
-
- /// <summary>
- /// Gets or sets the brushstop color catalog guid.
- /// </summary>
-
- [Column("COLOR_CATALOG_GUID")]
- [ForeignKey("ColorCatalog")]
-
- public String ColorCatalogGuid
- {
- get
+ if (propName == nameof(OffsetPercent))
{
- return _colorcatalogguid;
- }
-
- set
- {
- if (_colorcatalogguid != value)
+ if (Segment != null)
{
- _colorcatalogguid = value;
+ Segment.RaiseSegmentBrushChanged();
}
}
- }
-
- protected Int32 _colorcatalogcode;
-
- /// <summary>
- /// Gets or sets the brushstop color catalog code.
- /// </summary>
-
- [Column("COLOR_CATALOG_CODE")]
-
- public Int32 ColorCatalogCode
- {
- get
- {
- return _colorcatalogcode;
- }
-
- set
+ if (propName == nameof(ColorSpace))
{
- if (_colorcatalogcode != value)
+ if (ColorSpace != null && ColorSpace.Code == ColorSpaces.Twine.ToInt32())
{
- _colorcatalogcode = value;
-
- OnColorCatalogCodeChanged(value);
-
+ Corrected = false;
+ IsOutOfGamut = false;
}
}
}
- protected ColorCatalog _colorcatalog;
-
- /// <summary>
- /// Gets or sets the brushstop color catalogs.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual ColorCatalog ColorCatalog
+ public override BrushStop Clone()
{
- get
- {
- return _colorcatalog;
- }
-
- set
- {
- if (_colorcatalog != value)
- {
- _colorcatalog = value;
-
- OnColorCatalogChanged(value);
-
- }
- }
+ BrushStop cloned = base.Clone();
+ return cloned;
}
- protected ColorSpace _colorspace;
-
- /// <summary>
- /// Gets or sets the brushstop color spaces.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual ColorSpace ColorSpace
+ public BrushStop Clone(Segment segment)
{
- get
- {
- return _colorspace;
- }
+ BrushStop cloned = base.Clone();
+ cloned.Segment = segment;
+ cloned.ColorCatalog = ColorCatalog;
+ cloned.ColorSpace = ColorSpace;
+ cloned.SegmentGuid = segment.Guid;
- set
+ if (LiquidVolumes != null && LiquidVolumes.Count > 0)
{
- if (_colorspace != value)
- {
- _colorspace = value;
-
- OnColorSpaceChanged(value);
-
- }
+ cloned.LiquidVolumes = LiquidVolumes.Select(x => x.Clone(cloned)).ToObservableCollection();
}
+ return cloned;
}
- protected Segment _segment;
+ #endregion
+
+ #region Private Methods
/// <summary>
- /// Gets or sets the brushstop segment.
+ /// Synchronizes between the different brush stop color spaces.
/// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual Segment Segment
+ private void SynchronizeColorSpaces(Action onComplete = null)
{
- get
+ Task.Factory.StartNew(() =>
{
- return _segment;
- }
+ Rgb rgb = new Rgb(Red, Green, Blue);
+ Cmyk cmyk = new Cmyk(Cyan, Magenta, Yellow, Black);
+ Lab lab = new Lab(L, A, B);
+ Rgb rgb_twine = new Rgb(0, 0, 0);
- set
- {
- if (_segment != value)
+ if (ColorCatalog != null)
{
- _segment = value;
-
- OnSegmentChanged(value);
-
+ rgb_twine = new Rgb(ColorCatalog.Red, ColorCatalog.Green, ColorCatalog.Blue);
}
- }
- }
-
- /// <summary>
- /// Called when the OffsetPercent has changed.
- /// </summary>
- protected virtual void OnOffsetPercentChanged(Double offsetpercent)
- {
- OffsetPercentChanged?.Invoke(this, offsetpercent);
- RaisePropertyChanged(nameof(OffsetPercent));
- }
- /// <summary>
- /// Called when the StopIndex has changed.
- /// </summary>
- protected virtual void OnStopIndexChanged(Int32 stopindex)
- {
- StopIndexChanged?.Invoke(this, stopindex);
- RaisePropertyChanged(nameof(StopIndex));
- }
-
- /// <summary>
- /// Called when the Cyan has changed.
- /// </summary>
- protected virtual void OnCyanChanged(Double cyan)
- {
- CyanChanged?.Invoke(this, cyan);
- RaisePropertyChanged(nameof(Cyan));
- }
-
- /// <summary>
- /// Called when the Magenta has changed.
- /// </summary>
- protected virtual void OnMagentaChanged(Double magenta)
- {
- MagentaChanged?.Invoke(this, magenta);
- RaisePropertyChanged(nameof(Magenta));
- }
-
- /// <summary>
- /// Called when the Yellow has changed.
- /// </summary>
- protected virtual void OnYellowChanged(Double yellow)
- {
- YellowChanged?.Invoke(this, yellow);
- RaisePropertyChanged(nameof(Yellow));
- }
-
- /// <summary>
- /// Called when the Black has changed.
- /// </summary>
- protected virtual void OnBlackChanged(Double black)
- {
- BlackChanged?.Invoke(this, black);
- RaisePropertyChanged(nameof(Black));
- }
-
- /// <summary>
- /// Called when the Red has changed.
- /// </summary>
- protected virtual void OnRedChanged(Int32 red)
- {
- RedChanged?.Invoke(this, red);
- RaisePropertyChanged(nameof(Red));
- }
-
- /// <summary>
- /// Called when the Green has changed.
- /// </summary>
- protected virtual void OnGreenChanged(Int32 green)
- {
- GreenChanged?.Invoke(this, green);
- RaisePropertyChanged(nameof(Green));
- }
-
- /// <summary>
- /// Called when the Blue has changed.
- /// </summary>
- protected virtual void OnBlueChanged(Int32 blue)
- {
- BlueChanged?.Invoke(this, blue);
- RaisePropertyChanged(nameof(Blue));
- }
-
- /// <summary>
- /// Called when the L has changed.
- /// </summary>
- protected virtual void OnLChanged(Double l)
- {
- LChanged?.Invoke(this, l);
- RaisePropertyChanged(nameof(L));
- }
-
- /// <summary>
- /// Called when the A has changed.
- /// </summary>
- protected virtual void OnAChanged(Double a)
- {
- AChanged?.Invoke(this, a);
- RaisePropertyChanged(nameof(A));
- }
-
- /// <summary>
- /// Called when the B has changed.
- /// </summary>
- protected virtual void OnBChanged(Double b)
- {
- BChanged?.Invoke(this, b);
- RaisePropertyChanged(nameof(B));
- }
-
- /// <summary>
- /// Called when the V0 has changed.
- /// </summary>
- protected virtual void OnV0Changed(Double v0)
- {
- V0Changed?.Invoke(this, v0);
- RaisePropertyChanged(nameof(V0));
- }
-
- /// <summary>
- /// Called when the V0Div has changed.
- /// </summary>
- protected virtual void OnV0DivChanged(Int32 v0div)
- {
- V0DivChanged?.Invoke(this, v0div);
- RaisePropertyChanged(nameof(V0Div));
- }
-
- /// <summary>
- /// Called when the V1 has changed.
- /// </summary>
- protected virtual void OnV1Changed(Double v1)
- {
- V1Changed?.Invoke(this, v1);
- RaisePropertyChanged(nameof(V1));
- }
-
- /// <summary>
- /// Called when the V1Div has changed.
- /// </summary>
- protected virtual void OnV1DivChanged(Int32 v1div)
- {
- V1DivChanged?.Invoke(this, v1div);
- RaisePropertyChanged(nameof(V1Div));
- }
-
- /// <summary>
- /// Called when the V2 has changed.
- /// </summary>
- protected virtual void OnV2Changed(Double v2)
- {
- V2Changed?.Invoke(this, v2);
- RaisePropertyChanged(nameof(V2));
- }
-
- /// <summary>
- /// Called when the V2Div has changed.
- /// </summary>
- protected virtual void OnV2DivChanged(Int32 v2div)
- {
- V2DivChanged?.Invoke(this, v2div);
- RaisePropertyChanged(nameof(V2Div));
- }
-
- /// <summary>
- /// Called when the V3 has changed.
- /// </summary>
- protected virtual void OnV3Changed(Double v3)
- {
- V3Changed?.Invoke(this, v3);
- RaisePropertyChanged(nameof(V3));
- }
-
- /// <summary>
- /// Called when the V3Div has changed.
- /// </summary>
- protected virtual void OnV3DivChanged(Int32 v3div)
- {
- V3DivChanged?.Invoke(this, v3div);
- RaisePropertyChanged(nameof(V3Div));
- }
-
- /// <summary>
- /// Called when the V4 has changed.
- /// </summary>
- protected virtual void OnV4Changed(Double v4)
- {
- V4Changed?.Invoke(this, v4);
- RaisePropertyChanged(nameof(V4));
- }
-
- /// <summary>
- /// Called when the V4Div has changed.
- /// </summary>
- protected virtual void OnV4DivChanged(Int32 v4div)
- {
- V4DivChanged?.Invoke(this, v4div);
- RaisePropertyChanged(nameof(V4Div));
- }
-
- /// <summary>
- /// Called when the V5 has changed.
- /// </summary>
- protected virtual void OnV5Changed(Double v5)
- {
- V5Changed?.Invoke(this, v5);
- RaisePropertyChanged(nameof(V5));
- }
-
- /// <summary>
- /// Called when the V5Div has changed.
- /// </summary>
- protected virtual void OnV5DivChanged(Int32 v5div)
- {
- V5DivChanged?.Invoke(this, v5div);
- RaisePropertyChanged(nameof(V5Div));
- }
-
- /// <summary>
- /// Called when the V6 has changed.
- /// </summary>
- protected virtual void OnV6Changed(Double v6)
- {
- V6Changed?.Invoke(this, v6);
- RaisePropertyChanged(nameof(V6));
- }
+ switch ((ColorSpaces)ColorSpace.Code)
+ {
+ case ColorSpaces.RGB:
+ cmyk = rgb.To<Cmyk>();
+ lab = rgb.To<Lab>();
+ break;
+ case ColorSpaces.CMYK:
+ rgb = cmyk.To<Rgb>();
+ lab = cmyk.To<Lab>();
+ break;
+ case ColorSpaces.LAB:
+ rgb = lab.To<Rgb>();
+ cmyk = lab.To<Cmyk>();
+ break;
+ case ColorSpaces.Twine:
+ cmyk = rgb_twine.To<Cmyk>();
+ lab = rgb_twine.To<Lab>();
+ rgb = rgb_twine;
+ Validate(null);
+ break;
+ }
- /// <summary>
- /// Called when the V6Div has changed.
- /// </summary>
- protected virtual void OnV6DivChanged(Int32 v6div)
- {
- V6DivChanged?.Invoke(this, v6div);
- RaisePropertyChanged(nameof(V6Div));
- }
+ _red = (int)rgb.R;
+ _green = (int)rgb.G;
+ _blue = (int)rgb.B;
- /// <summary>
- /// Called when the V7 has changed.
- /// </summary>
- protected virtual void OnV7Changed(Double v7)
- {
- V7Changed?.Invoke(this, v7);
- RaisePropertyChanged(nameof(V7));
- }
+ _cyan = cmyk.C;
+ _magenta = cmyk.M;
+ _yellow = cmyk.Y;
+ _black = cmyk.K;
- /// <summary>
- /// Called when the V7Div has changed.
- /// </summary>
- protected virtual void OnV7DivChanged(Int32 v7div)
- {
- V7DivChanged?.Invoke(this, v7div);
- RaisePropertyChanged(nameof(V7Div));
- }
-
- /// <summary>
- /// Called when the Corrected has changed.
- /// </summary>
- protected virtual void OnCorrectedChanged(Boolean corrected)
- {
- CorrectedChanged?.Invoke(this, corrected);
- RaisePropertyChanged(nameof(Corrected));
- }
+ _l = lab.L;
+ _a = lab.A;
+ _b = lab.B;
- /// <summary>
- /// Called when the ColorCatalogCode has changed.
- /// </summary>
- protected virtual void OnColorCatalogCodeChanged(Int32 colorcatalogcode)
- {
- ColorCatalogCodeChanged?.Invoke(this, colorcatalogcode);
- RaisePropertyChanged(nameof(ColorCatalogCode));
+ onComplete?.Invoke();
+ });
}
- /// <summary>
- /// Called when the ColorCatalog has changed.
- /// </summary>
- protected virtual void OnColorCatalogChanged(ColorCatalog colorcatalog)
+ protected override void OnValidating(ObservablesContext context)
{
- ColorCatalogChanged?.Invoke(this, colorcatalog);
- RaisePropertyChanged(nameof(ColorCatalog));
- }
+ base.OnValidating(context);
- /// <summary>
- /// Called when the ColorSpace has changed.
- /// </summary>
- protected virtual void OnColorSpaceChanged(ColorSpace colorspace)
- {
- ColorSpaceChanged?.Invoke(this, colorspace);
- RaisePropertyChanged(nameof(ColorSpace));
+ if (ColorSpace.Code == ColorSpaces.Twine.ToInt32() && ColorCatalog == null)
+ {
+ InsertError(nameof(ColorCatalog), "Please specify a color code.");
+ }
}
- /// <summary>
- /// Called when the Segment has changed.
- /// </summary>
- protected virtual void OnSegmentChanged(Segment segment)
- {
- SegmentChanged?.Invoke(this, segment);
- RaisePropertyChanged(nameof(Segment));
- }
+ #endregion
/// <summary>
/// Initializes a new instance of the <see cref="BrushStop" /> class.
/// </summary>
public BrushStop() : base()
{
+
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/BrushStopBase.cs b/Software/Visual_Studio/Tango.BL/Entities/BrushStopBase.cs
new file mode 100644
index 000000000..53eee50e0
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/BrushStopBase.cs
@@ -0,0 +1,1364 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("BRUSH_STOPS")]
+ public abstract class BrushStopBase : ObservableEntity<BrushStop>
+ {
+
+ public event EventHandler<Double> OffsetPercentChanged;
+
+ public event EventHandler<Int32> StopIndexChanged;
+
+ public event EventHandler<Double> CyanChanged;
+
+ public event EventHandler<Double> MagentaChanged;
+
+ public event EventHandler<Double> YellowChanged;
+
+ public event EventHandler<Double> BlackChanged;
+
+ public event EventHandler<Int32> RedChanged;
+
+ public event EventHandler<Int32> GreenChanged;
+
+ public event EventHandler<Int32> BlueChanged;
+
+ public event EventHandler<Double> LChanged;
+
+ public event EventHandler<Double> AChanged;
+
+ public event EventHandler<Double> BChanged;
+
+ public event EventHandler<Double> V0Changed;
+
+ public event EventHandler<Int32> V0DivChanged;
+
+ public event EventHandler<Double> V1Changed;
+
+ public event EventHandler<Int32> V1DivChanged;
+
+ public event EventHandler<Double> V2Changed;
+
+ public event EventHandler<Int32> V2DivChanged;
+
+ public event EventHandler<Double> V3Changed;
+
+ public event EventHandler<Int32> V3DivChanged;
+
+ public event EventHandler<Double> V4Changed;
+
+ public event EventHandler<Int32> V4DivChanged;
+
+ public event EventHandler<Double> V5Changed;
+
+ public event EventHandler<Int32> V5DivChanged;
+
+ public event EventHandler<Double> V6Changed;
+
+ public event EventHandler<Int32> V6DivChanged;
+
+ public event EventHandler<Double> V7Changed;
+
+ public event EventHandler<Int32> V7DivChanged;
+
+ public event EventHandler<Boolean> CorrectedChanged;
+
+ public event EventHandler<Int32> ColorCatalogCodeChanged;
+
+ public event EventHandler<ColorCatalog> ColorCatalogChanged;
+
+ public event EventHandler<ColorSpace> ColorSpaceChanged;
+
+ public event EventHandler<Segment> SegmentChanged;
+
+ protected String _segmentguid;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase segment guid.
+ /// </summary>
+
+ [Column("SEGMENT_GUID")]
+ [ForeignKey("Segment")]
+
+ public String SegmentGuid
+ {
+ get
+ {
+ return _segmentguid;
+ }
+
+ set
+ {
+ if (_segmentguid != value)
+ {
+ _segmentguid = value;
+ }
+ }
+ }
+
+ protected String _colorspaceguid;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase color space guid.
+ /// </summary>
+
+ [Column("COLOR_SPACE_GUID")]
+ [ForeignKey("ColorSpace")]
+
+ public String ColorSpaceGuid
+ {
+ get
+ {
+ return _colorspaceguid;
+ }
+
+ set
+ {
+ if (_colorspaceguid != value)
+ {
+ _colorspaceguid = value;
+ }
+ }
+ }
+
+ protected Double _offsetpercent;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase offset percent.
+ /// </summary>
+
+ [Column("OFFSET_PERCENT")]
+
+ public Double OffsetPercent
+ {
+ get
+ {
+ return _offsetpercent;
+ }
+
+ set
+ {
+ if (_offsetpercent != value)
+ {
+ _offsetpercent = value;
+
+ OnOffsetPercentChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _stopindex;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase stop index.
+ /// </summary>
+
+ [Column("STOP_INDEX")]
+
+ public Int32 StopIndex
+ {
+ get
+ {
+ return _stopindex;
+ }
+
+ set
+ {
+ if (_stopindex != value)
+ {
+ _stopindex = value;
+
+ OnStopIndexChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _cyan;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase cyan.
+ /// </summary>
+
+ [Column("CYAN")]
+
+ public Double Cyan
+ {
+ get
+ {
+ return _cyan;
+ }
+
+ set
+ {
+ if (_cyan != value)
+ {
+ _cyan = value;
+
+ OnCyanChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _magenta;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase magenta.
+ /// </summary>
+
+ [Column("MAGENTA")]
+
+ public Double Magenta
+ {
+ get
+ {
+ return _magenta;
+ }
+
+ set
+ {
+ if (_magenta != value)
+ {
+ _magenta = value;
+
+ OnMagentaChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _yellow;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase yellow.
+ /// </summary>
+
+ [Column("YELLOW")]
+
+ public Double Yellow
+ {
+ get
+ {
+ return _yellow;
+ }
+
+ set
+ {
+ if (_yellow != value)
+ {
+ _yellow = value;
+
+ OnYellowChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _black;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase black.
+ /// </summary>
+
+ [Column("BLACK")]
+
+ public Double Black
+ {
+ get
+ {
+ return _black;
+ }
+
+ set
+ {
+ if (_black != value)
+ {
+ _black = value;
+
+ OnBlackChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _red;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase red.
+ /// </summary>
+
+ [Column("RED")]
+
+ public Int32 Red
+ {
+ get
+ {
+ return _red;
+ }
+
+ set
+ {
+ if (_red != value)
+ {
+ _red = value;
+
+ OnRedChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _green;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase green.
+ /// </summary>
+
+ [Column("GREEN")]
+
+ public Int32 Green
+ {
+ get
+ {
+ return _green;
+ }
+
+ set
+ {
+ if (_green != value)
+ {
+ _green = value;
+
+ OnGreenChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _blue;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase blue.
+ /// </summary>
+
+ [Column("BLUE")]
+
+ public Int32 Blue
+ {
+ get
+ {
+ return _blue;
+ }
+
+ set
+ {
+ if (_blue != value)
+ {
+ _blue = value;
+
+ OnBlueChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _l;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase l.
+ /// </summary>
+
+ [Column("L")]
+
+ public Double L
+ {
+ get
+ {
+ return _l;
+ }
+
+ set
+ {
+ if (_l != value)
+ {
+ _l = value;
+
+ OnLChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _a;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase a.
+ /// </summary>
+
+ [Column("A")]
+
+ public Double A
+ {
+ get
+ {
+ return _a;
+ }
+
+ set
+ {
+ if (_a != value)
+ {
+ _a = value;
+
+ OnAChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _b;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase b.
+ /// </summary>
+
+ [Column("B")]
+
+ public Double B
+ {
+ get
+ {
+ return _b;
+ }
+
+ set
+ {
+ if (_b != value)
+ {
+ _b = value;
+
+ OnBChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _v0;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase v0.
+ /// </summary>
+
+ [Column("V0")]
+
+ public Double V0
+ {
+ get
+ {
+ return _v0;
+ }
+
+ set
+ {
+ if (_v0 != value)
+ {
+ _v0 = value;
+
+ OnV0Changed(value);
+
+ }
+ }
+ }
+
+ protected Int32 _v0div;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase v0 div.
+ /// </summary>
+
+ [Column("V0_DIV")]
+
+ public Int32 V0Div
+ {
+ get
+ {
+ return _v0div;
+ }
+
+ set
+ {
+ if (_v0div != value)
+ {
+ _v0div = value;
+
+ OnV0DivChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _v1;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase v1.
+ /// </summary>
+
+ [Column("V1")]
+
+ public Double V1
+ {
+ get
+ {
+ return _v1;
+ }
+
+ set
+ {
+ if (_v1 != value)
+ {
+ _v1 = value;
+
+ OnV1Changed(value);
+
+ }
+ }
+ }
+
+ protected Int32 _v1div;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase v1 div.
+ /// </summary>
+
+ [Column("V1_DIV")]
+
+ public Int32 V1Div
+ {
+ get
+ {
+ return _v1div;
+ }
+
+ set
+ {
+ if (_v1div != value)
+ {
+ _v1div = value;
+
+ OnV1DivChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _v2;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase v2.
+ /// </summary>
+
+ [Column("V2")]
+
+ public Double V2
+ {
+ get
+ {
+ return _v2;
+ }
+
+ set
+ {
+ if (_v2 != value)
+ {
+ _v2 = value;
+
+ OnV2Changed(value);
+
+ }
+ }
+ }
+
+ protected Int32 _v2div;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase v2 div.
+ /// </summary>
+
+ [Column("V2_DIV")]
+
+ public Int32 V2Div
+ {
+ get
+ {
+ return _v2div;
+ }
+
+ set
+ {
+ if (_v2div != value)
+ {
+ _v2div = value;
+
+ OnV2DivChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _v3;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase v3.
+ /// </summary>
+
+ [Column("V3")]
+
+ public Double V3
+ {
+ get
+ {
+ return _v3;
+ }
+
+ set
+ {
+ if (_v3 != value)
+ {
+ _v3 = value;
+
+ OnV3Changed(value);
+
+ }
+ }
+ }
+
+ protected Int32 _v3div;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase v3 div.
+ /// </summary>
+
+ [Column("V3_DIV")]
+
+ public Int32 V3Div
+ {
+ get
+ {
+ return _v3div;
+ }
+
+ set
+ {
+ if (_v3div != value)
+ {
+ _v3div = value;
+
+ OnV3DivChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _v4;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase v4.
+ /// </summary>
+
+ [Column("V4")]
+
+ public Double V4
+ {
+ get
+ {
+ return _v4;
+ }
+
+ set
+ {
+ if (_v4 != value)
+ {
+ _v4 = value;
+
+ OnV4Changed(value);
+
+ }
+ }
+ }
+
+ protected Int32 _v4div;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase v4 div.
+ /// </summary>
+
+ [Column("V4_DIV")]
+
+ public Int32 V4Div
+ {
+ get
+ {
+ return _v4div;
+ }
+
+ set
+ {
+ if (_v4div != value)
+ {
+ _v4div = value;
+
+ OnV4DivChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _v5;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase v5.
+ /// </summary>
+
+ [Column("V5")]
+
+ public Double V5
+ {
+ get
+ {
+ return _v5;
+ }
+
+ set
+ {
+ if (_v5 != value)
+ {
+ _v5 = value;
+
+ OnV5Changed(value);
+
+ }
+ }
+ }
+
+ protected Int32 _v5div;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase v5 div.
+ /// </summary>
+
+ [Column("V5_DIV")]
+
+ public Int32 V5Div
+ {
+ get
+ {
+ return _v5div;
+ }
+
+ set
+ {
+ if (_v5div != value)
+ {
+ _v5div = value;
+
+ OnV5DivChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _v6;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase v6.
+ /// </summary>
+
+ [Column("V6")]
+
+ public Double V6
+ {
+ get
+ {
+ return _v6;
+ }
+
+ set
+ {
+ if (_v6 != value)
+ {
+ _v6 = value;
+
+ OnV6Changed(value);
+
+ }
+ }
+ }
+
+ protected Int32 _v6div;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase v6 div.
+ /// </summary>
+
+ [Column("V6_DIV")]
+
+ public Int32 V6Div
+ {
+ get
+ {
+ return _v6div;
+ }
+
+ set
+ {
+ if (_v6div != value)
+ {
+ _v6div = value;
+
+ OnV6DivChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _v7;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase v7.
+ /// </summary>
+
+ [Column("V7")]
+
+ public Double V7
+ {
+ get
+ {
+ return _v7;
+ }
+
+ set
+ {
+ if (_v7 != value)
+ {
+ _v7 = value;
+
+ OnV7Changed(value);
+
+ }
+ }
+ }
+
+ protected Int32 _v7div;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase v7 div.
+ /// </summary>
+
+ [Column("V7_DIV")]
+
+ public Int32 V7Div
+ {
+ get
+ {
+ return _v7div;
+ }
+
+ set
+ {
+ if (_v7div != value)
+ {
+ _v7div = value;
+
+ OnV7DivChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _corrected;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase corrected.
+ /// </summary>
+
+ [Column("CORRECTED")]
+
+ public Boolean Corrected
+ {
+ get
+ {
+ return _corrected;
+ }
+
+ set
+ {
+ if (_corrected != value)
+ {
+ _corrected = value;
+
+ OnCorrectedChanged(value);
+
+ }
+ }
+ }
+
+ protected String _colorcatalogguid;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase color catalog guid.
+ /// </summary>
+
+ [Column("COLOR_CATALOG_GUID")]
+ [ForeignKey("ColorCatalog")]
+
+ public String ColorCatalogGuid
+ {
+ get
+ {
+ return _colorcatalogguid;
+ }
+
+ set
+ {
+ if (_colorcatalogguid != value)
+ {
+ _colorcatalogguid = value;
+ }
+ }
+ }
+
+ protected Int32 _colorcatalogcode;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase color catalog code.
+ /// </summary>
+
+ [Column("COLOR_CATALOG_CODE")]
+
+ public Int32 ColorCatalogCode
+ {
+ get
+ {
+ return _colorcatalogcode;
+ }
+
+ set
+ {
+ if (_colorcatalogcode != value)
+ {
+ _colorcatalogcode = value;
+
+ OnColorCatalogCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected ColorCatalog _colorcatalog;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase color catalogs.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual ColorCatalog ColorCatalog
+ {
+ get
+ {
+ return _colorcatalog;
+ }
+
+ set
+ {
+ if (_colorcatalog != value)
+ {
+ _colorcatalog = value;
+
+ OnColorCatalogChanged(value);
+
+ }
+ }
+ }
+
+ protected ColorSpace _colorspace;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase color spaces.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual ColorSpace ColorSpace
+ {
+ get
+ {
+ return _colorspace;
+ }
+
+ set
+ {
+ if (_colorspace != value)
+ {
+ _colorspace = value;
+
+ OnColorSpaceChanged(value);
+
+ }
+ }
+ }
+
+ protected Segment _segment;
+
+ /// <summary>
+ /// Gets or sets the brushstopbase segment.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual Segment Segment
+ {
+ get
+ {
+ return _segment;
+ }
+
+ set
+ {
+ if (_segment != value)
+ {
+ _segment = value;
+
+ OnSegmentChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the OffsetPercent has changed.
+ /// </summary>
+ protected virtual void OnOffsetPercentChanged(Double offsetpercent)
+ {
+ OffsetPercentChanged?.Invoke(this, offsetpercent);
+ RaisePropertyChanged(nameof(OffsetPercent));
+ }
+
+ /// <summary>
+ /// Called when the StopIndex has changed.
+ /// </summary>
+ protected virtual void OnStopIndexChanged(Int32 stopindex)
+ {
+ StopIndexChanged?.Invoke(this, stopindex);
+ RaisePropertyChanged(nameof(StopIndex));
+ }
+
+ /// <summary>
+ /// Called when the Cyan has changed.
+ /// </summary>
+ protected virtual void OnCyanChanged(Double cyan)
+ {
+ CyanChanged?.Invoke(this, cyan);
+ RaisePropertyChanged(nameof(Cyan));
+ }
+
+ /// <summary>
+ /// Called when the Magenta has changed.
+ /// </summary>
+ protected virtual void OnMagentaChanged(Double magenta)
+ {
+ MagentaChanged?.Invoke(this, magenta);
+ RaisePropertyChanged(nameof(Magenta));
+ }
+
+ /// <summary>
+ /// Called when the Yellow has changed.
+ /// </summary>
+ protected virtual void OnYellowChanged(Double yellow)
+ {
+ YellowChanged?.Invoke(this, yellow);
+ RaisePropertyChanged(nameof(Yellow));
+ }
+
+ /// <summary>
+ /// Called when the Black has changed.
+ /// </summary>
+ protected virtual void OnBlackChanged(Double black)
+ {
+ BlackChanged?.Invoke(this, black);
+ RaisePropertyChanged(nameof(Black));
+ }
+
+ /// <summary>
+ /// Called when the Red has changed.
+ /// </summary>
+ protected virtual void OnRedChanged(Int32 red)
+ {
+ RedChanged?.Invoke(this, red);
+ RaisePropertyChanged(nameof(Red));
+ }
+
+ /// <summary>
+ /// Called when the Green has changed.
+ /// </summary>
+ protected virtual void OnGreenChanged(Int32 green)
+ {
+ GreenChanged?.Invoke(this, green);
+ RaisePropertyChanged(nameof(Green));
+ }
+
+ /// <summary>
+ /// Called when the Blue has changed.
+ /// </summary>
+ protected virtual void OnBlueChanged(Int32 blue)
+ {
+ BlueChanged?.Invoke(this, blue);
+ RaisePropertyChanged(nameof(Blue));
+ }
+
+ /// <summary>
+ /// Called when the L has changed.
+ /// </summary>
+ protected virtual void OnLChanged(Double l)
+ {
+ LChanged?.Invoke(this, l);
+ RaisePropertyChanged(nameof(L));
+ }
+
+ /// <summary>
+ /// Called when the A has changed.
+ /// </summary>
+ protected virtual void OnAChanged(Double a)
+ {
+ AChanged?.Invoke(this, a);
+ RaisePropertyChanged(nameof(A));
+ }
+
+ /// <summary>
+ /// Called when the B has changed.
+ /// </summary>
+ protected virtual void OnBChanged(Double b)
+ {
+ BChanged?.Invoke(this, b);
+ RaisePropertyChanged(nameof(B));
+ }
+
+ /// <summary>
+ /// Called when the V0 has changed.
+ /// </summary>
+ protected virtual void OnV0Changed(Double v0)
+ {
+ V0Changed?.Invoke(this, v0);
+ RaisePropertyChanged(nameof(V0));
+ }
+
+ /// <summary>
+ /// Called when the V0Div has changed.
+ /// </summary>
+ protected virtual void OnV0DivChanged(Int32 v0div)
+ {
+ V0DivChanged?.Invoke(this, v0div);
+ RaisePropertyChanged(nameof(V0Div));
+ }
+
+ /// <summary>
+ /// Called when the V1 has changed.
+ /// </summary>
+ protected virtual void OnV1Changed(Double v1)
+ {
+ V1Changed?.Invoke(this, v1);
+ RaisePropertyChanged(nameof(V1));
+ }
+
+ /// <summary>
+ /// Called when the V1Div has changed.
+ /// </summary>
+ protected virtual void OnV1DivChanged(Int32 v1div)
+ {
+ V1DivChanged?.Invoke(this, v1div);
+ RaisePropertyChanged(nameof(V1Div));
+ }
+
+ /// <summary>
+ /// Called when the V2 has changed.
+ /// </summary>
+ protected virtual void OnV2Changed(Double v2)
+ {
+ V2Changed?.Invoke(this, v2);
+ RaisePropertyChanged(nameof(V2));
+ }
+
+ /// <summary>
+ /// Called when the V2Div has changed.
+ /// </summary>
+ protected virtual void OnV2DivChanged(Int32 v2div)
+ {
+ V2DivChanged?.Invoke(this, v2div);
+ RaisePropertyChanged(nameof(V2Div));
+ }
+
+ /// <summary>
+ /// Called when the V3 has changed.
+ /// </summary>
+ protected virtual void OnV3Changed(Double v3)
+ {
+ V3Changed?.Invoke(this, v3);
+ RaisePropertyChanged(nameof(V3));
+ }
+
+ /// <summary>
+ /// Called when the V3Div has changed.
+ /// </summary>
+ protected virtual void OnV3DivChanged(Int32 v3div)
+ {
+ V3DivChanged?.Invoke(this, v3div);
+ RaisePropertyChanged(nameof(V3Div));
+ }
+
+ /// <summary>
+ /// Called when the V4 has changed.
+ /// </summary>
+ protected virtual void OnV4Changed(Double v4)
+ {
+ V4Changed?.Invoke(this, v4);
+ RaisePropertyChanged(nameof(V4));
+ }
+
+ /// <summary>
+ /// Called when the V4Div has changed.
+ /// </summary>
+ protected virtual void OnV4DivChanged(Int32 v4div)
+ {
+ V4DivChanged?.Invoke(this, v4div);
+ RaisePropertyChanged(nameof(V4Div));
+ }
+
+ /// <summary>
+ /// Called when the V5 has changed.
+ /// </summary>
+ protected virtual void OnV5Changed(Double v5)
+ {
+ V5Changed?.Invoke(this, v5);
+ RaisePropertyChanged(nameof(V5));
+ }
+
+ /// <summary>
+ /// Called when the V5Div has changed.
+ /// </summary>
+ protected virtual void OnV5DivChanged(Int32 v5div)
+ {
+ V5DivChanged?.Invoke(this, v5div);
+ RaisePropertyChanged(nameof(V5Div));
+ }
+
+ /// <summary>
+ /// Called when the V6 has changed.
+ /// </summary>
+ protected virtual void OnV6Changed(Double v6)
+ {
+ V6Changed?.Invoke(this, v6);
+ RaisePropertyChanged(nameof(V6));
+ }
+
+ /// <summary>
+ /// Called when the V6Div has changed.
+ /// </summary>
+ protected virtual void OnV6DivChanged(Int32 v6div)
+ {
+ V6DivChanged?.Invoke(this, v6div);
+ RaisePropertyChanged(nameof(V6Div));
+ }
+
+ /// <summary>
+ /// Called when the V7 has changed.
+ /// </summary>
+ protected virtual void OnV7Changed(Double v7)
+ {
+ V7Changed?.Invoke(this, v7);
+ RaisePropertyChanged(nameof(V7));
+ }
+
+ /// <summary>
+ /// Called when the V7Div has changed.
+ /// </summary>
+ protected virtual void OnV7DivChanged(Int32 v7div)
+ {
+ V7DivChanged?.Invoke(this, v7div);
+ RaisePropertyChanged(nameof(V7Div));
+ }
+
+ /// <summary>
+ /// Called when the Corrected has changed.
+ /// </summary>
+ protected virtual void OnCorrectedChanged(Boolean corrected)
+ {
+ CorrectedChanged?.Invoke(this, corrected);
+ RaisePropertyChanged(nameof(Corrected));
+ }
+
+ /// <summary>
+ /// Called when the ColorCatalogCode has changed.
+ /// </summary>
+ protected virtual void OnColorCatalogCodeChanged(Int32 colorcatalogcode)
+ {
+ ColorCatalogCodeChanged?.Invoke(this, colorcatalogcode);
+ RaisePropertyChanged(nameof(ColorCatalogCode));
+ }
+
+ /// <summary>
+ /// Called when the ColorCatalog has changed.
+ /// </summary>
+ protected virtual void OnColorCatalogChanged(ColorCatalog colorcatalog)
+ {
+ ColorCatalogChanged?.Invoke(this, colorcatalog);
+ RaisePropertyChanged(nameof(ColorCatalog));
+ }
+
+ /// <summary>
+ /// Called when the ColorSpace has changed.
+ /// </summary>
+ protected virtual void OnColorSpaceChanged(ColorSpace colorspace)
+ {
+ ColorSpaceChanged?.Invoke(this, colorspace);
+ RaisePropertyChanged(nameof(ColorSpace));
+ }
+
+ /// <summary>
+ /// Called when the Segment has changed.
+ /// </summary>
+ protected virtual void OnSegmentChanged(Segment segment)
+ {
+ SegmentChanged?.Invoke(this, segment);
+ RaisePropertyChanged(nameof(Segment));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="BrushStopBase" /> class.
+ /// </summary>
+ public BrushStopBase() : base()
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/CartridgeType.cs b/Software/Visual_Studio/Tango.BL/Entities/CartridgeType.cs
index 905dbe3cc..d141c8859 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/CartridgeType.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/CartridgeType.cs
@@ -1,150 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("CARTRIDGE_TYPES")]
- public partial class CartridgeType : ObservableEntity<CartridgeType>
+ public partial class CartridgeType : CartridgeTypeBase
{
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<SynchronizedObservableCollection<IdsPack>> IdsPacksChanged;
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the cartridgetype code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the cartridgetype name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<IdsPack> _idspacks;
-
- /// <summary>
- /// Gets or sets the cartridgetype ids packs.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<IdsPack> IdsPacks
- {
- get
- {
- return _idspacks;
- }
-
- set
- {
- if (_idspacks != value)
- {
- _idspacks = value;
-
- OnIdsPacksChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the IdsPacks has changed.
- /// </summary>
- protected virtual void OnIdsPacksChanged(SynchronizedObservableCollection<IdsPack> idspacks)
- {
- IdsPacksChanged?.Invoke(this, idspacks);
- RaisePropertyChanged(nameof(IdsPacks));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="CartridgeType" /> class.
/// </summary>
public CartridgeType() : base()
{
- IdsPacks = new SynchronizedObservableCollection<IdsPack>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/CartridgeTypeBase.cs b/Software/Visual_Studio/Tango.BL/Entities/CartridgeTypeBase.cs
new file mode 100644
index 000000000..c7bbdf4f7
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/CartridgeTypeBase.cs
@@ -0,0 +1,150 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("CARTRIDGE_TYPES")]
+ public abstract class CartridgeTypeBase : ObservableEntity<CartridgeType>
+ {
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<IdsPack>> IdsPacksChanged;
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the cartridgetypebase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the cartridgetypebase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<IdsPack> _idspacks;
+
+ /// <summary>
+ /// Gets or sets the cartridgetypebase ids packs.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<IdsPack> IdsPacks
+ {
+ get
+ {
+ return _idspacks;
+ }
+
+ set
+ {
+ if (_idspacks != value)
+ {
+ _idspacks = value;
+
+ OnIdsPacksChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the IdsPacks has changed.
+ /// </summary>
+ protected virtual void OnIdsPacksChanged(SynchronizedObservableCollection<IdsPack> idspacks)
+ {
+ IdsPacksChanged?.Invoke(this, idspacks);
+ RaisePropertyChanged(nameof(IdsPacks));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="CartridgeTypeBase" /> class.
+ /// </summary>
+ public CartridgeTypeBase() : base()
+ {
+
+ IdsPacks = new SynchronizedObservableCollection<IdsPack>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/Cat.cs b/Software/Visual_Studio/Tango.BL/Entities/Cat.cs
index ed706cc8e..866068e0a 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/Cat.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/Cat.cs
@@ -1,293 +1,56 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.PMR.ColorLab;
namespace Tango.BL.Entities
{
- [Table("CATS")]
- public partial class Cat : ObservableEntity<Cat>
+ public partial class Cat : CatBase
{
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<Byte[]> DataChanged;
-
- public event EventHandler<LiquidType> LiquidTypeChanged;
-
- public event EventHandler<Machine> MachineChanged;
-
- public event EventHandler<Rml> RmlChanged;
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the cat name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
+ public CalibrationData GetCalibrationData()
{
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
+ return CalibrationData.Parser.ParseFrom(Data);
}
- protected String _machineguid;
-
- /// <summary>
- /// Gets or sets the cat machine guid.
- /// </summary>
-
- [Column("MACHINE_GUID")]
- [ForeignKey("Machine")]
-
- public String MachineGuid
+ public void PutCalibrationData(CalibrationData data)
{
- get
- {
- return _machineguid;
- }
-
- set
- {
- if (_machineguid != value)
- {
- _machineguid = value;
- }
- }
+ Data = data.ToBytes();
}
- protected String _rmlguid;
-
- /// <summary>
- /// Gets or sets the cat rml guid.
- /// </summary>
-
- [Column("RML_GUID")]
- [ForeignKey("Rml")]
-
- public String RmlGuid
+ public static CalibrationData CreateDemoCalibrationData(PMR.ColorLab.LiquidType liquidType)
{
- get
- {
- return _rmlguid;
- }
+ CalibrationData data = new CalibrationData();
+ data.LiquidType = liquidType;
- set
+ for (int i = 0; i < 101; i++)
{
- if (_rmlguid != value)
+ data.CalibrationPoints.Add(new CalibrationPoint()
{
- _rmlguid = value;
- }
+ X = i,
+ Y = i,
+ });
}
- }
-
- protected String _liquidtypeguid;
- /// <summary>
- /// Gets or sets the cat liquid type guid.
- /// </summary>
-
- [Column("LIQUID_TYPE_GUID")]
- [ForeignKey("LiquidType")]
-
- public String LiquidTypeGuid
- {
- get
- {
- return _liquidtypeguid;
- }
-
- set
- {
- if (_liquidtypeguid != value)
- {
- _liquidtypeguid = value;
- }
- }
+ return data;
}
- protected Byte[] _data;
-
- /// <summary>
- /// Gets or sets the cat data.
- /// </summary>
-
- [Column("DATA")]
-
- public Byte[] Data
+ public Cat Clone(Machine machine)
{
- get
- {
- return _data;
- }
-
- set
- {
- if (_data != value)
- {
- _data = value;
-
- OnDataChanged(value);
-
- }
- }
+ var cloned = base.Clone();
+ cloned.Machine = machine;
+ return cloned;
}
- protected LiquidType _liquidtype;
-
- /// <summary>
- /// Gets or sets the cat liquid types.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual LiquidType LiquidType
+ public override List<string> GetIgnoreProperties()
{
- get
- {
- return _liquidtype;
- }
-
- set
+ return base.GetIgnoreProperties().Concat(new List<String>()
{
- if (_liquidtype != value)
- {
- _liquidtype = value;
-
- OnLiquidTypeChanged(value);
-
- }
- }
- }
-
- protected Machine _machine;
-
- /// <summary>
- /// Gets or sets the cat machine.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual Machine Machine
- {
- get
- {
- return _machine;
- }
-
- set
- {
- if (_machine != value)
- {
- _machine = value;
-
- OnMachineChanged(value);
-
- }
- }
- }
-
- protected Rml _rml;
-
- /// <summary>
- /// Gets or sets the cat rml.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual Rml Rml
- {
- get
- {
- return _rml;
- }
-
- set
- {
- if (_rml != value)
- {
- _rml = value;
-
- OnRmlChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Data has changed.
- /// </summary>
- protected virtual void OnDataChanged(Byte[] data)
- {
- DataChanged?.Invoke(this, data);
- RaisePropertyChanged(nameof(Data));
- }
-
- /// <summary>
- /// Called when the LiquidType has changed.
- /// </summary>
- protected virtual void OnLiquidTypeChanged(LiquidType liquidtype)
- {
- LiquidTypeChanged?.Invoke(this, liquidtype);
- RaisePropertyChanged(nameof(LiquidType));
- }
-
- /// <summary>
- /// Called when the Machine has changed.
- /// </summary>
- protected virtual void OnMachineChanged(Machine machine)
- {
- MachineChanged?.Invoke(this, machine);
- RaisePropertyChanged(nameof(Machine));
- }
-
- /// <summary>
- /// Called when the Rml has changed.
- /// </summary>
- protected virtual void OnRmlChanged(Rml rml)
- {
- RmlChanged?.Invoke(this, rml);
- RaisePropertyChanged(nameof(Rml));
+ nameof(this.LiquidType),
+ nameof(this.Machine),
+ nameof(this.Rml),
+ }).ToList();
}
/// <summary>
@@ -295,6 +58,7 @@ namespace Tango.BL.Entities
/// </summary>
public Cat() : base()
{
+
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/CatBase.cs b/Software/Visual_Studio/Tango.BL/Entities/CatBase.cs
new file mode 100644
index 000000000..3ea654919
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/CatBase.cs
@@ -0,0 +1,300 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("CATS")]
+ public abstract class CatBase : ObservableEntity<Cat>
+ {
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<Byte[]> DataChanged;
+
+ public event EventHandler<LiquidType> LiquidTypeChanged;
+
+ public event EventHandler<Machine> MachineChanged;
+
+ public event EventHandler<Rml> RmlChanged;
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the catbase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _machineguid;
+
+ /// <summary>
+ /// Gets or sets the catbase machine guid.
+ /// </summary>
+
+ [Column("MACHINE_GUID")]
+ [ForeignKey("Machine")]
+
+ public String MachineGuid
+ {
+ get
+ {
+ return _machineguid;
+ }
+
+ set
+ {
+ if (_machineguid != value)
+ {
+ _machineguid = value;
+ }
+ }
+ }
+
+ protected String _rmlguid;
+
+ /// <summary>
+ /// Gets or sets the catbase rml guid.
+ /// </summary>
+
+ [Column("RML_GUID")]
+ [ForeignKey("Rml")]
+
+ public String RmlGuid
+ {
+ get
+ {
+ return _rmlguid;
+ }
+
+ set
+ {
+ if (_rmlguid != value)
+ {
+ _rmlguid = value;
+ }
+ }
+ }
+
+ protected String _liquidtypeguid;
+
+ /// <summary>
+ /// Gets or sets the catbase liquid type guid.
+ /// </summary>
+
+ [Column("LIQUID_TYPE_GUID")]
+ [ForeignKey("LiquidType")]
+
+ public String LiquidTypeGuid
+ {
+ get
+ {
+ return _liquidtypeguid;
+ }
+
+ set
+ {
+ if (_liquidtypeguid != value)
+ {
+ _liquidtypeguid = value;
+ }
+ }
+ }
+
+ protected Byte[] _data;
+
+ /// <summary>
+ /// Gets or sets the catbase data.
+ /// </summary>
+
+ [Column("DATA")]
+
+ public Byte[] Data
+ {
+ get
+ {
+ return _data;
+ }
+
+ set
+ {
+ if (_data != value)
+ {
+ _data = value;
+
+ OnDataChanged(value);
+
+ }
+ }
+ }
+
+ protected LiquidType _liquidtype;
+
+ /// <summary>
+ /// Gets or sets the catbase liquid types.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual LiquidType LiquidType
+ {
+ get
+ {
+ return _liquidtype;
+ }
+
+ set
+ {
+ if (_liquidtype != value)
+ {
+ _liquidtype = value;
+
+ OnLiquidTypeChanged(value);
+
+ }
+ }
+ }
+
+ protected Machine _machine;
+
+ /// <summary>
+ /// Gets or sets the catbase machine.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual Machine Machine
+ {
+ get
+ {
+ return _machine;
+ }
+
+ set
+ {
+ if (_machine != value)
+ {
+ _machine = value;
+
+ OnMachineChanged(value);
+
+ }
+ }
+ }
+
+ protected Rml _rml;
+
+ /// <summary>
+ /// Gets or sets the catbase rml.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual Rml Rml
+ {
+ get
+ {
+ return _rml;
+ }
+
+ set
+ {
+ if (_rml != value)
+ {
+ _rml = value;
+
+ OnRmlChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Data has changed.
+ /// </summary>
+ protected virtual void OnDataChanged(Byte[] data)
+ {
+ DataChanged?.Invoke(this, data);
+ RaisePropertyChanged(nameof(Data));
+ }
+
+ /// <summary>
+ /// Called when the LiquidType has changed.
+ /// </summary>
+ protected virtual void OnLiquidTypeChanged(LiquidType liquidtype)
+ {
+ LiquidTypeChanged?.Invoke(this, liquidtype);
+ RaisePropertyChanged(nameof(LiquidType));
+ }
+
+ /// <summary>
+ /// Called when the Machine has changed.
+ /// </summary>
+ protected virtual void OnMachineChanged(Machine machine)
+ {
+ MachineChanged?.Invoke(this, machine);
+ RaisePropertyChanged(nameof(Machine));
+ }
+
+ /// <summary>
+ /// Called when the Rml has changed.
+ /// </summary>
+ protected virtual void OnRmlChanged(Rml rml)
+ {
+ RmlChanged?.Invoke(this, rml);
+ RaisePropertyChanged(nameof(Rml));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="CatBase" /> class.
+ /// </summary>
+ public CatBase() : base()
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/Cct.cs b/Software/Visual_Studio/Tango.BL/Entities/Cct.cs
index 2c902b210..6caeb5009 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/Cct.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/Cct.cs
@@ -1,364 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("CCTS")]
- public partial class Cct : ObservableEntity<Cct>
+ public partial class Cct : CctBase
{
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<String> DescriptionChanged;
-
- public event EventHandler<String> ForwardFileNameChanged;
-
- public event EventHandler<String> InverseFileNameChanged;
-
- public event EventHandler<Byte[]> ForwardDataChanged;
-
- public event EventHandler<Byte[]> InverseDataChanged;
-
- public event EventHandler<Double> VersionChanged;
-
- public event EventHandler<Rml> RmlChanged;
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the cct name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected String _description;
-
- /// <summary>
- /// Gets or sets the cct description.
- /// </summary>
-
- [Column("DESCRIPTION")]
-
- public String Description
- {
- get
- {
- return _description;
- }
-
- set
- {
- if (_description != value)
- {
- _description = value;
-
- OnDescriptionChanged(value);
-
- }
- }
- }
-
- protected String _forwardfilename;
-
- /// <summary>
- /// Gets or sets the cct forward file name.
- /// </summary>
-
- [Column("FORWARD_FILE_NAME")]
-
- public String ForwardFileName
- {
- get
- {
- return _forwardfilename;
- }
-
- set
- {
- if (_forwardfilename != value)
- {
- _forwardfilename = value;
-
- OnForwardFileNameChanged(value);
-
- }
- }
- }
-
- protected String _inversefilename;
-
- /// <summary>
- /// Gets or sets the cct inverse file name.
- /// </summary>
-
- [Column("INVERSE_FILE_NAME")]
-
- public String InverseFileName
- {
- get
- {
- return _inversefilename;
- }
-
- set
- {
- if (_inversefilename != value)
- {
- _inversefilename = value;
-
- OnInverseFileNameChanged(value);
-
- }
- }
- }
-
- protected Byte[] _forwarddata;
-
- /// <summary>
- /// Gets or sets the cct forward data.
- /// </summary>
-
- [Column("FORWARD_DATA")]
-
- public Byte[] ForwardData
- {
- get
- {
- return _forwarddata;
- }
-
- set
- {
- if (_forwarddata != value)
- {
- _forwarddata = value;
-
- OnForwardDataChanged(value);
-
- }
- }
- }
-
- protected Byte[] _inversedata;
-
- /// <summary>
- /// Gets or sets the cct inverse data.
- /// </summary>
-
- [Column("INVERSE_DATA")]
-
- public Byte[] InverseData
- {
- get
- {
- return _inversedata;
- }
-
- set
- {
- if (_inversedata != value)
- {
- _inversedata = value;
-
- OnInverseDataChanged(value);
-
- }
- }
- }
-
- protected Double _version;
-
- /// <summary>
- /// Gets or sets the cct version.
- /// </summary>
-
- [Column("VERSION")]
-
- public Double Version
- {
- get
- {
- return _version;
- }
-
- set
- {
- if (_version != value)
- {
- _version = value;
-
- OnVersionChanged(value);
-
- }
- }
- }
-
- protected String _rmlguid;
-
- /// <summary>
- /// Gets or sets the cct rml guid.
- /// </summary>
-
- [Column("RML_GUID")]
- [ForeignKey("Rml")]
-
- public String RmlGuid
- {
- get
- {
- return _rmlguid;
- }
-
- set
- {
- if (_rmlguid != value)
- {
- _rmlguid = value;
- }
- }
- }
-
- protected Rml _rml;
-
- /// <summary>
- /// Gets or sets the cct rml.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual Rml Rml
- {
- get
- {
- return _rml;
- }
-
- set
- {
- if (_rml != value)
- {
- _rml = value;
-
- OnRmlChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Description has changed.
- /// </summary>
- protected virtual void OnDescriptionChanged(String description)
- {
- DescriptionChanged?.Invoke(this, description);
- RaisePropertyChanged(nameof(Description));
- }
-
- /// <summary>
- /// Called when the ForwardFileName has changed.
- /// </summary>
- protected virtual void OnForwardFileNameChanged(String forwardfilename)
- {
- ForwardFileNameChanged?.Invoke(this, forwardfilename);
- RaisePropertyChanged(nameof(ForwardFileName));
- }
-
- /// <summary>
- /// Called when the InverseFileName has changed.
- /// </summary>
- protected virtual void OnInverseFileNameChanged(String inversefilename)
- {
- InverseFileNameChanged?.Invoke(this, inversefilename);
- RaisePropertyChanged(nameof(InverseFileName));
- }
-
- /// <summary>
- /// Called when the ForwardData has changed.
- /// </summary>
- protected virtual void OnForwardDataChanged(Byte[] forwarddata)
- {
- ForwardDataChanged?.Invoke(this, forwarddata);
- RaisePropertyChanged(nameof(ForwardData));
- }
-
- /// <summary>
- /// Called when the InverseData has changed.
- /// </summary>
- protected virtual void OnInverseDataChanged(Byte[] inversedata)
- {
- InverseDataChanged?.Invoke(this, inversedata);
- RaisePropertyChanged(nameof(InverseData));
- }
-
- /// <summary>
- /// Called when the Version has changed.
- /// </summary>
- protected virtual void OnVersionChanged(Double version)
- {
- VersionChanged?.Invoke(this, version);
- RaisePropertyChanged(nameof(Version));
- }
-
- /// <summary>
- /// Called when the Rml has changed.
- /// </summary>
- protected virtual void OnRmlChanged(Rml rml)
- {
- RmlChanged?.Invoke(this, rml);
- RaisePropertyChanged(nameof(Rml));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="Cct" /> class.
/// </summary>
public Cct() : base()
{
+
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/CctBase.cs b/Software/Visual_Studio/Tango.BL/Entities/CctBase.cs
new file mode 100644
index 000000000..11319a38a
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/CctBase.cs
@@ -0,0 +1,364 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("CCTS")]
+ public abstract class CctBase : ObservableEntity<Cct>
+ {
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<String> DescriptionChanged;
+
+ public event EventHandler<String> ForwardFileNameChanged;
+
+ public event EventHandler<String> InverseFileNameChanged;
+
+ public event EventHandler<Byte[]> ForwardDataChanged;
+
+ public event EventHandler<Byte[]> InverseDataChanged;
+
+ public event EventHandler<Double> VersionChanged;
+
+ public event EventHandler<Rml> RmlChanged;
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the cctbase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _description;
+
+ /// <summary>
+ /// Gets or sets the cctbase description.
+ /// </summary>
+
+ [Column("DESCRIPTION")]
+
+ public String Description
+ {
+ get
+ {
+ return _description;
+ }
+
+ set
+ {
+ if (_description != value)
+ {
+ _description = value;
+
+ OnDescriptionChanged(value);
+
+ }
+ }
+ }
+
+ protected String _forwardfilename;
+
+ /// <summary>
+ /// Gets or sets the cctbase forward file name.
+ /// </summary>
+
+ [Column("FORWARD_FILE_NAME")]
+
+ public String ForwardFileName
+ {
+ get
+ {
+ return _forwardfilename;
+ }
+
+ set
+ {
+ if (_forwardfilename != value)
+ {
+ _forwardfilename = value;
+
+ OnForwardFileNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _inversefilename;
+
+ /// <summary>
+ /// Gets or sets the cctbase inverse file name.
+ /// </summary>
+
+ [Column("INVERSE_FILE_NAME")]
+
+ public String InverseFileName
+ {
+ get
+ {
+ return _inversefilename;
+ }
+
+ set
+ {
+ if (_inversefilename != value)
+ {
+ _inversefilename = value;
+
+ OnInverseFileNameChanged(value);
+
+ }
+ }
+ }
+
+ protected Byte[] _forwarddata;
+
+ /// <summary>
+ /// Gets or sets the cctbase forward data.
+ /// </summary>
+
+ [Column("FORWARD_DATA")]
+
+ public Byte[] ForwardData
+ {
+ get
+ {
+ return _forwarddata;
+ }
+
+ set
+ {
+ if (_forwarddata != value)
+ {
+ _forwarddata = value;
+
+ OnForwardDataChanged(value);
+
+ }
+ }
+ }
+
+ protected Byte[] _inversedata;
+
+ /// <summary>
+ /// Gets or sets the cctbase inverse data.
+ /// </summary>
+
+ [Column("INVERSE_DATA")]
+
+ public Byte[] InverseData
+ {
+ get
+ {
+ return _inversedata;
+ }
+
+ set
+ {
+ if (_inversedata != value)
+ {
+ _inversedata = value;
+
+ OnInverseDataChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _version;
+
+ /// <summary>
+ /// Gets or sets the cctbase version.
+ /// </summary>
+
+ [Column("VERSION")]
+
+ public Double Version
+ {
+ get
+ {
+ return _version;
+ }
+
+ set
+ {
+ if (_version != value)
+ {
+ _version = value;
+
+ OnVersionChanged(value);
+
+ }
+ }
+ }
+
+ protected String _rmlguid;
+
+ /// <summary>
+ /// Gets or sets the cctbase rml guid.
+ /// </summary>
+
+ [Column("RML_GUID")]
+ [ForeignKey("Rml")]
+
+ public String RmlGuid
+ {
+ get
+ {
+ return _rmlguid;
+ }
+
+ set
+ {
+ if (_rmlguid != value)
+ {
+ _rmlguid = value;
+ }
+ }
+ }
+
+ protected Rml _rml;
+
+ /// <summary>
+ /// Gets or sets the cctbase rml.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual Rml Rml
+ {
+ get
+ {
+ return _rml;
+ }
+
+ set
+ {
+ if (_rml != value)
+ {
+ _rml = value;
+
+ OnRmlChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Description has changed.
+ /// </summary>
+ protected virtual void OnDescriptionChanged(String description)
+ {
+ DescriptionChanged?.Invoke(this, description);
+ RaisePropertyChanged(nameof(Description));
+ }
+
+ /// <summary>
+ /// Called when the ForwardFileName has changed.
+ /// </summary>
+ protected virtual void OnForwardFileNameChanged(String forwardfilename)
+ {
+ ForwardFileNameChanged?.Invoke(this, forwardfilename);
+ RaisePropertyChanged(nameof(ForwardFileName));
+ }
+
+ /// <summary>
+ /// Called when the InverseFileName has changed.
+ /// </summary>
+ protected virtual void OnInverseFileNameChanged(String inversefilename)
+ {
+ InverseFileNameChanged?.Invoke(this, inversefilename);
+ RaisePropertyChanged(nameof(InverseFileName));
+ }
+
+ /// <summary>
+ /// Called when the ForwardData has changed.
+ /// </summary>
+ protected virtual void OnForwardDataChanged(Byte[] forwarddata)
+ {
+ ForwardDataChanged?.Invoke(this, forwarddata);
+ RaisePropertyChanged(nameof(ForwardData));
+ }
+
+ /// <summary>
+ /// Called when the InverseData has changed.
+ /// </summary>
+ protected virtual void OnInverseDataChanged(Byte[] inversedata)
+ {
+ InverseDataChanged?.Invoke(this, inversedata);
+ RaisePropertyChanged(nameof(InverseData));
+ }
+
+ /// <summary>
+ /// Called when the Version has changed.
+ /// </summary>
+ protected virtual void OnVersionChanged(Double version)
+ {
+ VersionChanged?.Invoke(this, version);
+ RaisePropertyChanged(nameof(Version));
+ }
+
+ /// <summary>
+ /// Called when the Rml has changed.
+ /// </summary>
+ protected virtual void OnRmlChanged(Rml rml)
+ {
+ RmlChanged?.Invoke(this, rml);
+ RaisePropertyChanged(nameof(Rml));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="CctBase" /> class.
+ /// </summary>
+ public CctBase() : base()
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/ColorCatalog.cs b/Software/Visual_Studio/Tango.BL/Entities/ColorCatalog.cs
index a09078de6..53a0f2641 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/ColorCatalog.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/ColorCatalog.cs
@@ -1,669 +1,40 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Media;
namespace Tango.BL.Entities
{
- [Table("COLOR_CATALOGS")]
- public partial class ColorCatalog : ObservableEntity<ColorCatalog>
+ public partial class ColorCatalog : ColorCatalogBase
{
-
- public event EventHandler<Int32> ColorCodeChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<String> ColorGroupChanged;
-
- public event EventHandler<Double> CyanChanged;
-
- public event EventHandler<Double> MagentaChanged;
-
- public event EventHandler<Double> YellowChanged;
-
- public event EventHandler<Double> BlackChanged;
-
- public event EventHandler<Int32> RedChanged;
-
- public event EventHandler<Int32> GreenChanged;
-
- public event EventHandler<Int32> BlueChanged;
-
- public event EventHandler<Double> LChanged;
-
- public event EventHandler<Double> AChanged;
-
- public event EventHandler<Double> BChanged;
-
- public event EventHandler<Int32> ProcessParametersTableIndexChanged;
-
- public event EventHandler<SynchronizedObservableCollection<BrushStop>> BrushStopsChanged;
-
- public event EventHandler<ColorSpace> ColorSpaceChanged;
-
- protected String _colorspaceguid;
-
- /// <summary>
- /// Gets or sets the colorcatalog color space guid.
- /// </summary>
-
- [Column("COLOR_SPACE_GUID")]
- [ForeignKey("ColorSpace")]
-
- public String ColorSpaceGuid
- {
- get
- {
- return _colorspaceguid;
- }
-
- set
- {
- if (_colorspaceguid != value)
- {
- _colorspaceguid = value;
- }
- }
- }
-
- protected Int32 _colorcode;
-
- /// <summary>
- /// Gets or sets the colorcatalog color code.
- /// </summary>
-
- [Column("COLOR_CODE")]
-
- public Int32 ColorCode
- {
- get
- {
- return _colorcode;
- }
-
- set
- {
- if (_colorcode != value)
- {
- _colorcode = value;
-
- OnColorCodeChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the colorcatalog name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected String _colorgroup;
-
- /// <summary>
- /// Gets or sets the colorcatalog color group.
- /// </summary>
-
- [Column("COLOR_GROUP")]
-
- public String ColorGroup
- {
- get
- {
- return _colorgroup;
- }
-
- set
- {
- if (_colorgroup != value)
- {
- _colorgroup = value;
-
- OnColorGroupChanged(value);
-
- }
- }
- }
-
- protected Double _cyan;
-
- /// <summary>
- /// Gets or sets the colorcatalog cyan.
- /// </summary>
-
- [Column("CYAN")]
-
- public Double Cyan
- {
- get
- {
- return _cyan;
- }
-
- set
- {
- if (_cyan != value)
- {
- _cyan = value;
-
- OnCyanChanged(value);
-
- }
- }
- }
-
- protected Double _magenta;
-
+ private Color _color;
/// <summary>
- /// Gets or sets the colorcatalog magenta.
+ /// Gets the color.
/// </summary>
-
- [Column("MAGENTA")]
-
- public Double Magenta
+ public Color Color
{
- get
- {
- return _magenta;
- }
-
- set
- {
- if (_magenta != value)
- {
- _magenta = value;
-
- OnMagentaChanged(value);
-
- }
- }
+ get { return _color; }
+ private set { _color = value; RaisePropertyChangedAuto(); }
}
- protected Double _yellow;
-
- /// <summary>
- /// Gets or sets the colorcatalog yellow.
- /// </summary>
-
- [Column("YELLOW")]
-
- public Double Yellow
+ protected override void RaisePropertyChanged(string propName)
{
- get
- {
- return _yellow;
- }
+ base.RaisePropertyChanged(propName);
- set
+ if (propName == nameof(Red) || propName == nameof(Green) || propName == nameof(Blue))
{
- if (_yellow != value)
- {
- _yellow = value;
-
- OnYellowChanged(value);
-
- }
+ Color = Color.FromRgb((byte)Red, (byte)Green, (byte)Blue);
}
}
- protected Double _black;
-
- /// <summary>
- /// Gets or sets the colorcatalog black.
- /// </summary>
-
- [Column("BLACK")]
-
- public Double Black
- {
- get
- {
- return _black;
- }
-
- set
- {
- if (_black != value)
- {
- _black = value;
-
- OnBlackChanged(value);
-
- }
- }
- }
-
- protected Int32 _red;
-
- /// <summary>
- /// Gets or sets the colorcatalog red.
- /// </summary>
-
- [Column("RED")]
-
- public Int32 Red
- {
- get
- {
- return _red;
- }
-
- set
- {
- if (_red != value)
- {
- _red = value;
-
- OnRedChanged(value);
-
- }
- }
- }
-
- protected Int32 _green;
-
- /// <summary>
- /// Gets or sets the colorcatalog green.
- /// </summary>
-
- [Column("GREEN")]
-
- public Int32 Green
- {
- get
- {
- return _green;
- }
-
- set
- {
- if (_green != value)
- {
- _green = value;
-
- OnGreenChanged(value);
-
- }
- }
- }
-
- protected Int32 _blue;
-
- /// <summary>
- /// Gets or sets the colorcatalog blue.
- /// </summary>
-
- [Column("BLUE")]
-
- public Int32 Blue
- {
- get
- {
- return _blue;
- }
-
- set
- {
- if (_blue != value)
- {
- _blue = value;
-
- OnBlueChanged(value);
-
- }
- }
- }
-
- protected Double _l;
-
- /// <summary>
- /// Gets or sets the colorcatalog l.
- /// </summary>
-
- [Column("L")]
-
- public Double L
- {
- get
- {
- return _l;
- }
-
- set
- {
- if (_l != value)
- {
- _l = value;
-
- OnLChanged(value);
-
- }
- }
- }
-
- protected Double _a;
-
- /// <summary>
- /// Gets or sets the colorcatalog a.
- /// </summary>
-
- [Column("A")]
-
- public Double A
- {
- get
- {
- return _a;
- }
-
- set
- {
- if (_a != value)
- {
- _a = value;
-
- OnAChanged(value);
-
- }
- }
- }
-
- protected Double _b;
-
- /// <summary>
- /// Gets or sets the colorcatalog b.
- /// </summary>
-
- [Column("B")]
-
- public Double B
- {
- get
- {
- return _b;
- }
-
- set
- {
- if (_b != value)
- {
- _b = value;
-
- OnBChanged(value);
-
- }
- }
- }
-
- protected Int32 _processparameterstableindex;
-
- /// <summary>
- /// Gets or sets the colorcatalog process parameters table index.
- /// </summary>
-
- [Column("PROCESS_PARAMETERS_TABLE_INDEX")]
-
- public Int32 ProcessParametersTableIndex
- {
- get
- {
- return _processparameterstableindex;
- }
-
- set
- {
- if (_processparameterstableindex != value)
- {
- _processparameterstableindex = value;
-
- OnProcessParametersTableIndexChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<BrushStop> _brushstops;
-
- /// <summary>
- /// Gets or sets the colorcatalog brush stops.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<BrushStop> BrushStops
- {
- get
- {
- return _brushstops;
- }
-
- set
- {
- if (_brushstops != value)
- {
- _brushstops = value;
-
- OnBrushStopsChanged(value);
-
- }
- }
- }
-
- protected ColorSpace _colorspace;
-
- /// <summary>
- /// Gets or sets the colorcatalog color spaces.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual ColorSpace ColorSpace
- {
- get
- {
- return _colorspace;
- }
-
- set
- {
- if (_colorspace != value)
- {
- _colorspace = value;
-
- OnColorSpaceChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the ColorCode has changed.
- /// </summary>
- protected virtual void OnColorCodeChanged(Int32 colorcode)
- {
- ColorCodeChanged?.Invoke(this, colorcode);
- RaisePropertyChanged(nameof(ColorCode));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the ColorGroup has changed.
- /// </summary>
- protected virtual void OnColorGroupChanged(String colorgroup)
- {
- ColorGroupChanged?.Invoke(this, colorgroup);
- RaisePropertyChanged(nameof(ColorGroup));
- }
-
- /// <summary>
- /// Called when the Cyan has changed.
- /// </summary>
- protected virtual void OnCyanChanged(Double cyan)
- {
- CyanChanged?.Invoke(this, cyan);
- RaisePropertyChanged(nameof(Cyan));
- }
-
- /// <summary>
- /// Called when the Magenta has changed.
- /// </summary>
- protected virtual void OnMagentaChanged(Double magenta)
- {
- MagentaChanged?.Invoke(this, magenta);
- RaisePropertyChanged(nameof(Magenta));
- }
-
- /// <summary>
- /// Called when the Yellow has changed.
- /// </summary>
- protected virtual void OnYellowChanged(Double yellow)
- {
- YellowChanged?.Invoke(this, yellow);
- RaisePropertyChanged(nameof(Yellow));
- }
-
- /// <summary>
- /// Called when the Black has changed.
- /// </summary>
- protected virtual void OnBlackChanged(Double black)
- {
- BlackChanged?.Invoke(this, black);
- RaisePropertyChanged(nameof(Black));
- }
-
- /// <summary>
- /// Called when the Red has changed.
- /// </summary>
- protected virtual void OnRedChanged(Int32 red)
- {
- RedChanged?.Invoke(this, red);
- RaisePropertyChanged(nameof(Red));
- }
-
- /// <summary>
- /// Called when the Green has changed.
- /// </summary>
- protected virtual void OnGreenChanged(Int32 green)
- {
- GreenChanged?.Invoke(this, green);
- RaisePropertyChanged(nameof(Green));
- }
-
- /// <summary>
- /// Called when the Blue has changed.
- /// </summary>
- protected virtual void OnBlueChanged(Int32 blue)
- {
- BlueChanged?.Invoke(this, blue);
- RaisePropertyChanged(nameof(Blue));
- }
-
- /// <summary>
- /// Called when the L has changed.
- /// </summary>
- protected virtual void OnLChanged(Double l)
- {
- LChanged?.Invoke(this, l);
- RaisePropertyChanged(nameof(L));
- }
-
- /// <summary>
- /// Called when the A has changed.
- /// </summary>
- protected virtual void OnAChanged(Double a)
- {
- AChanged?.Invoke(this, a);
- RaisePropertyChanged(nameof(A));
- }
-
- /// <summary>
- /// Called when the B has changed.
- /// </summary>
- protected virtual void OnBChanged(Double b)
- {
- BChanged?.Invoke(this, b);
- RaisePropertyChanged(nameof(B));
- }
-
- /// <summary>
- /// Called when the ProcessParametersTableIndex has changed.
- /// </summary>
- protected virtual void OnProcessParametersTableIndexChanged(Int32 processparameterstableindex)
- {
- ProcessParametersTableIndexChanged?.Invoke(this, processparameterstableindex);
- RaisePropertyChanged(nameof(ProcessParametersTableIndex));
- }
-
- /// <summary>
- /// Called when the BrushStops has changed.
- /// </summary>
- protected virtual void OnBrushStopsChanged(SynchronizedObservableCollection<BrushStop> brushstops)
- {
- BrushStopsChanged?.Invoke(this, brushstops);
- RaisePropertyChanged(nameof(BrushStops));
- }
-
- /// <summary>
- /// Called when the ColorSpace has changed.
- /// </summary>
- protected virtual void OnColorSpaceChanged(ColorSpace colorspace)
- {
- ColorSpaceChanged?.Invoke(this, colorspace);
- RaisePropertyChanged(nameof(ColorSpace));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="ColorCatalog" /> class.
/// </summary>
public ColorCatalog() : base()
{
- BrushStops = new SynchronizedObservableCollection<BrushStop>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/ColorCatalogBase.cs b/Software/Visual_Studio/Tango.BL/Entities/ColorCatalogBase.cs
new file mode 100644
index 000000000..49e519455
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/ColorCatalogBase.cs
@@ -0,0 +1,669 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("COLOR_CATALOGS")]
+ public abstract class ColorCatalogBase : ObservableEntity<ColorCatalog>
+ {
+
+ public event EventHandler<Int32> ColorCodeChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<String> ColorGroupChanged;
+
+ public event EventHandler<Double> CyanChanged;
+
+ public event EventHandler<Double> MagentaChanged;
+
+ public event EventHandler<Double> YellowChanged;
+
+ public event EventHandler<Double> BlackChanged;
+
+ public event EventHandler<Int32> RedChanged;
+
+ public event EventHandler<Int32> GreenChanged;
+
+ public event EventHandler<Int32> BlueChanged;
+
+ public event EventHandler<Double> LChanged;
+
+ public event EventHandler<Double> AChanged;
+
+ public event EventHandler<Double> BChanged;
+
+ public event EventHandler<Int32> ProcessParametersTableIndexChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<BrushStop>> BrushStopsChanged;
+
+ public event EventHandler<ColorSpace> ColorSpaceChanged;
+
+ protected String _colorspaceguid;
+
+ /// <summary>
+ /// Gets or sets the colorcatalogbase color space guid.
+ /// </summary>
+
+ [Column("COLOR_SPACE_GUID")]
+ [ForeignKey("ColorSpace")]
+
+ public String ColorSpaceGuid
+ {
+ get
+ {
+ return _colorspaceguid;
+ }
+
+ set
+ {
+ if (_colorspaceguid != value)
+ {
+ _colorspaceguid = value;
+ }
+ }
+ }
+
+ protected Int32 _colorcode;
+
+ /// <summary>
+ /// Gets or sets the colorcatalogbase color code.
+ /// </summary>
+
+ [Column("COLOR_CODE")]
+
+ public Int32 ColorCode
+ {
+ get
+ {
+ return _colorcode;
+ }
+
+ set
+ {
+ if (_colorcode != value)
+ {
+ _colorcode = value;
+
+ OnColorCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the colorcatalogbase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _colorgroup;
+
+ /// <summary>
+ /// Gets or sets the colorcatalogbase color group.
+ /// </summary>
+
+ [Column("COLOR_GROUP")]
+
+ public String ColorGroup
+ {
+ get
+ {
+ return _colorgroup;
+ }
+
+ set
+ {
+ if (_colorgroup != value)
+ {
+ _colorgroup = value;
+
+ OnColorGroupChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _cyan;
+
+ /// <summary>
+ /// Gets or sets the colorcatalogbase cyan.
+ /// </summary>
+
+ [Column("CYAN")]
+
+ public Double Cyan
+ {
+ get
+ {
+ return _cyan;
+ }
+
+ set
+ {
+ if (_cyan != value)
+ {
+ _cyan = value;
+
+ OnCyanChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _magenta;
+
+ /// <summary>
+ /// Gets or sets the colorcatalogbase magenta.
+ /// </summary>
+
+ [Column("MAGENTA")]
+
+ public Double Magenta
+ {
+ get
+ {
+ return _magenta;
+ }
+
+ set
+ {
+ if (_magenta != value)
+ {
+ _magenta = value;
+
+ OnMagentaChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _yellow;
+
+ /// <summary>
+ /// Gets or sets the colorcatalogbase yellow.
+ /// </summary>
+
+ [Column("YELLOW")]
+
+ public Double Yellow
+ {
+ get
+ {
+ return _yellow;
+ }
+
+ set
+ {
+ if (_yellow != value)
+ {
+ _yellow = value;
+
+ OnYellowChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _black;
+
+ /// <summary>
+ /// Gets or sets the colorcatalogbase black.
+ /// </summary>
+
+ [Column("BLACK")]
+
+ public Double Black
+ {
+ get
+ {
+ return _black;
+ }
+
+ set
+ {
+ if (_black != value)
+ {
+ _black = value;
+
+ OnBlackChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _red;
+
+ /// <summary>
+ /// Gets or sets the colorcatalogbase red.
+ /// </summary>
+
+ [Column("RED")]
+
+ public Int32 Red
+ {
+ get
+ {
+ return _red;
+ }
+
+ set
+ {
+ if (_red != value)
+ {
+ _red = value;
+
+ OnRedChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _green;
+
+ /// <summary>
+ /// Gets or sets the colorcatalogbase green.
+ /// </summary>
+
+ [Column("GREEN")]
+
+ public Int32 Green
+ {
+ get
+ {
+ return _green;
+ }
+
+ set
+ {
+ if (_green != value)
+ {
+ _green = value;
+
+ OnGreenChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _blue;
+
+ /// <summary>
+ /// Gets or sets the colorcatalogbase blue.
+ /// </summary>
+
+ [Column("BLUE")]
+
+ public Int32 Blue
+ {
+ get
+ {
+ return _blue;
+ }
+
+ set
+ {
+ if (_blue != value)
+ {
+ _blue = value;
+
+ OnBlueChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _l;
+
+ /// <summary>
+ /// Gets or sets the colorcatalogbase l.
+ /// </summary>
+
+ [Column("L")]
+
+ public Double L
+ {
+ get
+ {
+ return _l;
+ }
+
+ set
+ {
+ if (_l != value)
+ {
+ _l = value;
+
+ OnLChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _a;
+
+ /// <summary>
+ /// Gets or sets the colorcatalogbase a.
+ /// </summary>
+
+ [Column("A")]
+
+ public Double A
+ {
+ get
+ {
+ return _a;
+ }
+
+ set
+ {
+ if (_a != value)
+ {
+ _a = value;
+
+ OnAChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _b;
+
+ /// <summary>
+ /// Gets or sets the colorcatalogbase b.
+ /// </summary>
+
+ [Column("B")]
+
+ public Double B
+ {
+ get
+ {
+ return _b;
+ }
+
+ set
+ {
+ if (_b != value)
+ {
+ _b = value;
+
+ OnBChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _processparameterstableindex;
+
+ /// <summary>
+ /// Gets or sets the colorcatalogbase process parameters table index.
+ /// </summary>
+
+ [Column("PROCESS_PARAMETERS_TABLE_INDEX")]
+
+ public Int32 ProcessParametersTableIndex
+ {
+ get
+ {
+ return _processparameterstableindex;
+ }
+
+ set
+ {
+ if (_processparameterstableindex != value)
+ {
+ _processparameterstableindex = value;
+
+ OnProcessParametersTableIndexChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<BrushStop> _brushstops;
+
+ /// <summary>
+ /// Gets or sets the colorcatalogbase brush stops.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<BrushStop> BrushStops
+ {
+ get
+ {
+ return _brushstops;
+ }
+
+ set
+ {
+ if (_brushstops != value)
+ {
+ _brushstops = value;
+
+ OnBrushStopsChanged(value);
+
+ }
+ }
+ }
+
+ protected ColorSpace _colorspace;
+
+ /// <summary>
+ /// Gets or sets the colorcatalogbase color spaces.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual ColorSpace ColorSpace
+ {
+ get
+ {
+ return _colorspace;
+ }
+
+ set
+ {
+ if (_colorspace != value)
+ {
+ _colorspace = value;
+
+ OnColorSpaceChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the ColorCode has changed.
+ /// </summary>
+ protected virtual void OnColorCodeChanged(Int32 colorcode)
+ {
+ ColorCodeChanged?.Invoke(this, colorcode);
+ RaisePropertyChanged(nameof(ColorCode));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the ColorGroup has changed.
+ /// </summary>
+ protected virtual void OnColorGroupChanged(String colorgroup)
+ {
+ ColorGroupChanged?.Invoke(this, colorgroup);
+ RaisePropertyChanged(nameof(ColorGroup));
+ }
+
+ /// <summary>
+ /// Called when the Cyan has changed.
+ /// </summary>
+ protected virtual void OnCyanChanged(Double cyan)
+ {
+ CyanChanged?.Invoke(this, cyan);
+ RaisePropertyChanged(nameof(Cyan));
+ }
+
+ /// <summary>
+ /// Called when the Magenta has changed.
+ /// </summary>
+ protected virtual void OnMagentaChanged(Double magenta)
+ {
+ MagentaChanged?.Invoke(this, magenta);
+ RaisePropertyChanged(nameof(Magenta));
+ }
+
+ /// <summary>
+ /// Called when the Yellow has changed.
+ /// </summary>
+ protected virtual void OnYellowChanged(Double yellow)
+ {
+ YellowChanged?.Invoke(this, yellow);
+ RaisePropertyChanged(nameof(Yellow));
+ }
+
+ /// <summary>
+ /// Called when the Black has changed.
+ /// </summary>
+ protected virtual void OnBlackChanged(Double black)
+ {
+ BlackChanged?.Invoke(this, black);
+ RaisePropertyChanged(nameof(Black));
+ }
+
+ /// <summary>
+ /// Called when the Red has changed.
+ /// </summary>
+ protected virtual void OnRedChanged(Int32 red)
+ {
+ RedChanged?.Invoke(this, red);
+ RaisePropertyChanged(nameof(Red));
+ }
+
+ /// <summary>
+ /// Called when the Green has changed.
+ /// </summary>
+ protected virtual void OnGreenChanged(Int32 green)
+ {
+ GreenChanged?.Invoke(this, green);
+ RaisePropertyChanged(nameof(Green));
+ }
+
+ /// <summary>
+ /// Called when the Blue has changed.
+ /// </summary>
+ protected virtual void OnBlueChanged(Int32 blue)
+ {
+ BlueChanged?.Invoke(this, blue);
+ RaisePropertyChanged(nameof(Blue));
+ }
+
+ /// <summary>
+ /// Called when the L has changed.
+ /// </summary>
+ protected virtual void OnLChanged(Double l)
+ {
+ LChanged?.Invoke(this, l);
+ RaisePropertyChanged(nameof(L));
+ }
+
+ /// <summary>
+ /// Called when the A has changed.
+ /// </summary>
+ protected virtual void OnAChanged(Double a)
+ {
+ AChanged?.Invoke(this, a);
+ RaisePropertyChanged(nameof(A));
+ }
+
+ /// <summary>
+ /// Called when the B has changed.
+ /// </summary>
+ protected virtual void OnBChanged(Double b)
+ {
+ BChanged?.Invoke(this, b);
+ RaisePropertyChanged(nameof(B));
+ }
+
+ /// <summary>
+ /// Called when the ProcessParametersTableIndex has changed.
+ /// </summary>
+ protected virtual void OnProcessParametersTableIndexChanged(Int32 processparameterstableindex)
+ {
+ ProcessParametersTableIndexChanged?.Invoke(this, processparameterstableindex);
+ RaisePropertyChanged(nameof(ProcessParametersTableIndex));
+ }
+
+ /// <summary>
+ /// Called when the BrushStops has changed.
+ /// </summary>
+ protected virtual void OnBrushStopsChanged(SynchronizedObservableCollection<BrushStop> brushstops)
+ {
+ BrushStopsChanged?.Invoke(this, brushstops);
+ RaisePropertyChanged(nameof(BrushStops));
+ }
+
+ /// <summary>
+ /// Called when the ColorSpace has changed.
+ /// </summary>
+ protected virtual void OnColorSpaceChanged(ColorSpace colorspace)
+ {
+ ColorSpaceChanged?.Invoke(this, colorspace);
+ RaisePropertyChanged(nameof(ColorSpace));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ColorCatalogBase" /> class.
+ /// </summary>
+ public ColorCatalogBase() : base()
+ {
+
+ BrushStops = new SynchronizedObservableCollection<BrushStop>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/ColorSpace.cs b/Software/Visual_Studio/Tango.BL/Entities/ColorSpace.cs
index 03b13d452..e764c04f2 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/ColorSpace.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/ColorSpace.cs
@@ -1,378 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("COLOR_SPACES")]
- public partial class ColorSpace : ObservableEntity<ColorSpace>
+ public partial class ColorSpace : ColorSpaceBase
{
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<String> DescriptionChanged;
-
- public event EventHandler<Boolean> IsCatalogChanged;
-
- public event EventHandler<Byte[]> ThumbnailChanged;
-
- public event EventHandler<SynchronizedObservableCollection<BrushStop>> BrushStopsChanged;
-
- public event EventHandler<SynchronizedObservableCollection<ColorCatalog>> ColorCatalogsChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Job>> JobsChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Machine>> MachinesChanged;
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the colorspace code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the colorspace name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected String _description;
-
- /// <summary>
- /// Gets or sets the colorspace description.
- /// </summary>
-
- [Column("DESCRIPTION")]
-
- public String Description
- {
- get
- {
- return _description;
- }
-
- set
- {
- if (_description != value)
- {
- _description = value;
-
- OnDescriptionChanged(value);
-
- }
- }
- }
-
- protected Boolean _iscatalog;
-
- /// <summary>
- /// Gets or sets the colorspace is catalog.
- /// </summary>
-
- [Column("IS_CATALOG")]
-
- public Boolean IsCatalog
- {
- get
- {
- return _iscatalog;
- }
-
- set
- {
- if (_iscatalog != value)
- {
- _iscatalog = value;
-
- OnIsCatalogChanged(value);
-
- }
- }
- }
-
- protected Byte[] _thumbnail;
-
- /// <summary>
- /// Gets or sets the colorspace thumbnail.
- /// </summary>
-
- [Column("THUMBNAIL")]
-
- public Byte[] Thumbnail
- {
- get
- {
- return _thumbnail;
- }
-
- set
- {
- if (_thumbnail != value)
- {
- _thumbnail = value;
-
- OnThumbnailChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<BrushStop> _brushstops;
-
- /// <summary>
- /// Gets or sets the colorspace brush stops.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<BrushStop> BrushStops
- {
- get
- {
- return _brushstops;
- }
-
- set
- {
- if (_brushstops != value)
- {
- _brushstops = value;
-
- OnBrushStopsChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<ColorCatalog> _colorcatalogs;
-
- /// <summary>
- /// Gets or sets the colorspace color catalogs.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<ColorCatalog> ColorCatalogs
- {
- get
- {
- return _colorcatalogs;
- }
-
- set
- {
- if (_colorcatalogs != value)
- {
- _colorcatalogs = value;
-
- OnColorCatalogsChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<Job> _jobs;
-
- /// <summary>
- /// Gets or sets the colorspace jobs.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Job> Jobs
- {
- get
- {
- return _jobs;
- }
-
- set
- {
- if (_jobs != value)
- {
- _jobs = value;
-
- OnJobsChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<Machine> _machines;
-
- /// <summary>
- /// Gets or sets the colorspace machines.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Machine> Machines
- {
- get
- {
- return _machines;
- }
-
- set
- {
- if (_machines != value)
- {
- _machines = value;
-
- OnMachinesChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Description has changed.
- /// </summary>
- protected virtual void OnDescriptionChanged(String description)
- {
- DescriptionChanged?.Invoke(this, description);
- RaisePropertyChanged(nameof(Description));
- }
-
- /// <summary>
- /// Called when the IsCatalog has changed.
- /// </summary>
- protected virtual void OnIsCatalogChanged(Boolean iscatalog)
- {
- IsCatalogChanged?.Invoke(this, iscatalog);
- RaisePropertyChanged(nameof(IsCatalog));
- }
-
- /// <summary>
- /// Called when the Thumbnail has changed.
- /// </summary>
- protected virtual void OnThumbnailChanged(Byte[] thumbnail)
- {
- ThumbnailChanged?.Invoke(this, thumbnail);
- RaisePropertyChanged(nameof(Thumbnail));
- }
-
- /// <summary>
- /// Called when the BrushStops has changed.
- /// </summary>
- protected virtual void OnBrushStopsChanged(SynchronizedObservableCollection<BrushStop> brushstops)
- {
- BrushStopsChanged?.Invoke(this, brushstops);
- RaisePropertyChanged(nameof(BrushStops));
- }
-
- /// <summary>
- /// Called when the ColorCatalogs has changed.
- /// </summary>
- protected virtual void OnColorCatalogsChanged(SynchronizedObservableCollection<ColorCatalog> colorcatalogs)
- {
- ColorCatalogsChanged?.Invoke(this, colorcatalogs);
- RaisePropertyChanged(nameof(ColorCatalogs));
- }
-
- /// <summary>
- /// Called when the Jobs has changed.
- /// </summary>
- protected virtual void OnJobsChanged(SynchronizedObservableCollection<Job> jobs)
- {
- JobsChanged?.Invoke(this, jobs);
- RaisePropertyChanged(nameof(Jobs));
- }
-
- /// <summary>
- /// Called when the Machines has changed.
- /// </summary>
- protected virtual void OnMachinesChanged(SynchronizedObservableCollection<Machine> machines)
- {
- MachinesChanged?.Invoke(this, machines);
- RaisePropertyChanged(nameof(Machines));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="ColorSpace" /> class.
/// </summary>
public ColorSpace() : base()
{
- BrushStops = new SynchronizedObservableCollection<BrushStop>();
-
- ColorCatalogs = new SynchronizedObservableCollection<ColorCatalog>();
-
- Jobs = new SynchronizedObservableCollection<Job>();
-
- Machines = new SynchronizedObservableCollection<Machine>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/ColorSpaceBase.cs b/Software/Visual_Studio/Tango.BL/Entities/ColorSpaceBase.cs
new file mode 100644
index 000000000..2d32eb6a9
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/ColorSpaceBase.cs
@@ -0,0 +1,378 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("COLOR_SPACES")]
+ public abstract class ColorSpaceBase : ObservableEntity<ColorSpace>
+ {
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<String> DescriptionChanged;
+
+ public event EventHandler<Boolean> IsCatalogChanged;
+
+ public event EventHandler<Byte[]> ThumbnailChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<BrushStop>> BrushStopsChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<ColorCatalog>> ColorCatalogsChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Job>> JobsChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Machine>> MachinesChanged;
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the colorspacebase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the colorspacebase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _description;
+
+ /// <summary>
+ /// Gets or sets the colorspacebase description.
+ /// </summary>
+
+ [Column("DESCRIPTION")]
+
+ public String Description
+ {
+ get
+ {
+ return _description;
+ }
+
+ set
+ {
+ if (_description != value)
+ {
+ _description = value;
+
+ OnDescriptionChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _iscatalog;
+
+ /// <summary>
+ /// Gets or sets the colorspacebase is catalog.
+ /// </summary>
+
+ [Column("IS_CATALOG")]
+
+ public Boolean IsCatalog
+ {
+ get
+ {
+ return _iscatalog;
+ }
+
+ set
+ {
+ if (_iscatalog != value)
+ {
+ _iscatalog = value;
+
+ OnIsCatalogChanged(value);
+
+ }
+ }
+ }
+
+ protected Byte[] _thumbnail;
+
+ /// <summary>
+ /// Gets or sets the colorspacebase thumbnail.
+ /// </summary>
+
+ [Column("THUMBNAIL")]
+
+ public Byte[] Thumbnail
+ {
+ get
+ {
+ return _thumbnail;
+ }
+
+ set
+ {
+ if (_thumbnail != value)
+ {
+ _thumbnail = value;
+
+ OnThumbnailChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<BrushStop> _brushstops;
+
+ /// <summary>
+ /// Gets or sets the colorspacebase brush stops.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<BrushStop> BrushStops
+ {
+ get
+ {
+ return _brushstops;
+ }
+
+ set
+ {
+ if (_brushstops != value)
+ {
+ _brushstops = value;
+
+ OnBrushStopsChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<ColorCatalog> _colorcatalogs;
+
+ /// <summary>
+ /// Gets or sets the colorspacebase color catalogs.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<ColorCatalog> ColorCatalogs
+ {
+ get
+ {
+ return _colorcatalogs;
+ }
+
+ set
+ {
+ if (_colorcatalogs != value)
+ {
+ _colorcatalogs = value;
+
+ OnColorCatalogsChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Job> _jobs;
+
+ /// <summary>
+ /// Gets or sets the colorspacebase jobs.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Job> Jobs
+ {
+ get
+ {
+ return _jobs;
+ }
+
+ set
+ {
+ if (_jobs != value)
+ {
+ _jobs = value;
+
+ OnJobsChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Machine> _machines;
+
+ /// <summary>
+ /// Gets or sets the colorspacebase machines.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Machine> Machines
+ {
+ get
+ {
+ return _machines;
+ }
+
+ set
+ {
+ if (_machines != value)
+ {
+ _machines = value;
+
+ OnMachinesChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Description has changed.
+ /// </summary>
+ protected virtual void OnDescriptionChanged(String description)
+ {
+ DescriptionChanged?.Invoke(this, description);
+ RaisePropertyChanged(nameof(Description));
+ }
+
+ /// <summary>
+ /// Called when the IsCatalog has changed.
+ /// </summary>
+ protected virtual void OnIsCatalogChanged(Boolean iscatalog)
+ {
+ IsCatalogChanged?.Invoke(this, iscatalog);
+ RaisePropertyChanged(nameof(IsCatalog));
+ }
+
+ /// <summary>
+ /// Called when the Thumbnail has changed.
+ /// </summary>
+ protected virtual void OnThumbnailChanged(Byte[] thumbnail)
+ {
+ ThumbnailChanged?.Invoke(this, thumbnail);
+ RaisePropertyChanged(nameof(Thumbnail));
+ }
+
+ /// <summary>
+ /// Called when the BrushStops has changed.
+ /// </summary>
+ protected virtual void OnBrushStopsChanged(SynchronizedObservableCollection<BrushStop> brushstops)
+ {
+ BrushStopsChanged?.Invoke(this, brushstops);
+ RaisePropertyChanged(nameof(BrushStops));
+ }
+
+ /// <summary>
+ /// Called when the ColorCatalogs has changed.
+ /// </summary>
+ protected virtual void OnColorCatalogsChanged(SynchronizedObservableCollection<ColorCatalog> colorcatalogs)
+ {
+ ColorCatalogsChanged?.Invoke(this, colorcatalogs);
+ RaisePropertyChanged(nameof(ColorCatalogs));
+ }
+
+ /// <summary>
+ /// Called when the Jobs has changed.
+ /// </summary>
+ protected virtual void OnJobsChanged(SynchronizedObservableCollection<Job> jobs)
+ {
+ JobsChanged?.Invoke(this, jobs);
+ RaisePropertyChanged(nameof(Jobs));
+ }
+
+ /// <summary>
+ /// Called when the Machines has changed.
+ /// </summary>
+ protected virtual void OnMachinesChanged(SynchronizedObservableCollection<Machine> machines)
+ {
+ MachinesChanged?.Invoke(this, machines);
+ RaisePropertyChanged(nameof(Machines));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ColorSpaceBase" /> class.
+ /// </summary>
+ public ColorSpaceBase() : base()
+ {
+
+ BrushStops = new SynchronizedObservableCollection<BrushStop>();
+
+ ColorCatalogs = new SynchronizedObservableCollection<ColorCatalog>();
+
+ Jobs = new SynchronizedObservableCollection<Job>();
+
+ Machines = new SynchronizedObservableCollection<Machine>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/Configuration.cs b/Software/Visual_Studio/Tango.BL/Entities/Configuration.cs
index 2aafe59ef..f45e6c087 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/Configuration.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/Configuration.cs
@@ -1,415 +1,80 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
+using Newtonsoft.Json;
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
+using System.Xml.Serialization;
namespace Tango.BL.Entities
{
- [Table("CONFIGURATIONS")]
- public partial class Configuration : ObservableEntity<Configuration>
+ public partial class Configuration : ConfigurationBase
{
-
- public event EventHandler<ApplicationDisplayPanelVersion> ApplicationDisplayPanelVersionChanged;
-
- public event EventHandler<ApplicationFirmwareVersion> ApplicationFirmwareVersionChanged;
-
- public event EventHandler<ApplicationOsVersion> ApplicationOsVersionChanged;
-
- public event EventHandler<EmbeddedFirmwareVersion> EmbeddedFirmwareVersionChanged;
-
- public event EventHandler<HardwareVersion> HardwareVersionChanged;
-
- public event EventHandler<SynchronizedObservableCollection<IdsPack>> IdsPacksChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Machine>> MachinesChanged;
-
- protected String _applicationosversionguid;
-
- /// <summary>
- /// Gets or sets the configuration application os version guid.
- /// </summary>
-
- [Column("APPLICATION_OS_VERSION_GUID")]
- [ForeignKey("ApplicationOsVersion")]
-
- public String ApplicationOsVersionGuid
- {
- get
- {
- return _applicationosversionguid;
- }
-
- set
- {
- if (_applicationosversionguid != value)
- {
- _applicationosversionguid = value;
- }
- }
- }
-
- protected String _applicationfirmwareversionguid;
-
- /// <summary>
- /// Gets or sets the configuration application firmware version guid.
- /// </summary>
-
- [Column("APPLICATION_FIRMWARE_VERSION_GUID")]
- [ForeignKey("ApplicationFirmwareVersion")]
-
- public String ApplicationFirmwareVersionGuid
- {
- get
- {
- return _applicationfirmwareversionguid;
- }
-
- set
- {
- if (_applicationfirmwareversionguid != value)
- {
- _applicationfirmwareversionguid = value;
- }
- }
- }
-
- protected String _applicationdisplaypanelversionguid;
-
- /// <summary>
- /// Gets or sets the configuration application display panel version guid.
- /// </summary>
-
- [Column("APPLICATION_DISPLAY_PANEL_VERSION_GUID")]
- [ForeignKey("ApplicationDisplayPanelVersion")]
-
- public String ApplicationDisplayPanelVersionGuid
- {
- get
- {
- return _applicationdisplaypanelversionguid;
- }
-
- set
- {
- if (_applicationdisplaypanelversionguid != value)
- {
- _applicationdisplaypanelversionguid = value;
- }
- }
- }
-
- protected String _embeddedfirmwareversionguid;
-
- /// <summary>
- /// Gets or sets the configuration embedded firmware version guid.
- /// </summary>
-
- [Column("EMBEDDED_FIRMWARE_VERSION_GUID")]
- [ForeignKey("EmbeddedFirmwareVersion")]
-
- public String EmbeddedFirmwareVersionGuid
- {
- get
- {
- return _embeddedfirmwareversionguid;
- }
-
- set
- {
- if (_embeddedfirmwareversionguid != value)
- {
- _embeddedfirmwareversionguid = value;
- }
- }
- }
-
- protected String _hardwareversionguid;
-
- /// <summary>
- /// Gets or sets the configuration hardware version guid.
- /// </summary>
-
- [Column("HARDWARE_VERSION_GUID")]
- [ForeignKey("HardwareVersion")]
-
- public String HardwareVersionGuid
- {
- get
- {
- return _hardwareversionguid;
- }
-
- set
- {
- if (_hardwareversionguid != value)
- {
- _hardwareversionguid = value;
- }
- }
- }
-
- protected ApplicationDisplayPanelVersion _applicationdisplaypanelversion;
-
- /// <summary>
- /// Gets or sets the configuration application display panel versions.
- /// </summary>
-
+ [NotMapped]
[XmlIgnore]
[JsonIgnore]
- public virtual ApplicationDisplayPanelVersion ApplicationDisplayPanelVersion
+ public IEnumerable<IdsPack> NoneEmptyIdsPacks
{
- get
- {
- return _applicationdisplaypanelversion;
- }
-
- set
- {
- if (_applicationdisplaypanelversion != value)
- {
- _applicationdisplaypanelversion = value;
-
- OnApplicationDisplayPanelVersionChanged(value);
-
- }
- }
+ get { return IdsPacks.Where(x => !x.IsEmpty); }
}
- protected ApplicationFirmwareVersion _applicationfirmwareversion;
-
- /// <summary>
- /// Gets or sets the configuration application firmware versions.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual ApplicationFirmwareVersion ApplicationFirmwareVersion
+ public IEnumerable<IdsPack> GetSupportedIdsPacks(Rml rml)
{
- get
+ if (rml == null)
{
- return _applicationfirmwareversion;
+ throw new NullReferenceException("The specified RML cannot be null.");
}
- set
- {
- if (_applicationfirmwareversion != value)
- {
- _applicationfirmwareversion = value;
-
- OnApplicationFirmwareVersionChanged(value);
-
- }
- }
+ return NoneEmptyIdsPacks.Where(x => rml.LiquidTypesRmls.ToList().Exists(y => y.LiquidType.Guid == x.LiquidType.Guid)).OrderBy(x => x.PackIndex).ToList();
}
- protected ApplicationOsVersion _applicationosversion;
-
- /// <summary>
- /// Gets or sets the configuration application os versions.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual ApplicationOsVersion ApplicationOsVersion
+ public override void DefferedDelete(ObservablesContext context)
{
- get
- {
- return _applicationosversion;
- }
-
- set
- {
- if (_applicationosversion != value)
- {
- _applicationosversion = value;
-
- OnApplicationOsVersionChanged(value);
-
- }
- }
+ IdsPacks.ToList().ForEach(x => x.DefferedDelete(context));
+ base.DefferedDelete(context);
+ IdsPacks.Clear();
}
- protected EmbeddedFirmwareVersion _embeddedfirmwareversion;
-
- /// <summary>
- /// Gets or sets the configuration embedded firmware versions.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual EmbeddedFirmwareVersion EmbeddedFirmwareVersion
+ public override void Delete(ObservablesContext context)
{
- get
- {
- return _embeddedfirmwareversion;
- }
-
- set
- {
- if (_embeddedfirmwareversion != value)
- {
- _embeddedfirmwareversion = value;
-
- OnEmbeddedFirmwareVersionChanged(value);
-
- }
- }
+ IdsPacks.ToList().ForEach(x => x.DefferedDelete(context));
+ base.Delete(context);
+ IdsPacks.Clear();
}
- protected HardwareVersion _hardwareversion;
-
- /// <summary>
- /// Gets or sets the configuration hardware versions.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual HardwareVersion HardwareVersion
+ public override Configuration Clone()
{
- get
- {
- return _hardwareversion;
- }
-
- set
- {
- if (_hardwareversion != value)
- {
- _hardwareversion = value;
+ Configuration cloned = base.Clone();
- OnHardwareVersionChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<IdsPack> _idspacks;
-
- /// <summary>
- /// Gets or sets the configuration ids packs.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<IdsPack> IdsPacks
- {
- get
+ foreach (var idsPack in this.IdsPacks)
{
- return _idspacks;
+ IdsPack clonedPack = idsPack.Clone();
+ clonedPack.Configuration = cloned;
+ clonedPack.CartridgeType = idsPack.CartridgeType;
+ clonedPack.MidTankType = idsPack.MidTankType;
+ clonedPack.IdsPackFormula = idsPack.IdsPackFormula;
+ clonedPack.IsEmpty = idsPack.IsEmpty;
+ clonedPack.Dispenser = null;
+ clonedPack.DispenserGuid = null;
+ cloned.IdsPacks.Add(clonedPack);
}
- set
- {
- if (_idspacks != value)
- {
- _idspacks = value;
-
- OnIdsPacksChanged(value);
-
- }
- }
+ return cloned;
}
- protected SynchronizedObservableCollection<Machine> _machines;
-
- /// <summary>
- /// Gets or sets the configuration machines.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Machine> Machines
+ public override List<string> GetIgnoreProperties()
{
- get
- {
- return _machines;
- }
-
- set
+ return base.GetIgnoreProperties().Concat(new List<String>()
{
- if (_machines != value)
- {
- _machines = value;
-
- OnMachinesChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the ApplicationDisplayPanelVersion has changed.
- /// </summary>
- protected virtual void OnApplicationDisplayPanelVersionChanged(ApplicationDisplayPanelVersion applicationdisplaypanelversion)
- {
- ApplicationDisplayPanelVersionChanged?.Invoke(this, applicationdisplaypanelversion);
- RaisePropertyChanged(nameof(ApplicationDisplayPanelVersion));
- }
-
- /// <summary>
- /// Called when the ApplicationFirmwareVersion has changed.
- /// </summary>
- protected virtual void OnApplicationFirmwareVersionChanged(ApplicationFirmwareVersion applicationfirmwareversion)
- {
- ApplicationFirmwareVersionChanged?.Invoke(this, applicationfirmwareversion);
- RaisePropertyChanged(nameof(ApplicationFirmwareVersion));
- }
-
- /// <summary>
- /// Called when the ApplicationOsVersion has changed.
- /// </summary>
- protected virtual void OnApplicationOsVersionChanged(ApplicationOsVersion applicationosversion)
- {
- ApplicationOsVersionChanged?.Invoke(this, applicationosversion);
- RaisePropertyChanged(nameof(ApplicationOsVersion));
- }
-
- /// <summary>
- /// Called when the EmbeddedFirmwareVersion has changed.
- /// </summary>
- protected virtual void OnEmbeddedFirmwareVersionChanged(EmbeddedFirmwareVersion embeddedfirmwareversion)
- {
- EmbeddedFirmwareVersionChanged?.Invoke(this, embeddedfirmwareversion);
- RaisePropertyChanged(nameof(EmbeddedFirmwareVersion));
- }
-
- /// <summary>
- /// Called when the HardwareVersion has changed.
- /// </summary>
- protected virtual void OnHardwareVersionChanged(HardwareVersion hardwareversion)
- {
- HardwareVersionChanged?.Invoke(this, hardwareversion);
- RaisePropertyChanged(nameof(HardwareVersion));
- }
-
- /// <summary>
- /// Called when the IdsPacks has changed.
- /// </summary>
- protected virtual void OnIdsPacksChanged(SynchronizedObservableCollection<IdsPack> idspacks)
- {
- IdsPacksChanged?.Invoke(this, idspacks);
- RaisePropertyChanged(nameof(IdsPacks));
- }
-
- /// <summary>
- /// Called when the Machines has changed.
- /// </summary>
- protected virtual void OnMachinesChanged(SynchronizedObservableCollection<Machine> machines)
- {
- MachinesChanged?.Invoke(this, machines);
- RaisePropertyChanged(nameof(Machines));
+ nameof(this.ApplicationDisplayPanelVersion),
+ nameof(this.ApplicationFirmwareVersion),
+ nameof(this.ApplicationOsVersion),
+ nameof(this.EmbeddedFirmwareVersion),
+ nameof(this.Machines),
+ nameof(this.NoneEmptyIdsPacks),
+ nameof(this.HardwareVersion),
+ }).ToList();
}
/// <summary>
@@ -418,10 +83,6 @@ namespace Tango.BL.Entities
public Configuration() : base()
{
- IdsPacks = new SynchronizedObservableCollection<IdsPack>();
-
- Machines = new SynchronizedObservableCollection<Machine>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/ConfigurationBase.cs b/Software/Visual_Studio/Tango.BL/Entities/ConfigurationBase.cs
new file mode 100644
index 000000000..f2adc67e7
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/ConfigurationBase.cs
@@ -0,0 +1,427 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("CONFIGURATIONS")]
+ public abstract class ConfigurationBase : ObservableEntity<Configuration>
+ {
+
+ public event EventHandler<ApplicationDisplayPanelVersion> ApplicationDisplayPanelVersionChanged;
+
+ public event EventHandler<ApplicationFirmwareVersion> ApplicationFirmwareVersionChanged;
+
+ public event EventHandler<ApplicationOsVersion> ApplicationOsVersionChanged;
+
+ public event EventHandler<EmbeddedFirmwareVersion> EmbeddedFirmwareVersionChanged;
+
+ public event EventHandler<HardwareVersion> HardwareVersionChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<IdsPack>> IdsPacksChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Machine>> MachinesChanged;
+
+ protected String _applicationosversionguid;
+
+ /// <summary>
+ /// Gets or sets the configurationbase application os version guid.
+ /// </summary>
+
+ [Column("APPLICATION_OS_VERSION_GUID")]
+ [ForeignKey("ApplicationOsVersion")]
+
+ public String ApplicationOsVersionGuid
+ {
+ get
+ {
+ return _applicationosversionguid;
+ }
+
+ set
+ {
+ if (_applicationosversionguid != value)
+ {
+ _applicationosversionguid = value;
+ }
+ }
+ }
+
+ protected String _applicationfirmwareversionguid;
+
+ /// <summary>
+ /// Gets or sets the configurationbase application firmware version guid.
+ /// </summary>
+
+ [Column("APPLICATION_FIRMWARE_VERSION_GUID")]
+ [ForeignKey("ApplicationFirmwareVersion")]
+
+ public String ApplicationFirmwareVersionGuid
+ {
+ get
+ {
+ return _applicationfirmwareversionguid;
+ }
+
+ set
+ {
+ if (_applicationfirmwareversionguid != value)
+ {
+ _applicationfirmwareversionguid = value;
+ }
+ }
+ }
+
+ protected String _applicationdisplaypanelversionguid;
+
+ /// <summary>
+ /// Gets or sets the configurationbase application display panel version guid.
+ /// </summary>
+
+ [Column("APPLICATION_DISPLAY_PANEL_VERSION_GUID")]
+ [ForeignKey("ApplicationDisplayPanelVersion")]
+
+ public String ApplicationDisplayPanelVersionGuid
+ {
+ get
+ {
+ return _applicationdisplaypanelversionguid;
+ }
+
+ set
+ {
+ if (_applicationdisplaypanelversionguid != value)
+ {
+ _applicationdisplaypanelversionguid = value;
+ }
+ }
+ }
+
+ protected String _embeddedfirmwareversionguid;
+
+ /// <summary>
+ /// Gets or sets the configurationbase embedded firmware version guid.
+ /// </summary>
+
+ [Column("EMBEDDED_FIRMWARE_VERSION_GUID")]
+ [ForeignKey("EmbeddedFirmwareVersion")]
+
+ public String EmbeddedFirmwareVersionGuid
+ {
+ get
+ {
+ return _embeddedfirmwareversionguid;
+ }
+
+ set
+ {
+ if (_embeddedfirmwareversionguid != value)
+ {
+ _embeddedfirmwareversionguid = value;
+ }
+ }
+ }
+
+ protected String _hardwareversionguid;
+
+ /// <summary>
+ /// Gets or sets the configurationbase hardware version guid.
+ /// </summary>
+
+ [Column("HARDWARE_VERSION_GUID")]
+ [ForeignKey("HardwareVersion")]
+
+ public String HardwareVersionGuid
+ {
+ get
+ {
+ return _hardwareversionguid;
+ }
+
+ set
+ {
+ if (_hardwareversionguid != value)
+ {
+ _hardwareversionguid = value;
+ }
+ }
+ }
+
+ protected ApplicationDisplayPanelVersion _applicationdisplaypanelversion;
+
+ /// <summary>
+ /// Gets or sets the configurationbase application display panel versions.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual ApplicationDisplayPanelVersion ApplicationDisplayPanelVersion
+ {
+ get
+ {
+ return _applicationdisplaypanelversion;
+ }
+
+ set
+ {
+ if (_applicationdisplaypanelversion != value)
+ {
+ _applicationdisplaypanelversion = value;
+
+ OnApplicationDisplayPanelVersionChanged(value);
+
+ }
+ }
+ }
+
+ protected ApplicationFirmwareVersion _applicationfirmwareversion;
+
+ /// <summary>
+ /// Gets or sets the configurationbase application firmware versions.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual ApplicationFirmwareVersion ApplicationFirmwareVersion
+ {
+ get
+ {
+ return _applicationfirmwareversion;
+ }
+
+ set
+ {
+ if (_applicationfirmwareversion != value)
+ {
+ _applicationfirmwareversion = value;
+
+ OnApplicationFirmwareVersionChanged(value);
+
+ }
+ }
+ }
+
+ protected ApplicationOsVersion _applicationosversion;
+
+ /// <summary>
+ /// Gets or sets the configurationbase application os versions.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual ApplicationOsVersion ApplicationOsVersion
+ {
+ get
+ {
+ return _applicationosversion;
+ }
+
+ set
+ {
+ if (_applicationosversion != value)
+ {
+ _applicationosversion = value;
+
+ OnApplicationOsVersionChanged(value);
+
+ }
+ }
+ }
+
+ protected EmbeddedFirmwareVersion _embeddedfirmwareversion;
+
+ /// <summary>
+ /// Gets or sets the configurationbase embedded firmware versions.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual EmbeddedFirmwareVersion EmbeddedFirmwareVersion
+ {
+ get
+ {
+ return _embeddedfirmwareversion;
+ }
+
+ set
+ {
+ if (_embeddedfirmwareversion != value)
+ {
+ _embeddedfirmwareversion = value;
+
+ OnEmbeddedFirmwareVersionChanged(value);
+
+ }
+ }
+ }
+
+ protected HardwareVersion _hardwareversion;
+
+ /// <summary>
+ /// Gets or sets the configurationbase hardware versions.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual HardwareVersion HardwareVersion
+ {
+ get
+ {
+ return _hardwareversion;
+ }
+
+ set
+ {
+ if (_hardwareversion != value)
+ {
+ _hardwareversion = value;
+
+ OnHardwareVersionChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<IdsPack> _idspacks;
+
+ /// <summary>
+ /// Gets or sets the configurationbase ids packs.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<IdsPack> IdsPacks
+ {
+ get
+ {
+ return _idspacks;
+ }
+
+ set
+ {
+ if (_idspacks != value)
+ {
+ _idspacks = value;
+
+ OnIdsPacksChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Machine> _machines;
+
+ /// <summary>
+ /// Gets or sets the configurationbase machines.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Machine> Machines
+ {
+ get
+ {
+ return _machines;
+ }
+
+ set
+ {
+ if (_machines != value)
+ {
+ _machines = value;
+
+ OnMachinesChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the ApplicationDisplayPanelVersion has changed.
+ /// </summary>
+ protected virtual void OnApplicationDisplayPanelVersionChanged(ApplicationDisplayPanelVersion applicationdisplaypanelversion)
+ {
+ ApplicationDisplayPanelVersionChanged?.Invoke(this, applicationdisplaypanelversion);
+ RaisePropertyChanged(nameof(ApplicationDisplayPanelVersion));
+ }
+
+ /// <summary>
+ /// Called when the ApplicationFirmwareVersion has changed.
+ /// </summary>
+ protected virtual void OnApplicationFirmwareVersionChanged(ApplicationFirmwareVersion applicationfirmwareversion)
+ {
+ ApplicationFirmwareVersionChanged?.Invoke(this, applicationfirmwareversion);
+ RaisePropertyChanged(nameof(ApplicationFirmwareVersion));
+ }
+
+ /// <summary>
+ /// Called when the ApplicationOsVersion has changed.
+ /// </summary>
+ protected virtual void OnApplicationOsVersionChanged(ApplicationOsVersion applicationosversion)
+ {
+ ApplicationOsVersionChanged?.Invoke(this, applicationosversion);
+ RaisePropertyChanged(nameof(ApplicationOsVersion));
+ }
+
+ /// <summary>
+ /// Called when the EmbeddedFirmwareVersion has changed.
+ /// </summary>
+ protected virtual void OnEmbeddedFirmwareVersionChanged(EmbeddedFirmwareVersion embeddedfirmwareversion)
+ {
+ EmbeddedFirmwareVersionChanged?.Invoke(this, embeddedfirmwareversion);
+ RaisePropertyChanged(nameof(EmbeddedFirmwareVersion));
+ }
+
+ /// <summary>
+ /// Called when the HardwareVersion has changed.
+ /// </summary>
+ protected virtual void OnHardwareVersionChanged(HardwareVersion hardwareversion)
+ {
+ HardwareVersionChanged?.Invoke(this, hardwareversion);
+ RaisePropertyChanged(nameof(HardwareVersion));
+ }
+
+ /// <summary>
+ /// Called when the IdsPacks has changed.
+ /// </summary>
+ protected virtual void OnIdsPacksChanged(SynchronizedObservableCollection<IdsPack> idspacks)
+ {
+ IdsPacksChanged?.Invoke(this, idspacks);
+ RaisePropertyChanged(nameof(IdsPacks));
+ }
+
+ /// <summary>
+ /// Called when the Machines has changed.
+ /// </summary>
+ protected virtual void OnMachinesChanged(SynchronizedObservableCollection<Machine> machines)
+ {
+ MachinesChanged?.Invoke(this, machines);
+ RaisePropertyChanged(nameof(Machines));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ConfigurationBase" /> class.
+ /// </summary>
+ public ConfigurationBase() : base()
+ {
+
+ IdsPacks = new SynchronizedObservableCollection<IdsPack>();
+
+ Machines = new SynchronizedObservableCollection<Machine>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/Contact.cs b/Software/Visual_Studio/Tango.BL/Entities/Contact.cs
index 2100ee0e8..285aefec9 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/Contact.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/Contact.cs
@@ -1,378 +1,60 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
+using SimpleValidator.Extensions;
namespace Tango.BL.Entities
{
- [Table("CONTACTS")]
- public partial class Contact : ObservableEntity<Contact>
+ public partial class Contact : ContactBase
{
-
- public event EventHandler<Boolean> DeletedChanged;
-
- public event EventHandler<String> FirstNameChanged;
-
- public event EventHandler<String> LastNameChanged;
-
- public event EventHandler<String> FullNameChanged;
-
- public event EventHandler<String> EmailChanged;
-
- public event EventHandler<String> PhoneNumberChanged;
-
- public event EventHandler<String> FaxChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Organization>> OrganizationsChanged;
-
- public event EventHandler<SynchronizedObservableCollection<User>> UsersChanged;
-
- protected Boolean _deleted;
-
- /// <summary>
- /// Gets or sets the contact deleted.
- /// </summary>
-
- [Column("DELETED")]
-
- public Boolean Deleted
- {
- get
- {
- return _deleted;
- }
-
- set
- {
- if (_deleted != value)
- {
- _deleted = value;
-
- OnDeletedChanged(value);
-
- }
- }
- }
-
- protected String _firstname;
-
- /// <summary>
- /// Gets or sets the contact first name.
- /// </summary>
-
- [Column("FIRST_NAME")]
-
- public String FirstName
+ protected override void RaisePropertyChanged(string propName)
{
- get
- {
- return _firstname;
- }
+ base.RaisePropertyChanged(propName);
- set
+ if (propName == nameof(FirstName) || propName == nameof(LastName))
{
- if (_firstname != value)
- {
- _firstname = value;
-
- OnFirstNameChanged(value);
-
- }
+ FixNames();
}
}
- protected String _lastname;
-
- /// <summary>
- /// Gets or sets the contact last name.
- /// </summary>
-
- [Column("LAST_NAME")]
-
- public String LastName
+ private void FixNames()
{
- get
- {
- return _lastname;
- }
-
- set
+ if (_firstname != null)
{
- if (_lastname != value)
- {
- _lastname = value;
-
- OnLastNameChanged(value);
-
- }
+ _firstname = _firstname.Trim();
}
- }
-
- protected String _fullname;
- /// <summary>
- /// Gets or sets the contact full name.
- /// </summary>
-
- [Column("FULL_NAME")]
-
- public String FullName
- {
- get
+ if (_lastname != null)
{
- return _fullname;
+ _lastname = _lastname.Trim();
}
- set
- {
- if (_fullname != value)
- {
- _fullname = value;
-
- OnFullNameChanged(value);
-
- }
- }
+ FullName = FirstName + " " + LastName;
}
- protected String _email;
-
- /// <summary>
- /// Gets or sets the contact email.
- /// </summary>
-
- [Column("EMAIL")]
-
- public String Email
+ protected override void OnValidating(ObservablesContext context)
{
- get
- {
- return _email;
- }
+ base.OnValidating(context);
- set
+ if (FirstName.IsNullOrWhiteSpace() || LastName.IsNullOrWhiteSpace())
{
- if (_email != value)
- {
- _email = value;
-
- OnEmailChanged(value);
-
- }
+ InsertError(nameof(FirstName), "Contact first name and last name was not provided.");
}
- }
- protected String _phonenumber;
-
- /// <summary>
- /// Gets or sets the contact phone number.
- /// </summary>
-
- [Column("PHONE_NUMBER")]
-
- public String PhoneNumber
- {
- get
+ if (!Email.IsEmail())
{
- return _phonenumber;
- }
-
- set
- {
- if (_phonenumber != value)
- {
- _phonenumber = value;
-
- OnPhoneNumberChanged(value);
-
- }
+ InsertError(nameof(Email), "Invalid contact email format.");
}
}
- protected String _fax;
-
- /// <summary>
- /// Gets or sets the contact fax.
- /// </summary>
-
- [Column("FAX")]
-
- public String Fax
- {
- get
- {
- return _fax;
- }
-
- set
- {
- if (_fax != value)
- {
- _fax = value;
-
- OnFaxChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<Organization> _organizations;
-
- /// <summary>
- /// Gets or sets the contact organizations.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Organization> Organizations
- {
- get
- {
- return _organizations;
- }
-
- set
- {
- if (_organizations != value)
- {
- _organizations = value;
-
- OnOrganizationsChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<User> _users;
-
- /// <summary>
- /// Gets or sets the contact users.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<User> Users
- {
- get
- {
- return _users;
- }
-
- set
- {
- if (_users != value)
- {
- _users = value;
-
- OnUsersChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Deleted has changed.
- /// </summary>
- protected virtual void OnDeletedChanged(Boolean deleted)
- {
- DeletedChanged?.Invoke(this, deleted);
- RaisePropertyChanged(nameof(Deleted));
- }
-
- /// <summary>
- /// Called when the FirstName has changed.
- /// </summary>
- protected virtual void OnFirstNameChanged(String firstname)
- {
- FirstNameChanged?.Invoke(this, firstname);
- RaisePropertyChanged(nameof(FirstName));
- }
-
- /// <summary>
- /// Called when the LastName has changed.
- /// </summary>
- protected virtual void OnLastNameChanged(String lastname)
- {
- LastNameChanged?.Invoke(this, lastname);
- RaisePropertyChanged(nameof(LastName));
- }
-
- /// <summary>
- /// Called when the FullName has changed.
- /// </summary>
- protected virtual void OnFullNameChanged(String fullname)
- {
- FullNameChanged?.Invoke(this, fullname);
- RaisePropertyChanged(nameof(FullName));
- }
-
- /// <summary>
- /// Called when the Email has changed.
- /// </summary>
- protected virtual void OnEmailChanged(String email)
- {
- EmailChanged?.Invoke(this, email);
- RaisePropertyChanged(nameof(Email));
- }
-
- /// <summary>
- /// Called when the PhoneNumber has changed.
- /// </summary>
- protected virtual void OnPhoneNumberChanged(String phonenumber)
- {
- PhoneNumberChanged?.Invoke(this, phonenumber);
- RaisePropertyChanged(nameof(PhoneNumber));
- }
-
- /// <summary>
- /// Called when the Fax has changed.
- /// </summary>
- protected virtual void OnFaxChanged(String fax)
- {
- FaxChanged?.Invoke(this, fax);
- RaisePropertyChanged(nameof(Fax));
- }
-
- /// <summary>
- /// Called when the Organizations has changed.
- /// </summary>
- protected virtual void OnOrganizationsChanged(SynchronizedObservableCollection<Organization> organizations)
- {
- OrganizationsChanged?.Invoke(this, organizations);
- RaisePropertyChanged(nameof(Organizations));
- }
-
- /// <summary>
- /// Called when the Users has changed.
- /// </summary>
- protected virtual void OnUsersChanged(SynchronizedObservableCollection<User> users)
- {
- UsersChanged?.Invoke(this, users);
- RaisePropertyChanged(nameof(Users));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="Contact" /> class.
/// </summary>
public Contact() : base()
{
- Organizations = new SynchronizedObservableCollection<Organization>();
-
- Users = new SynchronizedObservableCollection<User>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/ContactBase.cs b/Software/Visual_Studio/Tango.BL/Entities/ContactBase.cs
new file mode 100644
index 000000000..19326fafd
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/ContactBase.cs
@@ -0,0 +1,378 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("CONTACTS")]
+ public abstract class ContactBase : ObservableEntity<Contact>
+ {
+
+ public event EventHandler<Boolean> DeletedChanged;
+
+ public event EventHandler<String> FirstNameChanged;
+
+ public event EventHandler<String> LastNameChanged;
+
+ public event EventHandler<String> FullNameChanged;
+
+ public event EventHandler<String> EmailChanged;
+
+ public event EventHandler<String> PhoneNumberChanged;
+
+ public event EventHandler<String> FaxChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Organization>> OrganizationsChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<User>> UsersChanged;
+
+ protected Boolean _deleted;
+
+ /// <summary>
+ /// Gets or sets the contactbase deleted.
+ /// </summary>
+
+ [Column("DELETED")]
+
+ public Boolean Deleted
+ {
+ get
+ {
+ return _deleted;
+ }
+
+ set
+ {
+ if (_deleted != value)
+ {
+ _deleted = value;
+
+ OnDeletedChanged(value);
+
+ }
+ }
+ }
+
+ protected String _firstname;
+
+ /// <summary>
+ /// Gets or sets the contactbase first name.
+ /// </summary>
+
+ [Column("FIRST_NAME")]
+
+ public String FirstName
+ {
+ get
+ {
+ return _firstname;
+ }
+
+ set
+ {
+ if (_firstname != value)
+ {
+ _firstname = value;
+
+ OnFirstNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _lastname;
+
+ /// <summary>
+ /// Gets or sets the contactbase last name.
+ /// </summary>
+
+ [Column("LAST_NAME")]
+
+ public String LastName
+ {
+ get
+ {
+ return _lastname;
+ }
+
+ set
+ {
+ if (_lastname != value)
+ {
+ _lastname = value;
+
+ OnLastNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _fullname;
+
+ /// <summary>
+ /// Gets or sets the contactbase full name.
+ /// </summary>
+
+ [Column("FULL_NAME")]
+
+ public String FullName
+ {
+ get
+ {
+ return _fullname;
+ }
+
+ set
+ {
+ if (_fullname != value)
+ {
+ _fullname = value;
+
+ OnFullNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _email;
+
+ /// <summary>
+ /// Gets or sets the contactbase email.
+ /// </summary>
+
+ [Column("EMAIL")]
+
+ public String Email
+ {
+ get
+ {
+ return _email;
+ }
+
+ set
+ {
+ if (_email != value)
+ {
+ _email = value;
+
+ OnEmailChanged(value);
+
+ }
+ }
+ }
+
+ protected String _phonenumber;
+
+ /// <summary>
+ /// Gets or sets the contactbase phone number.
+ /// </summary>
+
+ [Column("PHONE_NUMBER")]
+
+ public String PhoneNumber
+ {
+ get
+ {
+ return _phonenumber;
+ }
+
+ set
+ {
+ if (_phonenumber != value)
+ {
+ _phonenumber = value;
+
+ OnPhoneNumberChanged(value);
+
+ }
+ }
+ }
+
+ protected String _fax;
+
+ /// <summary>
+ /// Gets or sets the contactbase fax.
+ /// </summary>
+
+ [Column("FAX")]
+
+ public String Fax
+ {
+ get
+ {
+ return _fax;
+ }
+
+ set
+ {
+ if (_fax != value)
+ {
+ _fax = value;
+
+ OnFaxChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Organization> _organizations;
+
+ /// <summary>
+ /// Gets or sets the contactbase organizations.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Organization> Organizations
+ {
+ get
+ {
+ return _organizations;
+ }
+
+ set
+ {
+ if (_organizations != value)
+ {
+ _organizations = value;
+
+ OnOrganizationsChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<User> _users;
+
+ /// <summary>
+ /// Gets or sets the contactbase users.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<User> Users
+ {
+ get
+ {
+ return _users;
+ }
+
+ set
+ {
+ if (_users != value)
+ {
+ _users = value;
+
+ OnUsersChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Deleted has changed.
+ /// </summary>
+ protected virtual void OnDeletedChanged(Boolean deleted)
+ {
+ DeletedChanged?.Invoke(this, deleted);
+ RaisePropertyChanged(nameof(Deleted));
+ }
+
+ /// <summary>
+ /// Called when the FirstName has changed.
+ /// </summary>
+ protected virtual void OnFirstNameChanged(String firstname)
+ {
+ FirstNameChanged?.Invoke(this, firstname);
+ RaisePropertyChanged(nameof(FirstName));
+ }
+
+ /// <summary>
+ /// Called when the LastName has changed.
+ /// </summary>
+ protected virtual void OnLastNameChanged(String lastname)
+ {
+ LastNameChanged?.Invoke(this, lastname);
+ RaisePropertyChanged(nameof(LastName));
+ }
+
+ /// <summary>
+ /// Called when the FullName has changed.
+ /// </summary>
+ protected virtual void OnFullNameChanged(String fullname)
+ {
+ FullNameChanged?.Invoke(this, fullname);
+ RaisePropertyChanged(nameof(FullName));
+ }
+
+ /// <summary>
+ /// Called when the Email has changed.
+ /// </summary>
+ protected virtual void OnEmailChanged(String email)
+ {
+ EmailChanged?.Invoke(this, email);
+ RaisePropertyChanged(nameof(Email));
+ }
+
+ /// <summary>
+ /// Called when the PhoneNumber has changed.
+ /// </summary>
+ protected virtual void OnPhoneNumberChanged(String phonenumber)
+ {
+ PhoneNumberChanged?.Invoke(this, phonenumber);
+ RaisePropertyChanged(nameof(PhoneNumber));
+ }
+
+ /// <summary>
+ /// Called when the Fax has changed.
+ /// </summary>
+ protected virtual void OnFaxChanged(String fax)
+ {
+ FaxChanged?.Invoke(this, fax);
+ RaisePropertyChanged(nameof(Fax));
+ }
+
+ /// <summary>
+ /// Called when the Organizations has changed.
+ /// </summary>
+ protected virtual void OnOrganizationsChanged(SynchronizedObservableCollection<Organization> organizations)
+ {
+ OrganizationsChanged?.Invoke(this, organizations);
+ RaisePropertyChanged(nameof(Organizations));
+ }
+
+ /// <summary>
+ /// Called when the Users has changed.
+ /// </summary>
+ protected virtual void OnUsersChanged(SynchronizedObservableCollection<User> users)
+ {
+ UsersChanged?.Invoke(this, users);
+ RaisePropertyChanged(nameof(Users));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ContactBase" /> class.
+ /// </summary>
+ public ContactBase() : base()
+ {
+
+ Organizations = new SynchronizedObservableCollection<Organization>();
+
+ Users = new SynchronizedObservableCollection<User>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/Customer.cs b/Software/Visual_Studio/Tango.BL/Entities/Customer.cs
index 0281ffd8e..bd4a51c54 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/Customer.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/Customer.cs
@@ -1,175 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("CUSTOMERS")]
- public partial class Customer : ObservableEntity<Customer>
+ public partial class Customer : CustomerBase
{
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<Organization> OrganizationChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Job>> JobsChanged;
-
- protected String _organizationguid;
-
- /// <summary>
- /// Gets or sets the customer organization guid.
- /// </summary>
-
- [Column("ORGANIZATION_GUID")]
- [ForeignKey("Organization")]
-
- public String OrganizationGuid
- {
- get
- {
- return _organizationguid;
- }
-
- set
- {
- if (_organizationguid != value)
- {
- _organizationguid = value;
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the customer name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected Organization _organization;
-
- /// <summary>
- /// Gets or sets the customer organization.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual Organization Organization
- {
- get
- {
- return _organization;
- }
-
- set
- {
- if (_organization != value)
- {
- _organization = value;
-
- OnOrganizationChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<Job> _jobs;
-
- /// <summary>
- /// Gets or sets the customer jobs.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Job> Jobs
- {
- get
- {
- return _jobs;
- }
-
- set
- {
- if (_jobs != value)
- {
- _jobs = value;
-
- OnJobsChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Organization has changed.
- /// </summary>
- protected virtual void OnOrganizationChanged(Organization organization)
- {
- OrganizationChanged?.Invoke(this, organization);
- RaisePropertyChanged(nameof(Organization));
- }
-
- /// <summary>
- /// Called when the Jobs has changed.
- /// </summary>
- protected virtual void OnJobsChanged(SynchronizedObservableCollection<Job> jobs)
- {
- JobsChanged?.Invoke(this, jobs);
- RaisePropertyChanged(nameof(Jobs));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="Customer" /> class.
/// </summary>
public Customer() : base()
{
- Jobs = new SynchronizedObservableCollection<Job>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/CustomerBase.cs b/Software/Visual_Studio/Tango.BL/Entities/CustomerBase.cs
new file mode 100644
index 000000000..89a8e8cf7
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/CustomerBase.cs
@@ -0,0 +1,175 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("CUSTOMERS")]
+ public abstract class CustomerBase : ObservableEntity<Customer>
+ {
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<Organization> OrganizationChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Job>> JobsChanged;
+
+ protected String _organizationguid;
+
+ /// <summary>
+ /// Gets or sets the customerbase organization guid.
+ /// </summary>
+
+ [Column("ORGANIZATION_GUID")]
+ [ForeignKey("Organization")]
+
+ public String OrganizationGuid
+ {
+ get
+ {
+ return _organizationguid;
+ }
+
+ set
+ {
+ if (_organizationguid != value)
+ {
+ _organizationguid = value;
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the customerbase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected Organization _organization;
+
+ /// <summary>
+ /// Gets or sets the customerbase organization.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual Organization Organization
+ {
+ get
+ {
+ return _organization;
+ }
+
+ set
+ {
+ if (_organization != value)
+ {
+ _organization = value;
+
+ OnOrganizationChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Job> _jobs;
+
+ /// <summary>
+ /// Gets or sets the customerbase jobs.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Job> Jobs
+ {
+ get
+ {
+ return _jobs;
+ }
+
+ set
+ {
+ if (_jobs != value)
+ {
+ _jobs = value;
+
+ OnJobsChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Organization has changed.
+ /// </summary>
+ protected virtual void OnOrganizationChanged(Organization organization)
+ {
+ OrganizationChanged?.Invoke(this, organization);
+ RaisePropertyChanged(nameof(Organization));
+ }
+
+ /// <summary>
+ /// Called when the Jobs has changed.
+ /// </summary>
+ protected virtual void OnJobsChanged(SynchronizedObservableCollection<Job> jobs)
+ {
+ JobsChanged?.Invoke(this, jobs);
+ RaisePropertyChanged(nameof(Jobs));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="CustomerBase" /> class.
+ /// </summary>
+ public CustomerBase() : base()
+ {
+
+ Jobs = new SynchronizedObservableCollection<Job>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/Dispenser.cs b/Software/Visual_Studio/Tango.BL/Entities/Dispenser.cs
index e45b064df..2508ec121 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/Dispenser.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/Dispenser.cs
@@ -1,241 +1,38 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
+using Newtonsoft.Json;
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
+using System.Data.Entity;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("DISPENSERS")]
- public partial class Dispenser : ObservableEntity<Dispenser>
+ public partial class Dispenser : DispenserBase
{
-
- public event EventHandler<String> SerialNumberChanged;
-
- public event EventHandler<Double> NlPerPulseChanged;
-
- public event EventHandler<Byte[]> DataChanged;
-
- public event EventHandler<DispenserType> DispenserTypeChanged;
-
- public event EventHandler<SynchronizedObservableCollection<IdsPack>> IdsPacksChanged;
-
- protected String _serialnumber;
-
- /// <summary>
- /// Gets or sets the dispenser serial number.
- /// </summary>
-
- [Column("SERIAL_NUMBER")]
-
- public String SerialNumber
- {
- get
- {
- return _serialnumber;
- }
-
- set
- {
- if (_serialnumber != value)
- {
- _serialnumber = value;
-
- OnSerialNumberChanged(value);
-
- }
- }
- }
-
- protected String _dispensertypeguid;
-
- /// <summary>
- /// Gets or sets the dispenser dispenser type guid.
- /// </summary>
-
- [Column("DISPENSER_TYPE_GUID")]
- [ForeignKey("DispenserType")]
-
- public String DispenserTypeGuid
- {
- get
- {
- return _dispensertypeguid;
- }
-
- set
- {
- if (_dispensertypeguid != value)
- {
- _dispensertypeguid = value;
- }
- }
- }
-
- protected Double _nlperpulse;
-
- /// <summary>
- /// Gets or sets the dispenser nl per pulse.
- /// </summary>
-
- [Column("NL_PER_PULSE")]
-
- public Double NlPerPulse
- {
- get
- {
- return _nlperpulse;
- }
-
- set
- {
- if (_nlperpulse != value)
- {
- _nlperpulse = value;
-
- OnNlPerPulseChanged(value);
-
- }
- }
- }
-
- protected Byte[] _data;
-
- /// <summary>
- /// Gets or sets the dispenser data.
- /// </summary>
-
- [Column("DATA")]
-
- public Byte[] Data
- {
- get
- {
- return _data;
- }
-
- set
- {
- if (_data != value)
- {
- _data = value;
-
- OnDataChanged(value);
-
- }
- }
- }
-
- protected DispenserType _dispensertype;
-
- /// <summary>
- /// Gets or sets the dispenser dispenser types.
- /// </summary>
-
- [XmlIgnore]
[JsonIgnore]
- public virtual DispenserType DispenserType
+ [NotMapped]
+ public bool IsInstalled
{
- get
+ get
{
- return _dispensertype;
- }
-
- set
- {
- if (_dispensertype != value)
- {
- _dispensertype = value;
-
- OnDispenserTypeChanged(value);
-
- }
+ return IdsPacks != null && IdsPacks.Count > 0;
}
}
- protected SynchronizedObservableCollection<IdsPack> _idspacks;
-
- /// <summary>
- /// Gets or sets the dispenser ids packs.
- /// </summary>
+ [JsonIgnore]
+ [NotMapped]
+ public Machine Machine { get; private set; }
- public virtual SynchronizedObservableCollection<IdsPack> IdsPacks
+ public async void InitMachine(ObservablesContext context)
{
- get
+ if (IdsPacks != null && IdsPacks.Count > 0)
{
- return _idspacks;
+ var config_guid = IdsPacks[0].ConfigurationGuid;
+ Machine = await context.Machines.SingleOrDefaultAsync(x => x.ConfigurationGuid == config_guid);
+ RaisePropertyChanged(nameof(Machine));
}
-
- set
- {
- if (_idspacks != value)
- {
- _idspacks = value;
-
- OnIdsPacksChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the SerialNumber has changed.
- /// </summary>
- protected virtual void OnSerialNumberChanged(String serialnumber)
- {
- SerialNumberChanged?.Invoke(this, serialnumber);
- RaisePropertyChanged(nameof(SerialNumber));
- }
-
- /// <summary>
- /// Called when the NlPerPulse has changed.
- /// </summary>
- protected virtual void OnNlPerPulseChanged(Double nlperpulse)
- {
- NlPerPulseChanged?.Invoke(this, nlperpulse);
- RaisePropertyChanged(nameof(NlPerPulse));
- }
-
- /// <summary>
- /// Called when the Data has changed.
- /// </summary>
- protected virtual void OnDataChanged(Byte[] data)
- {
- DataChanged?.Invoke(this, data);
- RaisePropertyChanged(nameof(Data));
- }
-
- /// <summary>
- /// Called when the DispenserType has changed.
- /// </summary>
- protected virtual void OnDispenserTypeChanged(DispenserType dispensertype)
- {
- DispenserTypeChanged?.Invoke(this, dispensertype);
- RaisePropertyChanged(nameof(DispenserType));
- }
-
- /// <summary>
- /// Called when the IdsPacks has changed.
- /// </summary>
- protected virtual void OnIdsPacksChanged(SynchronizedObservableCollection<IdsPack> idspacks)
- {
- IdsPacksChanged?.Invoke(this, idspacks);
- RaisePropertyChanged(nameof(IdsPacks));
}
/// <summary>
@@ -244,8 +41,6 @@ namespace Tango.BL.Entities
public Dispenser() : base()
{
- IdsPacks = new SynchronizedObservableCollection<IdsPack>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/DispenserBase.cs b/Software/Visual_Studio/Tango.BL/Entities/DispenserBase.cs
new file mode 100644
index 000000000..91d84a666
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/DispenserBase.cs
@@ -0,0 +1,251 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("DISPENSERS")]
+ public abstract class DispenserBase : ObservableEntity<Dispenser>
+ {
+
+ public event EventHandler<String> SerialNumberChanged;
+
+ public event EventHandler<Double> NlPerPulseChanged;
+
+ public event EventHandler<Byte[]> DataChanged;
+
+ public event EventHandler<DispenserType> DispenserTypeChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<IdsPack>> IdsPacksChanged;
+
+ protected String _serialnumber;
+
+ /// <summary>
+ /// Gets or sets the dispenserbase serial number.
+ /// </summary>
+
+ [Column("SERIAL_NUMBER")]
+
+ public String SerialNumber
+ {
+ get
+ {
+ return _serialnumber;
+ }
+
+ set
+ {
+ if (_serialnumber != value)
+ {
+ _serialnumber = value;
+
+ OnSerialNumberChanged(value);
+
+ }
+ }
+ }
+
+ protected String _dispensertypeguid;
+
+ /// <summary>
+ /// Gets or sets the dispenserbase dispenser type guid.
+ /// </summary>
+
+ [Column("DISPENSER_TYPE_GUID")]
+ [ForeignKey("DispenserType")]
+
+ public String DispenserTypeGuid
+ {
+ get
+ {
+ return _dispensertypeguid;
+ }
+
+ set
+ {
+ if (_dispensertypeguid != value)
+ {
+ _dispensertypeguid = value;
+ }
+ }
+ }
+
+ protected Double _nlperpulse;
+
+ /// <summary>
+ /// Gets or sets the dispenserbase nl per pulse.
+ /// </summary>
+
+ [Column("NL_PER_PULSE")]
+
+ public Double NlPerPulse
+ {
+ get
+ {
+ return _nlperpulse;
+ }
+
+ set
+ {
+ if (_nlperpulse != value)
+ {
+ _nlperpulse = value;
+
+ OnNlPerPulseChanged(value);
+
+ }
+ }
+ }
+
+ protected Byte[] _data;
+
+ /// <summary>
+ /// Gets or sets the dispenserbase data.
+ /// </summary>
+
+ [Column("DATA")]
+
+ public Byte[] Data
+ {
+ get
+ {
+ return _data;
+ }
+
+ set
+ {
+ if (_data != value)
+ {
+ _data = value;
+
+ OnDataChanged(value);
+
+ }
+ }
+ }
+
+ protected DispenserType _dispensertype;
+
+ /// <summary>
+ /// Gets or sets the dispenserbase dispenser types.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual DispenserType DispenserType
+ {
+ get
+ {
+ return _dispensertype;
+ }
+
+ set
+ {
+ if (_dispensertype != value)
+ {
+ _dispensertype = value;
+
+ OnDispenserTypeChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<IdsPack> _idspacks;
+
+ /// <summary>
+ /// Gets or sets the dispenserbase ids packs.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<IdsPack> IdsPacks
+ {
+ get
+ {
+ return _idspacks;
+ }
+
+ set
+ {
+ if (_idspacks != value)
+ {
+ _idspacks = value;
+
+ OnIdsPacksChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the SerialNumber has changed.
+ /// </summary>
+ protected virtual void OnSerialNumberChanged(String serialnumber)
+ {
+ SerialNumberChanged?.Invoke(this, serialnumber);
+ RaisePropertyChanged(nameof(SerialNumber));
+ }
+
+ /// <summary>
+ /// Called when the NlPerPulse has changed.
+ /// </summary>
+ protected virtual void OnNlPerPulseChanged(Double nlperpulse)
+ {
+ NlPerPulseChanged?.Invoke(this, nlperpulse);
+ RaisePropertyChanged(nameof(NlPerPulse));
+ }
+
+ /// <summary>
+ /// Called when the Data has changed.
+ /// </summary>
+ protected virtual void OnDataChanged(Byte[] data)
+ {
+ DataChanged?.Invoke(this, data);
+ RaisePropertyChanged(nameof(Data));
+ }
+
+ /// <summary>
+ /// Called when the DispenserType has changed.
+ /// </summary>
+ protected virtual void OnDispenserTypeChanged(DispenserType dispensertype)
+ {
+ DispenserTypeChanged?.Invoke(this, dispensertype);
+ RaisePropertyChanged(nameof(DispenserType));
+ }
+
+ /// <summary>
+ /// Called when the IdsPacks has changed.
+ /// </summary>
+ protected virtual void OnIdsPacksChanged(SynchronizedObservableCollection<IdsPack> idspacks)
+ {
+ IdsPacksChanged?.Invoke(this, idspacks);
+ RaisePropertyChanged(nameof(IdsPacks));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="DispenserBase" /> class.
+ /// </summary>
+ public DispenserBase() : base()
+ {
+
+ IdsPacks = new SynchronizedObservableCollection<IdsPack>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/DispenserType.cs b/Software/Visual_Studio/Tango.BL/Entities/DispenserType.cs
index a1351d0d1..f699a8d36 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/DispenserType.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/DispenserType.cs
@@ -1,188 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("DISPENSER_TYPES")]
- public partial class DispenserType : ObservableEntity<DispenserType>
+ public partial class DispenserType : DispenserTypeBase
{
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<Double> CapacityChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Dispenser>> DispensersChanged;
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the dispensertype code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the dispensertype name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected Double _capacity;
-
- /// <summary>
- /// Gets or sets the dispensertype capacity.
- /// </summary>
-
- [Column("CAPACITY")]
-
- public Double Capacity
- {
- get
- {
- return _capacity;
- }
-
- set
- {
- if (_capacity != value)
- {
- _capacity = value;
-
- OnCapacityChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<Dispenser> _dispensers;
-
- /// <summary>
- /// Gets or sets the dispensertype dispensers.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Dispenser> Dispensers
- {
- get
- {
- return _dispensers;
- }
-
- set
- {
- if (_dispensers != value)
- {
- _dispensers = value;
-
- OnDispensersChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Capacity has changed.
- /// </summary>
- protected virtual void OnCapacityChanged(Double capacity)
- {
- CapacityChanged?.Invoke(this, capacity);
- RaisePropertyChanged(nameof(Capacity));
- }
-
- /// <summary>
- /// Called when the Dispensers has changed.
- /// </summary>
- protected virtual void OnDispensersChanged(SynchronizedObservableCollection<Dispenser> dispensers)
- {
- DispensersChanged?.Invoke(this, dispensers);
- RaisePropertyChanged(nameof(Dispensers));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="DispenserType" /> class.
/// </summary>
public DispenserType() : base()
{
- Dispensers = new SynchronizedObservableCollection<Dispenser>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/DispenserTypeBase.cs b/Software/Visual_Studio/Tango.BL/Entities/DispenserTypeBase.cs
new file mode 100644
index 000000000..c2cde91c5
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/DispenserTypeBase.cs
@@ -0,0 +1,188 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("DISPENSER_TYPES")]
+ public abstract class DispenserTypeBase : ObservableEntity<DispenserType>
+ {
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<Double> CapacityChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Dispenser>> DispensersChanged;
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the dispensertypebase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the dispensertypebase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _capacity;
+
+ /// <summary>
+ /// Gets or sets the dispensertypebase capacity.
+ /// </summary>
+
+ [Column("CAPACITY")]
+
+ public Double Capacity
+ {
+ get
+ {
+ return _capacity;
+ }
+
+ set
+ {
+ if (_capacity != value)
+ {
+ _capacity = value;
+
+ OnCapacityChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Dispenser> _dispensers;
+
+ /// <summary>
+ /// Gets or sets the dispensertypebase dispensers.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Dispenser> Dispensers
+ {
+ get
+ {
+ return _dispensers;
+ }
+
+ set
+ {
+ if (_dispensers != value)
+ {
+ _dispensers = value;
+
+ OnDispensersChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Capacity has changed.
+ /// </summary>
+ protected virtual void OnCapacityChanged(Double capacity)
+ {
+ CapacityChanged?.Invoke(this, capacity);
+ RaisePropertyChanged(nameof(Capacity));
+ }
+
+ /// <summary>
+ /// Called when the Dispensers has changed.
+ /// </summary>
+ protected virtual void OnDispensersChanged(SynchronizedObservableCollection<Dispenser> dispensers)
+ {
+ DispensersChanged?.Invoke(this, dispensers);
+ RaisePropertyChanged(nameof(Dispensers));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="DispenserTypeBase" /> class.
+ /// </summary>
+ public DispenserTypeBase() : base()
+ {
+
+ Dispensers = new SynchronizedObservableCollection<Dispenser>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/EmbeddedFirmwareVersion.cs b/Software/Visual_Studio/Tango.BL/Entities/EmbeddedFirmwareVersion.cs
index 1cc45b75f..f1e9aedcb 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/EmbeddedFirmwareVersion.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/EmbeddedFirmwareVersion.cs
@@ -1,150 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("EMBEDDED_FIRMWARE_VERSIONS")]
- public partial class EmbeddedFirmwareVersion : ObservableEntity<EmbeddedFirmwareVersion>
+ public partial class EmbeddedFirmwareVersion : EmbeddedFirmwareVersionBase
{
-
- public event EventHandler<Double> VersionChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Configuration>> ConfigurationsChanged;
-
- protected Double _version;
-
- /// <summary>
- /// Gets or sets the embeddedfirmwareversion version.
- /// </summary>
-
- [Column("VERSION")]
-
- public Double Version
- {
- get
- {
- return _version;
- }
-
- set
- {
- if (_version != value)
- {
- _version = value;
-
- OnVersionChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the embeddedfirmwareversion name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<Configuration> _configurations;
-
- /// <summary>
- /// Gets or sets the embeddedfirmwareversion configurations.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Configuration> Configurations
- {
- get
- {
- return _configurations;
- }
-
- set
- {
- if (_configurations != value)
- {
- _configurations = value;
-
- OnConfigurationsChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Version has changed.
- /// </summary>
- protected virtual void OnVersionChanged(Double version)
- {
- VersionChanged?.Invoke(this, version);
- RaisePropertyChanged(nameof(Version));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Configurations has changed.
- /// </summary>
- protected virtual void OnConfigurationsChanged(SynchronizedObservableCollection<Configuration> configurations)
- {
- ConfigurationsChanged?.Invoke(this, configurations);
- RaisePropertyChanged(nameof(Configurations));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="EmbeddedFirmwareVersion" /> class.
/// </summary>
public EmbeddedFirmwareVersion() : base()
{
- Configurations = new SynchronizedObservableCollection<Configuration>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/EmbeddedFirmwareVersionBase.cs b/Software/Visual_Studio/Tango.BL/Entities/EmbeddedFirmwareVersionBase.cs
new file mode 100644
index 000000000..2cfba9f3f
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/EmbeddedFirmwareVersionBase.cs
@@ -0,0 +1,150 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("EMBEDDED_FIRMWARE_VERSIONS")]
+ public abstract class EmbeddedFirmwareVersionBase : ObservableEntity<EmbeddedFirmwareVersion>
+ {
+
+ public event EventHandler<Double> VersionChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Configuration>> ConfigurationsChanged;
+
+ protected Double _version;
+
+ /// <summary>
+ /// Gets or sets the embeddedfirmwareversionbase version.
+ /// </summary>
+
+ [Column("VERSION")]
+
+ public Double Version
+ {
+ get
+ {
+ return _version;
+ }
+
+ set
+ {
+ if (_version != value)
+ {
+ _version = value;
+
+ OnVersionChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the embeddedfirmwareversionbase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Configuration> _configurations;
+
+ /// <summary>
+ /// Gets or sets the embeddedfirmwareversionbase configurations.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Configuration> Configurations
+ {
+ get
+ {
+ return _configurations;
+ }
+
+ set
+ {
+ if (_configurations != value)
+ {
+ _configurations = value;
+
+ OnConfigurationsChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Version has changed.
+ /// </summary>
+ protected virtual void OnVersionChanged(Double version)
+ {
+ VersionChanged?.Invoke(this, version);
+ RaisePropertyChanged(nameof(Version));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Configurations has changed.
+ /// </summary>
+ protected virtual void OnConfigurationsChanged(SynchronizedObservableCollection<Configuration> configurations)
+ {
+ ConfigurationsChanged?.Invoke(this, configurations);
+ RaisePropertyChanged(nameof(Configurations));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="EmbeddedFirmwareVersionBase" /> class.
+ /// </summary>
+ public EmbeddedFirmwareVersionBase() : base()
+ {
+
+ Configurations = new SynchronizedObservableCollection<Configuration>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/EventType.cs b/Software/Visual_Studio/Tango.BL/Entities/EventType.cs
index 3b3117817..0c1e9fa76 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/EventType.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/EventType.cs
@@ -1,479 +1,22 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
+using Newtonsoft.Json;
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.BL.Enumerations;
namespace Tango.BL.Entities
{
- [Table("EVENT_TYPES")]
- public partial class EventType : ObservableEntity<EventType>
+ public partial class EventType : EventTypeBase
{
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<String> DescriptionChanged;
-
- public event EventHandler<Boolean> RequiresUserInterventionChanged;
-
- public event EventHandler<Boolean> ResolvableChanged;
-
- public event EventHandler<EventTypesGroup> EventTypesGroupChanged;
-
- public event EventHandler<EventTypesCategory> EventTypesCategoryChanged;
-
- public event EventHandler<HtmlPage> HtmlPageChanged;
-
- public event EventHandler<SynchronizedObservableCollection<EventTypesAction>> EventTypesActionsChanged;
-
- public event EventHandler<SynchronizedObservableCollection<MachinesEvent>> MachinesEventsChanged;
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the eventtype code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the eventtype name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected String _description;
-
- /// <summary>
- /// Gets or sets the eventtype description.
- /// </summary>
-
- [Column("DESCRIPTION")]
-
- public String Description
- {
- get
- {
- return _description;
- }
-
- set
- {
- if (_description != value)
- {
- _description = value;
-
- OnDescriptionChanged(value);
-
- }
- }
- }
-
- protected String _eventtypescategoryguid;
-
- /// <summary>
- /// Gets or sets the eventtype event types category guid.
- /// </summary>
-
- [Column("EVENT_TYPES_CATEGORY_GUID")]
- [ForeignKey("EventTypesCategory")]
-
- public String EventTypesCategoryGuid
- {
- get
- {
- return _eventtypescategoryguid;
- }
-
- set
- {
- if (_eventtypescategoryguid != value)
- {
- _eventtypescategoryguid = value;
- }
- }
- }
-
- protected String _eventtypesgroupguid;
-
- /// <summary>
- /// Gets or sets the eventtype event types group guid.
- /// </summary>
-
- [Column("EVENT_TYPES_GROUP_GUID")]
- [ForeignKey("EventTypesGroup")]
-
- public String EventTypesGroupGuid
- {
- get
- {
- return _eventtypesgroupguid;
- }
-
- set
- {
- if (_eventtypesgroupguid != value)
- {
- _eventtypesgroupguid = value;
- }
- }
- }
-
- protected Boolean _requiresuserintervention;
-
- /// <summary>
- /// Gets or sets the eventtype requires user intervention.
- /// </summary>
-
- [Column("REQUIRES_USER_INTERVENTION")]
-
- public Boolean RequiresUserIntervention
- {
- get
- {
- return _requiresuserintervention;
- }
-
- set
- {
- if (_requiresuserintervention != value)
- {
- _requiresuserintervention = value;
-
- OnRequiresUserInterventionChanged(value);
-
- }
- }
- }
-
- protected String _htmlpageguid;
-
- /// <summary>
- /// Gets or sets the eventtype html page guid.
- /// </summary>
-
- [Column("HTML_PAGE_GUID")]
- [ForeignKey("HtmlPage")]
-
- public String HtmlPageGuid
- {
- get
- {
- return _htmlpageguid;
- }
-
- set
- {
- if (_htmlpageguid != value)
- {
- _htmlpageguid = value;
- }
- }
- }
-
- protected Boolean _resolvable;
-
- /// <summary>
- /// Gets or sets the eventtype resolvable.
- /// </summary>
-
- [Column("RESOLVABLE")]
-
- public Boolean Resolvable
- {
- get
- {
- return _resolvable;
- }
-
- set
- {
- if (_resolvable != value)
- {
- _resolvable = value;
-
- OnResolvableChanged(value);
-
- }
- }
- }
-
- protected EventTypesGroup _eventtypesgroup;
-
- /// <summary>
- /// Gets or sets the eventtype event types groups.
- /// </summary>
-
- [XmlIgnore]
+ [NotMapped]
[JsonIgnore]
- public virtual EventTypesGroup EventTypesGroup
- {
- get
- {
- return _eventtypesgroup;
- }
-
- set
- {
- if (_eventtypesgroup != value)
- {
- _eventtypesgroup = value;
-
- OnEventTypesGroupChanged(value);
-
- }
- }
- }
-
- protected EventTypesCategory _eventtypescategory;
-
- /// <summary>
- /// Gets or sets the eventtype event types categories.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual EventTypesCategory EventTypesCategory
- {
- get
- {
- return _eventtypescategory;
- }
-
- set
- {
- if (_eventtypescategory != value)
- {
- _eventtypescategory = value;
-
- OnEventTypesCategoryChanged(value);
-
- }
- }
- }
-
- protected HtmlPage _htmlpage;
-
- /// <summary>
- /// Gets or sets the eventtype html pages.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual HtmlPage HtmlPage
- {
- get
- {
- return _htmlpage;
- }
-
- set
- {
- if (_htmlpage != value)
- {
- _htmlpage = value;
-
- OnHtmlPageChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<EventTypesAction> _eventtypesactions;
-
- /// <summary>
- /// Gets or sets the eventtype event types actions.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<EventTypesAction> EventTypesActions
- {
- get
- {
- return _eventtypesactions;
- }
-
- set
- {
- if (_eventtypesactions != value)
- {
- _eventtypesactions = value;
-
- OnEventTypesActionsChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<MachinesEvent> _machinesevents;
-
- /// <summary>
- /// Gets or sets the eventtype machines events.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<MachinesEvent> MachinesEvents
- {
- get
- {
- return _machinesevents;
- }
-
- set
- {
- if (_machinesevents != value)
- {
- _machinesevents = value;
-
- OnMachinesEventsChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
+ public EventTypes Type
{
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Description has changed.
- /// </summary>
- protected virtual void OnDescriptionChanged(String description)
- {
- DescriptionChanged?.Invoke(this, description);
- RaisePropertyChanged(nameof(Description));
- }
-
- /// <summary>
- /// Called when the RequiresUserIntervention has changed.
- /// </summary>
- protected virtual void OnRequiresUserInterventionChanged(Boolean requiresuserintervention)
- {
- RequiresUserInterventionChanged?.Invoke(this, requiresuserintervention);
- RaisePropertyChanged(nameof(RequiresUserIntervention));
- }
-
- /// <summary>
- /// Called when the Resolvable has changed.
- /// </summary>
- protected virtual void OnResolvableChanged(Boolean resolvable)
- {
- ResolvableChanged?.Invoke(this, resolvable);
- RaisePropertyChanged(nameof(Resolvable));
- }
-
- /// <summary>
- /// Called when the EventTypesGroup has changed.
- /// </summary>
- protected virtual void OnEventTypesGroupChanged(EventTypesGroup eventtypesgroup)
- {
- EventTypesGroupChanged?.Invoke(this, eventtypesgroup);
- RaisePropertyChanged(nameof(EventTypesGroup));
- }
-
- /// <summary>
- /// Called when the EventTypesCategory has changed.
- /// </summary>
- protected virtual void OnEventTypesCategoryChanged(EventTypesCategory eventtypescategory)
- {
- EventTypesCategoryChanged?.Invoke(this, eventtypescategory);
- RaisePropertyChanged(nameof(EventTypesCategory));
- }
-
- /// <summary>
- /// Called when the HtmlPage has changed.
- /// </summary>
- protected virtual void OnHtmlPageChanged(HtmlPage htmlpage)
- {
- HtmlPageChanged?.Invoke(this, htmlpage);
- RaisePropertyChanged(nameof(HtmlPage));
- }
-
- /// <summary>
- /// Called when the EventTypesActions has changed.
- /// </summary>
- protected virtual void OnEventTypesActionsChanged(SynchronizedObservableCollection<EventTypesAction> eventtypesactions)
- {
- EventTypesActionsChanged?.Invoke(this, eventtypesactions);
- RaisePropertyChanged(nameof(EventTypesActions));
- }
-
- /// <summary>
- /// Called when the MachinesEvents has changed.
- /// </summary>
- protected virtual void OnMachinesEventsChanged(SynchronizedObservableCollection<MachinesEvent> machinesevents)
- {
- MachinesEventsChanged?.Invoke(this, machinesevents);
- RaisePropertyChanged(nameof(MachinesEvents));
+ get { return (EventTypes)Code; }
+ set { Code = (int)value; }
}
/// <summary>
@@ -482,10 +25,6 @@ namespace Tango.BL.Entities
public EventType() : base()
{
- EventTypesActions = new SynchronizedObservableCollection<EventTypesAction>();
-
- MachinesEvents = new SynchronizedObservableCollection<MachinesEvent>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/EventTypeBase.cs b/Software/Visual_Studio/Tango.BL/Entities/EventTypeBase.cs
new file mode 100644
index 000000000..751309db8
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/EventTypeBase.cs
@@ -0,0 +1,491 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("EVENT_TYPES")]
+ public abstract class EventTypeBase : ObservableEntity<EventType>
+ {
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<String> DescriptionChanged;
+
+ public event EventHandler<Boolean> RequiresUserInterventionChanged;
+
+ public event EventHandler<Boolean> ResolvableChanged;
+
+ public event EventHandler<EventTypesGroup> EventTypesGroupChanged;
+
+ public event EventHandler<EventTypesCategory> EventTypesCategoryChanged;
+
+ public event EventHandler<HtmlPage> HtmlPageChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<EventTypesAction>> EventTypesActionsChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<MachinesEvent>> MachinesEventsChanged;
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the eventtypebase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the eventtypebase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _description;
+
+ /// <summary>
+ /// Gets or sets the eventtypebase description.
+ /// </summary>
+
+ [Column("DESCRIPTION")]
+
+ public String Description
+ {
+ get
+ {
+ return _description;
+ }
+
+ set
+ {
+ if (_description != value)
+ {
+ _description = value;
+
+ OnDescriptionChanged(value);
+
+ }
+ }
+ }
+
+ protected String _eventtypescategoryguid;
+
+ /// <summary>
+ /// Gets or sets the eventtypebase event types category guid.
+ /// </summary>
+
+ [Column("EVENT_TYPES_CATEGORY_GUID")]
+ [ForeignKey("EventTypesCategory")]
+
+ public String EventTypesCategoryGuid
+ {
+ get
+ {
+ return _eventtypescategoryguid;
+ }
+
+ set
+ {
+ if (_eventtypescategoryguid != value)
+ {
+ _eventtypescategoryguid = value;
+ }
+ }
+ }
+
+ protected String _eventtypesgroupguid;
+
+ /// <summary>
+ /// Gets or sets the eventtypebase event types group guid.
+ /// </summary>
+
+ [Column("EVENT_TYPES_GROUP_GUID")]
+ [ForeignKey("EventTypesGroup")]
+
+ public String EventTypesGroupGuid
+ {
+ get
+ {
+ return _eventtypesgroupguid;
+ }
+
+ set
+ {
+ if (_eventtypesgroupguid != value)
+ {
+ _eventtypesgroupguid = value;
+ }
+ }
+ }
+
+ protected Boolean _requiresuserintervention;
+
+ /// <summary>
+ /// Gets or sets the eventtypebase requires user intervention.
+ /// </summary>
+
+ [Column("REQUIRES_USER_INTERVENTION")]
+
+ public Boolean RequiresUserIntervention
+ {
+ get
+ {
+ return _requiresuserintervention;
+ }
+
+ set
+ {
+ if (_requiresuserintervention != value)
+ {
+ _requiresuserintervention = value;
+
+ OnRequiresUserInterventionChanged(value);
+
+ }
+ }
+ }
+
+ protected String _htmlpageguid;
+
+ /// <summary>
+ /// Gets or sets the eventtypebase html page guid.
+ /// </summary>
+
+ [Column("HTML_PAGE_GUID")]
+ [ForeignKey("HtmlPage")]
+
+ public String HtmlPageGuid
+ {
+ get
+ {
+ return _htmlpageguid;
+ }
+
+ set
+ {
+ if (_htmlpageguid != value)
+ {
+ _htmlpageguid = value;
+ }
+ }
+ }
+
+ protected Boolean _resolvable;
+
+ /// <summary>
+ /// Gets or sets the eventtypebase resolvable.
+ /// </summary>
+
+ [Column("RESOLVABLE")]
+
+ public Boolean Resolvable
+ {
+ get
+ {
+ return _resolvable;
+ }
+
+ set
+ {
+ if (_resolvable != value)
+ {
+ _resolvable = value;
+
+ OnResolvableChanged(value);
+
+ }
+ }
+ }
+
+ protected EventTypesGroup _eventtypesgroup;
+
+ /// <summary>
+ /// Gets or sets the eventtypebase event types groups.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual EventTypesGroup EventTypesGroup
+ {
+ get
+ {
+ return _eventtypesgroup;
+ }
+
+ set
+ {
+ if (_eventtypesgroup != value)
+ {
+ _eventtypesgroup = value;
+
+ OnEventTypesGroupChanged(value);
+
+ }
+ }
+ }
+
+ protected EventTypesCategory _eventtypescategory;
+
+ /// <summary>
+ /// Gets or sets the eventtypebase event types categories.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual EventTypesCategory EventTypesCategory
+ {
+ get
+ {
+ return _eventtypescategory;
+ }
+
+ set
+ {
+ if (_eventtypescategory != value)
+ {
+ _eventtypescategory = value;
+
+ OnEventTypesCategoryChanged(value);
+
+ }
+ }
+ }
+
+ protected HtmlPage _htmlpage;
+
+ /// <summary>
+ /// Gets or sets the eventtypebase html pages.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual HtmlPage HtmlPage
+ {
+ get
+ {
+ return _htmlpage;
+ }
+
+ set
+ {
+ if (_htmlpage != value)
+ {
+ _htmlpage = value;
+
+ OnHtmlPageChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<EventTypesAction> _eventtypesactions;
+
+ /// <summary>
+ /// Gets or sets the eventtypebase event types actions.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<EventTypesAction> EventTypesActions
+ {
+ get
+ {
+ return _eventtypesactions;
+ }
+
+ set
+ {
+ if (_eventtypesactions != value)
+ {
+ _eventtypesactions = value;
+
+ OnEventTypesActionsChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<MachinesEvent> _machinesevents;
+
+ /// <summary>
+ /// Gets or sets the eventtypebase machines events.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<MachinesEvent> MachinesEvents
+ {
+ get
+ {
+ return _machinesevents;
+ }
+
+ set
+ {
+ if (_machinesevents != value)
+ {
+ _machinesevents = value;
+
+ OnMachinesEventsChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Description has changed.
+ /// </summary>
+ protected virtual void OnDescriptionChanged(String description)
+ {
+ DescriptionChanged?.Invoke(this, description);
+ RaisePropertyChanged(nameof(Description));
+ }
+
+ /// <summary>
+ /// Called when the RequiresUserIntervention has changed.
+ /// </summary>
+ protected virtual void OnRequiresUserInterventionChanged(Boolean requiresuserintervention)
+ {
+ RequiresUserInterventionChanged?.Invoke(this, requiresuserintervention);
+ RaisePropertyChanged(nameof(RequiresUserIntervention));
+ }
+
+ /// <summary>
+ /// Called when the Resolvable has changed.
+ /// </summary>
+ protected virtual void OnResolvableChanged(Boolean resolvable)
+ {
+ ResolvableChanged?.Invoke(this, resolvable);
+ RaisePropertyChanged(nameof(Resolvable));
+ }
+
+ /// <summary>
+ /// Called when the EventTypesGroup has changed.
+ /// </summary>
+ protected virtual void OnEventTypesGroupChanged(EventTypesGroup eventtypesgroup)
+ {
+ EventTypesGroupChanged?.Invoke(this, eventtypesgroup);
+ RaisePropertyChanged(nameof(EventTypesGroup));
+ }
+
+ /// <summary>
+ /// Called when the EventTypesCategory has changed.
+ /// </summary>
+ protected virtual void OnEventTypesCategoryChanged(EventTypesCategory eventtypescategory)
+ {
+ EventTypesCategoryChanged?.Invoke(this, eventtypescategory);
+ RaisePropertyChanged(nameof(EventTypesCategory));
+ }
+
+ /// <summary>
+ /// Called when the HtmlPage has changed.
+ /// </summary>
+ protected virtual void OnHtmlPageChanged(HtmlPage htmlpage)
+ {
+ HtmlPageChanged?.Invoke(this, htmlpage);
+ RaisePropertyChanged(nameof(HtmlPage));
+ }
+
+ /// <summary>
+ /// Called when the EventTypesActions has changed.
+ /// </summary>
+ protected virtual void OnEventTypesActionsChanged(SynchronizedObservableCollection<EventTypesAction> eventtypesactions)
+ {
+ EventTypesActionsChanged?.Invoke(this, eventtypesactions);
+ RaisePropertyChanged(nameof(EventTypesActions));
+ }
+
+ /// <summary>
+ /// Called when the MachinesEvents has changed.
+ /// </summary>
+ protected virtual void OnMachinesEventsChanged(SynchronizedObservableCollection<MachinesEvent> machinesevents)
+ {
+ MachinesEventsChanged?.Invoke(this, machinesevents);
+ RaisePropertyChanged(nameof(MachinesEvents));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="EventTypeBase" /> class.
+ /// </summary>
+ public EventTypeBase() : base()
+ {
+
+ EventTypesActions = new SynchronizedObservableCollection<EventTypesAction>();
+
+ MachinesEvents = new SynchronizedObservableCollection<MachinesEvent>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/EventTypesAction.cs b/Software/Visual_Studio/Tango.BL/Entities/EventTypesAction.cs
index c606dfd0f..4b2bed316 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/EventTypesAction.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/EventTypesAction.cs
@@ -1,161 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("EVENT_TYPES_ACTIONS")]
- public partial class EventTypesAction : ObservableEntity<EventTypesAction>
+ public partial class EventTypesAction : EventTypesActionBase
{
-
- public event EventHandler<ActionType> ActionTypeChanged;
-
- public event EventHandler<EventType> EventTypeChanged;
-
- protected String _eventtypeguid;
-
- /// <summary>
- /// Gets or sets the eventtypesaction event type guid.
- /// </summary>
-
- [Column("EVENT_TYPE_GUID")]
- [ForeignKey("EventType")]
-
- public String EventTypeGuid
- {
- get
- {
- return _eventtypeguid;
- }
-
- set
- {
- if (_eventtypeguid != value)
- {
- _eventtypeguid = value;
- }
- }
- }
-
- protected String _actiontypeguid;
-
- /// <summary>
- /// Gets or sets the eventtypesaction action type guid.
- /// </summary>
-
- [Column("ACTION_TYPE_GUID")]
- [ForeignKey("ActionType")]
-
- public String ActionTypeGuid
- {
- get
- {
- return _actiontypeguid;
- }
-
- set
- {
- if (_actiontypeguid != value)
- {
- _actiontypeguid = value;
- }
- }
- }
-
- protected ActionType _actiontype;
-
- /// <summary>
- /// Gets or sets the eventtypesaction action types.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual ActionType ActionType
- {
- get
- {
- return _actiontype;
- }
-
- set
- {
- if (_actiontype != value)
- {
- _actiontype = value;
-
- OnActionTypeChanged(value);
-
- }
- }
- }
-
- protected EventType _eventtype;
-
- /// <summary>
- /// Gets or sets the eventtypesaction event types.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual EventType EventType
- {
- get
- {
- return _eventtype;
- }
-
- set
- {
- if (_eventtype != value)
- {
- _eventtype = value;
-
- OnEventTypeChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the ActionType has changed.
- /// </summary>
- protected virtual void OnActionTypeChanged(ActionType actiontype)
- {
- ActionTypeChanged?.Invoke(this, actiontype);
- RaisePropertyChanged(nameof(ActionType));
- }
-
- /// <summary>
- /// Called when the EventType has changed.
- /// </summary>
- protected virtual void OnEventTypeChanged(EventType eventtype)
- {
- EventTypeChanged?.Invoke(this, eventtype);
- RaisePropertyChanged(nameof(EventType));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="EventTypesAction" /> class.
/// </summary>
public EventTypesAction() : base()
{
+
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/EventTypesActionBase.cs b/Software/Visual_Studio/Tango.BL/Entities/EventTypesActionBase.cs
new file mode 100644
index 000000000..64b3f8101
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/EventTypesActionBase.cs
@@ -0,0 +1,161 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("EVENT_TYPES_ACTIONS")]
+ public abstract class EventTypesActionBase : ObservableEntity<EventTypesAction>
+ {
+
+ public event EventHandler<ActionType> ActionTypeChanged;
+
+ public event EventHandler<EventType> EventTypeChanged;
+
+ protected String _eventtypeguid;
+
+ /// <summary>
+ /// Gets or sets the eventtypesactionbase event type guid.
+ /// </summary>
+
+ [Column("EVENT_TYPE_GUID")]
+ [ForeignKey("EventType")]
+
+ public String EventTypeGuid
+ {
+ get
+ {
+ return _eventtypeguid;
+ }
+
+ set
+ {
+ if (_eventtypeguid != value)
+ {
+ _eventtypeguid = value;
+ }
+ }
+ }
+
+ protected String _actiontypeguid;
+
+ /// <summary>
+ /// Gets or sets the eventtypesactionbase action type guid.
+ /// </summary>
+
+ [Column("ACTION_TYPE_GUID")]
+ [ForeignKey("ActionType")]
+
+ public String ActionTypeGuid
+ {
+ get
+ {
+ return _actiontypeguid;
+ }
+
+ set
+ {
+ if (_actiontypeguid != value)
+ {
+ _actiontypeguid = value;
+ }
+ }
+ }
+
+ protected ActionType _actiontype;
+
+ /// <summary>
+ /// Gets or sets the eventtypesactionbase action types.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual ActionType ActionType
+ {
+ get
+ {
+ return _actiontype;
+ }
+
+ set
+ {
+ if (_actiontype != value)
+ {
+ _actiontype = value;
+
+ OnActionTypeChanged(value);
+
+ }
+ }
+ }
+
+ protected EventType _eventtype;
+
+ /// <summary>
+ /// Gets or sets the eventtypesactionbase event types.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual EventType EventType
+ {
+ get
+ {
+ return _eventtype;
+ }
+
+ set
+ {
+ if (_eventtype != value)
+ {
+ _eventtype = value;
+
+ OnEventTypeChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the ActionType has changed.
+ /// </summary>
+ protected virtual void OnActionTypeChanged(ActionType actiontype)
+ {
+ ActionTypeChanged?.Invoke(this, actiontype);
+ RaisePropertyChanged(nameof(ActionType));
+ }
+
+ /// <summary>
+ /// Called when the EventType has changed.
+ /// </summary>
+ protected virtual void OnEventTypeChanged(EventType eventtype)
+ {
+ EventTypeChanged?.Invoke(this, eventtype);
+ RaisePropertyChanged(nameof(EventType));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="EventTypesActionBase" /> class.
+ /// </summary>
+ public EventTypesActionBase() : base()
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/EventTypesCategory.cs b/Software/Visual_Studio/Tango.BL/Entities/EventTypesCategory.cs
index 3098b09b9..742147a5d 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/EventTypesCategory.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/EventTypesCategory.cs
@@ -1,188 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("EVENT_TYPES_CATEGORIES")]
- public partial class EventTypesCategory : ObservableEntity<EventTypesCategory>
+ public partial class EventTypesCategory : EventTypesCategoryBase
{
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<String> DescriptionChanged;
-
- public event EventHandler<SynchronizedObservableCollection<EventType>> EventTypesChanged;
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the eventtypescategory code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the eventtypescategory name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected String _description;
-
- /// <summary>
- /// Gets or sets the eventtypescategory description.
- /// </summary>
-
- [Column("DESCRIPTION")]
-
- public String Description
- {
- get
- {
- return _description;
- }
-
- set
- {
- if (_description != value)
- {
- _description = value;
-
- OnDescriptionChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<EventType> _eventtypes;
-
- /// <summary>
- /// Gets or sets the eventtypescategory event types.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<EventType> EventTypes
- {
- get
- {
- return _eventtypes;
- }
-
- set
- {
- if (_eventtypes != value)
- {
- _eventtypes = value;
-
- OnEventTypesChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Description has changed.
- /// </summary>
- protected virtual void OnDescriptionChanged(String description)
- {
- DescriptionChanged?.Invoke(this, description);
- RaisePropertyChanged(nameof(Description));
- }
-
- /// <summary>
- /// Called when the EventTypes has changed.
- /// </summary>
- protected virtual void OnEventTypesChanged(SynchronizedObservableCollection<EventType> eventtypes)
- {
- EventTypesChanged?.Invoke(this, eventtypes);
- RaisePropertyChanged(nameof(EventTypes));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="EventTypesCategory" /> class.
/// </summary>
public EventTypesCategory() : base()
{
- EventTypes = new SynchronizedObservableCollection<EventType>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/EventTypesCategoryBase.cs b/Software/Visual_Studio/Tango.BL/Entities/EventTypesCategoryBase.cs
new file mode 100644
index 000000000..6faed476f
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/EventTypesCategoryBase.cs
@@ -0,0 +1,188 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("EVENT_TYPES_CATEGORIES")]
+ public abstract class EventTypesCategoryBase : ObservableEntity<EventTypesCategory>
+ {
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<String> DescriptionChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<EventType>> EventTypesChanged;
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the eventtypescategorybase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the eventtypescategorybase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _description;
+
+ /// <summary>
+ /// Gets or sets the eventtypescategorybase description.
+ /// </summary>
+
+ [Column("DESCRIPTION")]
+
+ public String Description
+ {
+ get
+ {
+ return _description;
+ }
+
+ set
+ {
+ if (_description != value)
+ {
+ _description = value;
+
+ OnDescriptionChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<EventType> _eventtypes;
+
+ /// <summary>
+ /// Gets or sets the eventtypescategorybase event types.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<EventType> EventTypes
+ {
+ get
+ {
+ return _eventtypes;
+ }
+
+ set
+ {
+ if (_eventtypes != value)
+ {
+ _eventtypes = value;
+
+ OnEventTypesChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Description has changed.
+ /// </summary>
+ protected virtual void OnDescriptionChanged(String description)
+ {
+ DescriptionChanged?.Invoke(this, description);
+ RaisePropertyChanged(nameof(Description));
+ }
+
+ /// <summary>
+ /// Called when the EventTypes has changed.
+ /// </summary>
+ protected virtual void OnEventTypesChanged(SynchronizedObservableCollection<EventType> eventtypes)
+ {
+ EventTypesChanged?.Invoke(this, eventtypes);
+ RaisePropertyChanged(nameof(EventTypes));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="EventTypesCategoryBase" /> class.
+ /// </summary>
+ public EventTypesCategoryBase() : base()
+ {
+
+ EventTypes = new SynchronizedObservableCollection<EventType>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/EventTypesGroup.cs b/Software/Visual_Studio/Tango.BL/Entities/EventTypesGroup.cs
index c9dd320b4..3e7a737d0 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/EventTypesGroup.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/EventTypesGroup.cs
@@ -1,188 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("EVENT_TYPES_GROUPS")]
- public partial class EventTypesGroup : ObservableEntity<EventTypesGroup>
+ public partial class EventTypesGroup : EventTypesGroupBase
{
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<String> DescriptionChanged;
-
- public event EventHandler<SynchronizedObservableCollection<EventType>> EventTypesChanged;
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the eventtypesgroup code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the eventtypesgroup name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected String _description;
-
- /// <summary>
- /// Gets or sets the eventtypesgroup description.
- /// </summary>
-
- [Column("DESCRIPTION")]
-
- public String Description
- {
- get
- {
- return _description;
- }
-
- set
- {
- if (_description != value)
- {
- _description = value;
-
- OnDescriptionChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<EventType> _eventtypes;
-
- /// <summary>
- /// Gets or sets the eventtypesgroup event types.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<EventType> EventTypes
- {
- get
- {
- return _eventtypes;
- }
-
- set
- {
- if (_eventtypes != value)
- {
- _eventtypes = value;
-
- OnEventTypesChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Description has changed.
- /// </summary>
- protected virtual void OnDescriptionChanged(String description)
- {
- DescriptionChanged?.Invoke(this, description);
- RaisePropertyChanged(nameof(Description));
- }
-
- /// <summary>
- /// Called when the EventTypes has changed.
- /// </summary>
- protected virtual void OnEventTypesChanged(SynchronizedObservableCollection<EventType> eventtypes)
- {
- EventTypesChanged?.Invoke(this, eventtypes);
- RaisePropertyChanged(nameof(EventTypes));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="EventTypesGroup" /> class.
/// </summary>
public EventTypesGroup() : base()
{
- EventTypes = new SynchronizedObservableCollection<EventType>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/EventTypesGroupBase.cs b/Software/Visual_Studio/Tango.BL/Entities/EventTypesGroupBase.cs
new file mode 100644
index 000000000..f234d0d89
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/EventTypesGroupBase.cs
@@ -0,0 +1,188 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("EVENT_TYPES_GROUPS")]
+ public abstract class EventTypesGroupBase : ObservableEntity<EventTypesGroup>
+ {
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<String> DescriptionChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<EventType>> EventTypesChanged;
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the eventtypesgroupbase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the eventtypesgroupbase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _description;
+
+ /// <summary>
+ /// Gets or sets the eventtypesgroupbase description.
+ /// </summary>
+
+ [Column("DESCRIPTION")]
+
+ public String Description
+ {
+ get
+ {
+ return _description;
+ }
+
+ set
+ {
+ if (_description != value)
+ {
+ _description = value;
+
+ OnDescriptionChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<EventType> _eventtypes;
+
+ /// <summary>
+ /// Gets or sets the eventtypesgroupbase event types.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<EventType> EventTypes
+ {
+ get
+ {
+ return _eventtypes;
+ }
+
+ set
+ {
+ if (_eventtypes != value)
+ {
+ _eventtypes = value;
+
+ OnEventTypesChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Description has changed.
+ /// </summary>
+ protected virtual void OnDescriptionChanged(String description)
+ {
+ DescriptionChanged?.Invoke(this, description);
+ RaisePropertyChanged(nameof(Description));
+ }
+
+ /// <summary>
+ /// Called when the EventTypes has changed.
+ /// </summary>
+ protected virtual void OnEventTypesChanged(SynchronizedObservableCollection<EventType> eventtypes)
+ {
+ EventTypesChanged?.Invoke(this, eventtypes);
+ RaisePropertyChanged(nameof(EventTypes));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="EventTypesGroupBase" /> class.
+ /// </summary>
+ public EventTypesGroupBase() : base()
+ {
+
+ EventTypes = new SynchronizedObservableCollection<EventType>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/FiberShape.cs b/Software/Visual_Studio/Tango.BL/Entities/FiberShape.cs
index eaa234e54..eae740909 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/FiberShape.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/FiberShape.cs
@@ -1,150 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("FIBER_SHAPES")]
- public partial class FiberShape : ObservableEntity<FiberShape>
+ public partial class FiberShape : FiberShapeBase
{
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Rml>> RmlsChanged;
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the fibershape name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the fibershape code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<Rml> _rmls;
-
- /// <summary>
- /// Gets or sets the fibershape rmls.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Rml> Rmls
- {
- get
- {
- return _rmls;
- }
-
- set
- {
- if (_rmls != value)
- {
- _rmls = value;
-
- OnRmlsChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Rmls has changed.
- /// </summary>
- protected virtual void OnRmlsChanged(SynchronizedObservableCollection<Rml> rmls)
- {
- RmlsChanged?.Invoke(this, rmls);
- RaisePropertyChanged(nameof(Rmls));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="FiberShape" /> class.
/// </summary>
public FiberShape() : base()
{
- Rmls = new SynchronizedObservableCollection<Rml>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/FiberShapeBase.cs b/Software/Visual_Studio/Tango.BL/Entities/FiberShapeBase.cs
new file mode 100644
index 000000000..ff241b784
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/FiberShapeBase.cs
@@ -0,0 +1,150 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("FIBER_SHAPES")]
+ public abstract class FiberShapeBase : ObservableEntity<FiberShape>
+ {
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Rml>> RmlsChanged;
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the fibershapebase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the fibershapebase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Rml> _rmls;
+
+ /// <summary>
+ /// Gets or sets the fibershapebase rmls.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Rml> Rmls
+ {
+ get
+ {
+ return _rmls;
+ }
+
+ set
+ {
+ if (_rmls != value)
+ {
+ _rmls = value;
+
+ OnRmlsChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Rmls has changed.
+ /// </summary>
+ protected virtual void OnRmlsChanged(SynchronizedObservableCollection<Rml> rmls)
+ {
+ RmlsChanged?.Invoke(this, rmls);
+ RaisePropertyChanged(nameof(Rmls));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="FiberShapeBase" /> class.
+ /// </summary>
+ public FiberShapeBase() : base()
+ {
+
+ Rmls = new SynchronizedObservableCollection<Rml>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/FiberSynth.cs b/Software/Visual_Studio/Tango.BL/Entities/FiberSynth.cs
index e920c3934..b551a9e83 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/FiberSynth.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/FiberSynth.cs
@@ -1,150 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("FIBER_SYNTHS")]
- public partial class FiberSynth : ObservableEntity<FiberSynth>
+ public partial class FiberSynth : FiberSynthBase
{
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Rml>> RmlsChanged;
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the fibersynth name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the fibersynth code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<Rml> _rmls;
-
- /// <summary>
- /// Gets or sets the fibersynth rmls.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Rml> Rmls
- {
- get
- {
- return _rmls;
- }
-
- set
- {
- if (_rmls != value)
- {
- _rmls = value;
-
- OnRmlsChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Rmls has changed.
- /// </summary>
- protected virtual void OnRmlsChanged(SynchronizedObservableCollection<Rml> rmls)
- {
- RmlsChanged?.Invoke(this, rmls);
- RaisePropertyChanged(nameof(Rmls));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="FiberSynth" /> class.
/// </summary>
public FiberSynth() : base()
{
- Rmls = new SynchronizedObservableCollection<Rml>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/FiberSynthBase.cs b/Software/Visual_Studio/Tango.BL/Entities/FiberSynthBase.cs
new file mode 100644
index 000000000..847c078f5
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/FiberSynthBase.cs
@@ -0,0 +1,150 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("FIBER_SYNTHS")]
+ public abstract class FiberSynthBase : ObservableEntity<FiberSynth>
+ {
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Rml>> RmlsChanged;
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the fibersynthbase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the fibersynthbase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Rml> _rmls;
+
+ /// <summary>
+ /// Gets or sets the fibersynthbase rmls.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Rml> Rmls
+ {
+ get
+ {
+ return _rmls;
+ }
+
+ set
+ {
+ if (_rmls != value)
+ {
+ _rmls = value;
+
+ OnRmlsChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Rmls has changed.
+ /// </summary>
+ protected virtual void OnRmlsChanged(SynchronizedObservableCollection<Rml> rmls)
+ {
+ RmlsChanged?.Invoke(this, rmls);
+ RaisePropertyChanged(nameof(Rmls));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="FiberSynthBase" /> class.
+ /// </summary>
+ public FiberSynthBase() : base()
+ {
+
+ Rmls = new SynchronizedObservableCollection<Rml>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareBlower.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareBlower.cs
index 24e93df96..5eea4f403 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/HardwareBlower.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareBlower.cs
@@ -1,313 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("HARDWARE_BLOWERS")]
- public partial class HardwareBlower : ObservableEntity<HardwareBlower>
+ public partial class HardwareBlower : HardwareBlowerBase
{
-
- public event EventHandler<Boolean> EnabledChanged;
-
- public event EventHandler<Double> VoltageChanged;
-
- public event EventHandler<Double> HeatingVoltageChanged;
-
- public event EventHandler<Boolean> ActiveChanged;
-
- public event EventHandler<HardwareBlowerType> HardwareBlowerTypeChanged;
-
- public event EventHandler<HardwareVersion> HardwareVersionChanged;
-
- protected String _hardwareblowertypeguid;
-
- /// <summary>
- /// Gets or sets the hardwareblower hardware blower type guid.
- /// </summary>
-
- [Column("HARDWARE_BLOWER_TYPE_GUID")]
- [ForeignKey("HardwareBlowerType")]
-
- public String HardwareBlowerTypeGuid
- {
- get
- {
- return _hardwareblowertypeguid;
- }
-
- set
- {
- if (_hardwareblowertypeguid != value)
- {
- _hardwareblowertypeguid = value;
- }
- }
- }
-
- protected String _hardwareversionguid;
-
- /// <summary>
- /// Gets or sets the hardwareblower hardware version guid.
- /// </summary>
-
- [Column("HARDWARE_VERSION_GUID")]
- [ForeignKey("HardwareVersion")]
-
- public String HardwareVersionGuid
- {
- get
- {
- return _hardwareversionguid;
- }
-
- set
- {
- if (_hardwareversionguid != value)
- {
- _hardwareversionguid = value;
- }
- }
- }
-
- protected Boolean _enabled;
-
- /// <summary>
- /// Gets or sets the hardwareblower enabled.
- /// </summary>
-
- [Column("ENABLED")]
-
- public Boolean Enabled
- {
- get
- {
- return _enabled;
- }
-
- set
- {
- if (_enabled != value)
- {
- _enabled = value;
-
- OnEnabledChanged(value);
-
- }
- }
- }
-
- protected Double _voltage;
-
- /// <summary>
- /// Gets or sets the hardwareblower voltage.
- /// </summary>
-
- [Column("VOLTAGE")]
-
- public Double Voltage
- {
- get
- {
- return _voltage;
- }
-
- set
- {
- if (_voltage != value)
- {
- _voltage = value;
-
- OnVoltageChanged(value);
-
- }
- }
- }
-
- protected Double _heatingvoltage;
-
- /// <summary>
- /// Gets or sets the hardwareblower heating voltage.
- /// </summary>
-
- [Column("HEATING_VOLTAGE")]
-
- public Double HeatingVoltage
- {
- get
- {
- return _heatingvoltage;
- }
-
- set
- {
- if (_heatingvoltage != value)
- {
- _heatingvoltage = value;
-
- OnHeatingVoltageChanged(value);
-
- }
- }
- }
-
- protected Boolean _active;
-
- /// <summary>
- /// Gets or sets the hardwareblower active.
- /// </summary>
-
- [Column("ACTIVE")]
-
- public Boolean Active
- {
- get
- {
- return _active;
- }
-
- set
- {
- if (_active != value)
- {
- _active = value;
-
- OnActiveChanged(value);
-
- }
- }
- }
-
- protected HardwareBlowerType _hardwareblowertype;
-
- /// <summary>
- /// Gets or sets the hardwareblower hardware blower types.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual HardwareBlowerType HardwareBlowerType
- {
- get
- {
- return _hardwareblowertype;
- }
-
- set
- {
- if (_hardwareblowertype != value)
- {
- _hardwareblowertype = value;
-
- OnHardwareBlowerTypeChanged(value);
-
- }
- }
- }
-
- protected HardwareVersion _hardwareversion;
-
- /// <summary>
- /// Gets or sets the hardwareblower hardware versions.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual HardwareVersion HardwareVersion
- {
- get
- {
- return _hardwareversion;
- }
-
- set
- {
- if (_hardwareversion != value)
- {
- _hardwareversion = value;
-
- OnHardwareVersionChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Enabled has changed.
- /// </summary>
- protected virtual void OnEnabledChanged(Boolean enabled)
- {
- EnabledChanged?.Invoke(this, enabled);
- RaisePropertyChanged(nameof(Enabled));
- }
-
- /// <summary>
- /// Called when the Voltage has changed.
- /// </summary>
- protected virtual void OnVoltageChanged(Double voltage)
- {
- VoltageChanged?.Invoke(this, voltage);
- RaisePropertyChanged(nameof(Voltage));
- }
-
- /// <summary>
- /// Called when the HeatingVoltage has changed.
- /// </summary>
- protected virtual void OnHeatingVoltageChanged(Double heatingvoltage)
- {
- HeatingVoltageChanged?.Invoke(this, heatingvoltage);
- RaisePropertyChanged(nameof(HeatingVoltage));
- }
-
- /// <summary>
- /// Called when the Active has changed.
- /// </summary>
- protected virtual void OnActiveChanged(Boolean active)
- {
- ActiveChanged?.Invoke(this, active);
- RaisePropertyChanged(nameof(Active));
- }
-
- /// <summary>
- /// Called when the HardwareBlowerType has changed.
- /// </summary>
- protected virtual void OnHardwareBlowerTypeChanged(HardwareBlowerType hardwareblowertype)
- {
- HardwareBlowerTypeChanged?.Invoke(this, hardwareblowertype);
- RaisePropertyChanged(nameof(HardwareBlowerType));
- }
-
- /// <summary>
- /// Called when the HardwareVersion has changed.
- /// </summary>
- protected virtual void OnHardwareVersionChanged(HardwareVersion hardwareversion)
- {
- HardwareVersionChanged?.Invoke(this, hardwareversion);
- RaisePropertyChanged(nameof(HardwareVersion));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="HardwareBlower" /> class.
/// </summary>
public HardwareBlower() : base()
{
+
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareBlowerBase.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareBlowerBase.cs
new file mode 100644
index 000000000..62925b51f
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareBlowerBase.cs
@@ -0,0 +1,313 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("HARDWARE_BLOWERS")]
+ public abstract class HardwareBlowerBase : ObservableEntity<HardwareBlower>
+ {
+
+ public event EventHandler<Boolean> EnabledChanged;
+
+ public event EventHandler<Double> VoltageChanged;
+
+ public event EventHandler<Double> HeatingVoltageChanged;
+
+ public event EventHandler<Boolean> ActiveChanged;
+
+ public event EventHandler<HardwareBlowerType> HardwareBlowerTypeChanged;
+
+ public event EventHandler<HardwareVersion> HardwareVersionChanged;
+
+ protected String _hardwareblowertypeguid;
+
+ /// <summary>
+ /// Gets or sets the hardwareblowerbase hardware blower type guid.
+ /// </summary>
+
+ [Column("HARDWARE_BLOWER_TYPE_GUID")]
+ [ForeignKey("HardwareBlowerType")]
+
+ public String HardwareBlowerTypeGuid
+ {
+ get
+ {
+ return _hardwareblowertypeguid;
+ }
+
+ set
+ {
+ if (_hardwareblowertypeguid != value)
+ {
+ _hardwareblowertypeguid = value;
+ }
+ }
+ }
+
+ protected String _hardwareversionguid;
+
+ /// <summary>
+ /// Gets or sets the hardwareblowerbase hardware version guid.
+ /// </summary>
+
+ [Column("HARDWARE_VERSION_GUID")]
+ [ForeignKey("HardwareVersion")]
+
+ public String HardwareVersionGuid
+ {
+ get
+ {
+ return _hardwareversionguid;
+ }
+
+ set
+ {
+ if (_hardwareversionguid != value)
+ {
+ _hardwareversionguid = value;
+ }
+ }
+ }
+
+ protected Boolean _enabled;
+
+ /// <summary>
+ /// Gets or sets the hardwareblowerbase enabled.
+ /// </summary>
+
+ [Column("ENABLED")]
+
+ public Boolean Enabled
+ {
+ get
+ {
+ return _enabled;
+ }
+
+ set
+ {
+ if (_enabled != value)
+ {
+ _enabled = value;
+
+ OnEnabledChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _voltage;
+
+ /// <summary>
+ /// Gets or sets the hardwareblowerbase voltage.
+ /// </summary>
+
+ [Column("VOLTAGE")]
+
+ public Double Voltage
+ {
+ get
+ {
+ return _voltage;
+ }
+
+ set
+ {
+ if (_voltage != value)
+ {
+ _voltage = value;
+
+ OnVoltageChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _heatingvoltage;
+
+ /// <summary>
+ /// Gets or sets the hardwareblowerbase heating voltage.
+ /// </summary>
+
+ [Column("HEATING_VOLTAGE")]
+
+ public Double HeatingVoltage
+ {
+ get
+ {
+ return _heatingvoltage;
+ }
+
+ set
+ {
+ if (_heatingvoltage != value)
+ {
+ _heatingvoltage = value;
+
+ OnHeatingVoltageChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _active;
+
+ /// <summary>
+ /// Gets or sets the hardwareblowerbase active.
+ /// </summary>
+
+ [Column("ACTIVE")]
+
+ public Boolean Active
+ {
+ get
+ {
+ return _active;
+ }
+
+ set
+ {
+ if (_active != value)
+ {
+ _active = value;
+
+ OnActiveChanged(value);
+
+ }
+ }
+ }
+
+ protected HardwareBlowerType _hardwareblowertype;
+
+ /// <summary>
+ /// Gets or sets the hardwareblowerbase hardware blower types.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual HardwareBlowerType HardwareBlowerType
+ {
+ get
+ {
+ return _hardwareblowertype;
+ }
+
+ set
+ {
+ if (_hardwareblowertype != value)
+ {
+ _hardwareblowertype = value;
+
+ OnHardwareBlowerTypeChanged(value);
+
+ }
+ }
+ }
+
+ protected HardwareVersion _hardwareversion;
+
+ /// <summary>
+ /// Gets or sets the hardwareblowerbase hardware versions.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual HardwareVersion HardwareVersion
+ {
+ get
+ {
+ return _hardwareversion;
+ }
+
+ set
+ {
+ if (_hardwareversion != value)
+ {
+ _hardwareversion = value;
+
+ OnHardwareVersionChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Enabled has changed.
+ /// </summary>
+ protected virtual void OnEnabledChanged(Boolean enabled)
+ {
+ EnabledChanged?.Invoke(this, enabled);
+ RaisePropertyChanged(nameof(Enabled));
+ }
+
+ /// <summary>
+ /// Called when the Voltage has changed.
+ /// </summary>
+ protected virtual void OnVoltageChanged(Double voltage)
+ {
+ VoltageChanged?.Invoke(this, voltage);
+ RaisePropertyChanged(nameof(Voltage));
+ }
+
+ /// <summary>
+ /// Called when the HeatingVoltage has changed.
+ /// </summary>
+ protected virtual void OnHeatingVoltageChanged(Double heatingvoltage)
+ {
+ HeatingVoltageChanged?.Invoke(this, heatingvoltage);
+ RaisePropertyChanged(nameof(HeatingVoltage));
+ }
+
+ /// <summary>
+ /// Called when the Active has changed.
+ /// </summary>
+ protected virtual void OnActiveChanged(Boolean active)
+ {
+ ActiveChanged?.Invoke(this, active);
+ RaisePropertyChanged(nameof(Active));
+ }
+
+ /// <summary>
+ /// Called when the HardwareBlowerType has changed.
+ /// </summary>
+ protected virtual void OnHardwareBlowerTypeChanged(HardwareBlowerType hardwareblowertype)
+ {
+ HardwareBlowerTypeChanged?.Invoke(this, hardwareblowertype);
+ RaisePropertyChanged(nameof(HardwareBlowerType));
+ }
+
+ /// <summary>
+ /// Called when the HardwareVersion has changed.
+ /// </summary>
+ protected virtual void OnHardwareVersionChanged(HardwareVersion hardwareversion)
+ {
+ HardwareVersionChanged?.Invoke(this, hardwareversion);
+ RaisePropertyChanged(nameof(HardwareVersion));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="HardwareBlowerBase" /> class.
+ /// </summary>
+ public HardwareBlowerBase() : base()
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareBlowerType.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareBlowerType.cs
index 75a948075..1996cf648 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/HardwareBlowerType.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareBlowerType.cs
@@ -1,188 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("HARDWARE_BLOWER_TYPES")]
- public partial class HardwareBlowerType : ObservableEntity<HardwareBlowerType>
+ public partial class HardwareBlowerType : HardwareBlowerTypeBase
{
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<String> DescriptionChanged;
-
- public event EventHandler<SynchronizedObservableCollection<HardwareBlower>> HardwareBlowersChanged;
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the hardwareblowertype code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the hardwareblowertype name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected String _description;
-
- /// <summary>
- /// Gets or sets the hardwareblowertype description.
- /// </summary>
-
- [Column("DESCRIPTION")]
-
- public String Description
- {
- get
- {
- return _description;
- }
-
- set
- {
- if (_description != value)
- {
- _description = value;
-
- OnDescriptionChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<HardwareBlower> _hardwareblowers;
-
- /// <summary>
- /// Gets or sets the hardwareblowertype hardware blowers.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<HardwareBlower> HardwareBlowers
- {
- get
- {
- return _hardwareblowers;
- }
-
- set
- {
- if (_hardwareblowers != value)
- {
- _hardwareblowers = value;
-
- OnHardwareBlowersChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Description has changed.
- /// </summary>
- protected virtual void OnDescriptionChanged(String description)
- {
- DescriptionChanged?.Invoke(this, description);
- RaisePropertyChanged(nameof(Description));
- }
-
- /// <summary>
- /// Called when the HardwareBlowers has changed.
- /// </summary>
- protected virtual void OnHardwareBlowersChanged(SynchronizedObservableCollection<HardwareBlower> hardwareblowers)
- {
- HardwareBlowersChanged?.Invoke(this, hardwareblowers);
- RaisePropertyChanged(nameof(HardwareBlowers));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="HardwareBlowerType" /> class.
/// </summary>
public HardwareBlowerType() : base()
{
- HardwareBlowers = new SynchronizedObservableCollection<HardwareBlower>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareBlowerTypeBase.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareBlowerTypeBase.cs
new file mode 100644
index 000000000..676b1204c
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareBlowerTypeBase.cs
@@ -0,0 +1,188 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("HARDWARE_BLOWER_TYPES")]
+ public abstract class HardwareBlowerTypeBase : ObservableEntity<HardwareBlowerType>
+ {
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<String> DescriptionChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<HardwareBlower>> HardwareBlowersChanged;
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the hardwareblowertypebase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the hardwareblowertypebase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _description;
+
+ /// <summary>
+ /// Gets or sets the hardwareblowertypebase description.
+ /// </summary>
+
+ [Column("DESCRIPTION")]
+
+ public String Description
+ {
+ get
+ {
+ return _description;
+ }
+
+ set
+ {
+ if (_description != value)
+ {
+ _description = value;
+
+ OnDescriptionChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<HardwareBlower> _hardwareblowers;
+
+ /// <summary>
+ /// Gets or sets the hardwareblowertypebase hardware blowers.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<HardwareBlower> HardwareBlowers
+ {
+ get
+ {
+ return _hardwareblowers;
+ }
+
+ set
+ {
+ if (_hardwareblowers != value)
+ {
+ _hardwareblowers = value;
+
+ OnHardwareBlowersChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Description has changed.
+ /// </summary>
+ protected virtual void OnDescriptionChanged(String description)
+ {
+ DescriptionChanged?.Invoke(this, description);
+ RaisePropertyChanged(nameof(Description));
+ }
+
+ /// <summary>
+ /// Called when the HardwareBlowers has changed.
+ /// </summary>
+ protected virtual void OnHardwareBlowersChanged(SynchronizedObservableCollection<HardwareBlower> hardwareblowers)
+ {
+ HardwareBlowersChanged?.Invoke(this, hardwareblowers);
+ RaisePropertyChanged(nameof(HardwareBlowers));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="HardwareBlowerTypeBase" /> class.
+ /// </summary>
+ public HardwareBlowerTypeBase() : base()
+ {
+
+ HardwareBlowers = new SynchronizedObservableCollection<HardwareBlower>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareBreakSensor.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareBreakSensor.cs
index 0ace70d71..65ea74328 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/HardwareBreakSensor.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareBreakSensor.cs
@@ -1,275 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("HARDWARE_BREAK_SENSORS")]
- public partial class HardwareBreakSensor : ObservableEntity<HardwareBreakSensor>
+ public partial class HardwareBreakSensor : HardwareBreakSensorBase
{
-
- public event EventHandler<Boolean> EnabledChanged;
-
- public event EventHandler<Int32> DeBounceTimeMilliChanged;
-
- public event EventHandler<Boolean> ActiveChanged;
-
- public event EventHandler<HardwareBreakSensorType> HardwareBreakSensorTypeChanged;
-
- public event EventHandler<HardwareVersion> HardwareVersionChanged;
-
- protected String _hardwarebreaksensortypeguid;
-
- /// <summary>
- /// Gets or sets the hardwarebreaksensor hardware break sensor type guid.
- /// </summary>
-
- [Column("HARDWARE_BREAK_SENSOR_TYPE_GUID")]
- [ForeignKey("HardwareBreakSensorType")]
-
- public String HardwareBreakSensorTypeGuid
- {
- get
- {
- return _hardwarebreaksensortypeguid;
- }
-
- set
- {
- if (_hardwarebreaksensortypeguid != value)
- {
- _hardwarebreaksensortypeguid = value;
- }
- }
- }
-
- protected String _hardwareversionguid;
-
- /// <summary>
- /// Gets or sets the hardwarebreaksensor hardware version guid.
- /// </summary>
-
- [Column("HARDWARE_VERSION_GUID")]
- [ForeignKey("HardwareVersion")]
-
- public String HardwareVersionGuid
- {
- get
- {
- return _hardwareversionguid;
- }
-
- set
- {
- if (_hardwareversionguid != value)
- {
- _hardwareversionguid = value;
- }
- }
- }
-
- protected Boolean _enabled;
-
- /// <summary>
- /// Gets or sets the hardwarebreaksensor enabled.
- /// </summary>
-
- [Column("ENABLED")]
-
- public Boolean Enabled
- {
- get
- {
- return _enabled;
- }
-
- set
- {
- if (_enabled != value)
- {
- _enabled = value;
-
- OnEnabledChanged(value);
-
- }
- }
- }
-
- protected Int32 _debouncetimemilli;
-
- /// <summary>
- /// Gets or sets the hardwarebreaksensor de bounce time milli.
- /// </summary>
-
- [Column("DE_BOUNCE_TIME_MILLI")]
-
- public Int32 DeBounceTimeMilli
- {
- get
- {
- return _debouncetimemilli;
- }
-
- set
- {
- if (_debouncetimemilli != value)
- {
- _debouncetimemilli = value;
-
- OnDeBounceTimeMilliChanged(value);
-
- }
- }
- }
-
- protected Boolean _active;
-
- /// <summary>
- /// Gets or sets the hardwarebreaksensor active.
- /// </summary>
-
- [Column("ACTIVE")]
-
- public Boolean Active
- {
- get
- {
- return _active;
- }
-
- set
- {
- if (_active != value)
- {
- _active = value;
-
- OnActiveChanged(value);
-
- }
- }
- }
-
- protected HardwareBreakSensorType _hardwarebreaksensortype;
-
- /// <summary>
- /// Gets or sets the hardwarebreaksensor hardware break sensor types.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual HardwareBreakSensorType HardwareBreakSensorType
- {
- get
- {
- return _hardwarebreaksensortype;
- }
-
- set
- {
- if (_hardwarebreaksensortype != value)
- {
- _hardwarebreaksensortype = value;
-
- OnHardwareBreakSensorTypeChanged(value);
-
- }
- }
- }
-
- protected HardwareVersion _hardwareversion;
-
- /// <summary>
- /// Gets or sets the hardwarebreaksensor hardware versions.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual HardwareVersion HardwareVersion
- {
- get
- {
- return _hardwareversion;
- }
-
- set
- {
- if (_hardwareversion != value)
- {
- _hardwareversion = value;
-
- OnHardwareVersionChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Enabled has changed.
- /// </summary>
- protected virtual void OnEnabledChanged(Boolean enabled)
- {
- EnabledChanged?.Invoke(this, enabled);
- RaisePropertyChanged(nameof(Enabled));
- }
-
- /// <summary>
- /// Called when the DeBounceTimeMilli has changed.
- /// </summary>
- protected virtual void OnDeBounceTimeMilliChanged(Int32 debouncetimemilli)
- {
- DeBounceTimeMilliChanged?.Invoke(this, debouncetimemilli);
- RaisePropertyChanged(nameof(DeBounceTimeMilli));
- }
-
- /// <summary>
- /// Called when the Active has changed.
- /// </summary>
- protected virtual void OnActiveChanged(Boolean active)
- {
- ActiveChanged?.Invoke(this, active);
- RaisePropertyChanged(nameof(Active));
- }
-
- /// <summary>
- /// Called when the HardwareBreakSensorType has changed.
- /// </summary>
- protected virtual void OnHardwareBreakSensorTypeChanged(HardwareBreakSensorType hardwarebreaksensortype)
- {
- HardwareBreakSensorTypeChanged?.Invoke(this, hardwarebreaksensortype);
- RaisePropertyChanged(nameof(HardwareBreakSensorType));
- }
-
- /// <summary>
- /// Called when the HardwareVersion has changed.
- /// </summary>
- protected virtual void OnHardwareVersionChanged(HardwareVersion hardwareversion)
- {
- HardwareVersionChanged?.Invoke(this, hardwareversion);
- RaisePropertyChanged(nameof(HardwareVersion));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="HardwareBreakSensor" /> class.
/// </summary>
public HardwareBreakSensor() : base()
{
+
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareBreakSensorBase.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareBreakSensorBase.cs
new file mode 100644
index 000000000..799f0f783
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareBreakSensorBase.cs
@@ -0,0 +1,275 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("HARDWARE_BREAK_SENSORS")]
+ public abstract class HardwareBreakSensorBase : ObservableEntity<HardwareBreakSensor>
+ {
+
+ public event EventHandler<Boolean> EnabledChanged;
+
+ public event EventHandler<Int32> DeBounceTimeMilliChanged;
+
+ public event EventHandler<Boolean> ActiveChanged;
+
+ public event EventHandler<HardwareBreakSensorType> HardwareBreakSensorTypeChanged;
+
+ public event EventHandler<HardwareVersion> HardwareVersionChanged;
+
+ protected String _hardwarebreaksensortypeguid;
+
+ /// <summary>
+ /// Gets or sets the hardwarebreaksensorbase hardware break sensor type guid.
+ /// </summary>
+
+ [Column("HARDWARE_BREAK_SENSOR_TYPE_GUID")]
+ [ForeignKey("HardwareBreakSensorType")]
+
+ public String HardwareBreakSensorTypeGuid
+ {
+ get
+ {
+ return _hardwarebreaksensortypeguid;
+ }
+
+ set
+ {
+ if (_hardwarebreaksensortypeguid != value)
+ {
+ _hardwarebreaksensortypeguid = value;
+ }
+ }
+ }
+
+ protected String _hardwareversionguid;
+
+ /// <summary>
+ /// Gets or sets the hardwarebreaksensorbase hardware version guid.
+ /// </summary>
+
+ [Column("HARDWARE_VERSION_GUID")]
+ [ForeignKey("HardwareVersion")]
+
+ public String HardwareVersionGuid
+ {
+ get
+ {
+ return _hardwareversionguid;
+ }
+
+ set
+ {
+ if (_hardwareversionguid != value)
+ {
+ _hardwareversionguid = value;
+ }
+ }
+ }
+
+ protected Boolean _enabled;
+
+ /// <summary>
+ /// Gets or sets the hardwarebreaksensorbase enabled.
+ /// </summary>
+
+ [Column("ENABLED")]
+
+ public Boolean Enabled
+ {
+ get
+ {
+ return _enabled;
+ }
+
+ set
+ {
+ if (_enabled != value)
+ {
+ _enabled = value;
+
+ OnEnabledChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _debouncetimemilli;
+
+ /// <summary>
+ /// Gets or sets the hardwarebreaksensorbase de bounce time milli.
+ /// </summary>
+
+ [Column("DE_BOUNCE_TIME_MILLI")]
+
+ public Int32 DeBounceTimeMilli
+ {
+ get
+ {
+ return _debouncetimemilli;
+ }
+
+ set
+ {
+ if (_debouncetimemilli != value)
+ {
+ _debouncetimemilli = value;
+
+ OnDeBounceTimeMilliChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _active;
+
+ /// <summary>
+ /// Gets or sets the hardwarebreaksensorbase active.
+ /// </summary>
+
+ [Column("ACTIVE")]
+
+ public Boolean Active
+ {
+ get
+ {
+ return _active;
+ }
+
+ set
+ {
+ if (_active != value)
+ {
+ _active = value;
+
+ OnActiveChanged(value);
+
+ }
+ }
+ }
+
+ protected HardwareBreakSensorType _hardwarebreaksensortype;
+
+ /// <summary>
+ /// Gets or sets the hardwarebreaksensorbase hardware break sensor types.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual HardwareBreakSensorType HardwareBreakSensorType
+ {
+ get
+ {
+ return _hardwarebreaksensortype;
+ }
+
+ set
+ {
+ if (_hardwarebreaksensortype != value)
+ {
+ _hardwarebreaksensortype = value;
+
+ OnHardwareBreakSensorTypeChanged(value);
+
+ }
+ }
+ }
+
+ protected HardwareVersion _hardwareversion;
+
+ /// <summary>
+ /// Gets or sets the hardwarebreaksensorbase hardware versions.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual HardwareVersion HardwareVersion
+ {
+ get
+ {
+ return _hardwareversion;
+ }
+
+ set
+ {
+ if (_hardwareversion != value)
+ {
+ _hardwareversion = value;
+
+ OnHardwareVersionChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Enabled has changed.
+ /// </summary>
+ protected virtual void OnEnabledChanged(Boolean enabled)
+ {
+ EnabledChanged?.Invoke(this, enabled);
+ RaisePropertyChanged(nameof(Enabled));
+ }
+
+ /// <summary>
+ /// Called when the DeBounceTimeMilli has changed.
+ /// </summary>
+ protected virtual void OnDeBounceTimeMilliChanged(Int32 debouncetimemilli)
+ {
+ DeBounceTimeMilliChanged?.Invoke(this, debouncetimemilli);
+ RaisePropertyChanged(nameof(DeBounceTimeMilli));
+ }
+
+ /// <summary>
+ /// Called when the Active has changed.
+ /// </summary>
+ protected virtual void OnActiveChanged(Boolean active)
+ {
+ ActiveChanged?.Invoke(this, active);
+ RaisePropertyChanged(nameof(Active));
+ }
+
+ /// <summary>
+ /// Called when the HardwareBreakSensorType has changed.
+ /// </summary>
+ protected virtual void OnHardwareBreakSensorTypeChanged(HardwareBreakSensorType hardwarebreaksensortype)
+ {
+ HardwareBreakSensorTypeChanged?.Invoke(this, hardwarebreaksensortype);
+ RaisePropertyChanged(nameof(HardwareBreakSensorType));
+ }
+
+ /// <summary>
+ /// Called when the HardwareVersion has changed.
+ /// </summary>
+ protected virtual void OnHardwareVersionChanged(HardwareVersion hardwareversion)
+ {
+ HardwareVersionChanged?.Invoke(this, hardwareversion);
+ RaisePropertyChanged(nameof(HardwareVersion));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="HardwareBreakSensorBase" /> class.
+ /// </summary>
+ public HardwareBreakSensorBase() : base()
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareBreakSensorType.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareBreakSensorType.cs
index e531c91d1..8acda760f 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/HardwareBreakSensorType.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareBreakSensorType.cs
@@ -1,188 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("HARDWARE_BREAK_SENSOR_TYPES")]
- public partial class HardwareBreakSensorType : ObservableEntity<HardwareBreakSensorType>
+ public partial class HardwareBreakSensorType : HardwareBreakSensorTypeBase
{
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<String> DescriptionChanged;
-
- public event EventHandler<SynchronizedObservableCollection<HardwareBreakSensor>> HardwareBreakSensorsChanged;
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the hardwarebreaksensortype code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the hardwarebreaksensortype name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected String _description;
-
- /// <summary>
- /// Gets or sets the hardwarebreaksensortype description.
- /// </summary>
-
- [Column("DESCRIPTION")]
-
- public String Description
- {
- get
- {
- return _description;
- }
-
- set
- {
- if (_description != value)
- {
- _description = value;
-
- OnDescriptionChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<HardwareBreakSensor> _hardwarebreaksensors;
-
- /// <summary>
- /// Gets or sets the hardwarebreaksensortype hardware break sensors.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<HardwareBreakSensor> HardwareBreakSensors
- {
- get
- {
- return _hardwarebreaksensors;
- }
-
- set
- {
- if (_hardwarebreaksensors != value)
- {
- _hardwarebreaksensors = value;
-
- OnHardwareBreakSensorsChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Description has changed.
- /// </summary>
- protected virtual void OnDescriptionChanged(String description)
- {
- DescriptionChanged?.Invoke(this, description);
- RaisePropertyChanged(nameof(Description));
- }
-
- /// <summary>
- /// Called when the HardwareBreakSensors has changed.
- /// </summary>
- protected virtual void OnHardwareBreakSensorsChanged(SynchronizedObservableCollection<HardwareBreakSensor> hardwarebreaksensors)
- {
- HardwareBreakSensorsChanged?.Invoke(this, hardwarebreaksensors);
- RaisePropertyChanged(nameof(HardwareBreakSensors));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="HardwareBreakSensorType" /> class.
/// </summary>
public HardwareBreakSensorType() : base()
{
- HardwareBreakSensors = new SynchronizedObservableCollection<HardwareBreakSensor>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareBreakSensorTypeBase.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareBreakSensorTypeBase.cs
new file mode 100644
index 000000000..710bb3cb8
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareBreakSensorTypeBase.cs
@@ -0,0 +1,188 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("HARDWARE_BREAK_SENSOR_TYPES")]
+ public abstract class HardwareBreakSensorTypeBase : ObservableEntity<HardwareBreakSensorType>
+ {
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<String> DescriptionChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<HardwareBreakSensor>> HardwareBreakSensorsChanged;
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the hardwarebreaksensortypebase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the hardwarebreaksensortypebase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _description;
+
+ /// <summary>
+ /// Gets or sets the hardwarebreaksensortypebase description.
+ /// </summary>
+
+ [Column("DESCRIPTION")]
+
+ public String Description
+ {
+ get
+ {
+ return _description;
+ }
+
+ set
+ {
+ if (_description != value)
+ {
+ _description = value;
+
+ OnDescriptionChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<HardwareBreakSensor> _hardwarebreaksensors;
+
+ /// <summary>
+ /// Gets or sets the hardwarebreaksensortypebase hardware break sensors.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<HardwareBreakSensor> HardwareBreakSensors
+ {
+ get
+ {
+ return _hardwarebreaksensors;
+ }
+
+ set
+ {
+ if (_hardwarebreaksensors != value)
+ {
+ _hardwarebreaksensors = value;
+
+ OnHardwareBreakSensorsChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Description has changed.
+ /// </summary>
+ protected virtual void OnDescriptionChanged(String description)
+ {
+ DescriptionChanged?.Invoke(this, description);
+ RaisePropertyChanged(nameof(Description));
+ }
+
+ /// <summary>
+ /// Called when the HardwareBreakSensors has changed.
+ /// </summary>
+ protected virtual void OnHardwareBreakSensorsChanged(SynchronizedObservableCollection<HardwareBreakSensor> hardwarebreaksensors)
+ {
+ HardwareBreakSensorsChanged?.Invoke(this, hardwarebreaksensors);
+ RaisePropertyChanged(nameof(HardwareBreakSensors));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="HardwareBreakSensorTypeBase" /> class.
+ /// </summary>
+ public HardwareBreakSensorTypeBase() : base()
+ {
+
+ HardwareBreakSensors = new SynchronizedObservableCollection<HardwareBreakSensor>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareDancer.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareDancer.cs
index f213a953b..5dd25366b 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/HardwareDancer.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareDancer.cs
@@ -1,579 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("HARDWARE_DANCERS")]
- public partial class HardwareDancer : ObservableEntity<HardwareDancer>
+ public partial class HardwareDancer : HardwareDancerBase
{
-
- public event EventHandler<Boolean> GradualChanged;
-
- public event EventHandler<Double> KChanged;
-
- public event EventHandler<Double> XChanged;
-
- public event EventHandler<Int32> PulsePerMmSpringChanged;
-
- public event EventHandler<Int32> MaximalMovementMmChanged;
-
- public event EventHandler<Int32> ZeroPointChanged;
-
- public event EventHandler<Int32> ResolutionBitsChanged;
-
- public event EventHandler<Int32> ArmLengthChanged;
-
- public event EventHandler<Boolean> AssemblyDirectionRightChanged;
-
- public event EventHandler<Boolean> AccelerateOnTensionRaiseChanged;
-
- public event EventHandler<Boolean> ActiveChanged;
-
- public event EventHandler<HardwareDancerType> HardwareDancerTypeChanged;
-
- public event EventHandler<HardwareVersion> HardwareVersionChanged;
-
- protected String _hardwaredancertypeguid;
-
- /// <summary>
- /// Gets or sets the hardwaredancer hardware dancer type guid.
- /// </summary>
-
- [Column("HARDWARE_DANCER_TYPE_GUID")]
- [ForeignKey("HardwareDancerType")]
-
- public String HardwareDancerTypeGuid
- {
- get
- {
- return _hardwaredancertypeguid;
- }
-
- set
- {
- if (_hardwaredancertypeguid != value)
- {
- _hardwaredancertypeguid = value;
- }
- }
- }
-
- protected String _hardwareversionguid;
-
- /// <summary>
- /// Gets or sets the hardwaredancer hardware version guid.
- /// </summary>
-
- [Column("HARDWARE_VERSION_GUID")]
- [ForeignKey("HardwareVersion")]
-
- public String HardwareVersionGuid
- {
- get
- {
- return _hardwareversionguid;
- }
-
- set
- {
- if (_hardwareversionguid != value)
- {
- _hardwareversionguid = value;
- }
- }
- }
-
- protected Boolean _gradual;
-
- /// <summary>
- /// Gets or sets the hardwaredancer gradual.
- /// </summary>
-
- [Column("GRADUAL")]
-
- public Boolean Gradual
- {
- get
- {
- return _gradual;
- }
-
- set
- {
- if (_gradual != value)
- {
- _gradual = value;
-
- OnGradualChanged(value);
-
- }
- }
- }
-
- protected Double _k;
-
- /// <summary>
- /// Gets or sets the hardwaredancer k.
- /// </summary>
-
- [Column("K")]
-
- public Double K
- {
- get
- {
- return _k;
- }
-
- set
- {
- if (_k != value)
- {
- _k = value;
-
- OnKChanged(value);
-
- }
- }
- }
-
- protected Double _x;
-
- /// <summary>
- /// Gets or sets the hardwaredancer x.
- /// </summary>
-
- [Column("X")]
-
- public Double X
- {
- get
- {
- return _x;
- }
-
- set
- {
- if (_x != value)
- {
- _x = value;
-
- OnXChanged(value);
-
- }
- }
- }
-
- protected Int32 _pulsepermmspring;
-
- /// <summary>
- /// Gets or sets the hardwaredancer pulse per mm spring.
- /// </summary>
-
- [Column("PULSE_PER_MM_SPRING")]
-
- public Int32 PulsePerMmSpring
- {
- get
- {
- return _pulsepermmspring;
- }
-
- set
- {
- if (_pulsepermmspring != value)
- {
- _pulsepermmspring = value;
-
- OnPulsePerMmSpringChanged(value);
-
- }
- }
- }
-
- protected Int32 _maximalmovementmm;
-
- /// <summary>
- /// Gets or sets the hardwaredancer maximal movement mm.
- /// </summary>
-
- [Column("MAXIMAL_MOVEMENT_MM")]
-
- public Int32 MaximalMovementMm
- {
- get
- {
- return _maximalmovementmm;
- }
-
- set
- {
- if (_maximalmovementmm != value)
- {
- _maximalmovementmm = value;
-
- OnMaximalMovementMmChanged(value);
-
- }
- }
- }
-
- protected Int32 _zeropoint;
-
- /// <summary>
- /// Gets or sets the hardwaredancer zero point.
- /// </summary>
-
- [Column("ZERO_POINT")]
-
- public Int32 ZeroPoint
- {
- get
- {
- return _zeropoint;
- }
-
- set
- {
- if (_zeropoint != value)
- {
- _zeropoint = value;
-
- OnZeroPointChanged(value);
-
- }
- }
- }
-
- protected Int32 _resolutionbits;
-
- /// <summary>
- /// Gets or sets the hardwaredancer resolution bits.
- /// </summary>
-
- [Column("RESOLUTION_BITS")]
-
- public Int32 ResolutionBits
- {
- get
- {
- return _resolutionbits;
- }
-
- set
- {
- if (_resolutionbits != value)
- {
- _resolutionbits = value;
-
- OnResolutionBitsChanged(value);
-
- }
- }
- }
-
- protected Int32 _armlength;
-
- /// <summary>
- /// Gets or sets the hardwaredancer arm length.
- /// </summary>
-
- [Column("ARM_LENGTH")]
-
- public Int32 ArmLength
- {
- get
- {
- return _armlength;
- }
-
- set
- {
- if (_armlength != value)
- {
- _armlength = value;
-
- OnArmLengthChanged(value);
-
- }
- }
- }
-
- protected Boolean _assemblydirectionright;
-
- /// <summary>
- /// Gets or sets the hardwaredancer assembly direction right.
- /// </summary>
-
- [Column("ASSEMBLY_DIRECTION_RIGHT")]
-
- public Boolean AssemblyDirectionRight
- {
- get
- {
- return _assemblydirectionright;
- }
-
- set
- {
- if (_assemblydirectionright != value)
- {
- _assemblydirectionright = value;
-
- OnAssemblyDirectionRightChanged(value);
-
- }
- }
- }
-
- protected Boolean _accelerateontensionraise;
-
- /// <summary>
- /// Gets or sets the hardwaredancer accelerate on tension raise.
- /// </summary>
-
- [Column("ACCELERATE_ON_TENSION_RAISE")]
-
- public Boolean AccelerateOnTensionRaise
- {
- get
- {
- return _accelerateontensionraise;
- }
-
- set
- {
- if (_accelerateontensionraise != value)
- {
- _accelerateontensionraise = value;
-
- OnAccelerateOnTensionRaiseChanged(value);
-
- }
- }
- }
-
- protected Boolean _active;
-
- /// <summary>
- /// Gets or sets the hardwaredancer active.
- /// </summary>
-
- [Column("ACTIVE")]
-
- public Boolean Active
- {
- get
- {
- return _active;
- }
-
- set
- {
- if (_active != value)
- {
- _active = value;
-
- OnActiveChanged(value);
-
- }
- }
- }
-
- protected HardwareDancerType _hardwaredancertype;
-
- /// <summary>
- /// Gets or sets the hardwaredancer hardware dancer types.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual HardwareDancerType HardwareDancerType
- {
- get
- {
- return _hardwaredancertype;
- }
-
- set
- {
- if (_hardwaredancertype != value)
- {
- _hardwaredancertype = value;
-
- OnHardwareDancerTypeChanged(value);
-
- }
- }
- }
-
- protected HardwareVersion _hardwareversion;
-
- /// <summary>
- /// Gets or sets the hardwaredancer hardware versions.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual HardwareVersion HardwareVersion
- {
- get
- {
- return _hardwareversion;
- }
-
- set
- {
- if (_hardwareversion != value)
- {
- _hardwareversion = value;
-
- OnHardwareVersionChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Gradual has changed.
- /// </summary>
- protected virtual void OnGradualChanged(Boolean gradual)
- {
- GradualChanged?.Invoke(this, gradual);
- RaisePropertyChanged(nameof(Gradual));
- }
-
- /// <summary>
- /// Called when the K has changed.
- /// </summary>
- protected virtual void OnKChanged(Double k)
- {
- KChanged?.Invoke(this, k);
- RaisePropertyChanged(nameof(K));
- }
-
- /// <summary>
- /// Called when the X has changed.
- /// </summary>
- protected virtual void OnXChanged(Double x)
- {
- XChanged?.Invoke(this, x);
- RaisePropertyChanged(nameof(X));
- }
-
- /// <summary>
- /// Called when the PulsePerMmSpring has changed.
- /// </summary>
- protected virtual void OnPulsePerMmSpringChanged(Int32 pulsepermmspring)
- {
- PulsePerMmSpringChanged?.Invoke(this, pulsepermmspring);
- RaisePropertyChanged(nameof(PulsePerMmSpring));
- }
-
- /// <summary>
- /// Called when the MaximalMovementMm has changed.
- /// </summary>
- protected virtual void OnMaximalMovementMmChanged(Int32 maximalmovementmm)
- {
- MaximalMovementMmChanged?.Invoke(this, maximalmovementmm);
- RaisePropertyChanged(nameof(MaximalMovementMm));
- }
-
- /// <summary>
- /// Called when the ZeroPoint has changed.
- /// </summary>
- protected virtual void OnZeroPointChanged(Int32 zeropoint)
- {
- ZeroPointChanged?.Invoke(this, zeropoint);
- RaisePropertyChanged(nameof(ZeroPoint));
- }
-
- /// <summary>
- /// Called when the ResolutionBits has changed.
- /// </summary>
- protected virtual void OnResolutionBitsChanged(Int32 resolutionbits)
- {
- ResolutionBitsChanged?.Invoke(this, resolutionbits);
- RaisePropertyChanged(nameof(ResolutionBits));
- }
-
- /// <summary>
- /// Called when the ArmLength has changed.
- /// </summary>
- protected virtual void OnArmLengthChanged(Int32 armlength)
- {
- ArmLengthChanged?.Invoke(this, armlength);
- RaisePropertyChanged(nameof(ArmLength));
- }
-
- /// <summary>
- /// Called when the AssemblyDirectionRight has changed.
- /// </summary>
- protected virtual void OnAssemblyDirectionRightChanged(Boolean assemblydirectionright)
- {
- AssemblyDirectionRightChanged?.Invoke(this, assemblydirectionright);
- RaisePropertyChanged(nameof(AssemblyDirectionRight));
- }
-
- /// <summary>
- /// Called when the AccelerateOnTensionRaise has changed.
- /// </summary>
- protected virtual void OnAccelerateOnTensionRaiseChanged(Boolean accelerateontensionraise)
- {
- AccelerateOnTensionRaiseChanged?.Invoke(this, accelerateontensionraise);
- RaisePropertyChanged(nameof(AccelerateOnTensionRaise));
- }
-
- /// <summary>
- /// Called when the Active has changed.
- /// </summary>
- protected virtual void OnActiveChanged(Boolean active)
- {
- ActiveChanged?.Invoke(this, active);
- RaisePropertyChanged(nameof(Active));
- }
-
- /// <summary>
- /// Called when the HardwareDancerType has changed.
- /// </summary>
- protected virtual void OnHardwareDancerTypeChanged(HardwareDancerType hardwaredancertype)
- {
- HardwareDancerTypeChanged?.Invoke(this, hardwaredancertype);
- RaisePropertyChanged(nameof(HardwareDancerType));
- }
-
- /// <summary>
- /// Called when the HardwareVersion has changed.
- /// </summary>
- protected virtual void OnHardwareVersionChanged(HardwareVersion hardwareversion)
- {
- HardwareVersionChanged?.Invoke(this, hardwareversion);
- RaisePropertyChanged(nameof(HardwareVersion));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="HardwareDancer" /> class.
/// </summary>
public HardwareDancer() : base()
{
+
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareDancerBase.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareDancerBase.cs
new file mode 100644
index 000000000..2ff924d88
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareDancerBase.cs
@@ -0,0 +1,579 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("HARDWARE_DANCERS")]
+ public abstract class HardwareDancerBase : ObservableEntity<HardwareDancer>
+ {
+
+ public event EventHandler<Boolean> GradualChanged;
+
+ public event EventHandler<Double> KChanged;
+
+ public event EventHandler<Double> XChanged;
+
+ public event EventHandler<Int32> PulsePerMmSpringChanged;
+
+ public event EventHandler<Int32> MaximalMovementMmChanged;
+
+ public event EventHandler<Int32> ZeroPointChanged;
+
+ public event EventHandler<Int32> ResolutionBitsChanged;
+
+ public event EventHandler<Int32> ArmLengthChanged;
+
+ public event EventHandler<Boolean> AssemblyDirectionRightChanged;
+
+ public event EventHandler<Boolean> AccelerateOnTensionRaiseChanged;
+
+ public event EventHandler<Boolean> ActiveChanged;
+
+ public event EventHandler<HardwareDancerType> HardwareDancerTypeChanged;
+
+ public event EventHandler<HardwareVersion> HardwareVersionChanged;
+
+ protected String _hardwaredancertypeguid;
+
+ /// <summary>
+ /// Gets or sets the hardwaredancerbase hardware dancer type guid.
+ /// </summary>
+
+ [Column("HARDWARE_DANCER_TYPE_GUID")]
+ [ForeignKey("HardwareDancerType")]
+
+ public String HardwareDancerTypeGuid
+ {
+ get
+ {
+ return _hardwaredancertypeguid;
+ }
+
+ set
+ {
+ if (_hardwaredancertypeguid != value)
+ {
+ _hardwaredancertypeguid = value;
+ }
+ }
+ }
+
+ protected String _hardwareversionguid;
+
+ /// <summary>
+ /// Gets or sets the hardwaredancerbase hardware version guid.
+ /// </summary>
+
+ [Column("HARDWARE_VERSION_GUID")]
+ [ForeignKey("HardwareVersion")]
+
+ public String HardwareVersionGuid
+ {
+ get
+ {
+ return _hardwareversionguid;
+ }
+
+ set
+ {
+ if (_hardwareversionguid != value)
+ {
+ _hardwareversionguid = value;
+ }
+ }
+ }
+
+ protected Boolean _gradual;
+
+ /// <summary>
+ /// Gets or sets the hardwaredancerbase gradual.
+ /// </summary>
+
+ [Column("GRADUAL")]
+
+ public Boolean Gradual
+ {
+ get
+ {
+ return _gradual;
+ }
+
+ set
+ {
+ if (_gradual != value)
+ {
+ _gradual = value;
+
+ OnGradualChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _k;
+
+ /// <summary>
+ /// Gets or sets the hardwaredancerbase k.
+ /// </summary>
+
+ [Column("K")]
+
+ public Double K
+ {
+ get
+ {
+ return _k;
+ }
+
+ set
+ {
+ if (_k != value)
+ {
+ _k = value;
+
+ OnKChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _x;
+
+ /// <summary>
+ /// Gets or sets the hardwaredancerbase x.
+ /// </summary>
+
+ [Column("X")]
+
+ public Double X
+ {
+ get
+ {
+ return _x;
+ }
+
+ set
+ {
+ if (_x != value)
+ {
+ _x = value;
+
+ OnXChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _pulsepermmspring;
+
+ /// <summary>
+ /// Gets or sets the hardwaredancerbase pulse per mm spring.
+ /// </summary>
+
+ [Column("PULSE_PER_MM_SPRING")]
+
+ public Int32 PulsePerMmSpring
+ {
+ get
+ {
+ return _pulsepermmspring;
+ }
+
+ set
+ {
+ if (_pulsepermmspring != value)
+ {
+ _pulsepermmspring = value;
+
+ OnPulsePerMmSpringChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _maximalmovementmm;
+
+ /// <summary>
+ /// Gets or sets the hardwaredancerbase maximal movement mm.
+ /// </summary>
+
+ [Column("MAXIMAL_MOVEMENT_MM")]
+
+ public Int32 MaximalMovementMm
+ {
+ get
+ {
+ return _maximalmovementmm;
+ }
+
+ set
+ {
+ if (_maximalmovementmm != value)
+ {
+ _maximalmovementmm = value;
+
+ OnMaximalMovementMmChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _zeropoint;
+
+ /// <summary>
+ /// Gets or sets the hardwaredancerbase zero point.
+ /// </summary>
+
+ [Column("ZERO_POINT")]
+
+ public Int32 ZeroPoint
+ {
+ get
+ {
+ return _zeropoint;
+ }
+
+ set
+ {
+ if (_zeropoint != value)
+ {
+ _zeropoint = value;
+
+ OnZeroPointChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _resolutionbits;
+
+ /// <summary>
+ /// Gets or sets the hardwaredancerbase resolution bits.
+ /// </summary>
+
+ [Column("RESOLUTION_BITS")]
+
+ public Int32 ResolutionBits
+ {
+ get
+ {
+ return _resolutionbits;
+ }
+
+ set
+ {
+ if (_resolutionbits != value)
+ {
+ _resolutionbits = value;
+
+ OnResolutionBitsChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _armlength;
+
+ /// <summary>
+ /// Gets or sets the hardwaredancerbase arm length.
+ /// </summary>
+
+ [Column("ARM_LENGTH")]
+
+ public Int32 ArmLength
+ {
+ get
+ {
+ return _armlength;
+ }
+
+ set
+ {
+ if (_armlength != value)
+ {
+ _armlength = value;
+
+ OnArmLengthChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _assemblydirectionright;
+
+ /// <summary>
+ /// Gets or sets the hardwaredancerbase assembly direction right.
+ /// </summary>
+
+ [Column("ASSEMBLY_DIRECTION_RIGHT")]
+
+ public Boolean AssemblyDirectionRight
+ {
+ get
+ {
+ return _assemblydirectionright;
+ }
+
+ set
+ {
+ if (_assemblydirectionright != value)
+ {
+ _assemblydirectionright = value;
+
+ OnAssemblyDirectionRightChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _accelerateontensionraise;
+
+ /// <summary>
+ /// Gets or sets the hardwaredancerbase accelerate on tension raise.
+ /// </summary>
+
+ [Column("ACCELERATE_ON_TENSION_RAISE")]
+
+ public Boolean AccelerateOnTensionRaise
+ {
+ get
+ {
+ return _accelerateontensionraise;
+ }
+
+ set
+ {
+ if (_accelerateontensionraise != value)
+ {
+ _accelerateontensionraise = value;
+
+ OnAccelerateOnTensionRaiseChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _active;
+
+ /// <summary>
+ /// Gets or sets the hardwaredancerbase active.
+ /// </summary>
+
+ [Column("ACTIVE")]
+
+ public Boolean Active
+ {
+ get
+ {
+ return _active;
+ }
+
+ set
+ {
+ if (_active != value)
+ {
+ _active = value;
+
+ OnActiveChanged(value);
+
+ }
+ }
+ }
+
+ protected HardwareDancerType _hardwaredancertype;
+
+ /// <summary>
+ /// Gets or sets the hardwaredancerbase hardware dancer types.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual HardwareDancerType HardwareDancerType
+ {
+ get
+ {
+ return _hardwaredancertype;
+ }
+
+ set
+ {
+ if (_hardwaredancertype != value)
+ {
+ _hardwaredancertype = value;
+
+ OnHardwareDancerTypeChanged(value);
+
+ }
+ }
+ }
+
+ protected HardwareVersion _hardwareversion;
+
+ /// <summary>
+ /// Gets or sets the hardwaredancerbase hardware versions.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual HardwareVersion HardwareVersion
+ {
+ get
+ {
+ return _hardwareversion;
+ }
+
+ set
+ {
+ if (_hardwareversion != value)
+ {
+ _hardwareversion = value;
+
+ OnHardwareVersionChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Gradual has changed.
+ /// </summary>
+ protected virtual void OnGradualChanged(Boolean gradual)
+ {
+ GradualChanged?.Invoke(this, gradual);
+ RaisePropertyChanged(nameof(Gradual));
+ }
+
+ /// <summary>
+ /// Called when the K has changed.
+ /// </summary>
+ protected virtual void OnKChanged(Double k)
+ {
+ KChanged?.Invoke(this, k);
+ RaisePropertyChanged(nameof(K));
+ }
+
+ /// <summary>
+ /// Called when the X has changed.
+ /// </summary>
+ protected virtual void OnXChanged(Double x)
+ {
+ XChanged?.Invoke(this, x);
+ RaisePropertyChanged(nameof(X));
+ }
+
+ /// <summary>
+ /// Called when the PulsePerMmSpring has changed.
+ /// </summary>
+ protected virtual void OnPulsePerMmSpringChanged(Int32 pulsepermmspring)
+ {
+ PulsePerMmSpringChanged?.Invoke(this, pulsepermmspring);
+ RaisePropertyChanged(nameof(PulsePerMmSpring));
+ }
+
+ /// <summary>
+ /// Called when the MaximalMovementMm has changed.
+ /// </summary>
+ protected virtual void OnMaximalMovementMmChanged(Int32 maximalmovementmm)
+ {
+ MaximalMovementMmChanged?.Invoke(this, maximalmovementmm);
+ RaisePropertyChanged(nameof(MaximalMovementMm));
+ }
+
+ /// <summary>
+ /// Called when the ZeroPoint has changed.
+ /// </summary>
+ protected virtual void OnZeroPointChanged(Int32 zeropoint)
+ {
+ ZeroPointChanged?.Invoke(this, zeropoint);
+ RaisePropertyChanged(nameof(ZeroPoint));
+ }
+
+ /// <summary>
+ /// Called when the ResolutionBits has changed.
+ /// </summary>
+ protected virtual void OnResolutionBitsChanged(Int32 resolutionbits)
+ {
+ ResolutionBitsChanged?.Invoke(this, resolutionbits);
+ RaisePropertyChanged(nameof(ResolutionBits));
+ }
+
+ /// <summary>
+ /// Called when the ArmLength has changed.
+ /// </summary>
+ protected virtual void OnArmLengthChanged(Int32 armlength)
+ {
+ ArmLengthChanged?.Invoke(this, armlength);
+ RaisePropertyChanged(nameof(ArmLength));
+ }
+
+ /// <summary>
+ /// Called when the AssemblyDirectionRight has changed.
+ /// </summary>
+ protected virtual void OnAssemblyDirectionRightChanged(Boolean assemblydirectionright)
+ {
+ AssemblyDirectionRightChanged?.Invoke(this, assemblydirectionright);
+ RaisePropertyChanged(nameof(AssemblyDirectionRight));
+ }
+
+ /// <summary>
+ /// Called when the AccelerateOnTensionRaise has changed.
+ /// </summary>
+ protected virtual void OnAccelerateOnTensionRaiseChanged(Boolean accelerateontensionraise)
+ {
+ AccelerateOnTensionRaiseChanged?.Invoke(this, accelerateontensionraise);
+ RaisePropertyChanged(nameof(AccelerateOnTensionRaise));
+ }
+
+ /// <summary>
+ /// Called when the Active has changed.
+ /// </summary>
+ protected virtual void OnActiveChanged(Boolean active)
+ {
+ ActiveChanged?.Invoke(this, active);
+ RaisePropertyChanged(nameof(Active));
+ }
+
+ /// <summary>
+ /// Called when the HardwareDancerType has changed.
+ /// </summary>
+ protected virtual void OnHardwareDancerTypeChanged(HardwareDancerType hardwaredancertype)
+ {
+ HardwareDancerTypeChanged?.Invoke(this, hardwaredancertype);
+ RaisePropertyChanged(nameof(HardwareDancerType));
+ }
+
+ /// <summary>
+ /// Called when the HardwareVersion has changed.
+ /// </summary>
+ protected virtual void OnHardwareVersionChanged(HardwareVersion hardwareversion)
+ {
+ HardwareVersionChanged?.Invoke(this, hardwareversion);
+ RaisePropertyChanged(nameof(HardwareVersion));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="HardwareDancerBase" /> class.
+ /// </summary>
+ public HardwareDancerBase() : base()
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareDancerType.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareDancerType.cs
index c0fc38816..da3d20f2c 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/HardwareDancerType.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareDancerType.cs
@@ -1,188 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("HARDWARE_DANCER_TYPES")]
- public partial class HardwareDancerType : ObservableEntity<HardwareDancerType>
+ public partial class HardwareDancerType : HardwareDancerTypeBase
{
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<String> DescriptionChanged;
-
- public event EventHandler<SynchronizedObservableCollection<HardwareDancer>> HardwareDancersChanged;
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the hardwaredancertype code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the hardwaredancertype name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected String _description;
-
- /// <summary>
- /// Gets or sets the hardwaredancertype description.
- /// </summary>
-
- [Column("DESCRIPTION")]
-
- public String Description
- {
- get
- {
- return _description;
- }
-
- set
- {
- if (_description != value)
- {
- _description = value;
-
- OnDescriptionChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<HardwareDancer> _hardwaredancers;
-
- /// <summary>
- /// Gets or sets the hardwaredancertype hardware dancers.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<HardwareDancer> HardwareDancers
- {
- get
- {
- return _hardwaredancers;
- }
-
- set
- {
- if (_hardwaredancers != value)
- {
- _hardwaredancers = value;
-
- OnHardwareDancersChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Description has changed.
- /// </summary>
- protected virtual void OnDescriptionChanged(String description)
- {
- DescriptionChanged?.Invoke(this, description);
- RaisePropertyChanged(nameof(Description));
- }
-
- /// <summary>
- /// Called when the HardwareDancers has changed.
- /// </summary>
- protected virtual void OnHardwareDancersChanged(SynchronizedObservableCollection<HardwareDancer> hardwaredancers)
- {
- HardwareDancersChanged?.Invoke(this, hardwaredancers);
- RaisePropertyChanged(nameof(HardwareDancers));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="HardwareDancerType" /> class.
/// </summary>
public HardwareDancerType() : base()
{
- HardwareDancers = new SynchronizedObservableCollection<HardwareDancer>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareDancerTypeBase.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareDancerTypeBase.cs
new file mode 100644
index 000000000..3ed758575
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareDancerTypeBase.cs
@@ -0,0 +1,188 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("HARDWARE_DANCER_TYPES")]
+ public abstract class HardwareDancerTypeBase : ObservableEntity<HardwareDancerType>
+ {
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<String> DescriptionChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<HardwareDancer>> HardwareDancersChanged;
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the hardwaredancertypebase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the hardwaredancertypebase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _description;
+
+ /// <summary>
+ /// Gets or sets the hardwaredancertypebase description.
+ /// </summary>
+
+ [Column("DESCRIPTION")]
+
+ public String Description
+ {
+ get
+ {
+ return _description;
+ }
+
+ set
+ {
+ if (_description != value)
+ {
+ _description = value;
+
+ OnDescriptionChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<HardwareDancer> _hardwaredancers;
+
+ /// <summary>
+ /// Gets or sets the hardwaredancertypebase hardware dancers.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<HardwareDancer> HardwareDancers
+ {
+ get
+ {
+ return _hardwaredancers;
+ }
+
+ set
+ {
+ if (_hardwaredancers != value)
+ {
+ _hardwaredancers = value;
+
+ OnHardwareDancersChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Description has changed.
+ /// </summary>
+ protected virtual void OnDescriptionChanged(String description)
+ {
+ DescriptionChanged?.Invoke(this, description);
+ RaisePropertyChanged(nameof(Description));
+ }
+
+ /// <summary>
+ /// Called when the HardwareDancers has changed.
+ /// </summary>
+ protected virtual void OnHardwareDancersChanged(SynchronizedObservableCollection<HardwareDancer> hardwaredancers)
+ {
+ HardwareDancersChanged?.Invoke(this, hardwaredancers);
+ RaisePropertyChanged(nameof(HardwareDancers));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="HardwareDancerTypeBase" /> class.
+ /// </summary>
+ public HardwareDancerTypeBase() : base()
+ {
+
+ HardwareDancers = new SynchronizedObservableCollection<HardwareDancer>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareMotor.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareMotor.cs
index 0c459c883..eb4c60a02 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/HardwareMotor.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareMotor.cs
@@ -1,1116 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
-
- /// <summary>
- ///
- /// </summary>
-
- [Table("HARDWARE_MOTORS")]
- public partial class HardwareMotor : ObservableEntity<HardwareMotor>
+ public partial class HardwareMotor : HardwareMotorBase
{
-
- public event EventHandler<Int32> MinFrequencyChanged;
-
- public event EventHandler<Int32> MaxFrequencyChanged;
-
- public event EventHandler<Int32> SetMicroStepChanged;
-
- public event EventHandler<Int32> MicroStepChanged;
-
- public event EventHandler<Double> MaxChangeSlopeChanged;
-
- public event EventHandler<Double> HighLengthMicroSecondChanged;
-
- public event EventHandler<Boolean> SpeedMasterChanged;
-
- public event EventHandler<Int32> PulsePerRoundChanged;
-
- public event EventHandler<Double> PulleyRadiusChanged;
-
- public event EventHandler<Int32> ConfigWordChanged;
-
- public event EventHandler<Boolean> DirectionThreadWizeChanged;
-
- public event EventHandler<Int32> KvalHoldChanged;
-
- public event EventHandler<Int32> KvalRunChanged;
-
- public event EventHandler<Int32> KvalAccChanged;
-
- public event EventHandler<Int32> KvalDecChanged;
-
- public event EventHandler<Int32> OverCurrentThresholdChanged;
-
- public event EventHandler<Int32> StallThresholdChanged;
-
- public event EventHandler<Int32> ThermalCompensationFactorChanged;
-
- public event EventHandler<Boolean> LowSpeedOptimizationChanged;
-
- public event EventHandler<Int32> StSlpChanged;
-
- public event EventHandler<Int32> IntSpdChanged;
-
- public event EventHandler<Int32> FnSlpAccChanged;
-
- public event EventHandler<Int32> FnSlpDecChanged;
-
- public event EventHandler<Int32> FsSpdChanged;
-
- public event EventHandler<Boolean> ActiveChanged;
-
- public event EventHandler<HardwareMotorType> HardwareMotorTypeChanged;
-
- public event EventHandler<HardwareVersion> HardwareVersionChanged;
-
- protected String _hardwaremotortypeguid;
-
- /// <summary>
- /// Gets or sets the hardwaremotor hardware motor type guid.
- /// </summary>
-
- [Column("HARDWARE_MOTOR_TYPE_GUID")]
- [ForeignKey("HardwareMotorType")]
-
- public String HardwareMotorTypeGuid
- {
- get
- {
- return _hardwaremotortypeguid;
- }
-
- set
- {
- if (_hardwaremotortypeguid != value)
- {
- _hardwaremotortypeguid = value;
- }
- }
- }
-
- protected String _hardwareversionguid;
-
- /// <summary>
- /// Gets or sets the hardwaremotor hardware version guid.
- /// </summary>
-
- [Column("HARDWARE_VERSION_GUID")]
- [ForeignKey("HardwareVersion")]
-
- public String HardwareVersionGuid
- {
- get
- {
- return _hardwareversionguid;
- }
-
- set
- {
- if (_hardwareversionguid != value)
- {
- _hardwareversionguid = value;
- }
- }
- }
-
- protected Int32 _minfrequency;
-
- /// <summary>
- /// Gets or sets the hardwaremotor min frequency.
- /// </summary>
-
- [Column("MIN_FREQUENCY")]
-
- public Int32 MinFrequency
- {
- get
- {
- return _minfrequency;
- }
-
- set
- {
- if (_minfrequency != value)
- {
- _minfrequency = value;
-
- OnMinFrequencyChanged(value);
-
- }
- }
- }
-
- protected Int32 _maxfrequency;
-
- /// <summary>
- /// Gets or sets the hardwaremotor max frequency.
- /// </summary>
-
- [Column("MAX_FREQUENCY")]
-
- public Int32 MaxFrequency
- {
- get
- {
- return _maxfrequency;
- }
-
- set
- {
- if (_maxfrequency != value)
- {
- _maxfrequency = value;
-
- OnMaxFrequencyChanged(value);
-
- }
- }
- }
-
- protected Int32 _setmicrostep;
-
- /// <summary>
- /// Gets or sets the hardwaremotor set micro step.
- /// </summary>
-
- [Column("SET_MICRO_STEP")]
-
- public Int32 SetMicroStep
- {
- get
- {
- return _setmicrostep;
- }
-
- set
- {
- if (_setmicrostep != value)
- {
- _setmicrostep = value;
-
- OnSetMicroStepChanged(value);
-
- }
- }
- }
-
- protected Int32 _microstep;
-
- /// <summary>
- /// Gets or sets the hardwaremotor micro step.
- /// </summary>
-
- [Column("MICRO_STEP")]
-
- public Int32 MicroStep
- {
- get
- {
- return _microstep;
- }
-
- set
- {
- if (_microstep != value)
- {
- _microstep = value;
-
- OnMicroStepChanged(value);
-
- }
- }
- }
-
- protected Double _maxchangeslope;
-
- /// <summary>
- /// Gets or sets the hardwaremotor max change slope.
- /// </summary>
-
- [Column("MAX_CHANGE_SLOPE")]
-
- public Double MaxChangeSlope
- {
- get
- {
- return _maxchangeslope;
- }
-
- set
- {
- if (_maxchangeslope != value)
- {
- _maxchangeslope = value;
-
- OnMaxChangeSlopeChanged(value);
-
- }
- }
- }
-
- protected Double _highlengthmicrosecond;
-
- /// <summary>
- /// Gets or sets the hardwaremotor high length micro second.
- /// </summary>
-
- [Column("HIGH_LENGTH_MICRO_SECOND")]
-
- public Double HighLengthMicroSecond
- {
- get
- {
- return _highlengthmicrosecond;
- }
-
- set
- {
- if (_highlengthmicrosecond != value)
- {
- _highlengthmicrosecond = value;
-
- OnHighLengthMicroSecondChanged(value);
-
- }
- }
- }
-
- protected Boolean _speedmaster;
-
- /// <summary>
- /// Gets or sets the hardwaremotor speed master.
- /// </summary>
-
- [Column("SPEED_MASTER")]
-
- public Boolean SpeedMaster
- {
- get
- {
- return _speedmaster;
- }
-
- set
- {
- if (_speedmaster != value)
- {
- _speedmaster = value;
-
- OnSpeedMasterChanged(value);
-
- }
- }
- }
-
- protected Int32 _pulseperround;
-
- /// <summary>
- /// Gets or sets the hardwaremotor pulse per round.
- /// </summary>
-
- [Column("PULSE_PER_ROUND")]
-
- public Int32 PulsePerRound
- {
- get
- {
- return _pulseperround;
- }
-
- set
- {
- if (_pulseperround != value)
- {
- _pulseperround = value;
-
- OnPulsePerRoundChanged(value);
-
- }
- }
- }
-
- protected Double _pulleyradius;
-
- /// <summary>
- /// Gets or sets the hardwaremotor pulley radius.
- /// </summary>
-
- [Column("PULLEY_RADIUS")]
-
- public Double PulleyRadius
- {
- get
- {
- return _pulleyradius;
- }
-
- set
- {
- if (_pulleyradius != value)
- {
- _pulleyradius = value;
-
- OnPulleyRadiusChanged(value);
-
- }
- }
- }
-
- protected Int32 _configword;
-
- /// <summary>
- /// Gets or sets the hardwaremotor config word.
- /// </summary>
-
- [Column("CONFIG_WORD")]
-
- public Int32 ConfigWord
- {
- get
- {
- return _configword;
- }
-
- set
- {
- if (_configword != value)
- {
- _configword = value;
-
- OnConfigWordChanged(value);
-
- }
- }
- }
-
- protected Boolean _directionthreadwize;
-
- /// <summary>
- /// Gets or sets the hardwaremotor direction thread wize.
- /// </summary>
-
- [Column("DIRECTION_THREAD_WIZE")]
-
- public Boolean DirectionThreadWize
- {
- get
- {
- return _directionthreadwize;
- }
-
- set
- {
- if (_directionthreadwize != value)
- {
- _directionthreadwize = value;
-
- OnDirectionThreadWizeChanged(value);
-
- }
- }
- }
-
- protected Int32 _kvalhold;
-
- /// <summary>
- /// Gets or sets the hardwaremotor kval hold.
- /// </summary>
-
- [Column("KVAL_HOLD")]
-
- public Int32 KvalHold
- {
- get
- {
- return _kvalhold;
- }
-
- set
- {
- if (_kvalhold != value)
- {
- _kvalhold = value;
-
- OnKvalHoldChanged(value);
-
- }
- }
- }
-
- protected Int32 _kvalrun;
-
- /// <summary>
- /// Gets or sets the hardwaremotor kval run.
- /// </summary>
-
- [Column("KVAL_RUN")]
-
- public Int32 KvalRun
- {
- get
- {
- return _kvalrun;
- }
-
- set
- {
- if (_kvalrun != value)
- {
- _kvalrun = value;
-
- OnKvalRunChanged(value);
-
- }
- }
- }
-
- protected Int32 _kvalacc;
-
- /// <summary>
- /// Gets or sets the hardwaremotor kval acc.
- /// </summary>
-
- [Column("KVAL_ACC")]
-
- public Int32 KvalAcc
- {
- get
- {
- return _kvalacc;
- }
-
- set
- {
- if (_kvalacc != value)
- {
- _kvalacc = value;
-
- OnKvalAccChanged(value);
-
- }
- }
- }
-
- protected Int32 _kvaldec;
-
- /// <summary>
- /// Gets or sets the hardwaremotor kval dec.
- /// </summary>
-
- [Column("KVAL_DEC")]
-
- public Int32 KvalDec
- {
- get
- {
- return _kvaldec;
- }
-
- set
- {
- if (_kvaldec != value)
- {
- _kvaldec = value;
-
- OnKvalDecChanged(value);
-
- }
- }
- }
-
- protected Int32 _overcurrentthreshold;
-
- /// <summary>
- /// Gets or sets the hardwaremotor over current threshold.
- /// </summary>
-
- [Column("OVER_CURRENT_THRESHOLD")]
-
- public Int32 OverCurrentThreshold
- {
- get
- {
- return _overcurrentthreshold;
- }
-
- set
- {
- if (_overcurrentthreshold != value)
- {
- _overcurrentthreshold = value;
-
- OnOverCurrentThresholdChanged(value);
-
- }
- }
- }
-
- protected Int32 _stallthreshold;
-
- /// <summary>
- /// Gets or sets the hardwaremotor stall threshold.
- /// </summary>
-
- [Column("STALL_THRESHOLD")]
-
- public Int32 StallThreshold
- {
- get
- {
- return _stallthreshold;
- }
-
- set
- {
- if (_stallthreshold != value)
- {
- _stallthreshold = value;
-
- OnStallThresholdChanged(value);
-
- }
- }
- }
-
- protected Int32 _thermalcompensationfactor;
-
- /// <summary>
- /// Gets or sets the hardwaremotor thermal compensation factor.
- /// </summary>
-
- [Column("THERMAL_COMPENSATION_FACTOR")]
-
- public Int32 ThermalCompensationFactor
- {
- get
- {
- return _thermalcompensationfactor;
- }
-
- set
- {
- if (_thermalcompensationfactor != value)
- {
- _thermalcompensationfactor = value;
-
- OnThermalCompensationFactorChanged(value);
-
- }
- }
- }
-
- protected Boolean _lowspeedoptimization;
-
- /// <summary>
- /// Gets or sets the hardwaremotor low speed optimization.
- /// </summary>
-
- [Column("LOW_SPEED_OPTIMIZATION")]
-
- public Boolean LowSpeedOptimization
- {
- get
- {
- return _lowspeedoptimization;
- }
-
- set
- {
- if (_lowspeedoptimization != value)
- {
- _lowspeedoptimization = value;
-
- OnLowSpeedOptimizationChanged(value);
-
- }
- }
- }
-
- protected Int32 _stslp;
-
- /// <summary>
- /// Gets or sets the hardwaremotor st slp.
- /// </summary>
-
- [Column("ST_SLP")]
-
- public Int32 StSlp
- {
- get
- {
- return _stslp;
- }
-
- set
- {
- if (_stslp != value)
- {
- _stslp = value;
-
- OnStSlpChanged(value);
-
- }
- }
- }
-
- protected Int32 _intspd;
-
- /// <summary>
- /// Gets or sets the hardwaremotor int spd.
- /// </summary>
-
- [Column("INT_SPD")]
-
- public Int32 IntSpd
- {
- get
- {
- return _intspd;
- }
-
- set
- {
- if (_intspd != value)
- {
- _intspd = value;
-
- OnIntSpdChanged(value);
-
- }
- }
- }
-
- protected Int32 _fnslpacc;
-
- /// <summary>
- /// Gets or sets the hardwaremotor fn slp acc.
- /// </summary>
-
- [Column("FN_SLP_ACC")]
-
- public Int32 FnSlpAcc
- {
- get
- {
- return _fnslpacc;
- }
-
- set
- {
- if (_fnslpacc != value)
- {
- _fnslpacc = value;
-
- OnFnSlpAccChanged(value);
-
- }
- }
- }
-
- protected Int32 _fnslpdec;
-
- /// <summary>
- /// Gets or sets the hardwaremotor fn slp dec.
- /// </summary>
-
- [Column("FN_SLP_DEC")]
-
- public Int32 FnSlpDec
- {
- get
- {
- return _fnslpdec;
- }
-
- set
- {
- if (_fnslpdec != value)
- {
- _fnslpdec = value;
-
- OnFnSlpDecChanged(value);
-
- }
- }
- }
-
- protected Int32 _fsspd;
-
- /// <summary>
- /// The speed in which the motor moves to full step operation.
- /// </summary>
-
- [Column("FS_SPD")]
-
- public Int32 FsSpd
- {
- get
- {
- return _fsspd;
- }
-
- set
- {
- if (_fsspd != value)
- {
- _fsspd = value;
-
- OnFsSpdChanged(value);
-
- }
- }
- }
-
- protected Boolean _active;
-
- /// <summary>
- /// Gets or sets the hardwaremotor active.
- /// </summary>
-
- [Column("ACTIVE")]
-
- public Boolean Active
- {
- get
- {
- return _active;
- }
-
- set
- {
- if (_active != value)
- {
- _active = value;
-
- OnActiveChanged(value);
-
- }
- }
- }
-
- protected HardwareMotorType _hardwaremotortype;
-
- /// <summary>
- /// Gets or sets the hardwaremotor hardware motor types.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual HardwareMotorType HardwareMotorType
- {
- get
- {
- return _hardwaremotortype;
- }
-
- set
- {
- if (_hardwaremotortype != value)
- {
- _hardwaremotortype = value;
-
- OnHardwareMotorTypeChanged(value);
-
- }
- }
- }
-
- protected HardwareVersion _hardwareversion;
-
- /// <summary>
- /// Gets or sets the hardwaremotor hardware versions.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual HardwareVersion HardwareVersion
- {
- get
- {
- return _hardwareversion;
- }
-
- set
- {
- if (_hardwareversion != value)
- {
- _hardwareversion = value;
-
- OnHardwareVersionChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the MinFrequency has changed.
- /// </summary>
- protected virtual void OnMinFrequencyChanged(Int32 minfrequency)
- {
- MinFrequencyChanged?.Invoke(this, minfrequency);
- RaisePropertyChanged(nameof(MinFrequency));
- }
-
- /// <summary>
- /// Called when the MaxFrequency has changed.
- /// </summary>
- protected virtual void OnMaxFrequencyChanged(Int32 maxfrequency)
- {
- MaxFrequencyChanged?.Invoke(this, maxfrequency);
- RaisePropertyChanged(nameof(MaxFrequency));
- }
-
- /// <summary>
- /// Called when the SetMicroStep has changed.
- /// </summary>
- protected virtual void OnSetMicroStepChanged(Int32 setmicrostep)
- {
- SetMicroStepChanged?.Invoke(this, setmicrostep);
- RaisePropertyChanged(nameof(SetMicroStep));
- }
-
- /// <summary>
- /// Called when the MicroStep has changed.
- /// </summary>
- protected virtual void OnMicroStepChanged(Int32 microstep)
- {
- MicroStepChanged?.Invoke(this, microstep);
- RaisePropertyChanged(nameof(MicroStep));
- }
-
- /// <summary>
- /// Called when the MaxChangeSlope has changed.
- /// </summary>
- protected virtual void OnMaxChangeSlopeChanged(Double maxchangeslope)
- {
- MaxChangeSlopeChanged?.Invoke(this, maxchangeslope);
- RaisePropertyChanged(nameof(MaxChangeSlope));
- }
-
- /// <summary>
- /// Called when the HighLengthMicroSecond has changed.
- /// </summary>
- protected virtual void OnHighLengthMicroSecondChanged(Double highlengthmicrosecond)
- {
- HighLengthMicroSecondChanged?.Invoke(this, highlengthmicrosecond);
- RaisePropertyChanged(nameof(HighLengthMicroSecond));
- }
-
- /// <summary>
- /// Called when the SpeedMaster has changed.
- /// </summary>
- protected virtual void OnSpeedMasterChanged(Boolean speedmaster)
- {
- SpeedMasterChanged?.Invoke(this, speedmaster);
- RaisePropertyChanged(nameof(SpeedMaster));
- }
-
- /// <summary>
- /// Called when the PulsePerRound has changed.
- /// </summary>
- protected virtual void OnPulsePerRoundChanged(Int32 pulseperround)
- {
- PulsePerRoundChanged?.Invoke(this, pulseperround);
- RaisePropertyChanged(nameof(PulsePerRound));
- }
-
- /// <summary>
- /// Called when the PulleyRadius has changed.
- /// </summary>
- protected virtual void OnPulleyRadiusChanged(Double pulleyradius)
- {
- PulleyRadiusChanged?.Invoke(this, pulleyradius);
- RaisePropertyChanged(nameof(PulleyRadius));
- }
-
- /// <summary>
- /// Called when the ConfigWord has changed.
- /// </summary>
- protected virtual void OnConfigWordChanged(Int32 configword)
- {
- ConfigWordChanged?.Invoke(this, configword);
- RaisePropertyChanged(nameof(ConfigWord));
- }
-
- /// <summary>
- /// Called when the DirectionThreadWize has changed.
- /// </summary>
- protected virtual void OnDirectionThreadWizeChanged(Boolean directionthreadwize)
- {
- DirectionThreadWizeChanged?.Invoke(this, directionthreadwize);
- RaisePropertyChanged(nameof(DirectionThreadWize));
- }
-
- /// <summary>
- /// Called when the KvalHold has changed.
- /// </summary>
- protected virtual void OnKvalHoldChanged(Int32 kvalhold)
- {
- KvalHoldChanged?.Invoke(this, kvalhold);
- RaisePropertyChanged(nameof(KvalHold));
- }
-
- /// <summary>
- /// Called when the KvalRun has changed.
- /// </summary>
- protected virtual void OnKvalRunChanged(Int32 kvalrun)
- {
- KvalRunChanged?.Invoke(this, kvalrun);
- RaisePropertyChanged(nameof(KvalRun));
- }
-
- /// <summary>
- /// Called when the KvalAcc has changed.
- /// </summary>
- protected virtual void OnKvalAccChanged(Int32 kvalacc)
- {
- KvalAccChanged?.Invoke(this, kvalacc);
- RaisePropertyChanged(nameof(KvalAcc));
- }
-
- /// <summary>
- /// Called when the KvalDec has changed.
- /// </summary>
- protected virtual void OnKvalDecChanged(Int32 kvaldec)
- {
- KvalDecChanged?.Invoke(this, kvaldec);
- RaisePropertyChanged(nameof(KvalDec));
- }
-
- /// <summary>
- /// Called when the OverCurrentThreshold has changed.
- /// </summary>
- protected virtual void OnOverCurrentThresholdChanged(Int32 overcurrentthreshold)
- {
- OverCurrentThresholdChanged?.Invoke(this, overcurrentthreshold);
- RaisePropertyChanged(nameof(OverCurrentThreshold));
- }
-
- /// <summary>
- /// Called when the StallThreshold has changed.
- /// </summary>
- protected virtual void OnStallThresholdChanged(Int32 stallthreshold)
- {
- StallThresholdChanged?.Invoke(this, stallthreshold);
- RaisePropertyChanged(nameof(StallThreshold));
- }
-
- /// <summary>
- /// Called when the ThermalCompensationFactor has changed.
- /// </summary>
- protected virtual void OnThermalCompensationFactorChanged(Int32 thermalcompensationfactor)
- {
- ThermalCompensationFactorChanged?.Invoke(this, thermalcompensationfactor);
- RaisePropertyChanged(nameof(ThermalCompensationFactor));
- }
-
- /// <summary>
- /// Called when the LowSpeedOptimization has changed.
- /// </summary>
- protected virtual void OnLowSpeedOptimizationChanged(Boolean lowspeedoptimization)
- {
- LowSpeedOptimizationChanged?.Invoke(this, lowspeedoptimization);
- RaisePropertyChanged(nameof(LowSpeedOptimization));
- }
-
- /// <summary>
- /// Called when the StSlp has changed.
- /// </summary>
- protected virtual void OnStSlpChanged(Int32 stslp)
- {
- StSlpChanged?.Invoke(this, stslp);
- RaisePropertyChanged(nameof(StSlp));
- }
-
- /// <summary>
- /// Called when the IntSpd has changed.
- /// </summary>
- protected virtual void OnIntSpdChanged(Int32 intspd)
- {
- IntSpdChanged?.Invoke(this, intspd);
- RaisePropertyChanged(nameof(IntSpd));
- }
-
- /// <summary>
- /// Called when the FnSlpAcc has changed.
- /// </summary>
- protected virtual void OnFnSlpAccChanged(Int32 fnslpacc)
- {
- FnSlpAccChanged?.Invoke(this, fnslpacc);
- RaisePropertyChanged(nameof(FnSlpAcc));
- }
-
- /// <summary>
- /// Called when the FnSlpDec has changed.
- /// </summary>
- protected virtual void OnFnSlpDecChanged(Int32 fnslpdec)
- {
- FnSlpDecChanged?.Invoke(this, fnslpdec);
- RaisePropertyChanged(nameof(FnSlpDec));
- }
-
- /// <summary>
- /// Called when the FsSpd has changed.
- /// </summary>
- protected virtual void OnFsSpdChanged(Int32 fsspd)
- {
- FsSpdChanged?.Invoke(this, fsspd);
- RaisePropertyChanged(nameof(FsSpd));
- }
-
- /// <summary>
- /// Called when the Active has changed.
- /// </summary>
- protected virtual void OnActiveChanged(Boolean active)
- {
- ActiveChanged?.Invoke(this, active);
- RaisePropertyChanged(nameof(Active));
- }
-
- /// <summary>
- /// Called when the HardwareMotorType has changed.
- /// </summary>
- protected virtual void OnHardwareMotorTypeChanged(HardwareMotorType hardwaremotortype)
- {
- HardwareMotorTypeChanged?.Invoke(this, hardwaremotortype);
- RaisePropertyChanged(nameof(HardwareMotorType));
- }
-
- /// <summary>
- /// Called when the HardwareVersion has changed.
- /// </summary>
- protected virtual void OnHardwareVersionChanged(HardwareVersion hardwareversion)
- {
- HardwareVersionChanged?.Invoke(this, hardwareversion);
- RaisePropertyChanged(nameof(HardwareVersion));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="HardwareMotor" /> class.
/// </summary>
public HardwareMotor() : base()
{
+
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareMotorBase.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareMotorBase.cs
new file mode 100644
index 000000000..495951553
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareMotorBase.cs
@@ -0,0 +1,1116 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+
+ /// <summary>
+ ///
+ /// </summary>
+
+ [Table("HARDWARE_MOTORS")]
+ public abstract class HardwareMotorBase : ObservableEntity<HardwareMotor>
+ {
+
+ public event EventHandler<Int32> MinFrequencyChanged;
+
+ public event EventHandler<Int32> MaxFrequencyChanged;
+
+ public event EventHandler<Int32> SetMicroStepChanged;
+
+ public event EventHandler<Int32> MicroStepChanged;
+
+ public event EventHandler<Double> MaxChangeSlopeChanged;
+
+ public event EventHandler<Double> HighLengthMicroSecondChanged;
+
+ public event EventHandler<Boolean> SpeedMasterChanged;
+
+ public event EventHandler<Int32> PulsePerRoundChanged;
+
+ public event EventHandler<Double> PulleyRadiusChanged;
+
+ public event EventHandler<Int32> ConfigWordChanged;
+
+ public event EventHandler<Boolean> DirectionThreadWizeChanged;
+
+ public event EventHandler<Int32> KvalHoldChanged;
+
+ public event EventHandler<Int32> KvalRunChanged;
+
+ public event EventHandler<Int32> KvalAccChanged;
+
+ public event EventHandler<Int32> KvalDecChanged;
+
+ public event EventHandler<Int32> OverCurrentThresholdChanged;
+
+ public event EventHandler<Int32> StallThresholdChanged;
+
+ public event EventHandler<Int32> ThermalCompensationFactorChanged;
+
+ public event EventHandler<Boolean> LowSpeedOptimizationChanged;
+
+ public event EventHandler<Int32> StSlpChanged;
+
+ public event EventHandler<Int32> IntSpdChanged;
+
+ public event EventHandler<Int32> FnSlpAccChanged;
+
+ public event EventHandler<Int32> FnSlpDecChanged;
+
+ public event EventHandler<Int32> FsSpdChanged;
+
+ public event EventHandler<Boolean> ActiveChanged;
+
+ public event EventHandler<HardwareMotorType> HardwareMotorTypeChanged;
+
+ public event EventHandler<HardwareVersion> HardwareVersionChanged;
+
+ protected String _hardwaremotortypeguid;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotorbase hardware motor type guid.
+ /// </summary>
+
+ [Column("HARDWARE_MOTOR_TYPE_GUID")]
+ [ForeignKey("HardwareMotorType")]
+
+ public String HardwareMotorTypeGuid
+ {
+ get
+ {
+ return _hardwaremotortypeguid;
+ }
+
+ set
+ {
+ if (_hardwaremotortypeguid != value)
+ {
+ _hardwaremotortypeguid = value;
+ }
+ }
+ }
+
+ protected String _hardwareversionguid;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotorbase hardware version guid.
+ /// </summary>
+
+ [Column("HARDWARE_VERSION_GUID")]
+ [ForeignKey("HardwareVersion")]
+
+ public String HardwareVersionGuid
+ {
+ get
+ {
+ return _hardwareversionguid;
+ }
+
+ set
+ {
+ if (_hardwareversionguid != value)
+ {
+ _hardwareversionguid = value;
+ }
+ }
+ }
+
+ protected Int32 _minfrequency;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotorbase min frequency.
+ /// </summary>
+
+ [Column("MIN_FREQUENCY")]
+
+ public Int32 MinFrequency
+ {
+ get
+ {
+ return _minfrequency;
+ }
+
+ set
+ {
+ if (_minfrequency != value)
+ {
+ _minfrequency = value;
+
+ OnMinFrequencyChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _maxfrequency;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotorbase max frequency.
+ /// </summary>
+
+ [Column("MAX_FREQUENCY")]
+
+ public Int32 MaxFrequency
+ {
+ get
+ {
+ return _maxfrequency;
+ }
+
+ set
+ {
+ if (_maxfrequency != value)
+ {
+ _maxfrequency = value;
+
+ OnMaxFrequencyChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _setmicrostep;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotorbase set micro step.
+ /// </summary>
+
+ [Column("SET_MICRO_STEP")]
+
+ public Int32 SetMicroStep
+ {
+ get
+ {
+ return _setmicrostep;
+ }
+
+ set
+ {
+ if (_setmicrostep != value)
+ {
+ _setmicrostep = value;
+
+ OnSetMicroStepChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _microstep;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotorbase micro step.
+ /// </summary>
+
+ [Column("MICRO_STEP")]
+
+ public Int32 MicroStep
+ {
+ get
+ {
+ return _microstep;
+ }
+
+ set
+ {
+ if (_microstep != value)
+ {
+ _microstep = value;
+
+ OnMicroStepChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _maxchangeslope;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotorbase max change slope.
+ /// </summary>
+
+ [Column("MAX_CHANGE_SLOPE")]
+
+ public Double MaxChangeSlope
+ {
+ get
+ {
+ return _maxchangeslope;
+ }
+
+ set
+ {
+ if (_maxchangeslope != value)
+ {
+ _maxchangeslope = value;
+
+ OnMaxChangeSlopeChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _highlengthmicrosecond;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotorbase high length micro second.
+ /// </summary>
+
+ [Column("HIGH_LENGTH_MICRO_SECOND")]
+
+ public Double HighLengthMicroSecond
+ {
+ get
+ {
+ return _highlengthmicrosecond;
+ }
+
+ set
+ {
+ if (_highlengthmicrosecond != value)
+ {
+ _highlengthmicrosecond = value;
+
+ OnHighLengthMicroSecondChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _speedmaster;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotorbase speed master.
+ /// </summary>
+
+ [Column("SPEED_MASTER")]
+
+ public Boolean SpeedMaster
+ {
+ get
+ {
+ return _speedmaster;
+ }
+
+ set
+ {
+ if (_speedmaster != value)
+ {
+ _speedmaster = value;
+
+ OnSpeedMasterChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _pulseperround;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotorbase pulse per round.
+ /// </summary>
+
+ [Column("PULSE_PER_ROUND")]
+
+ public Int32 PulsePerRound
+ {
+ get
+ {
+ return _pulseperround;
+ }
+
+ set
+ {
+ if (_pulseperround != value)
+ {
+ _pulseperround = value;
+
+ OnPulsePerRoundChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _pulleyradius;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotorbase pulley radius.
+ /// </summary>
+
+ [Column("PULLEY_RADIUS")]
+
+ public Double PulleyRadius
+ {
+ get
+ {
+ return _pulleyradius;
+ }
+
+ set
+ {
+ if (_pulleyradius != value)
+ {
+ _pulleyradius = value;
+
+ OnPulleyRadiusChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _configword;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotorbase config word.
+ /// </summary>
+
+ [Column("CONFIG_WORD")]
+
+ public Int32 ConfigWord
+ {
+ get
+ {
+ return _configword;
+ }
+
+ set
+ {
+ if (_configword != value)
+ {
+ _configword = value;
+
+ OnConfigWordChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _directionthreadwize;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotorbase direction thread wize.
+ /// </summary>
+
+ [Column("DIRECTION_THREAD_WIZE")]
+
+ public Boolean DirectionThreadWize
+ {
+ get
+ {
+ return _directionthreadwize;
+ }
+
+ set
+ {
+ if (_directionthreadwize != value)
+ {
+ _directionthreadwize = value;
+
+ OnDirectionThreadWizeChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _kvalhold;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotorbase kval hold.
+ /// </summary>
+
+ [Column("KVAL_HOLD")]
+
+ public Int32 KvalHold
+ {
+ get
+ {
+ return _kvalhold;
+ }
+
+ set
+ {
+ if (_kvalhold != value)
+ {
+ _kvalhold = value;
+
+ OnKvalHoldChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _kvalrun;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotorbase kval run.
+ /// </summary>
+
+ [Column("KVAL_RUN")]
+
+ public Int32 KvalRun
+ {
+ get
+ {
+ return _kvalrun;
+ }
+
+ set
+ {
+ if (_kvalrun != value)
+ {
+ _kvalrun = value;
+
+ OnKvalRunChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _kvalacc;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotorbase kval acc.
+ /// </summary>
+
+ [Column("KVAL_ACC")]
+
+ public Int32 KvalAcc
+ {
+ get
+ {
+ return _kvalacc;
+ }
+
+ set
+ {
+ if (_kvalacc != value)
+ {
+ _kvalacc = value;
+
+ OnKvalAccChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _kvaldec;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotorbase kval dec.
+ /// </summary>
+
+ [Column("KVAL_DEC")]
+
+ public Int32 KvalDec
+ {
+ get
+ {
+ return _kvaldec;
+ }
+
+ set
+ {
+ if (_kvaldec != value)
+ {
+ _kvaldec = value;
+
+ OnKvalDecChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _overcurrentthreshold;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotorbase over current threshold.
+ /// </summary>
+
+ [Column("OVER_CURRENT_THRESHOLD")]
+
+ public Int32 OverCurrentThreshold
+ {
+ get
+ {
+ return _overcurrentthreshold;
+ }
+
+ set
+ {
+ if (_overcurrentthreshold != value)
+ {
+ _overcurrentthreshold = value;
+
+ OnOverCurrentThresholdChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _stallthreshold;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotorbase stall threshold.
+ /// </summary>
+
+ [Column("STALL_THRESHOLD")]
+
+ public Int32 StallThreshold
+ {
+ get
+ {
+ return _stallthreshold;
+ }
+
+ set
+ {
+ if (_stallthreshold != value)
+ {
+ _stallthreshold = value;
+
+ OnStallThresholdChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _thermalcompensationfactor;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotorbase thermal compensation factor.
+ /// </summary>
+
+ [Column("THERMAL_COMPENSATION_FACTOR")]
+
+ public Int32 ThermalCompensationFactor
+ {
+ get
+ {
+ return _thermalcompensationfactor;
+ }
+
+ set
+ {
+ if (_thermalcompensationfactor != value)
+ {
+ _thermalcompensationfactor = value;
+
+ OnThermalCompensationFactorChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _lowspeedoptimization;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotorbase low speed optimization.
+ /// </summary>
+
+ [Column("LOW_SPEED_OPTIMIZATION")]
+
+ public Boolean LowSpeedOptimization
+ {
+ get
+ {
+ return _lowspeedoptimization;
+ }
+
+ set
+ {
+ if (_lowspeedoptimization != value)
+ {
+ _lowspeedoptimization = value;
+
+ OnLowSpeedOptimizationChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _stslp;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotorbase st slp.
+ /// </summary>
+
+ [Column("ST_SLP")]
+
+ public Int32 StSlp
+ {
+ get
+ {
+ return _stslp;
+ }
+
+ set
+ {
+ if (_stslp != value)
+ {
+ _stslp = value;
+
+ OnStSlpChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _intspd;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotorbase int spd.
+ /// </summary>
+
+ [Column("INT_SPD")]
+
+ public Int32 IntSpd
+ {
+ get
+ {
+ return _intspd;
+ }
+
+ set
+ {
+ if (_intspd != value)
+ {
+ _intspd = value;
+
+ OnIntSpdChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _fnslpacc;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotorbase fn slp acc.
+ /// </summary>
+
+ [Column("FN_SLP_ACC")]
+
+ public Int32 FnSlpAcc
+ {
+ get
+ {
+ return _fnslpacc;
+ }
+
+ set
+ {
+ if (_fnslpacc != value)
+ {
+ _fnslpacc = value;
+
+ OnFnSlpAccChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _fnslpdec;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotorbase fn slp dec.
+ /// </summary>
+
+ [Column("FN_SLP_DEC")]
+
+ public Int32 FnSlpDec
+ {
+ get
+ {
+ return _fnslpdec;
+ }
+
+ set
+ {
+ if (_fnslpdec != value)
+ {
+ _fnslpdec = value;
+
+ OnFnSlpDecChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _fsspd;
+
+ /// <summary>
+ /// The speed in which the motor moves to full step operation.
+ /// </summary>
+
+ [Column("FS_SPD")]
+
+ public Int32 FsSpd
+ {
+ get
+ {
+ return _fsspd;
+ }
+
+ set
+ {
+ if (_fsspd != value)
+ {
+ _fsspd = value;
+
+ OnFsSpdChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _active;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotorbase active.
+ /// </summary>
+
+ [Column("ACTIVE")]
+
+ public Boolean Active
+ {
+ get
+ {
+ return _active;
+ }
+
+ set
+ {
+ if (_active != value)
+ {
+ _active = value;
+
+ OnActiveChanged(value);
+
+ }
+ }
+ }
+
+ protected HardwareMotorType _hardwaremotortype;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotorbase hardware motor types.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual HardwareMotorType HardwareMotorType
+ {
+ get
+ {
+ return _hardwaremotortype;
+ }
+
+ set
+ {
+ if (_hardwaremotortype != value)
+ {
+ _hardwaremotortype = value;
+
+ OnHardwareMotorTypeChanged(value);
+
+ }
+ }
+ }
+
+ protected HardwareVersion _hardwareversion;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotorbase hardware versions.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual HardwareVersion HardwareVersion
+ {
+ get
+ {
+ return _hardwareversion;
+ }
+
+ set
+ {
+ if (_hardwareversion != value)
+ {
+ _hardwareversion = value;
+
+ OnHardwareVersionChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the MinFrequency has changed.
+ /// </summary>
+ protected virtual void OnMinFrequencyChanged(Int32 minfrequency)
+ {
+ MinFrequencyChanged?.Invoke(this, minfrequency);
+ RaisePropertyChanged(nameof(MinFrequency));
+ }
+
+ /// <summary>
+ /// Called when the MaxFrequency has changed.
+ /// </summary>
+ protected virtual void OnMaxFrequencyChanged(Int32 maxfrequency)
+ {
+ MaxFrequencyChanged?.Invoke(this, maxfrequency);
+ RaisePropertyChanged(nameof(MaxFrequency));
+ }
+
+ /// <summary>
+ /// Called when the SetMicroStep has changed.
+ /// </summary>
+ protected virtual void OnSetMicroStepChanged(Int32 setmicrostep)
+ {
+ SetMicroStepChanged?.Invoke(this, setmicrostep);
+ RaisePropertyChanged(nameof(SetMicroStep));
+ }
+
+ /// <summary>
+ /// Called when the MicroStep has changed.
+ /// </summary>
+ protected virtual void OnMicroStepChanged(Int32 microstep)
+ {
+ MicroStepChanged?.Invoke(this, microstep);
+ RaisePropertyChanged(nameof(MicroStep));
+ }
+
+ /// <summary>
+ /// Called when the MaxChangeSlope has changed.
+ /// </summary>
+ protected virtual void OnMaxChangeSlopeChanged(Double maxchangeslope)
+ {
+ MaxChangeSlopeChanged?.Invoke(this, maxchangeslope);
+ RaisePropertyChanged(nameof(MaxChangeSlope));
+ }
+
+ /// <summary>
+ /// Called when the HighLengthMicroSecond has changed.
+ /// </summary>
+ protected virtual void OnHighLengthMicroSecondChanged(Double highlengthmicrosecond)
+ {
+ HighLengthMicroSecondChanged?.Invoke(this, highlengthmicrosecond);
+ RaisePropertyChanged(nameof(HighLengthMicroSecond));
+ }
+
+ /// <summary>
+ /// Called when the SpeedMaster has changed.
+ /// </summary>
+ protected virtual void OnSpeedMasterChanged(Boolean speedmaster)
+ {
+ SpeedMasterChanged?.Invoke(this, speedmaster);
+ RaisePropertyChanged(nameof(SpeedMaster));
+ }
+
+ /// <summary>
+ /// Called when the PulsePerRound has changed.
+ /// </summary>
+ protected virtual void OnPulsePerRoundChanged(Int32 pulseperround)
+ {
+ PulsePerRoundChanged?.Invoke(this, pulseperround);
+ RaisePropertyChanged(nameof(PulsePerRound));
+ }
+
+ /// <summary>
+ /// Called when the PulleyRadius has changed.
+ /// </summary>
+ protected virtual void OnPulleyRadiusChanged(Double pulleyradius)
+ {
+ PulleyRadiusChanged?.Invoke(this, pulleyradius);
+ RaisePropertyChanged(nameof(PulleyRadius));
+ }
+
+ /// <summary>
+ /// Called when the ConfigWord has changed.
+ /// </summary>
+ protected virtual void OnConfigWordChanged(Int32 configword)
+ {
+ ConfigWordChanged?.Invoke(this, configword);
+ RaisePropertyChanged(nameof(ConfigWord));
+ }
+
+ /// <summary>
+ /// Called when the DirectionThreadWize has changed.
+ /// </summary>
+ protected virtual void OnDirectionThreadWizeChanged(Boolean directionthreadwize)
+ {
+ DirectionThreadWizeChanged?.Invoke(this, directionthreadwize);
+ RaisePropertyChanged(nameof(DirectionThreadWize));
+ }
+
+ /// <summary>
+ /// Called when the KvalHold has changed.
+ /// </summary>
+ protected virtual void OnKvalHoldChanged(Int32 kvalhold)
+ {
+ KvalHoldChanged?.Invoke(this, kvalhold);
+ RaisePropertyChanged(nameof(KvalHold));
+ }
+
+ /// <summary>
+ /// Called when the KvalRun has changed.
+ /// </summary>
+ protected virtual void OnKvalRunChanged(Int32 kvalrun)
+ {
+ KvalRunChanged?.Invoke(this, kvalrun);
+ RaisePropertyChanged(nameof(KvalRun));
+ }
+
+ /// <summary>
+ /// Called when the KvalAcc has changed.
+ /// </summary>
+ protected virtual void OnKvalAccChanged(Int32 kvalacc)
+ {
+ KvalAccChanged?.Invoke(this, kvalacc);
+ RaisePropertyChanged(nameof(KvalAcc));
+ }
+
+ /// <summary>
+ /// Called when the KvalDec has changed.
+ /// </summary>
+ protected virtual void OnKvalDecChanged(Int32 kvaldec)
+ {
+ KvalDecChanged?.Invoke(this, kvaldec);
+ RaisePropertyChanged(nameof(KvalDec));
+ }
+
+ /// <summary>
+ /// Called when the OverCurrentThreshold has changed.
+ /// </summary>
+ protected virtual void OnOverCurrentThresholdChanged(Int32 overcurrentthreshold)
+ {
+ OverCurrentThresholdChanged?.Invoke(this, overcurrentthreshold);
+ RaisePropertyChanged(nameof(OverCurrentThreshold));
+ }
+
+ /// <summary>
+ /// Called when the StallThreshold has changed.
+ /// </summary>
+ protected virtual void OnStallThresholdChanged(Int32 stallthreshold)
+ {
+ StallThresholdChanged?.Invoke(this, stallthreshold);
+ RaisePropertyChanged(nameof(StallThreshold));
+ }
+
+ /// <summary>
+ /// Called when the ThermalCompensationFactor has changed.
+ /// </summary>
+ protected virtual void OnThermalCompensationFactorChanged(Int32 thermalcompensationfactor)
+ {
+ ThermalCompensationFactorChanged?.Invoke(this, thermalcompensationfactor);
+ RaisePropertyChanged(nameof(ThermalCompensationFactor));
+ }
+
+ /// <summary>
+ /// Called when the LowSpeedOptimization has changed.
+ /// </summary>
+ protected virtual void OnLowSpeedOptimizationChanged(Boolean lowspeedoptimization)
+ {
+ LowSpeedOptimizationChanged?.Invoke(this, lowspeedoptimization);
+ RaisePropertyChanged(nameof(LowSpeedOptimization));
+ }
+
+ /// <summary>
+ /// Called when the StSlp has changed.
+ /// </summary>
+ protected virtual void OnStSlpChanged(Int32 stslp)
+ {
+ StSlpChanged?.Invoke(this, stslp);
+ RaisePropertyChanged(nameof(StSlp));
+ }
+
+ /// <summary>
+ /// Called when the IntSpd has changed.
+ /// </summary>
+ protected virtual void OnIntSpdChanged(Int32 intspd)
+ {
+ IntSpdChanged?.Invoke(this, intspd);
+ RaisePropertyChanged(nameof(IntSpd));
+ }
+
+ /// <summary>
+ /// Called when the FnSlpAcc has changed.
+ /// </summary>
+ protected virtual void OnFnSlpAccChanged(Int32 fnslpacc)
+ {
+ FnSlpAccChanged?.Invoke(this, fnslpacc);
+ RaisePropertyChanged(nameof(FnSlpAcc));
+ }
+
+ /// <summary>
+ /// Called when the FnSlpDec has changed.
+ /// </summary>
+ protected virtual void OnFnSlpDecChanged(Int32 fnslpdec)
+ {
+ FnSlpDecChanged?.Invoke(this, fnslpdec);
+ RaisePropertyChanged(nameof(FnSlpDec));
+ }
+
+ /// <summary>
+ /// Called when the FsSpd has changed.
+ /// </summary>
+ protected virtual void OnFsSpdChanged(Int32 fsspd)
+ {
+ FsSpdChanged?.Invoke(this, fsspd);
+ RaisePropertyChanged(nameof(FsSpd));
+ }
+
+ /// <summary>
+ /// Called when the Active has changed.
+ /// </summary>
+ protected virtual void OnActiveChanged(Boolean active)
+ {
+ ActiveChanged?.Invoke(this, active);
+ RaisePropertyChanged(nameof(Active));
+ }
+
+ /// <summary>
+ /// Called when the HardwareMotorType has changed.
+ /// </summary>
+ protected virtual void OnHardwareMotorTypeChanged(HardwareMotorType hardwaremotortype)
+ {
+ HardwareMotorTypeChanged?.Invoke(this, hardwaremotortype);
+ RaisePropertyChanged(nameof(HardwareMotorType));
+ }
+
+ /// <summary>
+ /// Called when the HardwareVersion has changed.
+ /// </summary>
+ protected virtual void OnHardwareVersionChanged(HardwareVersion hardwareversion)
+ {
+ HardwareVersionChanged?.Invoke(this, hardwareversion);
+ RaisePropertyChanged(nameof(HardwareVersion));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="HardwareMotorBase" /> class.
+ /// </summary>
+ public HardwareMotorBase() : base()
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareMotorType.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareMotorType.cs
index 49dccd60e..21e64c004 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/HardwareMotorType.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareMotorType.cs
@@ -1,226 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("HARDWARE_MOTOR_TYPES")]
- public partial class HardwareMotorType : ObservableEntity<HardwareMotorType>
+ public partial class HardwareMotorType : HardwareMotorTypeBase
{
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<String> DescriptionChanged;
-
- public event EventHandler<Boolean> SupportsHomingChanged;
-
- public event EventHandler<SynchronizedObservableCollection<HardwareMotor>> HardwareMotorsChanged;
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the hardwaremotortype code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the hardwaremotortype name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected String _description;
-
- /// <summary>
- /// Gets or sets the hardwaremotortype description.
- /// </summary>
-
- [Column("DESCRIPTION")]
-
- public String Description
- {
- get
- {
- return _description;
- }
-
- set
- {
- if (_description != value)
- {
- _description = value;
-
- OnDescriptionChanged(value);
-
- }
- }
- }
-
- protected Boolean _supportshoming;
-
- /// <summary>
- /// Gets or sets the hardwaremotortype supports homing.
- /// </summary>
-
- [Column("SUPPORTS_HOMING")]
-
- public Boolean SupportsHoming
- {
- get
- {
- return _supportshoming;
- }
-
- set
- {
- if (_supportshoming != value)
- {
- _supportshoming = value;
-
- OnSupportsHomingChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<HardwareMotor> _hardwaremotors;
-
- /// <summary>
- /// Gets or sets the hardwaremotortype hardware motors.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<HardwareMotor> HardwareMotors
- {
- get
- {
- return _hardwaremotors;
- }
-
- set
- {
- if (_hardwaremotors != value)
- {
- _hardwaremotors = value;
-
- OnHardwareMotorsChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Description has changed.
- /// </summary>
- protected virtual void OnDescriptionChanged(String description)
- {
- DescriptionChanged?.Invoke(this, description);
- RaisePropertyChanged(nameof(Description));
- }
-
- /// <summary>
- /// Called when the SupportsHoming has changed.
- /// </summary>
- protected virtual void OnSupportsHomingChanged(Boolean supportshoming)
- {
- SupportsHomingChanged?.Invoke(this, supportshoming);
- RaisePropertyChanged(nameof(SupportsHoming));
- }
-
- /// <summary>
- /// Called when the HardwareMotors has changed.
- /// </summary>
- protected virtual void OnHardwareMotorsChanged(SynchronizedObservableCollection<HardwareMotor> hardwaremotors)
- {
- HardwareMotorsChanged?.Invoke(this, hardwaremotors);
- RaisePropertyChanged(nameof(HardwareMotors));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="HardwareMotorType" /> class.
/// </summary>
public HardwareMotorType() : base()
{
- HardwareMotors = new SynchronizedObservableCollection<HardwareMotor>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareMotorTypeBase.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareMotorTypeBase.cs
new file mode 100644
index 000000000..b6f5f464c
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareMotorTypeBase.cs
@@ -0,0 +1,226 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("HARDWARE_MOTOR_TYPES")]
+ public abstract class HardwareMotorTypeBase : ObservableEntity<HardwareMotorType>
+ {
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<String> DescriptionChanged;
+
+ public event EventHandler<Boolean> SupportsHomingChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<HardwareMotor>> HardwareMotorsChanged;
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotortypebase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotortypebase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _description;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotortypebase description.
+ /// </summary>
+
+ [Column("DESCRIPTION")]
+
+ public String Description
+ {
+ get
+ {
+ return _description;
+ }
+
+ set
+ {
+ if (_description != value)
+ {
+ _description = value;
+
+ OnDescriptionChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _supportshoming;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotortypebase supports homing.
+ /// </summary>
+
+ [Column("SUPPORTS_HOMING")]
+
+ public Boolean SupportsHoming
+ {
+ get
+ {
+ return _supportshoming;
+ }
+
+ set
+ {
+ if (_supportshoming != value)
+ {
+ _supportshoming = value;
+
+ OnSupportsHomingChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<HardwareMotor> _hardwaremotors;
+
+ /// <summary>
+ /// Gets or sets the hardwaremotortypebase hardware motors.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<HardwareMotor> HardwareMotors
+ {
+ get
+ {
+ return _hardwaremotors;
+ }
+
+ set
+ {
+ if (_hardwaremotors != value)
+ {
+ _hardwaremotors = value;
+
+ OnHardwareMotorsChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Description has changed.
+ /// </summary>
+ protected virtual void OnDescriptionChanged(String description)
+ {
+ DescriptionChanged?.Invoke(this, description);
+ RaisePropertyChanged(nameof(Description));
+ }
+
+ /// <summary>
+ /// Called when the SupportsHoming has changed.
+ /// </summary>
+ protected virtual void OnSupportsHomingChanged(Boolean supportshoming)
+ {
+ SupportsHomingChanged?.Invoke(this, supportshoming);
+ RaisePropertyChanged(nameof(SupportsHoming));
+ }
+
+ /// <summary>
+ /// Called when the HardwareMotors has changed.
+ /// </summary>
+ protected virtual void OnHardwareMotorsChanged(SynchronizedObservableCollection<HardwareMotor> hardwaremotors)
+ {
+ HardwareMotorsChanged?.Invoke(this, hardwaremotors);
+ RaisePropertyChanged(nameof(HardwareMotors));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="HardwareMotorTypeBase" /> class.
+ /// </summary>
+ public HardwareMotorTypeBase() : base()
+ {
+
+ HardwareMotors = new SynchronizedObservableCollection<HardwareMotor>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwarePidControl.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwarePidControl.cs
index 865ec00bc..5bb26001d 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/HardwarePidControl.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/HardwarePidControl.cs
@@ -1,921 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("HARDWARE_PID_CONTROLS")]
- public partial class HardwarePidControl : ObservableEntity<HardwarePidControl>
+ public partial class HardwarePidControl : HardwarePidControlBase
{
-
- public event EventHandler<Double> OutputProportionalPowerLimitChanged;
-
- public event EventHandler<Double> OutputProportionalBandChanged;
-
- public event EventHandler<Double> IntegralTimeChanged;
-
- public event EventHandler<Double> DerivativeTimeChanged;
-
- public event EventHandler<Double> SensorCorrectionAdjustmentChanged;
-
- public event EventHandler<Double> SensorMinValueChanged;
-
- public event EventHandler<Double> SensorMaxValueChanged;
-
- public event EventHandler<Double> SetPointRampRateorSoftStartRampChanged;
-
- public event EventHandler<Double> SetPointControlOutputRateChanged;
-
- public event EventHandler<Double> ControlOutputTypeChanged;
-
- public event EventHandler<Double> SsrControlOutputTypeChanged;
-
- public event EventHandler<Double> OutputOnOffHysteresisValueChanged;
-
- public event EventHandler<Double> ProcessVariableSamplingRateChanged;
-
- public event EventHandler<Double> PvInputFilterFactorModeChanged;
-
- public event EventHandler<Int32> OutputProportionalCycleTimeChanged;
-
- public event EventHandler<Int32> AcHeatersHalfCycleTimeChanged;
-
- public event EventHandler<Double> ProportionalGainChanged;
-
- public event EventHandler<Boolean> PidActiveChanged;
-
- public event EventHandler<Double> EpsilonChanged;
-
- public event EventHandler<Boolean> ActiveChanged;
-
- public event EventHandler<HardwarePidControlType> HardwarePidControlTypeChanged;
-
- public event EventHandler<HardwareVersion> HardwareVersionChanged;
-
- protected String _hardwarepidcontroltypeguid;
-
- /// <summary>
- /// Gets or sets the hardwarepidcontrol hardware pid control type guid.
- /// </summary>
-
- [Column("HARDWARE_PID_CONTROL_TYPE_GUID")]
- [ForeignKey("HardwarePidControlType")]
-
- public String HardwarePidControlTypeGuid
- {
- get
- {
- return _hardwarepidcontroltypeguid;
- }
-
- set
- {
- if (_hardwarepidcontroltypeguid != value)
- {
- _hardwarepidcontroltypeguid = value;
- }
- }
- }
-
- protected String _hardwareversionguid;
-
- /// <summary>
- /// Gets or sets the hardwarepidcontrol hardware version guid.
- /// </summary>
-
- [Column("HARDWARE_VERSION_GUID")]
- [ForeignKey("HardwareVersion")]
-
- public String HardwareVersionGuid
- {
- get
- {
- return _hardwareversionguid;
- }
-
- set
- {
- if (_hardwareversionguid != value)
- {
- _hardwareversionguid = value;
- }
- }
- }
-
- protected Double _outputproportionalpowerlimit;
-
- /// <summary>
- /// Gets or sets the hardwarepidcontrol output proportional power limit.
- /// </summary>
-
- [Column("OUTPUT_PROPORTIONAL_POWER_LIMIT")]
-
- public Double OutputProportionalPowerLimit
- {
- get
- {
- return _outputproportionalpowerlimit;
- }
-
- set
- {
- if (_outputproportionalpowerlimit != value)
- {
- _outputproportionalpowerlimit = value;
-
- OnOutputProportionalPowerLimitChanged(value);
-
- }
- }
- }
-
- protected Double _outputproportionalband;
-
- /// <summary>
- /// Gets or sets the hardwarepidcontrol output proportional band.
- /// </summary>
-
- [Column("OUTPUT_PROPORTIONAL_BAND")]
-
- public Double OutputProportionalBand
- {
- get
- {
- return _outputproportionalband;
- }
-
- set
- {
- if (_outputproportionalband != value)
- {
- _outputproportionalband = value;
-
- OnOutputProportionalBandChanged(value);
-
- }
- }
- }
-
- protected Double _integraltime;
-
- /// <summary>
- /// Gets or sets the hardwarepidcontrol integral time.
- /// </summary>
-
- [Column("INTEGRAL_TIME")]
-
- public Double IntegralTime
- {
- get
- {
- return _integraltime;
- }
-
- set
- {
- if (_integraltime != value)
- {
- _integraltime = value;
-
- OnIntegralTimeChanged(value);
-
- }
- }
- }
-
- protected Double _derivativetime;
-
- /// <summary>
- /// Gets or sets the hardwarepidcontrol derivative time.
- /// </summary>
-
- [Column("DERIVATIVE_TIME")]
-
- public Double DerivativeTime
- {
- get
- {
- return _derivativetime;
- }
-
- set
- {
- if (_derivativetime != value)
- {
- _derivativetime = value;
-
- OnDerivativeTimeChanged(value);
-
- }
- }
- }
-
- protected Double _sensorcorrectionadjustment;
-
- /// <summary>
- /// Gets or sets the hardwarepidcontrol sensor correction adjustment.
- /// </summary>
-
- [Column("SENSOR_CORRECTION_ADJUSTMENT")]
-
- public Double SensorCorrectionAdjustment
- {
- get
- {
- return _sensorcorrectionadjustment;
- }
-
- set
- {
- if (_sensorcorrectionadjustment != value)
- {
- _sensorcorrectionadjustment = value;
-
- OnSensorCorrectionAdjustmentChanged(value);
-
- }
- }
- }
-
- protected Double _sensorminvalue;
-
- /// <summary>
- /// Gets or sets the hardwarepidcontrol sensor min value.
- /// </summary>
-
- [Column("SENSOR_MIN_VALUE")]
-
- public Double SensorMinValue
- {
- get
- {
- return _sensorminvalue;
- }
-
- set
- {
- if (_sensorminvalue != value)
- {
- _sensorminvalue = value;
-
- OnSensorMinValueChanged(value);
-
- }
- }
- }
-
- protected Double _sensormaxvalue;
-
- /// <summary>
- /// Gets or sets the hardwarepidcontrol sensor max value.
- /// </summary>
-
- [Column("SENSOR_MAX_VALUE")]
-
- public Double SensorMaxValue
- {
- get
- {
- return _sensormaxvalue;
- }
-
- set
- {
- if (_sensormaxvalue != value)
- {
- _sensormaxvalue = value;
-
- OnSensorMaxValueChanged(value);
-
- }
- }
- }
-
- protected Double _setpointramprateorsoftstartramp;
-
- /// <summary>
- /// Gets or sets the hardwarepidcontrol set point ramp rateor soft start ramp.
- /// </summary>
-
- [Column("SET_POINT_RAMP_RATEOR_SOFT_START_RAMP")]
-
- public Double SetPointRampRateorSoftStartRamp
- {
- get
- {
- return _setpointramprateorsoftstartramp;
- }
-
- set
- {
- if (_setpointramprateorsoftstartramp != value)
- {
- _setpointramprateorsoftstartramp = value;
-
- OnSetPointRampRateorSoftStartRampChanged(value);
-
- }
- }
- }
-
- protected Double _setpointcontroloutputrate;
-
- /// <summary>
- /// Gets or sets the hardwarepidcontrol set point control output rate.
- /// </summary>
-
- [Column("SET_POINT_CONTROL_OUTPUT_RATE")]
-
- public Double SetPointControlOutputRate
- {
- get
- {
- return _setpointcontroloutputrate;
- }
-
- set
- {
- if (_setpointcontroloutputrate != value)
- {
- _setpointcontroloutputrate = value;
-
- OnSetPointControlOutputRateChanged(value);
-
- }
- }
- }
-
- protected Double _controloutputtype;
-
- /// <summary>
- /// Gets or sets the hardwarepidcontrol control output type.
- /// </summary>
-
- [Column("CONTROL_OUTPUT_TYPE")]
-
- public Double ControlOutputType
- {
- get
- {
- return _controloutputtype;
- }
-
- set
- {
- if (_controloutputtype != value)
- {
- _controloutputtype = value;
-
- OnControlOutputTypeChanged(value);
-
- }
- }
- }
-
- protected Double _ssrcontroloutputtype;
-
- /// <summary>
- /// Gets or sets the hardwarepidcontrol ssr control output type.
- /// </summary>
-
- [Column("SSR_CONTROL_OUTPUT_TYPE")]
-
- public Double SsrControlOutputType
- {
- get
- {
- return _ssrcontroloutputtype;
- }
-
- set
- {
- if (_ssrcontroloutputtype != value)
- {
- _ssrcontroloutputtype = value;
-
- OnSsrControlOutputTypeChanged(value);
-
- }
- }
- }
-
- protected Double _outputonoffhysteresisvalue;
-
- /// <summary>
- /// Gets or sets the hardwarepidcontrol output on off hysteresis value.
- /// </summary>
-
- [Column("OUTPUT_ON_OFF_HYSTERESIS_VALUE")]
-
- public Double OutputOnOffHysteresisValue
- {
- get
- {
- return _outputonoffhysteresisvalue;
- }
-
- set
- {
- if (_outputonoffhysteresisvalue != value)
- {
- _outputonoffhysteresisvalue = value;
-
- OnOutputOnOffHysteresisValueChanged(value);
-
- }
- }
- }
-
- protected Double _processvariablesamplingrate;
-
- /// <summary>
- /// Gets or sets the hardwarepidcontrol process variable sampling rate.
- /// </summary>
-
- [Column("PROCESS_VARIABLE_SAMPLING_RATE")]
-
- public Double ProcessVariableSamplingRate
- {
- get
- {
- return _processvariablesamplingrate;
- }
-
- set
- {
- if (_processvariablesamplingrate != value)
- {
- _processvariablesamplingrate = value;
-
- OnProcessVariableSamplingRateChanged(value);
-
- }
- }
- }
-
- protected Double _pvinputfilterfactormode;
-
- /// <summary>
- /// Gets or sets the hardwarepidcontrol pv input filter factor mode.
- /// </summary>
-
- [Column("PV_INPUT_FILTER_FACTOR_MODE")]
-
- public Double PvInputFilterFactorMode
- {
- get
- {
- return _pvinputfilterfactormode;
- }
-
- set
- {
- if (_pvinputfilterfactormode != value)
- {
- _pvinputfilterfactormode = value;
-
- OnPvInputFilterFactorModeChanged(value);
-
- }
- }
- }
-
- protected Int32 _outputproportionalcycletime;
-
- /// <summary>
- /// Gets or sets the hardwarepidcontrol output proportional cycle time.
- /// </summary>
-
- [Column("OUTPUT_PROPORTIONAL_CYCLE_TIME")]
-
- public Int32 OutputProportionalCycleTime
- {
- get
- {
- return _outputproportionalcycletime;
- }
-
- set
- {
- if (_outputproportionalcycletime != value)
- {
- _outputproportionalcycletime = value;
-
- OnOutputProportionalCycleTimeChanged(value);
-
- }
- }
- }
-
- protected Int32 _acheatershalfcycletime;
-
- /// <summary>
- /// Gets or sets the hardwarepidcontrol ac heaters half cycle time.
- /// </summary>
-
- [Column("AC_HEATERS__HALF_CYCLE_TIME")]
-
- public Int32 AcHeatersHalfCycleTime
- {
- get
- {
- return _acheatershalfcycletime;
- }
-
- set
- {
- if (_acheatershalfcycletime != value)
- {
- _acheatershalfcycletime = value;
-
- OnAcHeatersHalfCycleTimeChanged(value);
-
- }
- }
- }
-
- protected Double _proportionalgain;
-
- /// <summary>
- /// Gets or sets the hardwarepidcontrol proportional gain.
- /// </summary>
-
- [Column("PROPORTIONAL_GAIN")]
-
- public Double ProportionalGain
- {
- get
- {
- return _proportionalgain;
- }
-
- set
- {
- if (_proportionalgain != value)
- {
- _proportionalgain = value;
-
- OnProportionalGainChanged(value);
-
- }
- }
- }
-
- protected Boolean _pidactive;
-
- /// <summary>
- /// Gets or sets the hardwarepidcontrol pid active.
- /// </summary>
-
- [Column("PID_ACTIVE")]
-
- public Boolean PidActive
- {
- get
- {
- return _pidactive;
- }
-
- set
- {
- if (_pidactive != value)
- {
- _pidactive = value;
-
- OnPidActiveChanged(value);
-
- }
- }
- }
-
- protected Double _epsilon;
-
- /// <summary>
- /// Gets or sets the hardwarepidcontrol epsilon.
- /// </summary>
-
- [Column("EPSILON")]
-
- public Double Epsilon
- {
- get
- {
- return _epsilon;
- }
-
- set
- {
- if (_epsilon != value)
- {
- _epsilon = value;
-
- OnEpsilonChanged(value);
-
- }
- }
- }
-
- protected Boolean _active;
-
- /// <summary>
- /// Gets or sets the hardwarepidcontrol active.
- /// </summary>
-
- [Column("ACTIVE")]
-
- public Boolean Active
- {
- get
- {
- return _active;
- }
-
- set
- {
- if (_active != value)
- {
- _active = value;
-
- OnActiveChanged(value);
-
- }
- }
- }
-
- protected HardwarePidControlType _hardwarepidcontroltype;
-
- /// <summary>
- /// Gets or sets the hardwarepidcontrol hardware pid control types.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual HardwarePidControlType HardwarePidControlType
- {
- get
- {
- return _hardwarepidcontroltype;
- }
-
- set
- {
- if (_hardwarepidcontroltype != value)
- {
- _hardwarepidcontroltype = value;
-
- OnHardwarePidControlTypeChanged(value);
-
- }
- }
- }
-
- protected HardwareVersion _hardwareversion;
-
- /// <summary>
- /// Gets or sets the hardwarepidcontrol hardware versions.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual HardwareVersion HardwareVersion
- {
- get
- {
- return _hardwareversion;
- }
-
- set
- {
- if (_hardwareversion != value)
- {
- _hardwareversion = value;
-
- OnHardwareVersionChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the OutputProportionalPowerLimit has changed.
- /// </summary>
- protected virtual void OnOutputProportionalPowerLimitChanged(Double outputproportionalpowerlimit)
- {
- OutputProportionalPowerLimitChanged?.Invoke(this, outputproportionalpowerlimit);
- RaisePropertyChanged(nameof(OutputProportionalPowerLimit));
- }
-
- /// <summary>
- /// Called when the OutputProportionalBand has changed.
- /// </summary>
- protected virtual void OnOutputProportionalBandChanged(Double outputproportionalband)
- {
- OutputProportionalBandChanged?.Invoke(this, outputproportionalband);
- RaisePropertyChanged(nameof(OutputProportionalBand));
- }
-
- /// <summary>
- /// Called when the IntegralTime has changed.
- /// </summary>
- protected virtual void OnIntegralTimeChanged(Double integraltime)
- {
- IntegralTimeChanged?.Invoke(this, integraltime);
- RaisePropertyChanged(nameof(IntegralTime));
- }
-
- /// <summary>
- /// Called when the DerivativeTime has changed.
- /// </summary>
- protected virtual void OnDerivativeTimeChanged(Double derivativetime)
- {
- DerivativeTimeChanged?.Invoke(this, derivativetime);
- RaisePropertyChanged(nameof(DerivativeTime));
- }
-
- /// <summary>
- /// Called when the SensorCorrectionAdjustment has changed.
- /// </summary>
- protected virtual void OnSensorCorrectionAdjustmentChanged(Double sensorcorrectionadjustment)
- {
- SensorCorrectionAdjustmentChanged?.Invoke(this, sensorcorrectionadjustment);
- RaisePropertyChanged(nameof(SensorCorrectionAdjustment));
- }
-
- /// <summary>
- /// Called when the SensorMinValue has changed.
- /// </summary>
- protected virtual void OnSensorMinValueChanged(Double sensorminvalue)
- {
- SensorMinValueChanged?.Invoke(this, sensorminvalue);
- RaisePropertyChanged(nameof(SensorMinValue));
- }
-
- /// <summary>
- /// Called when the SensorMaxValue has changed.
- /// </summary>
- protected virtual void OnSensorMaxValueChanged(Double sensormaxvalue)
- {
- SensorMaxValueChanged?.Invoke(this, sensormaxvalue);
- RaisePropertyChanged(nameof(SensorMaxValue));
- }
-
- /// <summary>
- /// Called when the SetPointRampRateorSoftStartRamp has changed.
- /// </summary>
- protected virtual void OnSetPointRampRateorSoftStartRampChanged(Double setpointramprateorsoftstartramp)
- {
- SetPointRampRateorSoftStartRampChanged?.Invoke(this, setpointramprateorsoftstartramp);
- RaisePropertyChanged(nameof(SetPointRampRateorSoftStartRamp));
- }
-
- /// <summary>
- /// Called when the SetPointControlOutputRate has changed.
- /// </summary>
- protected virtual void OnSetPointControlOutputRateChanged(Double setpointcontroloutputrate)
- {
- SetPointControlOutputRateChanged?.Invoke(this, setpointcontroloutputrate);
- RaisePropertyChanged(nameof(SetPointControlOutputRate));
- }
-
- /// <summary>
- /// Called when the ControlOutputType has changed.
- /// </summary>
- protected virtual void OnControlOutputTypeChanged(Double controloutputtype)
- {
- ControlOutputTypeChanged?.Invoke(this, controloutputtype);
- RaisePropertyChanged(nameof(ControlOutputType));
- }
-
- /// <summary>
- /// Called when the SsrControlOutputType has changed.
- /// </summary>
- protected virtual void OnSsrControlOutputTypeChanged(Double ssrcontroloutputtype)
- {
- SsrControlOutputTypeChanged?.Invoke(this, ssrcontroloutputtype);
- RaisePropertyChanged(nameof(SsrControlOutputType));
- }
-
- /// <summary>
- /// Called when the OutputOnOffHysteresisValue has changed.
- /// </summary>
- protected virtual void OnOutputOnOffHysteresisValueChanged(Double outputonoffhysteresisvalue)
- {
- OutputOnOffHysteresisValueChanged?.Invoke(this, outputonoffhysteresisvalue);
- RaisePropertyChanged(nameof(OutputOnOffHysteresisValue));
- }
-
- /// <summary>
- /// Called when the ProcessVariableSamplingRate has changed.
- /// </summary>
- protected virtual void OnProcessVariableSamplingRateChanged(Double processvariablesamplingrate)
- {
- ProcessVariableSamplingRateChanged?.Invoke(this, processvariablesamplingrate);
- RaisePropertyChanged(nameof(ProcessVariableSamplingRate));
- }
-
- /// <summary>
- /// Called when the PvInputFilterFactorMode has changed.
- /// </summary>
- protected virtual void OnPvInputFilterFactorModeChanged(Double pvinputfilterfactormode)
- {
- PvInputFilterFactorModeChanged?.Invoke(this, pvinputfilterfactormode);
- RaisePropertyChanged(nameof(PvInputFilterFactorMode));
- }
-
- /// <summary>
- /// Called when the OutputProportionalCycleTime has changed.
- /// </summary>
- protected virtual void OnOutputProportionalCycleTimeChanged(Int32 outputproportionalcycletime)
- {
- OutputProportionalCycleTimeChanged?.Invoke(this, outputproportionalcycletime);
- RaisePropertyChanged(nameof(OutputProportionalCycleTime));
- }
-
- /// <summary>
- /// Called when the AcHeatersHalfCycleTime has changed.
- /// </summary>
- protected virtual void OnAcHeatersHalfCycleTimeChanged(Int32 acheatershalfcycletime)
- {
- AcHeatersHalfCycleTimeChanged?.Invoke(this, acheatershalfcycletime);
- RaisePropertyChanged(nameof(AcHeatersHalfCycleTime));
- }
-
- /// <summary>
- /// Called when the ProportionalGain has changed.
- /// </summary>
- protected virtual void OnProportionalGainChanged(Double proportionalgain)
- {
- ProportionalGainChanged?.Invoke(this, proportionalgain);
- RaisePropertyChanged(nameof(ProportionalGain));
- }
-
- /// <summary>
- /// Called when the PidActive has changed.
- /// </summary>
- protected virtual void OnPidActiveChanged(Boolean pidactive)
- {
- PidActiveChanged?.Invoke(this, pidactive);
- RaisePropertyChanged(nameof(PidActive));
- }
-
- /// <summary>
- /// Called when the Epsilon has changed.
- /// </summary>
- protected virtual void OnEpsilonChanged(Double epsilon)
- {
- EpsilonChanged?.Invoke(this, epsilon);
- RaisePropertyChanged(nameof(Epsilon));
- }
-
- /// <summary>
- /// Called when the Active has changed.
- /// </summary>
- protected virtual void OnActiveChanged(Boolean active)
- {
- ActiveChanged?.Invoke(this, active);
- RaisePropertyChanged(nameof(Active));
- }
-
- /// <summary>
- /// Called when the HardwarePidControlType has changed.
- /// </summary>
- protected virtual void OnHardwarePidControlTypeChanged(HardwarePidControlType hardwarepidcontroltype)
- {
- HardwarePidControlTypeChanged?.Invoke(this, hardwarepidcontroltype);
- RaisePropertyChanged(nameof(HardwarePidControlType));
- }
-
- /// <summary>
- /// Called when the HardwareVersion has changed.
- /// </summary>
- protected virtual void OnHardwareVersionChanged(HardwareVersion hardwareversion)
- {
- HardwareVersionChanged?.Invoke(this, hardwareversion);
- RaisePropertyChanged(nameof(HardwareVersion));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="HardwarePidControl" /> class.
/// </summary>
public HardwarePidControl() : base()
{
+
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwarePidControlBase.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwarePidControlBase.cs
new file mode 100644
index 000000000..0dbeb4c43
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/HardwarePidControlBase.cs
@@ -0,0 +1,921 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("HARDWARE_PID_CONTROLS")]
+ public abstract class HardwarePidControlBase : ObservableEntity<HardwarePidControl>
+ {
+
+ public event EventHandler<Double> OutputProportionalPowerLimitChanged;
+
+ public event EventHandler<Double> OutputProportionalBandChanged;
+
+ public event EventHandler<Double> IntegralTimeChanged;
+
+ public event EventHandler<Double> DerivativeTimeChanged;
+
+ public event EventHandler<Double> SensorCorrectionAdjustmentChanged;
+
+ public event EventHandler<Double> SensorMinValueChanged;
+
+ public event EventHandler<Double> SensorMaxValueChanged;
+
+ public event EventHandler<Double> SetPointRampRateorSoftStartRampChanged;
+
+ public event EventHandler<Double> SetPointControlOutputRateChanged;
+
+ public event EventHandler<Double> ControlOutputTypeChanged;
+
+ public event EventHandler<Double> SsrControlOutputTypeChanged;
+
+ public event EventHandler<Double> OutputOnOffHysteresisValueChanged;
+
+ public event EventHandler<Double> ProcessVariableSamplingRateChanged;
+
+ public event EventHandler<Double> PvInputFilterFactorModeChanged;
+
+ public event EventHandler<Int32> OutputProportionalCycleTimeChanged;
+
+ public event EventHandler<Int32> AcHeatersHalfCycleTimeChanged;
+
+ public event EventHandler<Double> ProportionalGainChanged;
+
+ public event EventHandler<Boolean> PidActiveChanged;
+
+ public event EventHandler<Double> EpsilonChanged;
+
+ public event EventHandler<Boolean> ActiveChanged;
+
+ public event EventHandler<HardwarePidControlType> HardwarePidControlTypeChanged;
+
+ public event EventHandler<HardwareVersion> HardwareVersionChanged;
+
+ protected String _hardwarepidcontroltypeguid;
+
+ /// <summary>
+ /// Gets or sets the hardwarepidcontrolbase hardware pid control type guid.
+ /// </summary>
+
+ [Column("HARDWARE_PID_CONTROL_TYPE_GUID")]
+ [ForeignKey("HardwarePidControlType")]
+
+ public String HardwarePidControlTypeGuid
+ {
+ get
+ {
+ return _hardwarepidcontroltypeguid;
+ }
+
+ set
+ {
+ if (_hardwarepidcontroltypeguid != value)
+ {
+ _hardwarepidcontroltypeguid = value;
+ }
+ }
+ }
+
+ protected String _hardwareversionguid;
+
+ /// <summary>
+ /// Gets or sets the hardwarepidcontrolbase hardware version guid.
+ /// </summary>
+
+ [Column("HARDWARE_VERSION_GUID")]
+ [ForeignKey("HardwareVersion")]
+
+ public String HardwareVersionGuid
+ {
+ get
+ {
+ return _hardwareversionguid;
+ }
+
+ set
+ {
+ if (_hardwareversionguid != value)
+ {
+ _hardwareversionguid = value;
+ }
+ }
+ }
+
+ protected Double _outputproportionalpowerlimit;
+
+ /// <summary>
+ /// Gets or sets the hardwarepidcontrolbase output proportional power limit.
+ /// </summary>
+
+ [Column("OUTPUT_PROPORTIONAL_POWER_LIMIT")]
+
+ public Double OutputProportionalPowerLimit
+ {
+ get
+ {
+ return _outputproportionalpowerlimit;
+ }
+
+ set
+ {
+ if (_outputproportionalpowerlimit != value)
+ {
+ _outputproportionalpowerlimit = value;
+
+ OnOutputProportionalPowerLimitChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _outputproportionalband;
+
+ /// <summary>
+ /// Gets or sets the hardwarepidcontrolbase output proportional band.
+ /// </summary>
+
+ [Column("OUTPUT_PROPORTIONAL_BAND")]
+
+ public Double OutputProportionalBand
+ {
+ get
+ {
+ return _outputproportionalband;
+ }
+
+ set
+ {
+ if (_outputproportionalband != value)
+ {
+ _outputproportionalband = value;
+
+ OnOutputProportionalBandChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _integraltime;
+
+ /// <summary>
+ /// Gets or sets the hardwarepidcontrolbase integral time.
+ /// </summary>
+
+ [Column("INTEGRAL_TIME")]
+
+ public Double IntegralTime
+ {
+ get
+ {
+ return _integraltime;
+ }
+
+ set
+ {
+ if (_integraltime != value)
+ {
+ _integraltime = value;
+
+ OnIntegralTimeChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _derivativetime;
+
+ /// <summary>
+ /// Gets or sets the hardwarepidcontrolbase derivative time.
+ /// </summary>
+
+ [Column("DERIVATIVE_TIME")]
+
+ public Double DerivativeTime
+ {
+ get
+ {
+ return _derivativetime;
+ }
+
+ set
+ {
+ if (_derivativetime != value)
+ {
+ _derivativetime = value;
+
+ OnDerivativeTimeChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _sensorcorrectionadjustment;
+
+ /// <summary>
+ /// Gets or sets the hardwarepidcontrolbase sensor correction adjustment.
+ /// </summary>
+
+ [Column("SENSOR_CORRECTION_ADJUSTMENT")]
+
+ public Double SensorCorrectionAdjustment
+ {
+ get
+ {
+ return _sensorcorrectionadjustment;
+ }
+
+ set
+ {
+ if (_sensorcorrectionadjustment != value)
+ {
+ _sensorcorrectionadjustment = value;
+
+ OnSensorCorrectionAdjustmentChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _sensorminvalue;
+
+ /// <summary>
+ /// Gets or sets the hardwarepidcontrolbase sensor min value.
+ /// </summary>
+
+ [Column("SENSOR_MIN_VALUE")]
+
+ public Double SensorMinValue
+ {
+ get
+ {
+ return _sensorminvalue;
+ }
+
+ set
+ {
+ if (_sensorminvalue != value)
+ {
+ _sensorminvalue = value;
+
+ OnSensorMinValueChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _sensormaxvalue;
+
+ /// <summary>
+ /// Gets or sets the hardwarepidcontrolbase sensor max value.
+ /// </summary>
+
+ [Column("SENSOR_MAX_VALUE")]
+
+ public Double SensorMaxValue
+ {
+ get
+ {
+ return _sensormaxvalue;
+ }
+
+ set
+ {
+ if (_sensormaxvalue != value)
+ {
+ _sensormaxvalue = value;
+
+ OnSensorMaxValueChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _setpointramprateorsoftstartramp;
+
+ /// <summary>
+ /// Gets or sets the hardwarepidcontrolbase set point ramp rateor soft start ramp.
+ /// </summary>
+
+ [Column("SET_POINT_RAMP_RATEOR_SOFT_START_RAMP")]
+
+ public Double SetPointRampRateorSoftStartRamp
+ {
+ get
+ {
+ return _setpointramprateorsoftstartramp;
+ }
+
+ set
+ {
+ if (_setpointramprateorsoftstartramp != value)
+ {
+ _setpointramprateorsoftstartramp = value;
+
+ OnSetPointRampRateorSoftStartRampChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _setpointcontroloutputrate;
+
+ /// <summary>
+ /// Gets or sets the hardwarepidcontrolbase set point control output rate.
+ /// </summary>
+
+ [Column("SET_POINT_CONTROL_OUTPUT_RATE")]
+
+ public Double SetPointControlOutputRate
+ {
+ get
+ {
+ return _setpointcontroloutputrate;
+ }
+
+ set
+ {
+ if (_setpointcontroloutputrate != value)
+ {
+ _setpointcontroloutputrate = value;
+
+ OnSetPointControlOutputRateChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _controloutputtype;
+
+ /// <summary>
+ /// Gets or sets the hardwarepidcontrolbase control output type.
+ /// </summary>
+
+ [Column("CONTROL_OUTPUT_TYPE")]
+
+ public Double ControlOutputType
+ {
+ get
+ {
+ return _controloutputtype;
+ }
+
+ set
+ {
+ if (_controloutputtype != value)
+ {
+ _controloutputtype = value;
+
+ OnControlOutputTypeChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _ssrcontroloutputtype;
+
+ /// <summary>
+ /// Gets or sets the hardwarepidcontrolbase ssr control output type.
+ /// </summary>
+
+ [Column("SSR_CONTROL_OUTPUT_TYPE")]
+
+ public Double SsrControlOutputType
+ {
+ get
+ {
+ return _ssrcontroloutputtype;
+ }
+
+ set
+ {
+ if (_ssrcontroloutputtype != value)
+ {
+ _ssrcontroloutputtype = value;
+
+ OnSsrControlOutputTypeChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _outputonoffhysteresisvalue;
+
+ /// <summary>
+ /// Gets or sets the hardwarepidcontrolbase output on off hysteresis value.
+ /// </summary>
+
+ [Column("OUTPUT_ON_OFF_HYSTERESIS_VALUE")]
+
+ public Double OutputOnOffHysteresisValue
+ {
+ get
+ {
+ return _outputonoffhysteresisvalue;
+ }
+
+ set
+ {
+ if (_outputonoffhysteresisvalue != value)
+ {
+ _outputonoffhysteresisvalue = value;
+
+ OnOutputOnOffHysteresisValueChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _processvariablesamplingrate;
+
+ /// <summary>
+ /// Gets or sets the hardwarepidcontrolbase process variable sampling rate.
+ /// </summary>
+
+ [Column("PROCESS_VARIABLE_SAMPLING_RATE")]
+
+ public Double ProcessVariableSamplingRate
+ {
+ get
+ {
+ return _processvariablesamplingrate;
+ }
+
+ set
+ {
+ if (_processvariablesamplingrate != value)
+ {
+ _processvariablesamplingrate = value;
+
+ OnProcessVariableSamplingRateChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _pvinputfilterfactormode;
+
+ /// <summary>
+ /// Gets or sets the hardwarepidcontrolbase pv input filter factor mode.
+ /// </summary>
+
+ [Column("PV_INPUT_FILTER_FACTOR_MODE")]
+
+ public Double PvInputFilterFactorMode
+ {
+ get
+ {
+ return _pvinputfilterfactormode;
+ }
+
+ set
+ {
+ if (_pvinputfilterfactormode != value)
+ {
+ _pvinputfilterfactormode = value;
+
+ OnPvInputFilterFactorModeChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _outputproportionalcycletime;
+
+ /// <summary>
+ /// Gets or sets the hardwarepidcontrolbase output proportional cycle time.
+ /// </summary>
+
+ [Column("OUTPUT_PROPORTIONAL_CYCLE_TIME")]
+
+ public Int32 OutputProportionalCycleTime
+ {
+ get
+ {
+ return _outputproportionalcycletime;
+ }
+
+ set
+ {
+ if (_outputproportionalcycletime != value)
+ {
+ _outputproportionalcycletime = value;
+
+ OnOutputProportionalCycleTimeChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _acheatershalfcycletime;
+
+ /// <summary>
+ /// Gets or sets the hardwarepidcontrolbase ac heaters half cycle time.
+ /// </summary>
+
+ [Column("AC_HEATERS__HALF_CYCLE_TIME")]
+
+ public Int32 AcHeatersHalfCycleTime
+ {
+ get
+ {
+ return _acheatershalfcycletime;
+ }
+
+ set
+ {
+ if (_acheatershalfcycletime != value)
+ {
+ _acheatershalfcycletime = value;
+
+ OnAcHeatersHalfCycleTimeChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _proportionalgain;
+
+ /// <summary>
+ /// Gets or sets the hardwarepidcontrolbase proportional gain.
+ /// </summary>
+
+ [Column("PROPORTIONAL_GAIN")]
+
+ public Double ProportionalGain
+ {
+ get
+ {
+ return _proportionalgain;
+ }
+
+ set
+ {
+ if (_proportionalgain != value)
+ {
+ _proportionalgain = value;
+
+ OnProportionalGainChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _pidactive;
+
+ /// <summary>
+ /// Gets or sets the hardwarepidcontrolbase pid active.
+ /// </summary>
+
+ [Column("PID_ACTIVE")]
+
+ public Boolean PidActive
+ {
+ get
+ {
+ return _pidactive;
+ }
+
+ set
+ {
+ if (_pidactive != value)
+ {
+ _pidactive = value;
+
+ OnPidActiveChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _epsilon;
+
+ /// <summary>
+ /// Gets or sets the hardwarepidcontrolbase epsilon.
+ /// </summary>
+
+ [Column("EPSILON")]
+
+ public Double Epsilon
+ {
+ get
+ {
+ return _epsilon;
+ }
+
+ set
+ {
+ if (_epsilon != value)
+ {
+ _epsilon = value;
+
+ OnEpsilonChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _active;
+
+ /// <summary>
+ /// Gets or sets the hardwarepidcontrolbase active.
+ /// </summary>
+
+ [Column("ACTIVE")]
+
+ public Boolean Active
+ {
+ get
+ {
+ return _active;
+ }
+
+ set
+ {
+ if (_active != value)
+ {
+ _active = value;
+
+ OnActiveChanged(value);
+
+ }
+ }
+ }
+
+ protected HardwarePidControlType _hardwarepidcontroltype;
+
+ /// <summary>
+ /// Gets or sets the hardwarepidcontrolbase hardware pid control types.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual HardwarePidControlType HardwarePidControlType
+ {
+ get
+ {
+ return _hardwarepidcontroltype;
+ }
+
+ set
+ {
+ if (_hardwarepidcontroltype != value)
+ {
+ _hardwarepidcontroltype = value;
+
+ OnHardwarePidControlTypeChanged(value);
+
+ }
+ }
+ }
+
+ protected HardwareVersion _hardwareversion;
+
+ /// <summary>
+ /// Gets or sets the hardwarepidcontrolbase hardware versions.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual HardwareVersion HardwareVersion
+ {
+ get
+ {
+ return _hardwareversion;
+ }
+
+ set
+ {
+ if (_hardwareversion != value)
+ {
+ _hardwareversion = value;
+
+ OnHardwareVersionChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the OutputProportionalPowerLimit has changed.
+ /// </summary>
+ protected virtual void OnOutputProportionalPowerLimitChanged(Double outputproportionalpowerlimit)
+ {
+ OutputProportionalPowerLimitChanged?.Invoke(this, outputproportionalpowerlimit);
+ RaisePropertyChanged(nameof(OutputProportionalPowerLimit));
+ }
+
+ /// <summary>
+ /// Called when the OutputProportionalBand has changed.
+ /// </summary>
+ protected virtual void OnOutputProportionalBandChanged(Double outputproportionalband)
+ {
+ OutputProportionalBandChanged?.Invoke(this, outputproportionalband);
+ RaisePropertyChanged(nameof(OutputProportionalBand));
+ }
+
+ /// <summary>
+ /// Called when the IntegralTime has changed.
+ /// </summary>
+ protected virtual void OnIntegralTimeChanged(Double integraltime)
+ {
+ IntegralTimeChanged?.Invoke(this, integraltime);
+ RaisePropertyChanged(nameof(IntegralTime));
+ }
+
+ /// <summary>
+ /// Called when the DerivativeTime has changed.
+ /// </summary>
+ protected virtual void OnDerivativeTimeChanged(Double derivativetime)
+ {
+ DerivativeTimeChanged?.Invoke(this, derivativetime);
+ RaisePropertyChanged(nameof(DerivativeTime));
+ }
+
+ /// <summary>
+ /// Called when the SensorCorrectionAdjustment has changed.
+ /// </summary>
+ protected virtual void OnSensorCorrectionAdjustmentChanged(Double sensorcorrectionadjustment)
+ {
+ SensorCorrectionAdjustmentChanged?.Invoke(this, sensorcorrectionadjustment);
+ RaisePropertyChanged(nameof(SensorCorrectionAdjustment));
+ }
+
+ /// <summary>
+ /// Called when the SensorMinValue has changed.
+ /// </summary>
+ protected virtual void OnSensorMinValueChanged(Double sensorminvalue)
+ {
+ SensorMinValueChanged?.Invoke(this, sensorminvalue);
+ RaisePropertyChanged(nameof(SensorMinValue));
+ }
+
+ /// <summary>
+ /// Called when the SensorMaxValue has changed.
+ /// </summary>
+ protected virtual void OnSensorMaxValueChanged(Double sensormaxvalue)
+ {
+ SensorMaxValueChanged?.Invoke(this, sensormaxvalue);
+ RaisePropertyChanged(nameof(SensorMaxValue));
+ }
+
+ /// <summary>
+ /// Called when the SetPointRampRateorSoftStartRamp has changed.
+ /// </summary>
+ protected virtual void OnSetPointRampRateorSoftStartRampChanged(Double setpointramprateorsoftstartramp)
+ {
+ SetPointRampRateorSoftStartRampChanged?.Invoke(this, setpointramprateorsoftstartramp);
+ RaisePropertyChanged(nameof(SetPointRampRateorSoftStartRamp));
+ }
+
+ /// <summary>
+ /// Called when the SetPointControlOutputRate has changed.
+ /// </summary>
+ protected virtual void OnSetPointControlOutputRateChanged(Double setpointcontroloutputrate)
+ {
+ SetPointControlOutputRateChanged?.Invoke(this, setpointcontroloutputrate);
+ RaisePropertyChanged(nameof(SetPointControlOutputRate));
+ }
+
+ /// <summary>
+ /// Called when the ControlOutputType has changed.
+ /// </summary>
+ protected virtual void OnControlOutputTypeChanged(Double controloutputtype)
+ {
+ ControlOutputTypeChanged?.Invoke(this, controloutputtype);
+ RaisePropertyChanged(nameof(ControlOutputType));
+ }
+
+ /// <summary>
+ /// Called when the SsrControlOutputType has changed.
+ /// </summary>
+ protected virtual void OnSsrControlOutputTypeChanged(Double ssrcontroloutputtype)
+ {
+ SsrControlOutputTypeChanged?.Invoke(this, ssrcontroloutputtype);
+ RaisePropertyChanged(nameof(SsrControlOutputType));
+ }
+
+ /// <summary>
+ /// Called when the OutputOnOffHysteresisValue has changed.
+ /// </summary>
+ protected virtual void OnOutputOnOffHysteresisValueChanged(Double outputonoffhysteresisvalue)
+ {
+ OutputOnOffHysteresisValueChanged?.Invoke(this, outputonoffhysteresisvalue);
+ RaisePropertyChanged(nameof(OutputOnOffHysteresisValue));
+ }
+
+ /// <summary>
+ /// Called when the ProcessVariableSamplingRate has changed.
+ /// </summary>
+ protected virtual void OnProcessVariableSamplingRateChanged(Double processvariablesamplingrate)
+ {
+ ProcessVariableSamplingRateChanged?.Invoke(this, processvariablesamplingrate);
+ RaisePropertyChanged(nameof(ProcessVariableSamplingRate));
+ }
+
+ /// <summary>
+ /// Called when the PvInputFilterFactorMode has changed.
+ /// </summary>
+ protected virtual void OnPvInputFilterFactorModeChanged(Double pvinputfilterfactormode)
+ {
+ PvInputFilterFactorModeChanged?.Invoke(this, pvinputfilterfactormode);
+ RaisePropertyChanged(nameof(PvInputFilterFactorMode));
+ }
+
+ /// <summary>
+ /// Called when the OutputProportionalCycleTime has changed.
+ /// </summary>
+ protected virtual void OnOutputProportionalCycleTimeChanged(Int32 outputproportionalcycletime)
+ {
+ OutputProportionalCycleTimeChanged?.Invoke(this, outputproportionalcycletime);
+ RaisePropertyChanged(nameof(OutputProportionalCycleTime));
+ }
+
+ /// <summary>
+ /// Called when the AcHeatersHalfCycleTime has changed.
+ /// </summary>
+ protected virtual void OnAcHeatersHalfCycleTimeChanged(Int32 acheatershalfcycletime)
+ {
+ AcHeatersHalfCycleTimeChanged?.Invoke(this, acheatershalfcycletime);
+ RaisePropertyChanged(nameof(AcHeatersHalfCycleTime));
+ }
+
+ /// <summary>
+ /// Called when the ProportionalGain has changed.
+ /// </summary>
+ protected virtual void OnProportionalGainChanged(Double proportionalgain)
+ {
+ ProportionalGainChanged?.Invoke(this, proportionalgain);
+ RaisePropertyChanged(nameof(ProportionalGain));
+ }
+
+ /// <summary>
+ /// Called when the PidActive has changed.
+ /// </summary>
+ protected virtual void OnPidActiveChanged(Boolean pidactive)
+ {
+ PidActiveChanged?.Invoke(this, pidactive);
+ RaisePropertyChanged(nameof(PidActive));
+ }
+
+ /// <summary>
+ /// Called when the Epsilon has changed.
+ /// </summary>
+ protected virtual void OnEpsilonChanged(Double epsilon)
+ {
+ EpsilonChanged?.Invoke(this, epsilon);
+ RaisePropertyChanged(nameof(Epsilon));
+ }
+
+ /// <summary>
+ /// Called when the Active has changed.
+ /// </summary>
+ protected virtual void OnActiveChanged(Boolean active)
+ {
+ ActiveChanged?.Invoke(this, active);
+ RaisePropertyChanged(nameof(Active));
+ }
+
+ /// <summary>
+ /// Called when the HardwarePidControlType has changed.
+ /// </summary>
+ protected virtual void OnHardwarePidControlTypeChanged(HardwarePidControlType hardwarepidcontroltype)
+ {
+ HardwarePidControlTypeChanged?.Invoke(this, hardwarepidcontroltype);
+ RaisePropertyChanged(nameof(HardwarePidControlType));
+ }
+
+ /// <summary>
+ /// Called when the HardwareVersion has changed.
+ /// </summary>
+ protected virtual void OnHardwareVersionChanged(HardwareVersion hardwareversion)
+ {
+ HardwareVersionChanged?.Invoke(this, hardwareversion);
+ RaisePropertyChanged(nameof(HardwareVersion));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="HardwarePidControlBase" /> class.
+ /// </summary>
+ public HardwarePidControlBase() : base()
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwarePidControlType.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwarePidControlType.cs
index a968ba355..05ed91b4d 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/HardwarePidControlType.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/HardwarePidControlType.cs
@@ -1,188 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("HARDWARE_PID_CONTROL_TYPES")]
- public partial class HardwarePidControlType : ObservableEntity<HardwarePidControlType>
+ public partial class HardwarePidControlType : HardwarePidControlTypeBase
{
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<String> DescriptionChanged;
-
- public event EventHandler<SynchronizedObservableCollection<HardwarePidControl>> HardwarePidControlsChanged;
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the hardwarepidcontroltype code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the hardwarepidcontroltype name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected String _description;
-
- /// <summary>
- /// Gets or sets the hardwarepidcontroltype description.
- /// </summary>
-
- [Column("DESCRIPTION")]
-
- public String Description
- {
- get
- {
- return _description;
- }
-
- set
- {
- if (_description != value)
- {
- _description = value;
-
- OnDescriptionChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<HardwarePidControl> _hardwarepidcontrols;
-
- /// <summary>
- /// Gets or sets the hardwarepidcontroltype hardware pid controls.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<HardwarePidControl> HardwarePidControls
- {
- get
- {
- return _hardwarepidcontrols;
- }
-
- set
- {
- if (_hardwarepidcontrols != value)
- {
- _hardwarepidcontrols = value;
-
- OnHardwarePidControlsChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Description has changed.
- /// </summary>
- protected virtual void OnDescriptionChanged(String description)
- {
- DescriptionChanged?.Invoke(this, description);
- RaisePropertyChanged(nameof(Description));
- }
-
- /// <summary>
- /// Called when the HardwarePidControls has changed.
- /// </summary>
- protected virtual void OnHardwarePidControlsChanged(SynchronizedObservableCollection<HardwarePidControl> hardwarepidcontrols)
- {
- HardwarePidControlsChanged?.Invoke(this, hardwarepidcontrols);
- RaisePropertyChanged(nameof(HardwarePidControls));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="HardwarePidControlType" /> class.
/// </summary>
public HardwarePidControlType() : base()
{
- HardwarePidControls = new SynchronizedObservableCollection<HardwarePidControl>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwarePidControlTypeBase.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwarePidControlTypeBase.cs
new file mode 100644
index 000000000..bec6675b6
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/HardwarePidControlTypeBase.cs
@@ -0,0 +1,188 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("HARDWARE_PID_CONTROL_TYPES")]
+ public abstract class HardwarePidControlTypeBase : ObservableEntity<HardwarePidControlType>
+ {
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<String> DescriptionChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<HardwarePidControl>> HardwarePidControlsChanged;
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the hardwarepidcontroltypebase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the hardwarepidcontroltypebase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _description;
+
+ /// <summary>
+ /// Gets or sets the hardwarepidcontroltypebase description.
+ /// </summary>
+
+ [Column("DESCRIPTION")]
+
+ public String Description
+ {
+ get
+ {
+ return _description;
+ }
+
+ set
+ {
+ if (_description != value)
+ {
+ _description = value;
+
+ OnDescriptionChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<HardwarePidControl> _hardwarepidcontrols;
+
+ /// <summary>
+ /// Gets or sets the hardwarepidcontroltypebase hardware pid controls.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<HardwarePidControl> HardwarePidControls
+ {
+ get
+ {
+ return _hardwarepidcontrols;
+ }
+
+ set
+ {
+ if (_hardwarepidcontrols != value)
+ {
+ _hardwarepidcontrols = value;
+
+ OnHardwarePidControlsChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Description has changed.
+ /// </summary>
+ protected virtual void OnDescriptionChanged(String description)
+ {
+ DescriptionChanged?.Invoke(this, description);
+ RaisePropertyChanged(nameof(Description));
+ }
+
+ /// <summary>
+ /// Called when the HardwarePidControls has changed.
+ /// </summary>
+ protected virtual void OnHardwarePidControlsChanged(SynchronizedObservableCollection<HardwarePidControl> hardwarepidcontrols)
+ {
+ HardwarePidControlsChanged?.Invoke(this, hardwarepidcontrols);
+ RaisePropertyChanged(nameof(HardwarePidControls));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="HardwarePidControlTypeBase" /> class.
+ /// </summary>
+ public HardwarePidControlTypeBase() : base()
+ {
+
+ HardwarePidControls = new SynchronizedObservableCollection<HardwarePidControl>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareSpeedSensor.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareSpeedSensor.cs
index 7c6550259..0c8631e70 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/HardwareSpeedSensor.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareSpeedSensor.cs
@@ -1,275 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("HARDWARE_SPEED_SENSORS")]
- public partial class HardwareSpeedSensor : ObservableEntity<HardwareSpeedSensor>
+ public partial class HardwareSpeedSensor : HardwareSpeedSensorBase
{
-
- public event EventHandler<Int32> ResolutionBitsChanged;
-
- public event EventHandler<Double> PerimeterChanged;
-
- public event EventHandler<Boolean> ActiveChanged;
-
- public event EventHandler<HardwareSpeedSensorType> HardwareSpeedSensorTypeChanged;
-
- public event EventHandler<HardwareVersion> HardwareVersionChanged;
-
- protected String _hardwarespeedsensortypeguid;
-
- /// <summary>
- /// Gets or sets the hardwarespeedsensor hardware speed sensor type guid.
- /// </summary>
-
- [Column("HARDWARE_SPEED_SENSOR_TYPE_GUID")]
- [ForeignKey("HardwareSpeedSensorType")]
-
- public String HardwareSpeedSensorTypeGuid
- {
- get
- {
- return _hardwarespeedsensortypeguid;
- }
-
- set
- {
- if (_hardwarespeedsensortypeguid != value)
- {
- _hardwarespeedsensortypeguid = value;
- }
- }
- }
-
- protected String _hardwareversionguid;
-
- /// <summary>
- /// Gets or sets the hardwarespeedsensor hardware version guid.
- /// </summary>
-
- [Column("HARDWARE_VERSION_GUID")]
- [ForeignKey("HardwareVersion")]
-
- public String HardwareVersionGuid
- {
- get
- {
- return _hardwareversionguid;
- }
-
- set
- {
- if (_hardwareversionguid != value)
- {
- _hardwareversionguid = value;
- }
- }
- }
-
- protected Int32 _resolutionbits;
-
- /// <summary>
- /// Gets or sets the hardwarespeedsensor resolution bits.
- /// </summary>
-
- [Column("RESOLUTION_BITS")]
-
- public Int32 ResolutionBits
- {
- get
- {
- return _resolutionbits;
- }
-
- set
- {
- if (_resolutionbits != value)
- {
- _resolutionbits = value;
-
- OnResolutionBitsChanged(value);
-
- }
- }
- }
-
- protected Double _perimeter;
-
- /// <summary>
- /// Gets or sets the hardwarespeedsensor perimeter.
- /// </summary>
-
- [Column("PERIMETER")]
-
- public Double Perimeter
- {
- get
- {
- return _perimeter;
- }
-
- set
- {
- if (_perimeter != value)
- {
- _perimeter = value;
-
- OnPerimeterChanged(value);
-
- }
- }
- }
-
- protected Boolean _active;
-
- /// <summary>
- /// Gets or sets the hardwarespeedsensor active.
- /// </summary>
-
- [Column("ACTIVE")]
-
- public Boolean Active
- {
- get
- {
- return _active;
- }
-
- set
- {
- if (_active != value)
- {
- _active = value;
-
- OnActiveChanged(value);
-
- }
- }
- }
-
- protected HardwareSpeedSensorType _hardwarespeedsensortype;
-
- /// <summary>
- /// Gets or sets the hardwarespeedsensor hardware speed sensor types.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual HardwareSpeedSensorType HardwareSpeedSensorType
- {
- get
- {
- return _hardwarespeedsensortype;
- }
-
- set
- {
- if (_hardwarespeedsensortype != value)
- {
- _hardwarespeedsensortype = value;
-
- OnHardwareSpeedSensorTypeChanged(value);
-
- }
- }
- }
-
- protected HardwareVersion _hardwareversion;
-
- /// <summary>
- /// Gets or sets the hardwarespeedsensor hardware versions.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual HardwareVersion HardwareVersion
- {
- get
- {
- return _hardwareversion;
- }
-
- set
- {
- if (_hardwareversion != value)
- {
- _hardwareversion = value;
-
- OnHardwareVersionChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the ResolutionBits has changed.
- /// </summary>
- protected virtual void OnResolutionBitsChanged(Int32 resolutionbits)
- {
- ResolutionBitsChanged?.Invoke(this, resolutionbits);
- RaisePropertyChanged(nameof(ResolutionBits));
- }
-
- /// <summary>
- /// Called when the Perimeter has changed.
- /// </summary>
- protected virtual void OnPerimeterChanged(Double perimeter)
- {
- PerimeterChanged?.Invoke(this, perimeter);
- RaisePropertyChanged(nameof(Perimeter));
- }
-
- /// <summary>
- /// Called when the Active has changed.
- /// </summary>
- protected virtual void OnActiveChanged(Boolean active)
- {
- ActiveChanged?.Invoke(this, active);
- RaisePropertyChanged(nameof(Active));
- }
-
- /// <summary>
- /// Called when the HardwareSpeedSensorType has changed.
- /// </summary>
- protected virtual void OnHardwareSpeedSensorTypeChanged(HardwareSpeedSensorType hardwarespeedsensortype)
- {
- HardwareSpeedSensorTypeChanged?.Invoke(this, hardwarespeedsensortype);
- RaisePropertyChanged(nameof(HardwareSpeedSensorType));
- }
-
- /// <summary>
- /// Called when the HardwareVersion has changed.
- /// </summary>
- protected virtual void OnHardwareVersionChanged(HardwareVersion hardwareversion)
- {
- HardwareVersionChanged?.Invoke(this, hardwareversion);
- RaisePropertyChanged(nameof(HardwareVersion));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="HardwareSpeedSensor" /> class.
/// </summary>
public HardwareSpeedSensor() : base()
{
+
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareSpeedSensorBase.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareSpeedSensorBase.cs
new file mode 100644
index 000000000..36a74c15b
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareSpeedSensorBase.cs
@@ -0,0 +1,275 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("HARDWARE_SPEED_SENSORS")]
+ public abstract class HardwareSpeedSensorBase : ObservableEntity<HardwareSpeedSensor>
+ {
+
+ public event EventHandler<Int32> ResolutionBitsChanged;
+
+ public event EventHandler<Double> PerimeterChanged;
+
+ public event EventHandler<Boolean> ActiveChanged;
+
+ public event EventHandler<HardwareSpeedSensorType> HardwareSpeedSensorTypeChanged;
+
+ public event EventHandler<HardwareVersion> HardwareVersionChanged;
+
+ protected String _hardwarespeedsensortypeguid;
+
+ /// <summary>
+ /// Gets or sets the hardwarespeedsensorbase hardware speed sensor type guid.
+ /// </summary>
+
+ [Column("HARDWARE_SPEED_SENSOR_TYPE_GUID")]
+ [ForeignKey("HardwareSpeedSensorType")]
+
+ public String HardwareSpeedSensorTypeGuid
+ {
+ get
+ {
+ return _hardwarespeedsensortypeguid;
+ }
+
+ set
+ {
+ if (_hardwarespeedsensortypeguid != value)
+ {
+ _hardwarespeedsensortypeguid = value;
+ }
+ }
+ }
+
+ protected String _hardwareversionguid;
+
+ /// <summary>
+ /// Gets or sets the hardwarespeedsensorbase hardware version guid.
+ /// </summary>
+
+ [Column("HARDWARE_VERSION_GUID")]
+ [ForeignKey("HardwareVersion")]
+
+ public String HardwareVersionGuid
+ {
+ get
+ {
+ return _hardwareversionguid;
+ }
+
+ set
+ {
+ if (_hardwareversionguid != value)
+ {
+ _hardwareversionguid = value;
+ }
+ }
+ }
+
+ protected Int32 _resolutionbits;
+
+ /// <summary>
+ /// Gets or sets the hardwarespeedsensorbase resolution bits.
+ /// </summary>
+
+ [Column("RESOLUTION_BITS")]
+
+ public Int32 ResolutionBits
+ {
+ get
+ {
+ return _resolutionbits;
+ }
+
+ set
+ {
+ if (_resolutionbits != value)
+ {
+ _resolutionbits = value;
+
+ OnResolutionBitsChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _perimeter;
+
+ /// <summary>
+ /// Gets or sets the hardwarespeedsensorbase perimeter.
+ /// </summary>
+
+ [Column("PERIMETER")]
+
+ public Double Perimeter
+ {
+ get
+ {
+ return _perimeter;
+ }
+
+ set
+ {
+ if (_perimeter != value)
+ {
+ _perimeter = value;
+
+ OnPerimeterChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _active;
+
+ /// <summary>
+ /// Gets or sets the hardwarespeedsensorbase active.
+ /// </summary>
+
+ [Column("ACTIVE")]
+
+ public Boolean Active
+ {
+ get
+ {
+ return _active;
+ }
+
+ set
+ {
+ if (_active != value)
+ {
+ _active = value;
+
+ OnActiveChanged(value);
+
+ }
+ }
+ }
+
+ protected HardwareSpeedSensorType _hardwarespeedsensortype;
+
+ /// <summary>
+ /// Gets or sets the hardwarespeedsensorbase hardware speed sensor types.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual HardwareSpeedSensorType HardwareSpeedSensorType
+ {
+ get
+ {
+ return _hardwarespeedsensortype;
+ }
+
+ set
+ {
+ if (_hardwarespeedsensortype != value)
+ {
+ _hardwarespeedsensortype = value;
+
+ OnHardwareSpeedSensorTypeChanged(value);
+
+ }
+ }
+ }
+
+ protected HardwareVersion _hardwareversion;
+
+ /// <summary>
+ /// Gets or sets the hardwarespeedsensorbase hardware versions.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual HardwareVersion HardwareVersion
+ {
+ get
+ {
+ return _hardwareversion;
+ }
+
+ set
+ {
+ if (_hardwareversion != value)
+ {
+ _hardwareversion = value;
+
+ OnHardwareVersionChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the ResolutionBits has changed.
+ /// </summary>
+ protected virtual void OnResolutionBitsChanged(Int32 resolutionbits)
+ {
+ ResolutionBitsChanged?.Invoke(this, resolutionbits);
+ RaisePropertyChanged(nameof(ResolutionBits));
+ }
+
+ /// <summary>
+ /// Called when the Perimeter has changed.
+ /// </summary>
+ protected virtual void OnPerimeterChanged(Double perimeter)
+ {
+ PerimeterChanged?.Invoke(this, perimeter);
+ RaisePropertyChanged(nameof(Perimeter));
+ }
+
+ /// <summary>
+ /// Called when the Active has changed.
+ /// </summary>
+ protected virtual void OnActiveChanged(Boolean active)
+ {
+ ActiveChanged?.Invoke(this, active);
+ RaisePropertyChanged(nameof(Active));
+ }
+
+ /// <summary>
+ /// Called when the HardwareSpeedSensorType has changed.
+ /// </summary>
+ protected virtual void OnHardwareSpeedSensorTypeChanged(HardwareSpeedSensorType hardwarespeedsensortype)
+ {
+ HardwareSpeedSensorTypeChanged?.Invoke(this, hardwarespeedsensortype);
+ RaisePropertyChanged(nameof(HardwareSpeedSensorType));
+ }
+
+ /// <summary>
+ /// Called when the HardwareVersion has changed.
+ /// </summary>
+ protected virtual void OnHardwareVersionChanged(HardwareVersion hardwareversion)
+ {
+ HardwareVersionChanged?.Invoke(this, hardwareversion);
+ RaisePropertyChanged(nameof(HardwareVersion));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="HardwareSpeedSensorBase" /> class.
+ /// </summary>
+ public HardwareSpeedSensorBase() : base()
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareSpeedSensorType.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareSpeedSensorType.cs
index f3a231191..a3f51dbea 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/HardwareSpeedSensorType.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareSpeedSensorType.cs
@@ -1,188 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("HARDWARE_SPEED_SENSOR_TYPES")]
- public partial class HardwareSpeedSensorType : ObservableEntity<HardwareSpeedSensorType>
+ public partial class HardwareSpeedSensorType : HardwareSpeedSensorTypeBase
{
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<String> DescriptionChanged;
-
- public event EventHandler<SynchronizedObservableCollection<HardwareSpeedSensor>> HardwareSpeedSensorsChanged;
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the hardwarespeedsensortype code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the hardwarespeedsensortype name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected String _description;
-
- /// <summary>
- /// Gets or sets the hardwarespeedsensortype description.
- /// </summary>
-
- [Column("DESCRIPTION")]
-
- public String Description
- {
- get
- {
- return _description;
- }
-
- set
- {
- if (_description != value)
- {
- _description = value;
-
- OnDescriptionChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<HardwareSpeedSensor> _hardwarespeedsensors;
-
- /// <summary>
- /// Gets or sets the hardwarespeedsensortype hardware speed sensors.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<HardwareSpeedSensor> HardwareSpeedSensors
- {
- get
- {
- return _hardwarespeedsensors;
- }
-
- set
- {
- if (_hardwarespeedsensors != value)
- {
- _hardwarespeedsensors = value;
-
- OnHardwareSpeedSensorsChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Description has changed.
- /// </summary>
- protected virtual void OnDescriptionChanged(String description)
- {
- DescriptionChanged?.Invoke(this, description);
- RaisePropertyChanged(nameof(Description));
- }
-
- /// <summary>
- /// Called when the HardwareSpeedSensors has changed.
- /// </summary>
- protected virtual void OnHardwareSpeedSensorsChanged(SynchronizedObservableCollection<HardwareSpeedSensor> hardwarespeedsensors)
- {
- HardwareSpeedSensorsChanged?.Invoke(this, hardwarespeedsensors);
- RaisePropertyChanged(nameof(HardwareSpeedSensors));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="HardwareSpeedSensorType" /> class.
/// </summary>
public HardwareSpeedSensorType() : base()
{
- HardwareSpeedSensors = new SynchronizedObservableCollection<HardwareSpeedSensor>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareSpeedSensorTypeBase.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareSpeedSensorTypeBase.cs
new file mode 100644
index 000000000..d7bde826d
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareSpeedSensorTypeBase.cs
@@ -0,0 +1,188 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("HARDWARE_SPEED_SENSOR_TYPES")]
+ public abstract class HardwareSpeedSensorTypeBase : ObservableEntity<HardwareSpeedSensorType>
+ {
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<String> DescriptionChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<HardwareSpeedSensor>> HardwareSpeedSensorsChanged;
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the hardwarespeedsensortypebase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the hardwarespeedsensortypebase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _description;
+
+ /// <summary>
+ /// Gets or sets the hardwarespeedsensortypebase description.
+ /// </summary>
+
+ [Column("DESCRIPTION")]
+
+ public String Description
+ {
+ get
+ {
+ return _description;
+ }
+
+ set
+ {
+ if (_description != value)
+ {
+ _description = value;
+
+ OnDescriptionChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<HardwareSpeedSensor> _hardwarespeedsensors;
+
+ /// <summary>
+ /// Gets or sets the hardwarespeedsensortypebase hardware speed sensors.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<HardwareSpeedSensor> HardwareSpeedSensors
+ {
+ get
+ {
+ return _hardwarespeedsensors;
+ }
+
+ set
+ {
+ if (_hardwarespeedsensors != value)
+ {
+ _hardwarespeedsensors = value;
+
+ OnHardwareSpeedSensorsChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Description has changed.
+ /// </summary>
+ protected virtual void OnDescriptionChanged(String description)
+ {
+ DescriptionChanged?.Invoke(this, description);
+ RaisePropertyChanged(nameof(Description));
+ }
+
+ /// <summary>
+ /// Called when the HardwareSpeedSensors has changed.
+ /// </summary>
+ protected virtual void OnHardwareSpeedSensorsChanged(SynchronizedObservableCollection<HardwareSpeedSensor> hardwarespeedsensors)
+ {
+ HardwareSpeedSensorsChanged?.Invoke(this, hardwarespeedsensors);
+ RaisePropertyChanged(nameof(HardwareSpeedSensors));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="HardwareSpeedSensorTypeBase" /> class.
+ /// </summary>
+ public HardwareSpeedSensorTypeBase() : base()
+ {
+
+ HardwareSpeedSensors = new SynchronizedObservableCollection<HardwareSpeedSensor>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareVersion.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareVersion.cs
index b9759e782..a7c31ff05 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/HardwareVersion.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareVersion.cs
@@ -1,392 +1,44 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("HARDWARE_VERSIONS")]
- public partial class HardwareVersion : ObservableEntity<HardwareVersion>
+ public partial class HardwareVersion : HardwareVersionBase
{
-
- public event EventHandler<Double> VersionChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Configuration>> ConfigurationsChanged;
-
- public event EventHandler<SynchronizedObservableCollection<HardwareBlower>> HardwareBlowersChanged;
-
- public event EventHandler<SynchronizedObservableCollection<HardwareBreakSensor>> HardwareBreakSensorsChanged;
-
- public event EventHandler<SynchronizedObservableCollection<HardwareDancer>> HardwareDancersChanged;
-
- public event EventHandler<SynchronizedObservableCollection<HardwareMotor>> HardwareMotorsChanged;
-
- public event EventHandler<SynchronizedObservableCollection<HardwarePidControl>> HardwarePidControlsChanged;
-
- public event EventHandler<SynchronizedObservableCollection<HardwareSpeedSensor>> HardwareSpeedSensorsChanged;
-
- public event EventHandler<SynchronizedObservableCollection<HardwareWinder>> HardwareWindersChanged;
-
- protected Double _version;
-
- /// <summary>
- /// Gets or sets the hardwareversion version.
- /// </summary>
-
- [Column("VERSION")]
-
- public Double Version
- {
- get
- {
- return _version;
- }
-
- set
- {
- if (_version != value)
- {
- _version = value;
-
- OnVersionChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the hardwareversion name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<Configuration> _configurations;
-
- /// <summary>
- /// Gets or sets the hardwareversion configurations.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Configuration> Configurations
- {
- get
- {
- return _configurations;
- }
-
- set
- {
- if (_configurations != value)
- {
- _configurations = value;
-
- OnConfigurationsChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<HardwareBlower> _hardwareblowers;
-
- /// <summary>
- /// Gets or sets the hardwareversion hardware blowers.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<HardwareBlower> HardwareBlowers
- {
- get
- {
- return _hardwareblowers;
- }
-
- set
- {
- if (_hardwareblowers != value)
- {
- _hardwareblowers = value;
-
- OnHardwareBlowersChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<HardwareBreakSensor> _hardwarebreaksensors;
-
- /// <summary>
- /// Gets or sets the hardwareversion hardware break sensors.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<HardwareBreakSensor> HardwareBreakSensors
- {
- get
- {
- return _hardwarebreaksensors;
- }
-
- set
- {
- if (_hardwarebreaksensors != value)
- {
- _hardwarebreaksensors = value;
-
- OnHardwareBreakSensorsChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<HardwareDancer> _hardwaredancers;
-
- /// <summary>
- /// Gets or sets the hardwareversion hardware dancers.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<HardwareDancer> HardwareDancers
- {
- get
- {
- return _hardwaredancers;
- }
-
- set
- {
- if (_hardwaredancers != value)
- {
- _hardwaredancers = value;
-
- OnHardwareDancersChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<HardwareMotor> _hardwaremotors;
-
- /// <summary>
- /// Gets or sets the hardwareversion hardware motors.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<HardwareMotor> HardwareMotors
- {
- get
- {
- return _hardwaremotors;
- }
-
- set
- {
- if (_hardwaremotors != value)
- {
- _hardwaremotors = value;
-
- OnHardwareMotorsChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<HardwarePidControl> _hardwarepidcontrols;
-
- /// <summary>
- /// Gets or sets the hardwareversion hardware pid controls.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<HardwarePidControl> HardwarePidControls
+ public override HardwareVersion Clone()
{
- get
- {
- return _hardwarepidcontrols;
- }
-
- set
- {
- if (_hardwarepidcontrols != value)
- {
- _hardwarepidcontrols = value;
-
- OnHardwarePidControlsChanged(value);
-
- }
- }
+ var cloned = base.Clone();
+ cloned.HardwareMotors = HardwareMotors.Select(x => x.Clone(y => y.HardwareVersion = cloned)).ToSynchronizedObservableCollection();
+ cloned.HardwareDancers = HardwareDancers.Select(x => x.Clone(y => y.HardwareVersion = cloned)).ToSynchronizedObservableCollection();
+ cloned.HardwarePidControls = HardwarePidControls.Select(x => x.Clone(y => y.HardwareVersion = cloned)).ToSynchronizedObservableCollection();
+ cloned.HardwareWinders = HardwareWinders.Select(x => x.Clone(y => y.HardwareVersion = cloned)).ToSynchronizedObservableCollection();
+ cloned.HardwareSpeedSensors = HardwareSpeedSensors.Select(x => x.Clone(y => y.HardwareVersion = cloned)).ToSynchronizedObservableCollection();
+ cloned.HardwareBlowers = HardwareBlowers.Select(x => x.Clone(y => y.HardwareVersion = cloned)).ToSynchronizedObservableCollection();
+ cloned.HardwareBreakSensors = HardwareBreakSensors.Select(x => x.Clone(y => y.HardwareVersion = cloned)).ToSynchronizedObservableCollection();
+ return cloned;
}
- protected SynchronizedObservableCollection<HardwareSpeedSensor> _hardwarespeedsensors;
-
- /// <summary>
- /// Gets or sets the hardwareversion hardware speed sensors.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<HardwareSpeedSensor> HardwareSpeedSensors
+ public override void Delete(ObservablesContext context)
{
- get
- {
- return _hardwarespeedsensors;
- }
-
- set
- {
- if (_hardwarespeedsensors != value)
- {
- _hardwarespeedsensors = value;
-
- OnHardwareSpeedSensorsChanged(value);
-
- }
- }
+ HardwareDancers.ToList().ForEach(x => x.DefferedDelete(context));
+ HardwareMotors.ToList().ForEach(x => x.DefferedDelete(context));
+ HardwarePidControls.ToList().ForEach(x => x.DefferedDelete(context));
+ HardwareWinders.ToList().ForEach(x => x.DefferedDelete(context));
+ HardwareSpeedSensors.ToList().ForEach(x => x.DefferedDelete(context));
+ HardwareBlowers.ToList().ForEach(x => x.DefferedDelete(context));
+ HardwareBreakSensors.ToList().ForEach(x => x.DefferedDelete(context));
+ base.Delete(context);
}
- protected SynchronizedObservableCollection<HardwareWinder> _hardwarewinders;
-
- /// <summary>
- /// Gets or sets the hardwareversion hardware winders.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<HardwareWinder> HardwareWinders
+ public override List<string> GetIgnoreProperties()
{
- get
+ return base.GetIgnoreProperties().Concat(new List<String>()
{
- return _hardwarewinders;
- }
-
- set
- {
- if (_hardwarewinders != value)
- {
- _hardwarewinders = value;
-
- OnHardwareWindersChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Version has changed.
- /// </summary>
- protected virtual void OnVersionChanged(Double version)
- {
- VersionChanged?.Invoke(this, version);
- RaisePropertyChanged(nameof(Version));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Configurations has changed.
- /// </summary>
- protected virtual void OnConfigurationsChanged(SynchronizedObservableCollection<Configuration> configurations)
- {
- ConfigurationsChanged?.Invoke(this, configurations);
- RaisePropertyChanged(nameof(Configurations));
- }
-
- /// <summary>
- /// Called when the HardwareBlowers has changed.
- /// </summary>
- protected virtual void OnHardwareBlowersChanged(SynchronizedObservableCollection<HardwareBlower> hardwareblowers)
- {
- HardwareBlowersChanged?.Invoke(this, hardwareblowers);
- RaisePropertyChanged(nameof(HardwareBlowers));
- }
-
- /// <summary>
- /// Called when the HardwareBreakSensors has changed.
- /// </summary>
- protected virtual void OnHardwareBreakSensorsChanged(SynchronizedObservableCollection<HardwareBreakSensor> hardwarebreaksensors)
- {
- HardwareBreakSensorsChanged?.Invoke(this, hardwarebreaksensors);
- RaisePropertyChanged(nameof(HardwareBreakSensors));
- }
-
- /// <summary>
- /// Called when the HardwareDancers has changed.
- /// </summary>
- protected virtual void OnHardwareDancersChanged(SynchronizedObservableCollection<HardwareDancer> hardwaredancers)
- {
- HardwareDancersChanged?.Invoke(this, hardwaredancers);
- RaisePropertyChanged(nameof(HardwareDancers));
- }
-
- /// <summary>
- /// Called when the HardwareMotors has changed.
- /// </summary>
- protected virtual void OnHardwareMotorsChanged(SynchronizedObservableCollection<HardwareMotor> hardwaremotors)
- {
- HardwareMotorsChanged?.Invoke(this, hardwaremotors);
- RaisePropertyChanged(nameof(HardwareMotors));
- }
-
- /// <summary>
- /// Called when the HardwarePidControls has changed.
- /// </summary>
- protected virtual void OnHardwarePidControlsChanged(SynchronizedObservableCollection<HardwarePidControl> hardwarepidcontrols)
- {
- HardwarePidControlsChanged?.Invoke(this, hardwarepidcontrols);
- RaisePropertyChanged(nameof(HardwarePidControls));
- }
-
- /// <summary>
- /// Called when the HardwareSpeedSensors has changed.
- /// </summary>
- protected virtual void OnHardwareSpeedSensorsChanged(SynchronizedObservableCollection<HardwareSpeedSensor> hardwarespeedsensors)
- {
- HardwareSpeedSensorsChanged?.Invoke(this, hardwarespeedsensors);
- RaisePropertyChanged(nameof(HardwareSpeedSensors));
- }
-
- /// <summary>
- /// Called when the HardwareWinders has changed.
- /// </summary>
- protected virtual void OnHardwareWindersChanged(SynchronizedObservableCollection<HardwareWinder> hardwarewinders)
- {
- HardwareWindersChanged?.Invoke(this, hardwarewinders);
- RaisePropertyChanged(nameof(HardwareWinders));
+ nameof(this.Configurations),
+ }).ToList();
}
/// <summary>
@@ -395,22 +47,6 @@ namespace Tango.BL.Entities
public HardwareVersion() : base()
{
- Configurations = new SynchronizedObservableCollection<Configuration>();
-
- HardwareBlowers = new SynchronizedObservableCollection<HardwareBlower>();
-
- HardwareBreakSensors = new SynchronizedObservableCollection<HardwareBreakSensor>();
-
- HardwareDancers = new SynchronizedObservableCollection<HardwareDancer>();
-
- HardwareMotors = new SynchronizedObservableCollection<HardwareMotor>();
-
- HardwarePidControls = new SynchronizedObservableCollection<HardwarePidControl>();
-
- HardwareSpeedSensors = new SynchronizedObservableCollection<HardwareSpeedSensor>();
-
- HardwareWinders = new SynchronizedObservableCollection<HardwareWinder>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareVersionBase.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareVersionBase.cs
new file mode 100644
index 000000000..3989e96e9
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareVersionBase.cs
@@ -0,0 +1,416 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("HARDWARE_VERSIONS")]
+ public abstract class HardwareVersionBase : ObservableEntity<HardwareVersion>
+ {
+
+ public event EventHandler<Double> VersionChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Configuration>> ConfigurationsChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<HardwareBlower>> HardwareBlowersChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<HardwareBreakSensor>> HardwareBreakSensorsChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<HardwareDancer>> HardwareDancersChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<HardwareMotor>> HardwareMotorsChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<HardwarePidControl>> HardwarePidControlsChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<HardwareSpeedSensor>> HardwareSpeedSensorsChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<HardwareWinder>> HardwareWindersChanged;
+
+ protected Double _version;
+
+ /// <summary>
+ /// Gets or sets the hardwareversionbase version.
+ /// </summary>
+
+ [Column("VERSION")]
+
+ public Double Version
+ {
+ get
+ {
+ return _version;
+ }
+
+ set
+ {
+ if (_version != value)
+ {
+ _version = value;
+
+ OnVersionChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the hardwareversionbase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Configuration> _configurations;
+
+ /// <summary>
+ /// Gets or sets the hardwareversionbase configurations.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Configuration> Configurations
+ {
+ get
+ {
+ return _configurations;
+ }
+
+ set
+ {
+ if (_configurations != value)
+ {
+ _configurations = value;
+
+ OnConfigurationsChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<HardwareBlower> _hardwareblowers;
+
+ /// <summary>
+ /// Gets or sets the hardwareversionbase hardware blowers.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<HardwareBlower> HardwareBlowers
+ {
+ get
+ {
+ return _hardwareblowers;
+ }
+
+ set
+ {
+ if (_hardwareblowers != value)
+ {
+ _hardwareblowers = value;
+
+ OnHardwareBlowersChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<HardwareBreakSensor> _hardwarebreaksensors;
+
+ /// <summary>
+ /// Gets or sets the hardwareversionbase hardware break sensors.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<HardwareBreakSensor> HardwareBreakSensors
+ {
+ get
+ {
+ return _hardwarebreaksensors;
+ }
+
+ set
+ {
+ if (_hardwarebreaksensors != value)
+ {
+ _hardwarebreaksensors = value;
+
+ OnHardwareBreakSensorsChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<HardwareDancer> _hardwaredancers;
+
+ /// <summary>
+ /// Gets or sets the hardwareversionbase hardware dancers.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<HardwareDancer> HardwareDancers
+ {
+ get
+ {
+ return _hardwaredancers;
+ }
+
+ set
+ {
+ if (_hardwaredancers != value)
+ {
+ _hardwaredancers = value;
+
+ OnHardwareDancersChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<HardwareMotor> _hardwaremotors;
+
+ /// <summary>
+ /// Gets or sets the hardwareversionbase hardware motors.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<HardwareMotor> HardwareMotors
+ {
+ get
+ {
+ return _hardwaremotors;
+ }
+
+ set
+ {
+ if (_hardwaremotors != value)
+ {
+ _hardwaremotors = value;
+
+ OnHardwareMotorsChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<HardwarePidControl> _hardwarepidcontrols;
+
+ /// <summary>
+ /// Gets or sets the hardwareversionbase hardware pid controls.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<HardwarePidControl> HardwarePidControls
+ {
+ get
+ {
+ return _hardwarepidcontrols;
+ }
+
+ set
+ {
+ if (_hardwarepidcontrols != value)
+ {
+ _hardwarepidcontrols = value;
+
+ OnHardwarePidControlsChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<HardwareSpeedSensor> _hardwarespeedsensors;
+
+ /// <summary>
+ /// Gets or sets the hardwareversionbase hardware speed sensors.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<HardwareSpeedSensor> HardwareSpeedSensors
+ {
+ get
+ {
+ return _hardwarespeedsensors;
+ }
+
+ set
+ {
+ if (_hardwarespeedsensors != value)
+ {
+ _hardwarespeedsensors = value;
+
+ OnHardwareSpeedSensorsChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<HardwareWinder> _hardwarewinders;
+
+ /// <summary>
+ /// Gets or sets the hardwareversionbase hardware winders.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<HardwareWinder> HardwareWinders
+ {
+ get
+ {
+ return _hardwarewinders;
+ }
+
+ set
+ {
+ if (_hardwarewinders != value)
+ {
+ _hardwarewinders = value;
+
+ OnHardwareWindersChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Version has changed.
+ /// </summary>
+ protected virtual void OnVersionChanged(Double version)
+ {
+ VersionChanged?.Invoke(this, version);
+ RaisePropertyChanged(nameof(Version));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Configurations has changed.
+ /// </summary>
+ protected virtual void OnConfigurationsChanged(SynchronizedObservableCollection<Configuration> configurations)
+ {
+ ConfigurationsChanged?.Invoke(this, configurations);
+ RaisePropertyChanged(nameof(Configurations));
+ }
+
+ /// <summary>
+ /// Called when the HardwareBlowers has changed.
+ /// </summary>
+ protected virtual void OnHardwareBlowersChanged(SynchronizedObservableCollection<HardwareBlower> hardwareblowers)
+ {
+ HardwareBlowersChanged?.Invoke(this, hardwareblowers);
+ RaisePropertyChanged(nameof(HardwareBlowers));
+ }
+
+ /// <summary>
+ /// Called when the HardwareBreakSensors has changed.
+ /// </summary>
+ protected virtual void OnHardwareBreakSensorsChanged(SynchronizedObservableCollection<HardwareBreakSensor> hardwarebreaksensors)
+ {
+ HardwareBreakSensorsChanged?.Invoke(this, hardwarebreaksensors);
+ RaisePropertyChanged(nameof(HardwareBreakSensors));
+ }
+
+ /// <summary>
+ /// Called when the HardwareDancers has changed.
+ /// </summary>
+ protected virtual void OnHardwareDancersChanged(SynchronizedObservableCollection<HardwareDancer> hardwaredancers)
+ {
+ HardwareDancersChanged?.Invoke(this, hardwaredancers);
+ RaisePropertyChanged(nameof(HardwareDancers));
+ }
+
+ /// <summary>
+ /// Called when the HardwareMotors has changed.
+ /// </summary>
+ protected virtual void OnHardwareMotorsChanged(SynchronizedObservableCollection<HardwareMotor> hardwaremotors)
+ {
+ HardwareMotorsChanged?.Invoke(this, hardwaremotors);
+ RaisePropertyChanged(nameof(HardwareMotors));
+ }
+
+ /// <summary>
+ /// Called when the HardwarePidControls has changed.
+ /// </summary>
+ protected virtual void OnHardwarePidControlsChanged(SynchronizedObservableCollection<HardwarePidControl> hardwarepidcontrols)
+ {
+ HardwarePidControlsChanged?.Invoke(this, hardwarepidcontrols);
+ RaisePropertyChanged(nameof(HardwarePidControls));
+ }
+
+ /// <summary>
+ /// Called when the HardwareSpeedSensors has changed.
+ /// </summary>
+ protected virtual void OnHardwareSpeedSensorsChanged(SynchronizedObservableCollection<HardwareSpeedSensor> hardwarespeedsensors)
+ {
+ HardwareSpeedSensorsChanged?.Invoke(this, hardwarespeedsensors);
+ RaisePropertyChanged(nameof(HardwareSpeedSensors));
+ }
+
+ /// <summary>
+ /// Called when the HardwareWinders has changed.
+ /// </summary>
+ protected virtual void OnHardwareWindersChanged(SynchronizedObservableCollection<HardwareWinder> hardwarewinders)
+ {
+ HardwareWindersChanged?.Invoke(this, hardwarewinders);
+ RaisePropertyChanged(nameof(HardwareWinders));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="HardwareVersionBase" /> class.
+ /// </summary>
+ public HardwareVersionBase() : base()
+ {
+
+ Configurations = new SynchronizedObservableCollection<Configuration>();
+
+ HardwareBlowers = new SynchronizedObservableCollection<HardwareBlower>();
+
+ HardwareBreakSensors = new SynchronizedObservableCollection<HardwareBreakSensor>();
+
+ HardwareDancers = new SynchronizedObservableCollection<HardwareDancer>();
+
+ HardwareMotors = new SynchronizedObservableCollection<HardwareMotor>();
+
+ HardwarePidControls = new SynchronizedObservableCollection<HardwarePidControl>();
+
+ HardwareSpeedSensors = new SynchronizedObservableCollection<HardwareSpeedSensor>();
+
+ HardwareWinders = new SynchronizedObservableCollection<HardwareWinder>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareWinder.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareWinder.cs
index 2d7050a10..e27102d88 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/HardwareWinder.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareWinder.cs
@@ -1,237 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("HARDWARE_WINDERS")]
- public partial class HardwareWinder : ObservableEntity<HardwareWinder>
+ public partial class HardwareWinder : HardwareWinderBase
{
-
- public event EventHandler<Int32> MillimeterPerRotationChanged;
-
- public event EventHandler<Boolean> ActiveChanged;
-
- public event EventHandler<HardwareVersion> HardwareVersionChanged;
-
- public event EventHandler<HardwareWinderType> HardwareWinderTypeChanged;
-
- protected String _hardwarewindertypeguid;
-
- /// <summary>
- /// Gets or sets the hardwarewinder hardware winder type guid.
- /// </summary>
-
- [Column("HARDWARE_WINDER_TYPE_GUID")]
- [ForeignKey("HardwareWinderType")]
-
- public String HardwareWinderTypeGuid
- {
- get
- {
- return _hardwarewindertypeguid;
- }
-
- set
- {
- if (_hardwarewindertypeguid != value)
- {
- _hardwarewindertypeguid = value;
- }
- }
- }
-
- protected String _hardwareversionguid;
-
- /// <summary>
- /// Gets or sets the hardwarewinder hardware version guid.
- /// </summary>
-
- [Column("HARDWARE_VERSION_GUID")]
- [ForeignKey("HardwareVersion")]
-
- public String HardwareVersionGuid
- {
- get
- {
- return _hardwareversionguid;
- }
-
- set
- {
- if (_hardwareversionguid != value)
- {
- _hardwareversionguid = value;
- }
- }
- }
-
- protected Int32 _millimeterperrotation;
-
- /// <summary>
- /// Gets or sets the hardwarewinder millimeter per rotation.
- /// </summary>
-
- [Column("MILLIMETER_PER_ROTATION")]
-
- public Int32 MillimeterPerRotation
- {
- get
- {
- return _millimeterperrotation;
- }
-
- set
- {
- if (_millimeterperrotation != value)
- {
- _millimeterperrotation = value;
-
- OnMillimeterPerRotationChanged(value);
-
- }
- }
- }
-
- protected Boolean _active;
-
- /// <summary>
- /// Gets or sets the hardwarewinder active.
- /// </summary>
-
- [Column("ACTIVE")]
-
- public Boolean Active
- {
- get
- {
- return _active;
- }
-
- set
- {
- if (_active != value)
- {
- _active = value;
-
- OnActiveChanged(value);
-
- }
- }
- }
-
- protected HardwareVersion _hardwareversion;
-
- /// <summary>
- /// Gets or sets the hardwarewinder hardware versions.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual HardwareVersion HardwareVersion
- {
- get
- {
- return _hardwareversion;
- }
-
- set
- {
- if (_hardwareversion != value)
- {
- _hardwareversion = value;
-
- OnHardwareVersionChanged(value);
-
- }
- }
- }
-
- protected HardwareWinderType _hardwarewindertype;
-
- /// <summary>
- /// Gets or sets the hardwarewinder hardware winder types.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual HardwareWinderType HardwareWinderType
- {
- get
- {
- return _hardwarewindertype;
- }
-
- set
- {
- if (_hardwarewindertype != value)
- {
- _hardwarewindertype = value;
-
- OnHardwareWinderTypeChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the MillimeterPerRotation has changed.
- /// </summary>
- protected virtual void OnMillimeterPerRotationChanged(Int32 millimeterperrotation)
- {
- MillimeterPerRotationChanged?.Invoke(this, millimeterperrotation);
- RaisePropertyChanged(nameof(MillimeterPerRotation));
- }
-
- /// <summary>
- /// Called when the Active has changed.
- /// </summary>
- protected virtual void OnActiveChanged(Boolean active)
- {
- ActiveChanged?.Invoke(this, active);
- RaisePropertyChanged(nameof(Active));
- }
-
- /// <summary>
- /// Called when the HardwareVersion has changed.
- /// </summary>
- protected virtual void OnHardwareVersionChanged(HardwareVersion hardwareversion)
- {
- HardwareVersionChanged?.Invoke(this, hardwareversion);
- RaisePropertyChanged(nameof(HardwareVersion));
- }
-
- /// <summary>
- /// Called when the HardwareWinderType has changed.
- /// </summary>
- protected virtual void OnHardwareWinderTypeChanged(HardwareWinderType hardwarewindertype)
- {
- HardwareWinderTypeChanged?.Invoke(this, hardwarewindertype);
- RaisePropertyChanged(nameof(HardwareWinderType));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="HardwareWinder" /> class.
/// </summary>
public HardwareWinder() : base()
{
+
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareWinderBase.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareWinderBase.cs
new file mode 100644
index 000000000..e0ec1edeb
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareWinderBase.cs
@@ -0,0 +1,237 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("HARDWARE_WINDERS")]
+ public abstract class HardwareWinderBase : ObservableEntity<HardwareWinder>
+ {
+
+ public event EventHandler<Int32> MillimeterPerRotationChanged;
+
+ public event EventHandler<Boolean> ActiveChanged;
+
+ public event EventHandler<HardwareVersion> HardwareVersionChanged;
+
+ public event EventHandler<HardwareWinderType> HardwareWinderTypeChanged;
+
+ protected String _hardwarewindertypeguid;
+
+ /// <summary>
+ /// Gets or sets the hardwarewinderbase hardware winder type guid.
+ /// </summary>
+
+ [Column("HARDWARE_WINDER_TYPE_GUID")]
+ [ForeignKey("HardwareWinderType")]
+
+ public String HardwareWinderTypeGuid
+ {
+ get
+ {
+ return _hardwarewindertypeguid;
+ }
+
+ set
+ {
+ if (_hardwarewindertypeguid != value)
+ {
+ _hardwarewindertypeguid = value;
+ }
+ }
+ }
+
+ protected String _hardwareversionguid;
+
+ /// <summary>
+ /// Gets or sets the hardwarewinderbase hardware version guid.
+ /// </summary>
+
+ [Column("HARDWARE_VERSION_GUID")]
+ [ForeignKey("HardwareVersion")]
+
+ public String HardwareVersionGuid
+ {
+ get
+ {
+ return _hardwareversionguid;
+ }
+
+ set
+ {
+ if (_hardwareversionguid != value)
+ {
+ _hardwareversionguid = value;
+ }
+ }
+ }
+
+ protected Int32 _millimeterperrotation;
+
+ /// <summary>
+ /// Gets or sets the hardwarewinderbase millimeter per rotation.
+ /// </summary>
+
+ [Column("MILLIMETER_PER_ROTATION")]
+
+ public Int32 MillimeterPerRotation
+ {
+ get
+ {
+ return _millimeterperrotation;
+ }
+
+ set
+ {
+ if (_millimeterperrotation != value)
+ {
+ _millimeterperrotation = value;
+
+ OnMillimeterPerRotationChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _active;
+
+ /// <summary>
+ /// Gets or sets the hardwarewinderbase active.
+ /// </summary>
+
+ [Column("ACTIVE")]
+
+ public Boolean Active
+ {
+ get
+ {
+ return _active;
+ }
+
+ set
+ {
+ if (_active != value)
+ {
+ _active = value;
+
+ OnActiveChanged(value);
+
+ }
+ }
+ }
+
+ protected HardwareVersion _hardwareversion;
+
+ /// <summary>
+ /// Gets or sets the hardwarewinderbase hardware versions.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual HardwareVersion HardwareVersion
+ {
+ get
+ {
+ return _hardwareversion;
+ }
+
+ set
+ {
+ if (_hardwareversion != value)
+ {
+ _hardwareversion = value;
+
+ OnHardwareVersionChanged(value);
+
+ }
+ }
+ }
+
+ protected HardwareWinderType _hardwarewindertype;
+
+ /// <summary>
+ /// Gets or sets the hardwarewinderbase hardware winder types.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual HardwareWinderType HardwareWinderType
+ {
+ get
+ {
+ return _hardwarewindertype;
+ }
+
+ set
+ {
+ if (_hardwarewindertype != value)
+ {
+ _hardwarewindertype = value;
+
+ OnHardwareWinderTypeChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the MillimeterPerRotation has changed.
+ /// </summary>
+ protected virtual void OnMillimeterPerRotationChanged(Int32 millimeterperrotation)
+ {
+ MillimeterPerRotationChanged?.Invoke(this, millimeterperrotation);
+ RaisePropertyChanged(nameof(MillimeterPerRotation));
+ }
+
+ /// <summary>
+ /// Called when the Active has changed.
+ /// </summary>
+ protected virtual void OnActiveChanged(Boolean active)
+ {
+ ActiveChanged?.Invoke(this, active);
+ RaisePropertyChanged(nameof(Active));
+ }
+
+ /// <summary>
+ /// Called when the HardwareVersion has changed.
+ /// </summary>
+ protected virtual void OnHardwareVersionChanged(HardwareVersion hardwareversion)
+ {
+ HardwareVersionChanged?.Invoke(this, hardwareversion);
+ RaisePropertyChanged(nameof(HardwareVersion));
+ }
+
+ /// <summary>
+ /// Called when the HardwareWinderType has changed.
+ /// </summary>
+ protected virtual void OnHardwareWinderTypeChanged(HardwareWinderType hardwarewindertype)
+ {
+ HardwareWinderTypeChanged?.Invoke(this, hardwarewindertype);
+ RaisePropertyChanged(nameof(HardwareWinderType));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="HardwareWinderBase" /> class.
+ /// </summary>
+ public HardwareWinderBase() : base()
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareWinderType.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareWinderType.cs
index 616ab40c5..f782da120 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/HardwareWinderType.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareWinderType.cs
@@ -1,188 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("HARDWARE_WINDER_TYPES")]
- public partial class HardwareWinderType : ObservableEntity<HardwareWinderType>
+ public partial class HardwareWinderType : HardwareWinderTypeBase
{
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<String> DescriptionChanged;
-
- public event EventHandler<SynchronizedObservableCollection<HardwareWinder>> HardwareWindersChanged;
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the hardwarewindertype code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the hardwarewindertype name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected String _description;
-
- /// <summary>
- /// Gets or sets the hardwarewindertype description.
- /// </summary>
-
- [Column("DESCRIPTION")]
-
- public String Description
- {
- get
- {
- return _description;
- }
-
- set
- {
- if (_description != value)
- {
- _description = value;
-
- OnDescriptionChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<HardwareWinder> _hardwarewinders;
-
- /// <summary>
- /// Gets or sets the hardwarewindertype hardware winders.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<HardwareWinder> HardwareWinders
- {
- get
- {
- return _hardwarewinders;
- }
-
- set
- {
- if (_hardwarewinders != value)
- {
- _hardwarewinders = value;
-
- OnHardwareWindersChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Description has changed.
- /// </summary>
- protected virtual void OnDescriptionChanged(String description)
- {
- DescriptionChanged?.Invoke(this, description);
- RaisePropertyChanged(nameof(Description));
- }
-
- /// <summary>
- /// Called when the HardwareWinders has changed.
- /// </summary>
- protected virtual void OnHardwareWindersChanged(SynchronizedObservableCollection<HardwareWinder> hardwarewinders)
- {
- HardwareWindersChanged?.Invoke(this, hardwarewinders);
- RaisePropertyChanged(nameof(HardwareWinders));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="HardwareWinderType" /> class.
/// </summary>
public HardwareWinderType() : base()
{
- HardwareWinders = new SynchronizedObservableCollection<HardwareWinder>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareWinderTypeBase.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareWinderTypeBase.cs
new file mode 100644
index 000000000..82d4699a2
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareWinderTypeBase.cs
@@ -0,0 +1,188 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("HARDWARE_WINDER_TYPES")]
+ public abstract class HardwareWinderTypeBase : ObservableEntity<HardwareWinderType>
+ {
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<String> DescriptionChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<HardwareWinder>> HardwareWindersChanged;
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the hardwarewindertypebase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the hardwarewindertypebase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _description;
+
+ /// <summary>
+ /// Gets or sets the hardwarewindertypebase description.
+ /// </summary>
+
+ [Column("DESCRIPTION")]
+
+ public String Description
+ {
+ get
+ {
+ return _description;
+ }
+
+ set
+ {
+ if (_description != value)
+ {
+ _description = value;
+
+ OnDescriptionChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<HardwareWinder> _hardwarewinders;
+
+ /// <summary>
+ /// Gets or sets the hardwarewindertypebase hardware winders.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<HardwareWinder> HardwareWinders
+ {
+ get
+ {
+ return _hardwarewinders;
+ }
+
+ set
+ {
+ if (_hardwarewinders != value)
+ {
+ _hardwarewinders = value;
+
+ OnHardwareWindersChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Description has changed.
+ /// </summary>
+ protected virtual void OnDescriptionChanged(String description)
+ {
+ DescriptionChanged?.Invoke(this, description);
+ RaisePropertyChanged(nameof(Description));
+ }
+
+ /// <summary>
+ /// Called when the HardwareWinders has changed.
+ /// </summary>
+ protected virtual void OnHardwareWindersChanged(SynchronizedObservableCollection<HardwareWinder> hardwarewinders)
+ {
+ HardwareWindersChanged?.Invoke(this, hardwarewinders);
+ RaisePropertyChanged(nameof(HardwareWinders));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="HardwareWinderTypeBase" /> class.
+ /// </summary>
+ public HardwareWinderTypeBase() : base()
+ {
+
+ HardwareWinders = new SynchronizedObservableCollection<HardwareWinder>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HtmlPage.cs b/Software/Visual_Studio/Tango.BL/Entities/HtmlPage.cs
index b908bcf41..ea57d5cf7 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/HtmlPage.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/HtmlPage.cs
@@ -1,226 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("HTML_PAGES")]
- public partial class HtmlPage : ObservableEntity<HtmlPage>
+ public partial class HtmlPage : HtmlPageBase
{
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<String> DescriptionChanged;
-
- public event EventHandler<String> HtmlChanged;
-
- public event EventHandler<SynchronizedObservableCollection<EventType>> EventTypesChanged;
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the htmlpage code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the htmlpage name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected String _description;
-
- /// <summary>
- /// Gets or sets the htmlpage description.
- /// </summary>
-
- [Column("DESCRIPTION")]
-
- public String Description
- {
- get
- {
- return _description;
- }
-
- set
- {
- if (_description != value)
- {
- _description = value;
-
- OnDescriptionChanged(value);
-
- }
- }
- }
-
- protected String _html;
-
- /// <summary>
- /// Gets or sets the htmlpage html.
- /// </summary>
-
- [Column("HTML")]
-
- public String Html
- {
- get
- {
- return _html;
- }
-
- set
- {
- if (_html != value)
- {
- _html = value;
-
- OnHtmlChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<EventType> _eventtypes;
-
- /// <summary>
- /// Gets or sets the htmlpage event types.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<EventType> EventTypes
- {
- get
- {
- return _eventtypes;
- }
-
- set
- {
- if (_eventtypes != value)
- {
- _eventtypes = value;
-
- OnEventTypesChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Description has changed.
- /// </summary>
- protected virtual void OnDescriptionChanged(String description)
- {
- DescriptionChanged?.Invoke(this, description);
- RaisePropertyChanged(nameof(Description));
- }
-
- /// <summary>
- /// Called when the Html has changed.
- /// </summary>
- protected virtual void OnHtmlChanged(String html)
- {
- HtmlChanged?.Invoke(this, html);
- RaisePropertyChanged(nameof(Html));
- }
-
- /// <summary>
- /// Called when the EventTypes has changed.
- /// </summary>
- protected virtual void OnEventTypesChanged(SynchronizedObservableCollection<EventType> eventtypes)
- {
- EventTypesChanged?.Invoke(this, eventtypes);
- RaisePropertyChanged(nameof(EventTypes));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="HtmlPage" /> class.
/// </summary>
public HtmlPage() : base()
{
- EventTypes = new SynchronizedObservableCollection<EventType>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HtmlPageBase.cs b/Software/Visual_Studio/Tango.BL/Entities/HtmlPageBase.cs
new file mode 100644
index 000000000..c955f8d0a
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/HtmlPageBase.cs
@@ -0,0 +1,226 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("HTML_PAGES")]
+ public abstract class HtmlPageBase : ObservableEntity<HtmlPage>
+ {
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<String> DescriptionChanged;
+
+ public event EventHandler<String> HtmlChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<EventType>> EventTypesChanged;
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the htmlpagebase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the htmlpagebase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _description;
+
+ /// <summary>
+ /// Gets or sets the htmlpagebase description.
+ /// </summary>
+
+ [Column("DESCRIPTION")]
+
+ public String Description
+ {
+ get
+ {
+ return _description;
+ }
+
+ set
+ {
+ if (_description != value)
+ {
+ _description = value;
+
+ OnDescriptionChanged(value);
+
+ }
+ }
+ }
+
+ protected String _html;
+
+ /// <summary>
+ /// Gets or sets the htmlpagebase html.
+ /// </summary>
+
+ [Column("HTML")]
+
+ public String Html
+ {
+ get
+ {
+ return _html;
+ }
+
+ set
+ {
+ if (_html != value)
+ {
+ _html = value;
+
+ OnHtmlChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<EventType> _eventtypes;
+
+ /// <summary>
+ /// Gets or sets the htmlpagebase event types.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<EventType> EventTypes
+ {
+ get
+ {
+ return _eventtypes;
+ }
+
+ set
+ {
+ if (_eventtypes != value)
+ {
+ _eventtypes = value;
+
+ OnEventTypesChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Description has changed.
+ /// </summary>
+ protected virtual void OnDescriptionChanged(String description)
+ {
+ DescriptionChanged?.Invoke(this, description);
+ RaisePropertyChanged(nameof(Description));
+ }
+
+ /// <summary>
+ /// Called when the Html has changed.
+ /// </summary>
+ protected virtual void OnHtmlChanged(String html)
+ {
+ HtmlChanged?.Invoke(this, html);
+ RaisePropertyChanged(nameof(Html));
+ }
+
+ /// <summary>
+ /// Called when the EventTypes has changed.
+ /// </summary>
+ protected virtual void OnEventTypesChanged(SynchronizedObservableCollection<EventType> eventtypes)
+ {
+ EventTypesChanged?.Invoke(this, eventtypes);
+ RaisePropertyChanged(nameof(EventTypes));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="HtmlPageBase" /> class.
+ /// </summary>
+ public HtmlPageBase() : base()
+ {
+
+ EventTypes = new SynchronizedObservableCollection<EventType>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/IdsPack.cs b/Software/Visual_Studio/Tango.BL/Entities/IdsPack.cs
index f4a5bb213..3c8077542 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/IdsPack.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/IdsPack.cs
@@ -1,482 +1,24 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("IDS_PACKS")]
- public partial class IdsPack : ObservableEntity<IdsPack>
+ public partial class IdsPack : IdsPackBase
{
-
- public event EventHandler<Int32> PackIndexChanged;
-
- public event EventHandler<Boolean> IsEmptyChanged;
-
- public event EventHandler<CartridgeType> CartridgeTypeChanged;
-
- public event EventHandler<Configuration> ConfigurationChanged;
-
- public event EventHandler<Dispenser> DispenserChanged;
-
- public event EventHandler<IdsPackFormula> IdsPackFormulaChanged;
-
- public event EventHandler<LiquidType> LiquidTypeChanged;
-
- public event EventHandler<MidTankType> MidTankTypeChanged;
-
- protected String _configurationguid;
-
- /// <summary>
- /// Gets or sets the idspack configuration guid.
- /// </summary>
-
- [Column("CONFIGURATION_GUID")]
- [ForeignKey("Configuration")]
-
- public String ConfigurationGuid
- {
- get
- {
- return _configurationguid;
- }
-
- set
- {
- if (_configurationguid != value)
- {
- _configurationguid = value;
- }
- }
- }
-
- protected String _dispenserguid;
-
- /// <summary>
- /// Gets or sets the idspack dispenser guid.
- /// </summary>
-
- [Column("DISPENSER_GUID")]
- [ForeignKey("Dispenser")]
-
- public String DispenserGuid
- {
- get
- {
- return _dispenserguid;
- }
-
- set
- {
- if (_dispenserguid != value)
- {
- _dispenserguid = value;
- }
- }
- }
-
- protected String _liquidtypeguid;
-
- /// <summary>
- /// Gets or sets the idspack liquid type guid.
- /// </summary>
-
- [Column("LIQUID_TYPE_GUID")]
- [ForeignKey("LiquidType")]
-
- public String LiquidTypeGuid
- {
- get
- {
- return _liquidtypeguid;
- }
-
- set
- {
- if (_liquidtypeguid != value)
- {
- _liquidtypeguid = value;
- }
- }
- }
-
- protected String _cartridgetypeguid;
-
- /// <summary>
- /// Gets or sets the idspack cartridge type guid.
- /// </summary>
-
- [Column("CARTRIDGE_TYPE_GUID")]
- [ForeignKey("CartridgeType")]
-
- public String CartridgeTypeGuid
- {
- get
- {
- return _cartridgetypeguid;
- }
-
- set
- {
- if (_cartridgetypeguid != value)
- {
- _cartridgetypeguid = value;
- }
- }
- }
-
- protected String _midtanktypeguid;
-
- /// <summary>
- /// Gets or sets the idspack mid tank type guid.
- /// </summary>
-
- [Column("MID_TANK_TYPE_GUID")]
- [ForeignKey("MidTankType")]
-
- public String MidTankTypeGuid
+ public override List<string> GetIgnoreProperties()
{
- get
- {
- return _midtanktypeguid;
- }
-
- set
+ return base.GetIgnoreProperties().Concat(new List<String>()
{
- if (_midtanktypeguid != value)
- {
- _midtanktypeguid = value;
- }
- }
- }
-
- protected String _idspackformulaguid;
-
- /// <summary>
- /// Gets or sets the idspack ids pack formula guid.
- /// </summary>
-
- [Column("IDS_PACK_FORMULA_GUID")]
- [ForeignKey("IdsPackFormula")]
-
- public String IdsPackFormulaGuid
- {
- get
- {
- return _idspackformulaguid;
- }
-
- set
- {
- if (_idspackformulaguid != value)
- {
- _idspackformulaguid = value;
- }
- }
- }
-
- protected Int32 _packindex;
-
- /// <summary>
- /// Gets or sets the idspack pack index.
- /// </summary>
-
- [Column("PACK_INDEX")]
-
- public Int32 PackIndex
- {
- get
- {
- return _packindex;
- }
-
- set
- {
- if (_packindex != value)
- {
- _packindex = value;
-
- OnPackIndexChanged(value);
-
- }
- }
- }
-
- protected Boolean _isempty;
-
- /// <summary>
- /// Gets or sets the idspack is empty.
- /// </summary>
-
- [Column("IS_EMPTY")]
-
- public Boolean IsEmpty
- {
- get
- {
- return _isempty;
- }
-
- set
- {
- if (_isempty != value)
- {
- _isempty = value;
-
- OnIsEmptyChanged(value);
-
- }
- }
- }
-
- protected CartridgeType _cartridgetype;
-
- /// <summary>
- /// Gets or sets the idspack cartridge types.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual CartridgeType CartridgeType
- {
- get
- {
- return _cartridgetype;
- }
-
- set
- {
- if (_cartridgetype != value)
- {
- _cartridgetype = value;
-
- OnCartridgeTypeChanged(value);
-
- }
- }
- }
-
- protected Configuration _configuration;
-
- /// <summary>
- /// Gets or sets the idspack configuration.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual Configuration Configuration
- {
- get
- {
- return _configuration;
- }
-
- set
- {
- if (_configuration != value)
- {
- _configuration = value;
-
- OnConfigurationChanged(value);
-
- }
- }
- }
-
- protected Dispenser _dispenser;
-
- /// <summary>
- /// Gets or sets the idspack dispenser.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual Dispenser Dispenser
- {
- get
- {
- return _dispenser;
- }
-
- set
- {
- if (_dispenser != value)
- {
- _dispenser = value;
-
- OnDispenserChanged(value);
-
- }
- }
- }
-
- protected IdsPackFormula _idspackformula;
-
- /// <summary>
- /// Gets or sets the idspack ids pack formulas.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual IdsPackFormula IdsPackFormula
- {
- get
- {
- return _idspackformula;
- }
-
- set
- {
- if (_idspackformula != value)
- {
- _idspackformula = value;
-
- OnIdsPackFormulaChanged(value);
-
- }
- }
- }
-
- protected LiquidType _liquidtype;
-
- /// <summary>
- /// Gets or sets the idspack liquid types.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual LiquidType LiquidType
- {
- get
- {
- return _liquidtype;
- }
-
- set
- {
- if (_liquidtype != value)
- {
- _liquidtype = value;
-
- OnLiquidTypeChanged(value);
-
- }
- }
- }
-
- protected MidTankType _midtanktype;
-
- /// <summary>
- /// Gets or sets the idspack mid tank types.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual MidTankType MidTankType
- {
- get
- {
- return _midtanktype;
- }
-
- set
- {
- if (_midtanktype != value)
- {
- _midtanktype = value;
-
- OnMidTankTypeChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the PackIndex has changed.
- /// </summary>
- protected virtual void OnPackIndexChanged(Int32 packindex)
- {
- PackIndexChanged?.Invoke(this, packindex);
- RaisePropertyChanged(nameof(PackIndex));
- }
-
- /// <summary>
- /// Called when the IsEmpty has changed.
- /// </summary>
- protected virtual void OnIsEmptyChanged(Boolean isempty)
- {
- IsEmptyChanged?.Invoke(this, isempty);
- RaisePropertyChanged(nameof(IsEmpty));
- }
-
- /// <summary>
- /// Called when the CartridgeType has changed.
- /// </summary>
- protected virtual void OnCartridgeTypeChanged(CartridgeType cartridgetype)
- {
- CartridgeTypeChanged?.Invoke(this, cartridgetype);
- RaisePropertyChanged(nameof(CartridgeType));
- }
-
- /// <summary>
- /// Called when the Configuration has changed.
- /// </summary>
- protected virtual void OnConfigurationChanged(Configuration configuration)
- {
- ConfigurationChanged?.Invoke(this, configuration);
- RaisePropertyChanged(nameof(Configuration));
- }
-
- /// <summary>
- /// Called when the Dispenser has changed.
- /// </summary>
- protected virtual void OnDispenserChanged(Dispenser dispenser)
- {
- DispenserChanged?.Invoke(this, dispenser);
- RaisePropertyChanged(nameof(Dispenser));
- }
-
- /// <summary>
- /// Called when the IdsPackFormula has changed.
- /// </summary>
- protected virtual void OnIdsPackFormulaChanged(IdsPackFormula idspackformula)
- {
- IdsPackFormulaChanged?.Invoke(this, idspackformula);
- RaisePropertyChanged(nameof(IdsPackFormula));
- }
-
- /// <summary>
- /// Called when the LiquidType has changed.
- /// </summary>
- protected virtual void OnLiquidTypeChanged(LiquidType liquidtype)
- {
- LiquidTypeChanged?.Invoke(this, liquidtype);
- RaisePropertyChanged(nameof(LiquidType));
- }
-
- /// <summary>
- /// Called when the MidTankType has changed.
- /// </summary>
- protected virtual void OnMidTankTypeChanged(MidTankType midtanktype)
- {
- MidTankTypeChanged?.Invoke(this, midtanktype);
- RaisePropertyChanged(nameof(MidTankType));
+ nameof(this.CartridgeType),
+ nameof(this.Configuration),
+ nameof(this.Dispenser),
+ nameof(this.IdsPackFormula),
+ nameof(this.LiquidType),
+ nameof(this.MidTankType),
+ }).ToList();
}
/// <summary>
@@ -484,6 +26,7 @@ namespace Tango.BL.Entities
/// </summary>
public IdsPack() : base()
{
+
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/IdsPackBase.cs b/Software/Visual_Studio/Tango.BL/Entities/IdsPackBase.cs
new file mode 100644
index 000000000..451dafbc9
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/IdsPackBase.cs
@@ -0,0 +1,489 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("IDS_PACKS")]
+ public abstract class IdsPackBase : ObservableEntity<IdsPack>
+ {
+
+ public event EventHandler<Int32> PackIndexChanged;
+
+ public event EventHandler<Boolean> IsEmptyChanged;
+
+ public event EventHandler<CartridgeType> CartridgeTypeChanged;
+
+ public event EventHandler<Configuration> ConfigurationChanged;
+
+ public event EventHandler<Dispenser> DispenserChanged;
+
+ public event EventHandler<IdsPackFormula> IdsPackFormulaChanged;
+
+ public event EventHandler<LiquidType> LiquidTypeChanged;
+
+ public event EventHandler<MidTankType> MidTankTypeChanged;
+
+ protected String _configurationguid;
+
+ /// <summary>
+ /// Gets or sets the idspackbase configuration guid.
+ /// </summary>
+
+ [Column("CONFIGURATION_GUID")]
+ [ForeignKey("Configuration")]
+
+ public String ConfigurationGuid
+ {
+ get
+ {
+ return _configurationguid;
+ }
+
+ set
+ {
+ if (_configurationguid != value)
+ {
+ _configurationguid = value;
+ }
+ }
+ }
+
+ protected String _dispenserguid;
+
+ /// <summary>
+ /// Gets or sets the idspackbase dispenser guid.
+ /// </summary>
+
+ [Column("DISPENSER_GUID")]
+ [ForeignKey("Dispenser")]
+
+ public String DispenserGuid
+ {
+ get
+ {
+ return _dispenserguid;
+ }
+
+ set
+ {
+ if (_dispenserguid != value)
+ {
+ _dispenserguid = value;
+ }
+ }
+ }
+
+ protected String _liquidtypeguid;
+
+ /// <summary>
+ /// Gets or sets the idspackbase liquid type guid.
+ /// </summary>
+
+ [Column("LIQUID_TYPE_GUID")]
+ [ForeignKey("LiquidType")]
+
+ public String LiquidTypeGuid
+ {
+ get
+ {
+ return _liquidtypeguid;
+ }
+
+ set
+ {
+ if (_liquidtypeguid != value)
+ {
+ _liquidtypeguid = value;
+ }
+ }
+ }
+
+ protected String _cartridgetypeguid;
+
+ /// <summary>
+ /// Gets or sets the idspackbase cartridge type guid.
+ /// </summary>
+
+ [Column("CARTRIDGE_TYPE_GUID")]
+ [ForeignKey("CartridgeType")]
+
+ public String CartridgeTypeGuid
+ {
+ get
+ {
+ return _cartridgetypeguid;
+ }
+
+ set
+ {
+ if (_cartridgetypeguid != value)
+ {
+ _cartridgetypeguid = value;
+ }
+ }
+ }
+
+ protected String _midtanktypeguid;
+
+ /// <summary>
+ /// Gets or sets the idspackbase mid tank type guid.
+ /// </summary>
+
+ [Column("MID_TANK_TYPE_GUID")]
+ [ForeignKey("MidTankType")]
+
+ public String MidTankTypeGuid
+ {
+ get
+ {
+ return _midtanktypeguid;
+ }
+
+ set
+ {
+ if (_midtanktypeguid != value)
+ {
+ _midtanktypeguid = value;
+ }
+ }
+ }
+
+ protected String _idspackformulaguid;
+
+ /// <summary>
+ /// Gets or sets the idspackbase ids pack formula guid.
+ /// </summary>
+
+ [Column("IDS_PACK_FORMULA_GUID")]
+ [ForeignKey("IdsPackFormula")]
+
+ public String IdsPackFormulaGuid
+ {
+ get
+ {
+ return _idspackformulaguid;
+ }
+
+ set
+ {
+ if (_idspackformulaguid != value)
+ {
+ _idspackformulaguid = value;
+ }
+ }
+ }
+
+ protected Int32 _packindex;
+
+ /// <summary>
+ /// Gets or sets the idspackbase pack index.
+ /// </summary>
+
+ [Column("PACK_INDEX")]
+
+ public Int32 PackIndex
+ {
+ get
+ {
+ return _packindex;
+ }
+
+ set
+ {
+ if (_packindex != value)
+ {
+ _packindex = value;
+
+ OnPackIndexChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _isempty;
+
+ /// <summary>
+ /// Gets or sets the idspackbase is empty.
+ /// </summary>
+
+ [Column("IS_EMPTY")]
+
+ public Boolean IsEmpty
+ {
+ get
+ {
+ return _isempty;
+ }
+
+ set
+ {
+ if (_isempty != value)
+ {
+ _isempty = value;
+
+ OnIsEmptyChanged(value);
+
+ }
+ }
+ }
+
+ protected CartridgeType _cartridgetype;
+
+ /// <summary>
+ /// Gets or sets the idspackbase cartridge types.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual CartridgeType CartridgeType
+ {
+ get
+ {
+ return _cartridgetype;
+ }
+
+ set
+ {
+ if (_cartridgetype != value)
+ {
+ _cartridgetype = value;
+
+ OnCartridgeTypeChanged(value);
+
+ }
+ }
+ }
+
+ protected Configuration _configuration;
+
+ /// <summary>
+ /// Gets or sets the idspackbase configuration.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual Configuration Configuration
+ {
+ get
+ {
+ return _configuration;
+ }
+
+ set
+ {
+ if (_configuration != value)
+ {
+ _configuration = value;
+
+ OnConfigurationChanged(value);
+
+ }
+ }
+ }
+
+ protected Dispenser _dispenser;
+
+ /// <summary>
+ /// Gets or sets the idspackbase dispenser.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual Dispenser Dispenser
+ {
+ get
+ {
+ return _dispenser;
+ }
+
+ set
+ {
+ if (_dispenser != value)
+ {
+ _dispenser = value;
+
+ OnDispenserChanged(value);
+
+ }
+ }
+ }
+
+ protected IdsPackFormula _idspackformula;
+
+ /// <summary>
+ /// Gets or sets the idspackbase ids pack formulas.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual IdsPackFormula IdsPackFormula
+ {
+ get
+ {
+ return _idspackformula;
+ }
+
+ set
+ {
+ if (_idspackformula != value)
+ {
+ _idspackformula = value;
+
+ OnIdsPackFormulaChanged(value);
+
+ }
+ }
+ }
+
+ protected LiquidType _liquidtype;
+
+ /// <summary>
+ /// Gets or sets the idspackbase liquid types.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual LiquidType LiquidType
+ {
+ get
+ {
+ return _liquidtype;
+ }
+
+ set
+ {
+ if (_liquidtype != value)
+ {
+ _liquidtype = value;
+
+ OnLiquidTypeChanged(value);
+
+ }
+ }
+ }
+
+ protected MidTankType _midtanktype;
+
+ /// <summary>
+ /// Gets or sets the idspackbase mid tank types.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual MidTankType MidTankType
+ {
+ get
+ {
+ return _midtanktype;
+ }
+
+ set
+ {
+ if (_midtanktype != value)
+ {
+ _midtanktype = value;
+
+ OnMidTankTypeChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the PackIndex has changed.
+ /// </summary>
+ protected virtual void OnPackIndexChanged(Int32 packindex)
+ {
+ PackIndexChanged?.Invoke(this, packindex);
+ RaisePropertyChanged(nameof(PackIndex));
+ }
+
+ /// <summary>
+ /// Called when the IsEmpty has changed.
+ /// </summary>
+ protected virtual void OnIsEmptyChanged(Boolean isempty)
+ {
+ IsEmptyChanged?.Invoke(this, isempty);
+ RaisePropertyChanged(nameof(IsEmpty));
+ }
+
+ /// <summary>
+ /// Called when the CartridgeType has changed.
+ /// </summary>
+ protected virtual void OnCartridgeTypeChanged(CartridgeType cartridgetype)
+ {
+ CartridgeTypeChanged?.Invoke(this, cartridgetype);
+ RaisePropertyChanged(nameof(CartridgeType));
+ }
+
+ /// <summary>
+ /// Called when the Configuration has changed.
+ /// </summary>
+ protected virtual void OnConfigurationChanged(Configuration configuration)
+ {
+ ConfigurationChanged?.Invoke(this, configuration);
+ RaisePropertyChanged(nameof(Configuration));
+ }
+
+ /// <summary>
+ /// Called when the Dispenser has changed.
+ /// </summary>
+ protected virtual void OnDispenserChanged(Dispenser dispenser)
+ {
+ DispenserChanged?.Invoke(this, dispenser);
+ RaisePropertyChanged(nameof(Dispenser));
+ }
+
+ /// <summary>
+ /// Called when the IdsPackFormula has changed.
+ /// </summary>
+ protected virtual void OnIdsPackFormulaChanged(IdsPackFormula idspackformula)
+ {
+ IdsPackFormulaChanged?.Invoke(this, idspackformula);
+ RaisePropertyChanged(nameof(IdsPackFormula));
+ }
+
+ /// <summary>
+ /// Called when the LiquidType has changed.
+ /// </summary>
+ protected virtual void OnLiquidTypeChanged(LiquidType liquidtype)
+ {
+ LiquidTypeChanged?.Invoke(this, liquidtype);
+ RaisePropertyChanged(nameof(LiquidType));
+ }
+
+ /// <summary>
+ /// Called when the MidTankType has changed.
+ /// </summary>
+ protected virtual void OnMidTankTypeChanged(MidTankType midtanktype)
+ {
+ MidTankTypeChanged?.Invoke(this, midtanktype);
+ RaisePropertyChanged(nameof(MidTankType));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="IdsPackBase" /> class.
+ /// </summary>
+ public IdsPackBase() : base()
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/IdsPackFormula.cs b/Software/Visual_Studio/Tango.BL/Entities/IdsPackFormula.cs
index 100512710..3e59c325d 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/IdsPackFormula.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/IdsPackFormula.cs
@@ -1,226 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("IDS_PACK_FORMULAS")]
- public partial class IdsPackFormula : ObservableEntity<IdsPackFormula>
+ public partial class IdsPackFormula : IdsPackFormulaBase
{
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<String> DescriptionChanged;
-
- public event EventHandler<Boolean> AutoCalculatedChanged;
-
- public event EventHandler<SynchronizedObservableCollection<IdsPack>> IdsPacksChanged;
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the idspackformula code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the idspackformula name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected String _description;
-
- /// <summary>
- /// Gets or sets the idspackformula description.
- /// </summary>
-
- [Column("DESCRIPTION")]
-
- public String Description
- {
- get
- {
- return _description;
- }
-
- set
- {
- if (_description != value)
- {
- _description = value;
-
- OnDescriptionChanged(value);
-
- }
- }
- }
-
- protected Boolean _autocalculated;
-
- /// <summary>
- /// Gets or sets the idspackformula auto calculated.
- /// </summary>
-
- [Column("AUTO_CALCULATED")]
-
- public Boolean AutoCalculated
- {
- get
- {
- return _autocalculated;
- }
-
- set
- {
- if (_autocalculated != value)
- {
- _autocalculated = value;
-
- OnAutoCalculatedChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<IdsPack> _idspacks;
-
- /// <summary>
- /// Gets or sets the idspackformula ids packs.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<IdsPack> IdsPacks
- {
- get
- {
- return _idspacks;
- }
-
- set
- {
- if (_idspacks != value)
- {
- _idspacks = value;
-
- OnIdsPacksChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Description has changed.
- /// </summary>
- protected virtual void OnDescriptionChanged(String description)
- {
- DescriptionChanged?.Invoke(this, description);
- RaisePropertyChanged(nameof(Description));
- }
-
- /// <summary>
- /// Called when the AutoCalculated has changed.
- /// </summary>
- protected virtual void OnAutoCalculatedChanged(Boolean autocalculated)
- {
- AutoCalculatedChanged?.Invoke(this, autocalculated);
- RaisePropertyChanged(nameof(AutoCalculated));
- }
-
- /// <summary>
- /// Called when the IdsPacks has changed.
- /// </summary>
- protected virtual void OnIdsPacksChanged(SynchronizedObservableCollection<IdsPack> idspacks)
- {
- IdsPacksChanged?.Invoke(this, idspacks);
- RaisePropertyChanged(nameof(IdsPacks));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="IdsPackFormula" /> class.
/// </summary>
public IdsPackFormula() : base()
{
- IdsPacks = new SynchronizedObservableCollection<IdsPack>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/IdsPackFormulaBase.cs b/Software/Visual_Studio/Tango.BL/Entities/IdsPackFormulaBase.cs
new file mode 100644
index 000000000..580f72b6e
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/IdsPackFormulaBase.cs
@@ -0,0 +1,226 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("IDS_PACK_FORMULAS")]
+ public abstract class IdsPackFormulaBase : ObservableEntity<IdsPackFormula>
+ {
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<String> DescriptionChanged;
+
+ public event EventHandler<Boolean> AutoCalculatedChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<IdsPack>> IdsPacksChanged;
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the idspackformulabase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the idspackformulabase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _description;
+
+ /// <summary>
+ /// Gets or sets the idspackformulabase description.
+ /// </summary>
+
+ [Column("DESCRIPTION")]
+
+ public String Description
+ {
+ get
+ {
+ return _description;
+ }
+
+ set
+ {
+ if (_description != value)
+ {
+ _description = value;
+
+ OnDescriptionChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _autocalculated;
+
+ /// <summary>
+ /// Gets or sets the idspackformulabase auto calculated.
+ /// </summary>
+
+ [Column("AUTO_CALCULATED")]
+
+ public Boolean AutoCalculated
+ {
+ get
+ {
+ return _autocalculated;
+ }
+
+ set
+ {
+ if (_autocalculated != value)
+ {
+ _autocalculated = value;
+
+ OnAutoCalculatedChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<IdsPack> _idspacks;
+
+ /// <summary>
+ /// Gets or sets the idspackformulabase ids packs.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<IdsPack> IdsPacks
+ {
+ get
+ {
+ return _idspacks;
+ }
+
+ set
+ {
+ if (_idspacks != value)
+ {
+ _idspacks = value;
+
+ OnIdsPacksChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Description has changed.
+ /// </summary>
+ protected virtual void OnDescriptionChanged(String description)
+ {
+ DescriptionChanged?.Invoke(this, description);
+ RaisePropertyChanged(nameof(Description));
+ }
+
+ /// <summary>
+ /// Called when the AutoCalculated has changed.
+ /// </summary>
+ protected virtual void OnAutoCalculatedChanged(Boolean autocalculated)
+ {
+ AutoCalculatedChanged?.Invoke(this, autocalculated);
+ RaisePropertyChanged(nameof(AutoCalculated));
+ }
+
+ /// <summary>
+ /// Called when the IdsPacks has changed.
+ /// </summary>
+ protected virtual void OnIdsPacksChanged(SynchronizedObservableCollection<IdsPack> idspacks)
+ {
+ IdsPacksChanged?.Invoke(this, idspacks);
+ RaisePropertyChanged(nameof(IdsPacks));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="IdsPackFormulaBase" /> class.
+ /// </summary>
+ public IdsPackFormulaBase() : base()
+ {
+
+ IdsPacks = new SynchronizedObservableCollection<IdsPack>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/Job.cs b/Software/Visual_Studio/Tango.BL/Entities/Job.cs
index 89776a983..77f151fbc 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/Job.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/Job.cs
@@ -1,1508 +1,667 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
+using Google.Protobuf;
+using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
+using System.Drawing;
using System.Linq;
-using Tango.DAL.Remote.DB;
+using System.Reflection;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Media.Imaging;
+using Tango.BL.Builders;
+using Tango.BL.Enumerations;
using Tango.Core;
+using Tango.Logging;
+using Tango.PMR.Exports;
namespace Tango.BL.Entities
{
-
- /// <summary>
- ///
- /// </summary>
-
- [Table("JOBS")]
- public partial class Job : ObservableEntity<Job>
+ public partial class Job : JobBase
{
-
- public event EventHandler<DateTime> CreationDateChanged;
-
- public event EventHandler<Nullable<DateTime>> LastRunChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<String> DescriptionChanged;
-
- public event EventHandler<Double> InterSegmentLengthChanged;
-
- public event EventHandler<Boolean> EnableInterSegmentChanged;
-
- public event EventHandler<Boolean> EnableLubricationChanged;
-
- public event EventHandler<Int32> JobIndexChanged;
-
- public event EventHandler<Int32> EstimatedDurationMiliChanged;
-
- public event EventHandler<Boolean> HasEmbroideryFileChanged;
-
- public event EventHandler<Byte[]> EmbroideryFileDataChanged;
-
- public event EventHandler<String> EmbroideryFileNameChanged;
-
- public event EventHandler<Byte[]> EmbroideryJpegChanged;
-
- public event EventHandler<Int32> StatusChanged;
-
- public event EventHandler<Int32> NumberOfUnitsChanged;
-
- public event EventHandler<Int32> TypeChanged;
-
- public event EventHandler<Int32> SpoolsDistributionChanged;
-
- public event EventHandler<Int32> NumberOfHeadsChanged;
-
- public event EventHandler<Int32> SampleUnitsOrMetersChanged;
-
- public event EventHandler<Int32> FineTuningStatusChanged;
-
- public event EventHandler<Nullable<DateTime>> FineTuningApproveDateChanged;
-
- public event EventHandler<Int32> SampleDyeStatusChanged;
-
- public event EventHandler<Nullable<DateTime>> SampleDyeApproveDateChanged;
-
- public event EventHandler<Int32> EditingStateChanged;
-
- public event EventHandler<Double> LengthPercentageFactorChanged;
-
- public event EventHandler<ColorSpace> ColorSpaceChanged;
-
- public event EventHandler<Customer> CustomerChanged;
-
- public event EventHandler<SynchronizedObservableCollection<JobRun>> JobRunsChanged;
-
- public event EventHandler<Machine> MachineChanged;
-
- public event EventHandler<Rml> RmlChanged;
-
- public event EventHandler<SpoolType> SpoolTypeChanged;
-
- public event EventHandler<User> UserChanged;
-
- public event EventHandler<WindingMethod> WindingMethodChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Segment>> SegmentsChanged;
-
- protected DateTime _creationdate;
+ private double _lastLength;
/// <summary>
- /// Gets or sets the job creation date.
+ /// Initializes a new instance of the <see cref="Job"/> class.
/// </summary>
-
- [Column("CREATION_DATE")]
-
- public DateTime CreationDate
+ public Job(DateTime creationDate)
{
- get
- {
- return _creationdate;
- }
-
- set
- {
- if (_creationdate != value)
- {
- _creationdate = value;
-
- OnCreationDateChanged(value);
-
- }
- }
+ CreationDate = creationDate;
}
- protected Nullable<DateTime> _lastrun;
+ #region Events
/// <summary>
- /// Gets or sets the job last run.
+ /// Occurs when the job total segments length has changed.
/// </summary>
+ public event EventHandler LengthChanged;
- [Column("LAST_RUN")]
-
- public Nullable<DateTime> LastRun
- {
- get
- {
- return _lastrun;
- }
-
- set
- {
- if (_lastrun != value)
- {
- _lastrun = value;
-
- OnLastRunChanged(value);
-
- }
- }
- }
+ #endregion
- protected String _machineguid;
+ #region Properties
/// <summary>
- /// Gets or sets the job machine guid.
+ /// Gets the total job segments length.
/// </summary>
-
- [Column("MACHINE_GUID")]
- [ForeignKey("Machine")]
-
- public String MachineGuid
+ [NotMapped]
+ [JsonIgnore]
+ public double Length
{
- get
+ get
{
- return _machineguid;
- }
-
- set
- {
- if (_machineguid != value)
- {
- _machineguid = value;
- }
+ _lastLength = GetLength();
+ return _lastLength;
}
}
- protected String _userguid;
-
/// <summary>
- /// Gets or sets the job user guid.
+ /// Gets the total job segments length multiplied by number of units if it is an embroidery job.
/// </summary>
-
- [Column("USER_GUID")]
- [ForeignKey("User")]
-
- public String UserGuid
+ [NotMapped]
+ [JsonIgnore]
+ public double LengthIncludingNumberOfUnits
{
- get
+ get
{
- return _userguid;
- }
+ _lastLength = GetLength();
+ var l = _lastLength * NumberOfUnits;
- set
- {
- if (_userguid != value)
+ if (EnableInterSegment && NumberOfUnits > 1)
{
- _userguid = value;
+ l += ((NumberOfUnits - 1) * InterSegmentLength);
}
- }
- }
-
- protected String _rmlguid;
-
- /// <summary>
- /// Gets or sets the job rml guid.
- /// </summary>
-
- [Column("RML_GUID")]
- [ForeignKey("Rml")]
- public String RmlGuid
- {
- get
- {
- return _rmlguid;
- }
-
- set
- {
- if (_rmlguid != value)
- {
- _rmlguid = value;
- }
+ return l;
}
}
- protected String _windingmethodguid;
-
/// <summary>
- /// Gets or sets the job winding method guid.
+ /// Gets or sets the job <see cref="Status"/> property as <see cref="JobStatus"/> enum instead of int.
/// </summary>
-
- [Column("WINDING_METHOD_GUID")]
- [ForeignKey("WindingMethod")]
-
- public String WindingMethodGuid
+ [NotMapped]
+ [JsonIgnore]
+ public JobStatuses JobStatus
{
- get
- {
- return _windingmethodguid;
- }
-
- set
- {
- if (_windingmethodguid != value)
- {
- _windingmethodguid = value;
- }
- }
+ get { return (JobStatuses)Status; }
+ set { Status = value.ToInt32(); RaisePropertyChangedAuto(); }
}
- protected String _spooltypeguid;
-
/// <summary>
- /// Gets or sets the job spool type guid.
+ /// Gets or sets the job <see cref="Type"/> property as <see cref="JobType"/> enum instead of int.
/// </summary>
-
- [Column("SPOOL_TYPE_GUID")]
- [ForeignKey("SpoolType")]
-
- public String SpoolTypeGuid
+ [NotMapped]
+ [JsonIgnore]
+ public JobTypes JobType
{
- get
- {
- return _spooltypeguid;
- }
-
- set
- {
- if (_spooltypeguid != value)
- {
- _spooltypeguid = value;
- }
- }
+ get { return (JobTypes)Type; }
+ set { Type = value.ToInt32(); RaisePropertyChangedAuto(); }
}
- protected String _name;
-
/// <summary>
- /// Gets or sets the job name.
+ /// Gets or sets the job <see cref="SpoolsDistribution"/> property as a <see cref="Boolean"/> property.
/// </summary>
-
- [Column("NAME")]
-
- public String Name
+ [NotMapped]
+ [JsonIgnore]
+ public bool IsAllSegmentsPerSpool
{
- get
+ get { return ((SpoolsDistributions)SpoolsDistribution) == SpoolsDistributions.AllSegments; }
+ set
{
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
+ SpoolsDistribution = value ? SpoolsDistributions.AllSegments.ToInt32() : SpoolsDistributions.SingleSegment.ToInt32();
+ RaisePropertyChangedAuto();
}
}
- protected String _description;
-
/// <summary>
- /// Gets or sets the job description.
+ /// Gets or sets the effective segments.
/// </summary>
-
- [Column("DESCRIPTION")]
-
- public String Description
+ [NotMapped]
+ [JsonIgnore]
+ public ObservableCollection<Segment> EffectiveSegments
{
- get
+ get
{
- return _description;
- }
-
- set
- {
- if (_description != value)
+ if (EnableInterSegment && IsAllSegmentsPerSpool)
{
- _description = value;
-
- OnDescriptionChanged(value);
+ int max = Segments.Max(x => x.SegmentIndex);
- }
- }
- }
-
- protected Double _intersegmentlength;
-
- /// <summary>
- /// Gets or sets the job inter segment length.
- /// </summary>
-
- [Column("INTER_SEGMENT_LENGTH")]
-
- public Double InterSegmentLength
- {
- get
- {
- return _intersegmentlength;
- }
+ ObservableCollection<Segment> effectiveSegments = new ObservableCollection<Segment>();
- set
- {
- if (_intersegmentlength != value)
- {
- _intersegmentlength = value;
+ foreach (var s in Segments.ToList().OrderBy(x => x.SegmentIndex))
+ {
+ effectiveSegments.Add(s);
- OnInterSegmentLengthChanged(value);
+ if (s.SegmentIndex != max)
+ {
+ effectiveSegments.Add(CreateInterSegment(InterSegmentLength));
+ }
+ }
+ return effectiveSegments;
}
- }
- }
-
- protected Boolean _enableintersegment;
-
- /// <summary>
- /// Gets or sets the job enable inter segment.
- /// </summary>
-
- [Column("ENABLE_INTER_SEGMENT")]
-
- public Boolean EnableInterSegment
- {
- get
- {
- return _enableintersegment;
- }
-
- set
- {
- if (_enableintersegment != value)
+ else
{
- _enableintersegment = value;
-
- OnEnableInterSegmentChanged(value);
-
+ return Segments.OrderBy(x => x.SegmentIndex).ToObservableCollection();
}
}
}
- protected Boolean _enablelubrication;
-
/// <summary>
- /// Gets or sets the job enable lubrication.
+ /// Gets the ordered segments.
/// </summary>
-
- [Column("ENABLE_LUBRICATION")]
-
- public Boolean EnableLubrication
+ [NotMapped]
+ [JsonIgnore]
+ public ObservableCollection<Segment> OrderedSegments
{
- get
+ get
{
- return _enablelubrication;
- }
-
- set
- {
- if (_enablelubrication != value)
- {
- _enablelubrication = value;
-
- OnEnableLubricationChanged(value);
-
- }
+ return Segments.OrderBy(x => x.SegmentIndex).ToObservableCollection();
}
}
- protected Int32 _jobindex;
-
/// <summary>
- /// Gets or sets the job job index.
+ /// Gets or sets the job fine tuning status.
/// </summary>
-
- [Column("JOB_INDEX")]
-
- public Int32 JobIndex
+ [NotMapped]
+ [JsonIgnore]
+ public FineTuningStatuses JobFineTuningStatus
{
- get
- {
- return _jobindex;
- }
-
- set
- {
- if (_jobindex != value)
- {
- _jobindex = value;
-
- OnJobIndexChanged(value);
-
- }
- }
+ get { return (FineTuningStatuses)FineTuningStatus; }
+ set { FineTuningStatus = value.ToInt32(); RaisePropertyChangedAuto(); }
}
- protected Int32 _estimateddurationmili;
-
/// <summary>
- /// Gets or sets the job estimated duration mili.
+ /// Gets or sets the job sample dye status.
/// </summary>
-
- [Column("ESTIMATED_DURATION_MILI")]
-
- public Int32 EstimatedDurationMili
+ [NotMapped]
+ [JsonIgnore]
+ public SampleDyeStatuses JobSampleDyeStatus
{
- get
- {
- return _estimateddurationmili;
- }
-
- set
- {
- if (_estimateddurationmili != value)
- {
- _estimateddurationmili = value;
-
- OnEstimatedDurationMiliChanged(value);
-
- }
- }
+ get { return (SampleDyeStatuses)SampleDyeStatus; }
+ set { SampleDyeStatus = value.ToInt32(); RaisePropertyChangedAuto(); }
}
- protected Boolean _hasembroideryfile;
-
- /// <summary>
- /// Gets or sets the job has embroidery file.
- /// </summary>
-
- [Column("HAS_EMBROIDERY_FILE")]
-
- public Boolean HasEmbroideryFile
+ private JobDesignations _designation;
+ [NotMapped]
+ [JsonIgnore]
+ public JobDesignations Designation
{
- get
- {
- return _hasembroideryfile;
- }
-
- set
- {
- if (_hasembroideryfile != value)
- {
- _hasembroideryfile = value;
-
- OnHasEmbroideryFileChanged(value);
-
- }
- }
+ get { return _designation; }
+ set { _designation = value; RaisePropertyChangedAuto(); }
}
- protected Byte[] _embroideryfiledata;
-
- /// <summary>
- /// Gets or sets the job embroidery file data.
- /// </summary>
-
- [Column("EMBROIDERY_FILE_DATA")]
-
- public Byte[] EmbroideryFileData
+ [NotMapped]
+ [JsonIgnore]
+ public EditingStates JobEditingState
{
- get
- {
- return _embroideryfiledata;
- }
-
- set
- {
- if (_embroideryfiledata != value)
- {
- _embroideryfiledata = value;
-
- OnEmbroideryFileDataChanged(value);
-
- }
- }
+ get { return (EditingStates)EditingState; }
+ set { EditingState = value.ToInt32(); RaisePropertyChangedAuto(); }
}
- protected String _embroideryfilename;
-
- /// <summary>
- /// Gets or sets the job embroidery file name.
- /// </summary>
-
- [Column("EMBROIDERY_FILE_NAME")]
-
- public String EmbroideryFileName
- {
- get
- {
- return _embroideryfilename;
- }
-
- set
- {
- if (_embroideryfilename != value)
- {
- _embroideryfilename = value;
-
- OnEmbroideryFileNameChanged(value);
+ #endregion
- }
- }
- }
-
- protected Byte[] _embroideryjpeg;
+ #region Event Handlers
/// <summary>
- /// Gets or sets the job embroidery jpeg.
+ /// Handles the CollectionChanged event of the Segments collection.
/// </summary>
-
- [Column("EMBROIDERY_JPEG")]
-
- public Byte[] EmbroideryJpeg
+ /// <param name="sender">The source of the event.</param>
+ /// <param name="e">The <see cref="System.Collections.Specialized.NotifyCollectionChangedEventArgs"/> instance containing the event data.</param>
+ private void Segments_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
{
- get
+ foreach (var segment in Segments.ToList())
{
- return _embroideryjpeg;
+ segment.PropertyChanged -= Segment_PropertyChanged;
+ segment.PropertyChanged += Segment_PropertyChanged;
}
- set
- {
- if (_embroideryjpeg != value)
- {
- _embroideryjpeg = value;
-
- OnEmbroideryJpegChanged(value);
-
- }
- }
+ OnLengthChanged();
+ RaisePropertyChanged(nameof(EffectiveSegments));
}
- protected Int32 _status;
-
/// <summary>
- /// 0 = Draft
- /// 1 = Completed
- /// 2 = Disrupted
- /// 3 = Aborted
+ /// Handles the PropertyChanged event of all job segments.
/// </summary>
-
- [Column("STATUS")]
-
- public Int32 Status
+ /// <param name="sender">The source of the event.</param>
+ /// <param name="e">The <see cref="System.ComponentModel.PropertyChangedEventArgs"/> instance containing the event data.</param>
+ private void Segment_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
- get
- {
- return _status;
- }
-
- set
+ if (e.PropertyName == nameof(Segment.Length))
{
- if (_status != value)
- {
- _status = value;
-
- OnStatusChanged(value);
-
- }
+ OnLengthChanged();
}
}
- protected String _colorspaceguid;
+ #endregion
+
+ #region Virtual Methods
/// <summary>
- /// Gets or sets the job color space guid.
+ /// Called when the <see cref="Length"/> property has been changed
/// </summary>
-
- [Column("COLOR_SPACE_GUID")]
- [ForeignKey("ColorSpace")]
-
- public String ColorSpaceGuid
+ protected virtual void OnLengthChanged()
{
- get
- {
- return _colorspaceguid;
- }
-
- set
+ if (_lastLength != GetLength())
{
- if (_colorspaceguid != value)
- {
- _colorspaceguid = value;
- }
+ RaisePropertyChanged(nameof(Length));
+ RaisePropertyChanged(nameof(LengthIncludingNumberOfUnits));
+ LengthChanged?.Invoke(this, new EventArgs());
}
}
- protected Int32 _numberofunits;
+ #endregion
+
+ #region Override Methods
/// <summary>
- /// Gets or sets the job number of units.
+ /// Raises the property changed event.
/// </summary>
-
- [Column("NUMBER_OF_UNITS")]
-
- public Int32 NumberOfUnits
+ /// <param name="propName">Name of the property.</param>
+ protected override void RaisePropertyChanged(string propName)
{
- get
- {
- return _numberofunits;
- }
+ base.RaisePropertyChanged(propName);
- set
+ if (propName == nameof(Segments))
{
- if (_numberofunits != value)
+ if (Segments != null)
{
- _numberofunits = value;
-
- OnNumberOfUnitsChanged(value);
+ Segments.CollectionChanged -= Segments_CollectionChanged;
+ Segments.CollectionChanged += Segments_CollectionChanged;
+ OnLengthChanged();
+ RaisePropertyChanged(nameof(EffectiveSegments));
}
}
- }
-
- protected Int32 _type;
- /// <summary>
- /// 0 = Sewing
- /// 1 = Embroidery
- /// </summary>
-
- [Column("TYPE")]
-
- public Int32 Type
- {
- get
+ if (propName == nameof(InterSegmentLength) || propName == nameof(EnableInterSegment) || propName == nameof(SpoolsDistribution))
{
- return _type;
+ OnLengthChanged();
+ RaisePropertyChanged(nameof(EffectiveSegments));
}
- set
+ if (propName == nameof(ColorSpace))
{
- if (_type != value)
+ //Make all brush stops the same color space if job color space is not null!
+ if (ColorSpace != null)
{
- _type = value;
-
- OnTypeChanged(value);
-
+ Segments.SelectMany(x => x.BrushStops).ToList().ForEach(x => x.ColorSpace = ColorSpace);
}
}
- }
-
- protected String _customerguid;
-
- /// <summary>
- /// Gets or sets the job customer guid.
- /// </summary>
-
- [Column("CUSTOMER_GUID")]
- [ForeignKey("Customer")]
- public String CustomerGuid
- {
- get
+ if (propName == nameof(NumberOfUnits))
{
- return _customerguid;
+ LengthChanged?.Invoke(this, new EventArgs());
}
- set
+ if (propName == nameof(LengthPercentageFactor))
{
- if (_customerguid != value)
- {
- _customerguid = value;
- }
+ OnLengthChanged();
+ Segments.ToList().ForEach(x => x.RaiseLengthWithFactorChanged());
}
}
- protected Int32 _spoolsdistribution;
-
- /// <summary>
- /// 0 = All segments per spool
- /// 1 = One segments per spool
- /// </summary>
+ public override Job Clone()
+ {
+ Job cloned = base.Clone();
- [Column("SPOOLS_DISTRIBUTION")]
+ cloned.Name = Name + " - Copy";
+ cloned.CreationDate = DateTime.UtcNow;
+ cloned.LastRun = null;
+ cloned.ColorSpace = ColorSpace;
+ cloned.Customer = Customer;
+ cloned.Rml = Rml;
+ cloned.SpoolType = SpoolType;
+ cloned.WindingMethod = WindingMethod;
+ cloned.JobStatus = JobStatuses.Draft;
+ cloned.Segments = Segments.Select(x => x.Clone(cloned)).ToSynchronizedObservableCollection();
- public Int32 SpoolsDistribution
- {
- get
+ foreach (var segment in cloned.Segments)
{
- return _spoolsdistribution;
+ segment.JobGuid = cloned.Guid;
+ segment.Job = cloned;
}
- set
- {
- if (_spoolsdistribution != value)
- {
- _spoolsdistribution = value;
-
- OnSpoolsDistributionChanged(value);
-
- }
- }
+ return cloned;
}
- protected Int32 _numberofheads;
-
- /// <summary>
- /// Gets or sets the job number of heads.
- /// </summary>
-
- [Column("NUMBER_OF_HEADS")]
-
- public Int32 NumberOfHeads
+ public override void DefferedDelete(ObservablesContext context)
{
- get
- {
- return _numberofheads;
- }
-
- set
- {
- if (_numberofheads != value)
- {
- _numberofheads = value;
-
- OnNumberOfHeadsChanged(value);
-
- }
- }
+ Segments.ToList().ForEach(x => x.DefferedDelete(context));
+ Segments.Clear();
+ base.DefferedDelete(context);
}
- protected Int32 _sampleunitsormeters;
+ #endregion
- /// <summary>
- /// Gets or sets the job sample units or meters.
- /// </summary>
+ #region Private Methods
- [Column("SAMPLE_UNITS_OR_METERS")]
-
- public Int32 SampleUnitsOrMeters
+ private double GetLength()
{
- get
- {
- return _sampleunitsormeters;
- }
-
- set
- {
- if (_sampleunitsormeters != value)
- {
- _sampleunitsormeters = value;
-
- OnSampleUnitsOrMetersChanged(value);
-
- }
- }
+ return Segments.Sum(x => x.LengthWithFactor) + ((EnableInterSegment && IsAllSegmentsPerSpool) ? (InterSegmentLength * (Segments.Count > 0 ? Segments.Count - 1 : Segments.Count)) : 0);
}
- protected Int32 _finetuningstatus;
-
- /// <summary>
- /// 0 = Unspecified
- /// 1 = PendingApproval
- /// 2 = Approved
- /// </summary>
+ #endregion
- [Column("FINE_TUNING_STATUS")]
+ #region Public Methods
- public Int32 FineTuningStatus
+ public BitmapSource CreateSegmentsPie(double width, double height)
{
- get
- {
- return _finetuningstatus;
- }
+ Bitmap bmp = new Bitmap((int)width, (int)height);
- set
+ using (Graphics g = Graphics.FromImage(bmp))
{
- if (_finetuningstatus != value)
- {
- _finetuningstatus = value;
-
- OnFineTuningStatusChanged(value);
-
- }
- }
- }
+ g.Clear(Color.Transparent);
+ g.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
+ g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.High;
+ g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
- protected Nullable<DateTime> _finetuningapprovedate;
+ int fromAngle = -90;
+ double totalLength = Segments.Sum(x => x.Length); //Excluding inter segment.
- /// <summary>
- /// Gets or sets the job fine tuning approve date.
- /// </summary>
-
- [Column("FINE_TUNING_APPROVE_DATE")]
-
- public Nullable<DateTime> FineTuningApproveDate
- {
- get
- {
- return _finetuningapprovedate;
- }
-
- set
- {
- if (_finetuningapprovedate != value)
+ foreach (var segment in OrderedSegments)
{
- _finetuningapprovedate = value;
-
- OnFineTuningApproveDateChanged(value);
+ int toAngle = (int)((segment.Length / totalLength) * 360d);
+ Rectangle rect = new Rectangle(0, 0, bmp.Width - 2, bmp.Height - 2);
+ g.FillPie(segment.CreateGdiBrush(bmp.Width - 2, bmp.Height - 2), rect, fromAngle, toAngle);
+ Pen pen = new Pen(Color.Gainsboro);
+ g.DrawEllipse(pen, rect);
+ pen.Dispose();
+ fromAngle += toAngle;
}
}
- }
- protected Int32 _sampledyestatus;
+ var source = bmp.ToBitmapSource();
+ bmp.Dispose();
+ return source;
+ }
/// <summary>
- /// 0 = Unspecified
- /// 1 = PendingApproval
- /// 2 = Approved
+ /// Adds a new solid segment.
/// </summary>
-
- [Column("SAMPLE_DYE_STATUS")]
-
- public Int32 SampleDyeStatus
+ public Segment AddSolidSegment()
{
- get
- {
- return _sampledyestatus;
- }
-
- set
- {
- if (_sampledyestatus != value)
- {
- _sampledyestatus = value;
-
- OnSampleDyeStatusChanged(value);
-
- }
- }
+ return AddSolidSegment(System.Windows.Media.Colors.Black);
}
- protected Nullable<DateTime> _sampledyeapprovedate;
-
/// <summary>
- /// Gets or sets the job sample dye approve date.
+ /// Adds a new solid segment.
/// </summary>
-
- [Column("SAMPLE_DYE_APPROVE_DATE")]
-
- public Nullable<DateTime> SampleDyeApproveDate
+ public Segment AddSolidSegment(System.Windows.Media.Color color)
{
- get
- {
- return _sampledyeapprovedate;
- }
-
- set
- {
- if (_sampledyeapprovedate != value)
- {
- _sampledyeapprovedate = value;
-
- OnSampleDyeApproveDateChanged(value);
-
- }
- }
+ return AddSolidSegment(color, 10);
}
- protected Int32 _editingstate;
-
/// <summary>
- /// 0 = Default
- /// 1 = SampleDye
- /// 2 = FineTuning
+ /// Adds a new solid segment.
/// </summary>
-
- [Column("EDITING_STATE")]
-
- public Int32 EditingState
+ public Segment AddSolidSegment(double length)
{
- get
- {
- return _editingstate;
- }
-
- set
- {
- if (_editingstate != value)
- {
- _editingstate = value;
-
- OnEditingStateChanged(value);
-
- }
- }
+ return AddSolidSegment(System.Windows.Media.Colors.White, length);
}
- protected Double _lengthpercentagefactor;
-
/// <summary>
- /// Gets or sets the job length percentage factor.
+ /// Adds a new solid segment.
/// </summary>
-
- [Column("LENGTH_PERCENTAGE_FACTOR")]
-
- public Double LengthPercentageFactor
+ public Segment AddSolidSegment(System.Windows.Media.Color color, double length)
{
- get
- {
- return _lengthpercentagefactor;
- }
+ Segment segment = new Segment();
+ segment.Name = "Standard Segment";
- set
+ if (Segments.Count > 0)
{
- if (_lengthpercentagefactor != value)
- {
- _lengthpercentagefactor = value;
-
- OnLengthPercentageFactorChanged(value);
-
- }
+ segment.SegmentIndex = Segments.Max(x => x.SegmentIndex) + 1;
}
- }
-
- protected ColorSpace _colorspace;
-
- /// <summary>
- /// Gets or sets the job color spaces.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual ColorSpace ColorSpace
- {
- get
+ else
{
- return _colorspace;
+ segment.SegmentIndex = 1;
}
- set
- {
- if (_colorspace != value)
- {
- _colorspace = value;
+ segment.Length = length;
- OnColorSpaceChanged(value);
+ segment.Job = this;
- }
- }
- }
+ var stop = segment.AddBrushStop();
+ stop.Color = color;
+ Segments.Add(segment);
- protected Customer _customer;
+ return segment;
+ }
/// <summary>
- /// Gets or sets the job customer.
+ /// Adds a new gradient segment.
/// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual Customer Customer
+ public Segment AddGradientSegment()
{
- get
- {
- return _customer;
- }
-
- set
- {
- if (_customer != value)
- {
- _customer = value;
-
- OnCustomerChanged(value);
-
- }
- }
+ return AddGradientSegment(10);
}
- protected SynchronizedObservableCollection<JobRun> _jobruns;
-
/// <summary>
- /// Gets or sets the job job runs.
+ /// Adds a new gradient segment.
/// </summary>
-
- public virtual SynchronizedObservableCollection<JobRun> JobRuns
+ public Segment AddGradientSegment(double length)
{
- get
- {
- return _jobruns;
- }
-
- set
- {
- if (_jobruns != value)
- {
- _jobruns = value;
-
- OnJobRunsChanged(value);
-
- }
- }
+ var segment = AddSolidSegment(length);
+ segment.BrushStops.Last().Color = System.Windows.Media.Colors.Silver;
+ segment.AddBrushStop();
+ segment.BrushStops.Last().Color = System.Windows.Media.Colors.DimGray;
+ return segment;
}
- protected Machine _machine;
-
/// <summary>
- /// Gets or sets the job machine.
+ /// Gets the duration estimation for this job.
/// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual Machine Machine
+ /// <param name="processParameters">The process parameters.</param>
+ /// <returns></returns>
+ public TimeSpan GetEstimatedDuration(ProcessParametersTable processParameters)
{
- get
- {
- return _machine;
- }
-
- set
+ if (processParameters.DyeingSpeed == 0)
{
- if (_machine != value)
- {
- _machine = value;
-
- OnMachineChanged(value);
-
- }
+ throw new ArgumentException("Process parameters dying speed cannot be zero.");
}
+ return TimeSpan.FromSeconds((LengthIncludingNumberOfUnits + processParameters.DryerBufferLength) / (processParameters.DyeingSpeed / 100d));
}
- protected Rml _rml;
-
/// <summary>
- /// Gets or sets the job rml.
+ /// Translates the job progress to time.
/// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual Rml Rml
+ /// <param name="progress">The progress.</param>
+ /// <param name="processParameters">The process parameters.</param>
+ /// <returns></returns>
+ public static TimeSpan TranslateProgressToTime(double progress, ProcessParametersTable processParameters)
{
- get
- {
- return _rml;
- }
-
- set
- {
- if (_rml != value)
- {
- _rml = value;
-
- OnRmlChanged(value);
-
- }
- }
+ return TimeSpan.FromSeconds(progress / (processParameters.DyeingSpeed / 100d));
}
- protected SpoolType _spooltype;
-
/// <summary>
- /// Gets or sets the job spool types.
+ /// Creates an inter segment.
/// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual SpoolType SpoolType
+ /// <param name="length">The length.</param>
+ /// <returns></returns>
+ public static Segment CreateInterSegment(double length)
{
- get
- {
- return _spooltype;
- }
-
- set
+ return new Segment()
{
- if (_spooltype != value)
- {
- _spooltype = value;
-
- OnSpoolTypeChanged(value);
-
- }
- }
+ IsInterSegment = true,
+ Length = length,
+ Name = "Inter Segment",
+ BrushStops = new SynchronizedObservableCollection<BrushStop>()
+ {
+ new BrushStop()
+ {
+ ColorSpace = new ColorSpace(),
+ Color = System.Windows.Media.Colors.White,
+ }
+ },
+ };
}
- protected User _user;
-
- /// <summary>
- /// Gets or sets the job user.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual User User
+ public Task<JobFile> ToJobFile()
{
- get
- {
- return _user;
- }
-
- set
+ return Task.Factory.StartNew<JobFile>(() =>
{
- if (_user != value)
+ using (ObservablesContext db = ObservablesContext.CreateDefault())
{
- _user = value;
+ var job = new JobBuilder(db).Set(Guid).WithUser().WithRML().WithSegments().WithBrushStops().Build();
- OnUserChanged(value);
+ var jobFile = new JobFile();
- }
- }
- }
+ jobFile.ColorSpaceGuid = job.ColorSpaceGuid.ToStringOrEmpty();
+ jobFile.Customer = job.Customer != null ? job.Customer.Name : String.Empty;
+ jobFile.Description = job.Description.ToStringOrEmpty();
- protected WindingMethod _windingmethod;
+ if (job.HasEmbroideryFile)
+ {
+ jobFile.HasEmbroideryFile = job.HasEmbroideryFile;
+ jobFile.EmbroideryFileData = ByteString.CopyFrom(job.EmbroideryFileData);
+ jobFile.EmbroideryFileName = job.EmbroideryFileName;
+ jobFile.EmbroideryJpeg = ByteString.CopyFrom(job.EmbroideryJpeg);
+ }
- /// <summary>
- /// Gets or sets the job winding methods.
- /// </summary>
+ jobFile.EnableInterSegment = job.EnableInterSegment;
+ jobFile.EnableLubrication = job.EnableLubrication;
+ jobFile.InterSegmentLength = job.InterSegmentLength;
+ jobFile.LengthPercentageFactor = job.LengthPercentageFactor;
+ jobFile.Name = job.Name.ToStringOrEmpty();
+ jobFile.NumberOfUnits = job.NumberOfUnits;
+ jobFile.RmlGuid = job.RmlGuid;
+ jobFile.SampleUnitsOrMeters = job.SampleUnitsOrMeters;
+ jobFile.SpoolsDistribution = job.SpoolsDistribution;
+ jobFile.SpoolTypeGuid = job.SpoolTypeGuid;
+ jobFile.Type = job.Type;
+ jobFile.WindingMethodGuid = job.WindingMethodGuid;
- [XmlIgnore]
- [JsonIgnore]
- public virtual WindingMethod WindingMethod
- {
- get
- {
- return _windingmethod;
- }
+ foreach (var segment in job.OrderedSegments)
+ {
+ JobFileSegment s = new JobFileSegment();
+ s.Length = segment.Length;
+ s.Name = segment.Name.ToStringOrEmpty();
+ jobFile.Segments.Add(s);
- set
- {
- if (_windingmethod != value)
- {
- _windingmethod = value;
-
- OnWindingMethodChanged(value);
+ foreach (var stop in segment.BrushStops.OrderBy(x => x.StopIndex))
+ {
+ JobFileBrushStop st = new JobFileBrushStop();
+ stop.MapPrimitivesWithStringsNoNullsTo(st);
+ s.BrushStops.Add(st);
+ }
+ }
+ return jobFile;
}
- }
+ });
}
- protected SynchronizedObservableCollection<Segment> _segments;
-
- /// <summary>
- /// Gets or sets the job segments.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Segment> Segments
+ public static Task<Job> FromJobFile(JobFile jobFile, String machineGuid, String userGuid)
{
- get
+ return Task.Factory.StartNew(() =>
{
- return _segments;
- }
-
- set
- {
- if (_segments != value)
+ using (ObservablesContext db = ObservablesContext.CreateDefault())
{
- _segments = value;
+ var job = new Job();
+ job.MachineGuid = machineGuid;
+ job.UserGuid = userGuid;
- OnSegmentsChanged(value);
+ var job_color_space = db.ColorSpaces.SingleOrDefault(x => x.Guid == jobFile.ColorSpaceGuid);
+ if (job_color_space == null) throw new ArgumentException("Could not load the specified job file. Job color space could not be located on database.");
+ job.ColorSpaceGuid = jobFile.ColorSpaceGuid;
- }
- }
- }
- /// <summary>
- /// Called when the CreationDate has changed.
- /// </summary>
- protected virtual void OnCreationDateChanged(DateTime creationdate)
- {
- CreationDateChanged?.Invoke(this, creationdate);
- RaisePropertyChanged(nameof(CreationDate));
- }
+ var job_customer = db.Customers.FirstOrDefault(x => x.Name == jobFile.Customer);
- /// <summary>
- /// Called when the LastRun has changed.
- /// </summary>
- protected virtual void OnLastRunChanged(Nullable<DateTime> lastrun)
- {
- LastRunChanged?.Invoke(this, lastrun);
- RaisePropertyChanged(nameof(LastRun));
- }
+ if (job_customer != null)
+ {
+ job.CustomerGuid = job_customer.Guid;
+ }
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
+ job.Description = jobFile.Description.ToNullIfEmpty();
- /// <summary>
- /// Called when the Description has changed.
- /// </summary>
- protected virtual void OnDescriptionChanged(String description)
- {
- DescriptionChanged?.Invoke(this, description);
- RaisePropertyChanged(nameof(Description));
- }
+ if (jobFile.HasEmbroideryFile)
+ {
+ job.HasEmbroideryFile = jobFile.HasEmbroideryFile;
+ job.EmbroideryFileData = jobFile.EmbroideryFileData.ToByteArray();
+ job.EmbroideryFileName = jobFile.EmbroideryFileName;
+ job.EmbroideryJpeg = jobFile.EmbroideryJpeg.ToByteArray();
+ }
+ job.EnableInterSegment = jobFile.EnableInterSegment;
+ job.EnableLubrication = jobFile.EnableLubrication;
+ job.InterSegmentLength = jobFile.InterSegmentLength;
+ job.LengthPercentageFactor = jobFile.LengthPercentageFactor;
+ job.Name = jobFile.Name.ToNullIfEmpty();
+ job.NumberOfUnits = jobFile.NumberOfUnits;
- /// <summary>
- /// Called when the InterSegmentLength has changed.
- /// </summary>
- protected virtual void OnInterSegmentLengthChanged(Double intersegmentlength)
- {
- InterSegmentLengthChanged?.Invoke(this, intersegmentlength);
- RaisePropertyChanged(nameof(InterSegmentLength));
- }
+ var job_rml = db.Rmls.SingleOrDefault(x => x.Guid == jobFile.RmlGuid);
- /// <summary>
- /// Called when the EnableInterSegment has changed.
- /// </summary>
- protected virtual void OnEnableInterSegmentChanged(Boolean enableintersegment)
- {
- EnableInterSegmentChanged?.Invoke(this, enableintersegment);
- RaisePropertyChanged(nameof(EnableInterSegment));
- }
+ if (job_rml == null) throw new ArgumentException("Could not load the specified job file. Job media type could not be located on database.");
- /// <summary>
- /// Called when the EnableLubrication has changed.
- /// </summary>
- protected virtual void OnEnableLubricationChanged(Boolean enablelubrication)
- {
- EnableLubricationChanged?.Invoke(this, enablelubrication);
- RaisePropertyChanged(nameof(EnableLubrication));
- }
+ job.RmlGuid = jobFile.RmlGuid;
+ job.SampleUnitsOrMeters = jobFile.SampleUnitsOrMeters;
+ job.SpoolsDistribution = jobFile.SpoolsDistribution;
- /// <summary>
- /// Called when the JobIndex has changed.
- /// </summary>
- protected virtual void OnJobIndexChanged(Int32 jobindex)
- {
- JobIndexChanged?.Invoke(this, jobindex);
- RaisePropertyChanged(nameof(JobIndex));
- }
+ var job_spool_type = db.SpoolTypes.SingleOrDefault(x => x.Guid == jobFile.SpoolTypeGuid);
- /// <summary>
- /// Called when the EstimatedDurationMili has changed.
- /// </summary>
- protected virtual void OnEstimatedDurationMiliChanged(Int32 estimateddurationmili)
- {
- EstimatedDurationMiliChanged?.Invoke(this, estimateddurationmili);
- RaisePropertyChanged(nameof(EstimatedDurationMili));
- }
+ if (job_spool_type == null) throw new ArgumentException("Could not load the specified job file. Job spool type could not be located on database.");
- /// <summary>
- /// Called when the HasEmbroideryFile has changed.
- /// </summary>
- protected virtual void OnHasEmbroideryFileChanged(Boolean hasembroideryfile)
- {
- HasEmbroideryFileChanged?.Invoke(this, hasembroideryfile);
- RaisePropertyChanged(nameof(HasEmbroideryFile));
- }
+ job.SpoolTypeGuid = jobFile.SpoolTypeGuid;
+ job.Type = jobFile.Type;
- /// <summary>
- /// Called when the EmbroideryFileData has changed.
- /// </summary>
- protected virtual void OnEmbroideryFileDataChanged(Byte[] embroideryfiledata)
- {
- EmbroideryFileDataChanged?.Invoke(this, embroideryfiledata);
- RaisePropertyChanged(nameof(EmbroideryFileData));
- }
+ var job_winding_method = db.WindingMethods.Single(x => x.Guid == jobFile.WindingMethodGuid);
- /// <summary>
- /// Called when the EmbroideryFileName has changed.
- /// </summary>
- protected virtual void OnEmbroideryFileNameChanged(String embroideryfilename)
- {
- EmbroideryFileNameChanged?.Invoke(this, embroideryfilename);
- RaisePropertyChanged(nameof(EmbroideryFileName));
- }
+ if (job_winding_method == null) throw new ArgumentException("Could not load the specified job file. Job winding method could not be located on database.");
- /// <summary>
- /// Called when the EmbroideryJpeg has changed.
- /// </summary>
- protected virtual void OnEmbroideryJpegChanged(Byte[] embroideryjpeg)
- {
- EmbroideryJpegChanged?.Invoke(this, embroideryjpeg);
- RaisePropertyChanged(nameof(EmbroideryJpeg));
- }
+ job.WindingMethodGuid = jobFile.WindingMethodGuid;
- /// <summary>
- /// Called when the Status has changed.
- /// </summary>
- protected virtual void OnStatusChanged(Int32 status)
- {
- StatusChanged?.Invoke(this, status);
- RaisePropertyChanged(nameof(Status));
- }
+ for (int i = 0; i < jobFile.Segments.Count; i++)
+ {
+ var segment = jobFile.Segments[i];
+ Segment s = new Segment();
+ s.JobGuid = job.Guid;
+ s.Name = segment.Name.ToNullIfEmpty();
+ s.Length = segment.Length;
+ s.SegmentIndex = i + 1;
+ job.Segments.Add(s);
- /// <summary>
- /// Called when the NumberOfUnits has changed.
- /// </summary>
- protected virtual void OnNumberOfUnitsChanged(Int32 numberofunits)
- {
- NumberOfUnitsChanged?.Invoke(this, numberofunits);
- RaisePropertyChanged(nameof(NumberOfUnits));
- }
+ for (int j = 0; j < segment.BrushStops.Count; j++)
+ {
+ var stop = segment.BrushStops[j];
- /// <summary>
- /// Called when the Type has changed.
- /// </summary>
- protected virtual void OnTypeChanged(Int32 type)
- {
- TypeChanged?.Invoke(this, type);
- RaisePropertyChanged(nameof(Type));
- }
+ var stop_color_space = db.ColorSpaces.SingleOrDefault(x => x.Guid == stop.ColorSpaceGuid);
+ if (stop_color_space == null) throw new ArgumentException("Could not load the specified job file. Job brush stop color space could not be located on database.");
- /// <summary>
- /// Called when the SpoolsDistribution has changed.
- /// </summary>
- protected virtual void OnSpoolsDistributionChanged(Int32 spoolsdistribution)
- {
- SpoolsDistributionChanged?.Invoke(this, spoolsdistribution);
- RaisePropertyChanged(nameof(SpoolsDistribution));
- }
+ if (!String.IsNullOrWhiteSpace(stop.ColorCatalogGuid))
+ {
+ var stop_color_catalog = db.ColorCatalogs.SingleOrDefault(x => x.Guid == stop.ColorCatalogGuid);
+ if (stop_color_catalog == null) throw new ArgumentException("Could not load the specified job file. Job brush stop catalog color could not be located on database.");
+ }
- /// <summary>
- /// Called when the NumberOfHeads has changed.
- /// </summary>
- protected virtual void OnNumberOfHeadsChanged(Int32 numberofheads)
- {
- NumberOfHeadsChanged?.Invoke(this, numberofheads);
- RaisePropertyChanged(nameof(NumberOfHeads));
- }
-
- /// <summary>
- /// Called when the SampleUnitsOrMeters has changed.
- /// </summary>
- protected virtual void OnSampleUnitsOrMetersChanged(Int32 sampleunitsormeters)
- {
- SampleUnitsOrMetersChanged?.Invoke(this, sampleunitsormeters);
- RaisePropertyChanged(nameof(SampleUnitsOrMeters));
- }
-
- /// <summary>
- /// Called when the FineTuningStatus has changed.
- /// </summary>
- protected virtual void OnFineTuningStatusChanged(Int32 finetuningstatus)
- {
- FineTuningStatusChanged?.Invoke(this, finetuningstatus);
- RaisePropertyChanged(nameof(FineTuningStatus));
- }
-
- /// <summary>
- /// Called when the FineTuningApproveDate has changed.
- /// </summary>
- protected virtual void OnFineTuningApproveDateChanged(Nullable<DateTime> finetuningapprovedate)
- {
- FineTuningApproveDateChanged?.Invoke(this, finetuningapprovedate);
- RaisePropertyChanged(nameof(FineTuningApproveDate));
- }
-
- /// <summary>
- /// Called when the SampleDyeStatus has changed.
- /// </summary>
- protected virtual void OnSampleDyeStatusChanged(Int32 sampledyestatus)
- {
- SampleDyeStatusChanged?.Invoke(this, sampledyestatus);
- RaisePropertyChanged(nameof(SampleDyeStatus));
- }
-
- /// <summary>
- /// Called when the SampleDyeApproveDate has changed.
- /// </summary>
- protected virtual void OnSampleDyeApproveDateChanged(Nullable<DateTime> sampledyeapprovedate)
- {
- SampleDyeApproveDateChanged?.Invoke(this, sampledyeapprovedate);
- RaisePropertyChanged(nameof(SampleDyeApproveDate));
- }
-
- /// <summary>
- /// Called when the EditingState has changed.
- /// </summary>
- protected virtual void OnEditingStateChanged(Int32 editingstate)
- {
- EditingStateChanged?.Invoke(this, editingstate);
- RaisePropertyChanged(nameof(EditingState));
- }
-
- /// <summary>
- /// Called when the LengthPercentageFactor has changed.
- /// </summary>
- protected virtual void OnLengthPercentageFactorChanged(Double lengthpercentagefactor)
- {
- LengthPercentageFactorChanged?.Invoke(this, lengthpercentagefactor);
- RaisePropertyChanged(nameof(LengthPercentageFactor));
- }
-
- /// <summary>
- /// Called when the ColorSpace has changed.
- /// </summary>
- protected virtual void OnColorSpaceChanged(ColorSpace colorspace)
- {
- ColorSpaceChanged?.Invoke(this, colorspace);
- RaisePropertyChanged(nameof(ColorSpace));
- }
-
- /// <summary>
- /// Called when the Customer has changed.
- /// </summary>
- protected virtual void OnCustomerChanged(Customer customer)
- {
- CustomerChanged?.Invoke(this, customer);
- RaisePropertyChanged(nameof(Customer));
- }
-
- /// <summary>
- /// Called when the JobRuns has changed.
- /// </summary>
- protected virtual void OnJobRunsChanged(SynchronizedObservableCollection<JobRun> jobruns)
- {
- JobRunsChanged?.Invoke(this, jobruns);
- RaisePropertyChanged(nameof(JobRuns));
- }
+ BrushStop st = new BrushStop();
+ st.StopIndex = j + 1;
+ st.SegmentGuid = s.Guid;
+ stop.MapPrimitivesWithStringsNoNullsTo(st);
+ s.BrushStops.Add(st);
+ }
+ }
- /// <summary>
- /// Called when the Machine has changed.
- /// </summary>
- protected virtual void OnMachineChanged(Machine machine)
- {
- MachineChanged?.Invoke(this, machine);
- RaisePropertyChanged(nameof(Machine));
+ return job;
+ }
+ });
}
- /// <summary>
- /// Called when the Rml has changed.
- /// </summary>
- protected virtual void OnRmlChanged(Rml rml)
- {
- RmlChanged?.Invoke(this, rml);
- RaisePropertyChanged(nameof(Rml));
- }
+ #endregion
- /// <summary>
- /// Called when the SpoolType has changed.
- /// </summary>
- protected virtual void OnSpoolTypeChanged(SpoolType spooltype)
- {
- SpoolTypeChanged?.Invoke(this, spooltype);
- RaisePropertyChanged(nameof(SpoolType));
- }
+ #region Validation
- /// <summary>
- /// Called when the User has changed.
- /// </summary>
- protected virtual void OnUserChanged(User user)
+ protected override void OnValidating(ObservablesContext context)
{
- UserChanged?.Invoke(this, user);
- RaisePropertyChanged(nameof(User));
- }
+ base.OnValidating(context);
- /// <summary>
- /// Called when the WindingMethod has changed.
- /// </summary>
- protected virtual void OnWindingMethodChanged(WindingMethod windingmethod)
- {
- WindingMethodChanged?.Invoke(this, windingmethod);
- RaisePropertyChanged(nameof(WindingMethod));
+ if (String.IsNullOrWhiteSpace(Name))
+ {
+ InsertError(nameof(Name), "Job name is required");
+ }
}
- /// <summary>
- /// Called when the Segments has changed.
- /// </summary>
- protected virtual void OnSegmentsChanged(SynchronizedObservableCollection<Segment> segments)
- {
- SegmentsChanged?.Invoke(this, segments);
- RaisePropertyChanged(nameof(Segments));
- }
+ #endregion
/// <summary>
/// Initializes a new instance of the <see cref="Job" /> class.
@@ -1510,10 +669,6 @@ namespace Tango.BL.Entities
public Job() : base()
{
- JobRuns = new SynchronizedObservableCollection<JobRun>();
-
- Segments = new SynchronizedObservableCollection<Segment>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/JobBase.cs b/Software/Visual_Studio/Tango.BL/Entities/JobBase.cs
new file mode 100644
index 000000000..55c06beff
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/JobBase.cs
@@ -0,0 +1,1519 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+
+ /// <summary>
+ ///
+ /// </summary>
+
+ [Table("JOBS")]
+ public abstract class JobBase : ObservableEntity<Job>
+ {
+
+ public event EventHandler<DateTime> CreationDateChanged;
+
+ public event EventHandler<Nullable<DateTime>> LastRunChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<String> DescriptionChanged;
+
+ public event EventHandler<Double> InterSegmentLengthChanged;
+
+ public event EventHandler<Boolean> EnableInterSegmentChanged;
+
+ public event EventHandler<Boolean> EnableLubricationChanged;
+
+ public event EventHandler<Int32> JobIndexChanged;
+
+ public event EventHandler<Int32> EstimatedDurationMiliChanged;
+
+ public event EventHandler<Boolean> HasEmbroideryFileChanged;
+
+ public event EventHandler<Byte[]> EmbroideryFileDataChanged;
+
+ public event EventHandler<String> EmbroideryFileNameChanged;
+
+ public event EventHandler<Byte[]> EmbroideryJpegChanged;
+
+ public event EventHandler<Int32> StatusChanged;
+
+ public event EventHandler<Int32> NumberOfUnitsChanged;
+
+ public event EventHandler<Int32> TypeChanged;
+
+ public event EventHandler<Int32> SpoolsDistributionChanged;
+
+ public event EventHandler<Int32> NumberOfHeadsChanged;
+
+ public event EventHandler<Int32> SampleUnitsOrMetersChanged;
+
+ public event EventHandler<Int32> FineTuningStatusChanged;
+
+ public event EventHandler<Nullable<DateTime>> FineTuningApproveDateChanged;
+
+ public event EventHandler<Int32> SampleDyeStatusChanged;
+
+ public event EventHandler<Nullable<DateTime>> SampleDyeApproveDateChanged;
+
+ public event EventHandler<Int32> EditingStateChanged;
+
+ public event EventHandler<Double> LengthPercentageFactorChanged;
+
+ public event EventHandler<ColorSpace> ColorSpaceChanged;
+
+ public event EventHandler<Customer> CustomerChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<JobRun>> JobRunsChanged;
+
+ public event EventHandler<Machine> MachineChanged;
+
+ public event EventHandler<Rml> RmlChanged;
+
+ public event EventHandler<SpoolType> SpoolTypeChanged;
+
+ public event EventHandler<User> UserChanged;
+
+ public event EventHandler<WindingMethod> WindingMethodChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Segment>> SegmentsChanged;
+
+ protected DateTime _creationdate;
+
+ /// <summary>
+ /// Gets or sets the jobbase creation date.
+ /// </summary>
+
+ [Column("CREATION_DATE")]
+
+ public DateTime CreationDate
+ {
+ get
+ {
+ return _creationdate;
+ }
+
+ set
+ {
+ if (_creationdate != value)
+ {
+ _creationdate = value;
+
+ OnCreationDateChanged(value);
+
+ }
+ }
+ }
+
+ protected Nullable<DateTime> _lastrun;
+
+ /// <summary>
+ /// Gets or sets the jobbase last run.
+ /// </summary>
+
+ [Column("LAST_RUN")]
+
+ public Nullable<DateTime> LastRun
+ {
+ get
+ {
+ return _lastrun;
+ }
+
+ set
+ {
+ if (_lastrun != value)
+ {
+ _lastrun = value;
+
+ OnLastRunChanged(value);
+
+ }
+ }
+ }
+
+ protected String _machineguid;
+
+ /// <summary>
+ /// Gets or sets the jobbase machine guid.
+ /// </summary>
+
+ [Column("MACHINE_GUID")]
+ [ForeignKey("Machine")]
+
+ public String MachineGuid
+ {
+ get
+ {
+ return _machineguid;
+ }
+
+ set
+ {
+ if (_machineguid != value)
+ {
+ _machineguid = value;
+ }
+ }
+ }
+
+ protected String _userguid;
+
+ /// <summary>
+ /// Gets or sets the jobbase user guid.
+ /// </summary>
+
+ [Column("USER_GUID")]
+ [ForeignKey("User")]
+
+ public String UserGuid
+ {
+ get
+ {
+ return _userguid;
+ }
+
+ set
+ {
+ if (_userguid != value)
+ {
+ _userguid = value;
+ }
+ }
+ }
+
+ protected String _rmlguid;
+
+ /// <summary>
+ /// Gets or sets the jobbase rml guid.
+ /// </summary>
+
+ [Column("RML_GUID")]
+ [ForeignKey("Rml")]
+
+ public String RmlGuid
+ {
+ get
+ {
+ return _rmlguid;
+ }
+
+ set
+ {
+ if (_rmlguid != value)
+ {
+ _rmlguid = value;
+ }
+ }
+ }
+
+ protected String _windingmethodguid;
+
+ /// <summary>
+ /// Gets or sets the jobbase winding method guid.
+ /// </summary>
+
+ [Column("WINDING_METHOD_GUID")]
+ [ForeignKey("WindingMethod")]
+
+ public String WindingMethodGuid
+ {
+ get
+ {
+ return _windingmethodguid;
+ }
+
+ set
+ {
+ if (_windingmethodguid != value)
+ {
+ _windingmethodguid = value;
+ }
+ }
+ }
+
+ protected String _spooltypeguid;
+
+ /// <summary>
+ /// Gets or sets the jobbase spool type guid.
+ /// </summary>
+
+ [Column("SPOOL_TYPE_GUID")]
+ [ForeignKey("SpoolType")]
+
+ public String SpoolTypeGuid
+ {
+ get
+ {
+ return _spooltypeguid;
+ }
+
+ set
+ {
+ if (_spooltypeguid != value)
+ {
+ _spooltypeguid = value;
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the jobbase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _description;
+
+ /// <summary>
+ /// Gets or sets the jobbase description.
+ /// </summary>
+
+ [Column("DESCRIPTION")]
+
+ public String Description
+ {
+ get
+ {
+ return _description;
+ }
+
+ set
+ {
+ if (_description != value)
+ {
+ _description = value;
+
+ OnDescriptionChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _intersegmentlength;
+
+ /// <summary>
+ /// Gets or sets the jobbase inter segment length.
+ /// </summary>
+
+ [Column("INTER_SEGMENT_LENGTH")]
+
+ public Double InterSegmentLength
+ {
+ get
+ {
+ return _intersegmentlength;
+ }
+
+ set
+ {
+ if (_intersegmentlength != value)
+ {
+ _intersegmentlength = value;
+
+ OnInterSegmentLengthChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _enableintersegment;
+
+ /// <summary>
+ /// Gets or sets the jobbase enable inter segment.
+ /// </summary>
+
+ [Column("ENABLE_INTER_SEGMENT")]
+
+ public Boolean EnableInterSegment
+ {
+ get
+ {
+ return _enableintersegment;
+ }
+
+ set
+ {
+ if (_enableintersegment != value)
+ {
+ _enableintersegment = value;
+
+ OnEnableInterSegmentChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _enablelubrication;
+
+ /// <summary>
+ /// Gets or sets the jobbase enable lubrication.
+ /// </summary>
+
+ [Column("ENABLE_LUBRICATION")]
+
+ public Boolean EnableLubrication
+ {
+ get
+ {
+ return _enablelubrication;
+ }
+
+ set
+ {
+ if (_enablelubrication != value)
+ {
+ _enablelubrication = value;
+
+ OnEnableLubricationChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _jobindex;
+
+ /// <summary>
+ /// Gets or sets the jobbase job index.
+ /// </summary>
+
+ [Column("JOB_INDEX")]
+
+ public Int32 JobIndex
+ {
+ get
+ {
+ return _jobindex;
+ }
+
+ set
+ {
+ if (_jobindex != value)
+ {
+ _jobindex = value;
+
+ OnJobIndexChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _estimateddurationmili;
+
+ /// <summary>
+ /// Gets or sets the jobbase estimated duration mili.
+ /// </summary>
+
+ [Column("ESTIMATED_DURATION_MILI")]
+
+ public Int32 EstimatedDurationMili
+ {
+ get
+ {
+ return _estimateddurationmili;
+ }
+
+ set
+ {
+ if (_estimateddurationmili != value)
+ {
+ _estimateddurationmili = value;
+
+ OnEstimatedDurationMiliChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _hasembroideryfile;
+
+ /// <summary>
+ /// Gets or sets the jobbase has embroidery file.
+ /// </summary>
+
+ [Column("HAS_EMBROIDERY_FILE")]
+
+ public Boolean HasEmbroideryFile
+ {
+ get
+ {
+ return _hasembroideryfile;
+ }
+
+ set
+ {
+ if (_hasembroideryfile != value)
+ {
+ _hasembroideryfile = value;
+
+ OnHasEmbroideryFileChanged(value);
+
+ }
+ }
+ }
+
+ protected Byte[] _embroideryfiledata;
+
+ /// <summary>
+ /// Gets or sets the jobbase embroidery file data.
+ /// </summary>
+
+ [Column("EMBROIDERY_FILE_DATA")]
+
+ public Byte[] EmbroideryFileData
+ {
+ get
+ {
+ return _embroideryfiledata;
+ }
+
+ set
+ {
+ if (_embroideryfiledata != value)
+ {
+ _embroideryfiledata = value;
+
+ OnEmbroideryFileDataChanged(value);
+
+ }
+ }
+ }
+
+ protected String _embroideryfilename;
+
+ /// <summary>
+ /// Gets or sets the jobbase embroidery file name.
+ /// </summary>
+
+ [Column("EMBROIDERY_FILE_NAME")]
+
+ public String EmbroideryFileName
+ {
+ get
+ {
+ return _embroideryfilename;
+ }
+
+ set
+ {
+ if (_embroideryfilename != value)
+ {
+ _embroideryfilename = value;
+
+ OnEmbroideryFileNameChanged(value);
+
+ }
+ }
+ }
+
+ protected Byte[] _embroideryjpeg;
+
+ /// <summary>
+ /// Gets or sets the jobbase embroidery jpeg.
+ /// </summary>
+
+ [Column("EMBROIDERY_JPEG")]
+
+ public Byte[] EmbroideryJpeg
+ {
+ get
+ {
+ return _embroideryjpeg;
+ }
+
+ set
+ {
+ if (_embroideryjpeg != value)
+ {
+ _embroideryjpeg = value;
+
+ OnEmbroideryJpegChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _status;
+
+ /// <summary>
+ /// 0 = Draft
+ /// 1 = Completed
+ /// 2 = Disrupted
+ /// 3 = Aborted
+ /// </summary>
+
+ [Column("STATUS")]
+
+ public Int32 Status
+ {
+ get
+ {
+ return _status;
+ }
+
+ set
+ {
+ if (_status != value)
+ {
+ _status = value;
+
+ OnStatusChanged(value);
+
+ }
+ }
+ }
+
+ protected String _colorspaceguid;
+
+ /// <summary>
+ /// Gets or sets the jobbase color space guid.
+ /// </summary>
+
+ [Column("COLOR_SPACE_GUID")]
+ [ForeignKey("ColorSpace")]
+
+ public String ColorSpaceGuid
+ {
+ get
+ {
+ return _colorspaceguid;
+ }
+
+ set
+ {
+ if (_colorspaceguid != value)
+ {
+ _colorspaceguid = value;
+ }
+ }
+ }
+
+ protected Int32 _numberofunits;
+
+ /// <summary>
+ /// Gets or sets the jobbase number of units.
+ /// </summary>
+
+ [Column("NUMBER_OF_UNITS")]
+
+ public Int32 NumberOfUnits
+ {
+ get
+ {
+ return _numberofunits;
+ }
+
+ set
+ {
+ if (_numberofunits != value)
+ {
+ _numberofunits = value;
+
+ OnNumberOfUnitsChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _type;
+
+ /// <summary>
+ /// 0 = Sewing
+ /// 1 = Embroidery
+ /// </summary>
+
+ [Column("TYPE")]
+
+ public Int32 Type
+ {
+ get
+ {
+ return _type;
+ }
+
+ set
+ {
+ if (_type != value)
+ {
+ _type = value;
+
+ OnTypeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _customerguid;
+
+ /// <summary>
+ /// Gets or sets the jobbase customer guid.
+ /// </summary>
+
+ [Column("CUSTOMER_GUID")]
+ [ForeignKey("Customer")]
+
+ public String CustomerGuid
+ {
+ get
+ {
+ return _customerguid;
+ }
+
+ set
+ {
+ if (_customerguid != value)
+ {
+ _customerguid = value;
+ }
+ }
+ }
+
+ protected Int32 _spoolsdistribution;
+
+ /// <summary>
+ /// 0 = All segments per spool
+ /// 1 = One segments per spool
+ /// </summary>
+
+ [Column("SPOOLS_DISTRIBUTION")]
+
+ public Int32 SpoolsDistribution
+ {
+ get
+ {
+ return _spoolsdistribution;
+ }
+
+ set
+ {
+ if (_spoolsdistribution != value)
+ {
+ _spoolsdistribution = value;
+
+ OnSpoolsDistributionChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _numberofheads;
+
+ /// <summary>
+ /// Gets or sets the jobbase number of heads.
+ /// </summary>
+
+ [Column("NUMBER_OF_HEADS")]
+
+ public Int32 NumberOfHeads
+ {
+ get
+ {
+ return _numberofheads;
+ }
+
+ set
+ {
+ if (_numberofheads != value)
+ {
+ _numberofheads = value;
+
+ OnNumberOfHeadsChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _sampleunitsormeters;
+
+ /// <summary>
+ /// Gets or sets the jobbase sample units or meters.
+ /// </summary>
+
+ [Column("SAMPLE_UNITS_OR_METERS")]
+
+ public Int32 SampleUnitsOrMeters
+ {
+ get
+ {
+ return _sampleunitsormeters;
+ }
+
+ set
+ {
+ if (_sampleunitsormeters != value)
+ {
+ _sampleunitsormeters = value;
+
+ OnSampleUnitsOrMetersChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _finetuningstatus;
+
+ /// <summary>
+ /// 0 = Unspecified
+ /// 1 = PendingApproval
+ /// 2 = Approved
+ /// </summary>
+
+ [Column("FINE_TUNING_STATUS")]
+
+ public Int32 FineTuningStatus
+ {
+ get
+ {
+ return _finetuningstatus;
+ }
+
+ set
+ {
+ if (_finetuningstatus != value)
+ {
+ _finetuningstatus = value;
+
+ OnFineTuningStatusChanged(value);
+
+ }
+ }
+ }
+
+ protected Nullable<DateTime> _finetuningapprovedate;
+
+ /// <summary>
+ /// Gets or sets the jobbase fine tuning approve date.
+ /// </summary>
+
+ [Column("FINE_TUNING_APPROVE_DATE")]
+
+ public Nullable<DateTime> FineTuningApproveDate
+ {
+ get
+ {
+ return _finetuningapprovedate;
+ }
+
+ set
+ {
+ if (_finetuningapprovedate != value)
+ {
+ _finetuningapprovedate = value;
+
+ OnFineTuningApproveDateChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _sampledyestatus;
+
+ /// <summary>
+ /// 0 = Unspecified
+ /// 1 = PendingApproval
+ /// 2 = Approved
+ /// </summary>
+
+ [Column("SAMPLE_DYE_STATUS")]
+
+ public Int32 SampleDyeStatus
+ {
+ get
+ {
+ return _sampledyestatus;
+ }
+
+ set
+ {
+ if (_sampledyestatus != value)
+ {
+ _sampledyestatus = value;
+
+ OnSampleDyeStatusChanged(value);
+
+ }
+ }
+ }
+
+ protected Nullable<DateTime> _sampledyeapprovedate;
+
+ /// <summary>
+ /// Gets or sets the jobbase sample dye approve date.
+ /// </summary>
+
+ [Column("SAMPLE_DYE_APPROVE_DATE")]
+
+ public Nullable<DateTime> SampleDyeApproveDate
+ {
+ get
+ {
+ return _sampledyeapprovedate;
+ }
+
+ set
+ {
+ if (_sampledyeapprovedate != value)
+ {
+ _sampledyeapprovedate = value;
+
+ OnSampleDyeApproveDateChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _editingstate;
+
+ /// <summary>
+ /// 0 = Default
+ /// 1 = SampleDye
+ /// 2 = FineTuning
+ /// </summary>
+
+ [Column("EDITING_STATE")]
+
+ public Int32 EditingState
+ {
+ get
+ {
+ return _editingstate;
+ }
+
+ set
+ {
+ if (_editingstate != value)
+ {
+ _editingstate = value;
+
+ OnEditingStateChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _lengthpercentagefactor;
+
+ /// <summary>
+ /// Gets or sets the jobbase length percentage factor.
+ /// </summary>
+
+ [Column("LENGTH_PERCENTAGE_FACTOR")]
+
+ public Double LengthPercentageFactor
+ {
+ get
+ {
+ return _lengthpercentagefactor;
+ }
+
+ set
+ {
+ if (_lengthpercentagefactor != value)
+ {
+ _lengthpercentagefactor = value;
+
+ OnLengthPercentageFactorChanged(value);
+
+ }
+ }
+ }
+
+ protected ColorSpace _colorspace;
+
+ /// <summary>
+ /// Gets or sets the jobbase color spaces.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual ColorSpace ColorSpace
+ {
+ get
+ {
+ return _colorspace;
+ }
+
+ set
+ {
+ if (_colorspace != value)
+ {
+ _colorspace = value;
+
+ OnColorSpaceChanged(value);
+
+ }
+ }
+ }
+
+ protected Customer _customer;
+
+ /// <summary>
+ /// Gets or sets the jobbase customer.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual Customer Customer
+ {
+ get
+ {
+ return _customer;
+ }
+
+ set
+ {
+ if (_customer != value)
+ {
+ _customer = value;
+
+ OnCustomerChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<JobRun> _jobruns;
+
+ /// <summary>
+ /// Gets or sets the jobbase job runs.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<JobRun> JobRuns
+ {
+ get
+ {
+ return _jobruns;
+ }
+
+ set
+ {
+ if (_jobruns != value)
+ {
+ _jobruns = value;
+
+ OnJobRunsChanged(value);
+
+ }
+ }
+ }
+
+ protected Machine _machine;
+
+ /// <summary>
+ /// Gets or sets the jobbase machine.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual Machine Machine
+ {
+ get
+ {
+ return _machine;
+ }
+
+ set
+ {
+ if (_machine != value)
+ {
+ _machine = value;
+
+ OnMachineChanged(value);
+
+ }
+ }
+ }
+
+ protected Rml _rml;
+
+ /// <summary>
+ /// Gets or sets the jobbase rml.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual Rml Rml
+ {
+ get
+ {
+ return _rml;
+ }
+
+ set
+ {
+ if (_rml != value)
+ {
+ _rml = value;
+
+ OnRmlChanged(value);
+
+ }
+ }
+ }
+
+ protected SpoolType _spooltype;
+
+ /// <summary>
+ /// Gets or sets the jobbase spool types.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual SpoolType SpoolType
+ {
+ get
+ {
+ return _spooltype;
+ }
+
+ set
+ {
+ if (_spooltype != value)
+ {
+ _spooltype = value;
+
+ OnSpoolTypeChanged(value);
+
+ }
+ }
+ }
+
+ protected User _user;
+
+ /// <summary>
+ /// Gets or sets the jobbase user.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual User User
+ {
+ get
+ {
+ return _user;
+ }
+
+ set
+ {
+ if (_user != value)
+ {
+ _user = value;
+
+ OnUserChanged(value);
+
+ }
+ }
+ }
+
+ protected WindingMethod _windingmethod;
+
+ /// <summary>
+ /// Gets or sets the jobbase winding methods.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual WindingMethod WindingMethod
+ {
+ get
+ {
+ return _windingmethod;
+ }
+
+ set
+ {
+ if (_windingmethod != value)
+ {
+ _windingmethod = value;
+
+ OnWindingMethodChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Segment> _segments;
+
+ /// <summary>
+ /// Gets or sets the jobbase segments.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Segment> Segments
+ {
+ get
+ {
+ return _segments;
+ }
+
+ set
+ {
+ if (_segments != value)
+ {
+ _segments = value;
+
+ OnSegmentsChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the CreationDate has changed.
+ /// </summary>
+ protected virtual void OnCreationDateChanged(DateTime creationdate)
+ {
+ CreationDateChanged?.Invoke(this, creationdate);
+ RaisePropertyChanged(nameof(CreationDate));
+ }
+
+ /// <summary>
+ /// Called when the LastRun has changed.
+ /// </summary>
+ protected virtual void OnLastRunChanged(Nullable<DateTime> lastrun)
+ {
+ LastRunChanged?.Invoke(this, lastrun);
+ RaisePropertyChanged(nameof(LastRun));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Description has changed.
+ /// </summary>
+ protected virtual void OnDescriptionChanged(String description)
+ {
+ DescriptionChanged?.Invoke(this, description);
+ RaisePropertyChanged(nameof(Description));
+ }
+
+ /// <summary>
+ /// Called when the InterSegmentLength has changed.
+ /// </summary>
+ protected virtual void OnInterSegmentLengthChanged(Double intersegmentlength)
+ {
+ InterSegmentLengthChanged?.Invoke(this, intersegmentlength);
+ RaisePropertyChanged(nameof(InterSegmentLength));
+ }
+
+ /// <summary>
+ /// Called when the EnableInterSegment has changed.
+ /// </summary>
+ protected virtual void OnEnableInterSegmentChanged(Boolean enableintersegment)
+ {
+ EnableInterSegmentChanged?.Invoke(this, enableintersegment);
+ RaisePropertyChanged(nameof(EnableInterSegment));
+ }
+
+ /// <summary>
+ /// Called when the EnableLubrication has changed.
+ /// </summary>
+ protected virtual void OnEnableLubricationChanged(Boolean enablelubrication)
+ {
+ EnableLubricationChanged?.Invoke(this, enablelubrication);
+ RaisePropertyChanged(nameof(EnableLubrication));
+ }
+
+ /// <summary>
+ /// Called when the JobIndex has changed.
+ /// </summary>
+ protected virtual void OnJobIndexChanged(Int32 jobindex)
+ {
+ JobIndexChanged?.Invoke(this, jobindex);
+ RaisePropertyChanged(nameof(JobIndex));
+ }
+
+ /// <summary>
+ /// Called when the EstimatedDurationMili has changed.
+ /// </summary>
+ protected virtual void OnEstimatedDurationMiliChanged(Int32 estimateddurationmili)
+ {
+ EstimatedDurationMiliChanged?.Invoke(this, estimateddurationmili);
+ RaisePropertyChanged(nameof(EstimatedDurationMili));
+ }
+
+ /// <summary>
+ /// Called when the HasEmbroideryFile has changed.
+ /// </summary>
+ protected virtual void OnHasEmbroideryFileChanged(Boolean hasembroideryfile)
+ {
+ HasEmbroideryFileChanged?.Invoke(this, hasembroideryfile);
+ RaisePropertyChanged(nameof(HasEmbroideryFile));
+ }
+
+ /// <summary>
+ /// Called when the EmbroideryFileData has changed.
+ /// </summary>
+ protected virtual void OnEmbroideryFileDataChanged(Byte[] embroideryfiledata)
+ {
+ EmbroideryFileDataChanged?.Invoke(this, embroideryfiledata);
+ RaisePropertyChanged(nameof(EmbroideryFileData));
+ }
+
+ /// <summary>
+ /// Called when the EmbroideryFileName has changed.
+ /// </summary>
+ protected virtual void OnEmbroideryFileNameChanged(String embroideryfilename)
+ {
+ EmbroideryFileNameChanged?.Invoke(this, embroideryfilename);
+ RaisePropertyChanged(nameof(EmbroideryFileName));
+ }
+
+ /// <summary>
+ /// Called when the EmbroideryJpeg has changed.
+ /// </summary>
+ protected virtual void OnEmbroideryJpegChanged(Byte[] embroideryjpeg)
+ {
+ EmbroideryJpegChanged?.Invoke(this, embroideryjpeg);
+ RaisePropertyChanged(nameof(EmbroideryJpeg));
+ }
+
+ /// <summary>
+ /// Called when the Status has changed.
+ /// </summary>
+ protected virtual void OnStatusChanged(Int32 status)
+ {
+ StatusChanged?.Invoke(this, status);
+ RaisePropertyChanged(nameof(Status));
+ }
+
+ /// <summary>
+ /// Called when the NumberOfUnits has changed.
+ /// </summary>
+ protected virtual void OnNumberOfUnitsChanged(Int32 numberofunits)
+ {
+ NumberOfUnitsChanged?.Invoke(this, numberofunits);
+ RaisePropertyChanged(nameof(NumberOfUnits));
+ }
+
+ /// <summary>
+ /// Called when the Type has changed.
+ /// </summary>
+ protected virtual void OnTypeChanged(Int32 type)
+ {
+ TypeChanged?.Invoke(this, type);
+ RaisePropertyChanged(nameof(Type));
+ }
+
+ /// <summary>
+ /// Called when the SpoolsDistribution has changed.
+ /// </summary>
+ protected virtual void OnSpoolsDistributionChanged(Int32 spoolsdistribution)
+ {
+ SpoolsDistributionChanged?.Invoke(this, spoolsdistribution);
+ RaisePropertyChanged(nameof(SpoolsDistribution));
+ }
+
+ /// <summary>
+ /// Called when the NumberOfHeads has changed.
+ /// </summary>
+ protected virtual void OnNumberOfHeadsChanged(Int32 numberofheads)
+ {
+ NumberOfHeadsChanged?.Invoke(this, numberofheads);
+ RaisePropertyChanged(nameof(NumberOfHeads));
+ }
+
+ /// <summary>
+ /// Called when the SampleUnitsOrMeters has changed.
+ /// </summary>
+ protected virtual void OnSampleUnitsOrMetersChanged(Int32 sampleunitsormeters)
+ {
+ SampleUnitsOrMetersChanged?.Invoke(this, sampleunitsormeters);
+ RaisePropertyChanged(nameof(SampleUnitsOrMeters));
+ }
+
+ /// <summary>
+ /// Called when the FineTuningStatus has changed.
+ /// </summary>
+ protected virtual void OnFineTuningStatusChanged(Int32 finetuningstatus)
+ {
+ FineTuningStatusChanged?.Invoke(this, finetuningstatus);
+ RaisePropertyChanged(nameof(FineTuningStatus));
+ }
+
+ /// <summary>
+ /// Called when the FineTuningApproveDate has changed.
+ /// </summary>
+ protected virtual void OnFineTuningApproveDateChanged(Nullable<DateTime> finetuningapprovedate)
+ {
+ FineTuningApproveDateChanged?.Invoke(this, finetuningapprovedate);
+ RaisePropertyChanged(nameof(FineTuningApproveDate));
+ }
+
+ /// <summary>
+ /// Called when the SampleDyeStatus has changed.
+ /// </summary>
+ protected virtual void OnSampleDyeStatusChanged(Int32 sampledyestatus)
+ {
+ SampleDyeStatusChanged?.Invoke(this, sampledyestatus);
+ RaisePropertyChanged(nameof(SampleDyeStatus));
+ }
+
+ /// <summary>
+ /// Called when the SampleDyeApproveDate has changed.
+ /// </summary>
+ protected virtual void OnSampleDyeApproveDateChanged(Nullable<DateTime> sampledyeapprovedate)
+ {
+ SampleDyeApproveDateChanged?.Invoke(this, sampledyeapprovedate);
+ RaisePropertyChanged(nameof(SampleDyeApproveDate));
+ }
+
+ /// <summary>
+ /// Called when the EditingState has changed.
+ /// </summary>
+ protected virtual void OnEditingStateChanged(Int32 editingstate)
+ {
+ EditingStateChanged?.Invoke(this, editingstate);
+ RaisePropertyChanged(nameof(EditingState));
+ }
+
+ /// <summary>
+ /// Called when the LengthPercentageFactor has changed.
+ /// </summary>
+ protected virtual void OnLengthPercentageFactorChanged(Double lengthpercentagefactor)
+ {
+ LengthPercentageFactorChanged?.Invoke(this, lengthpercentagefactor);
+ RaisePropertyChanged(nameof(LengthPercentageFactor));
+ }
+
+ /// <summary>
+ /// Called when the ColorSpace has changed.
+ /// </summary>
+ protected virtual void OnColorSpaceChanged(ColorSpace colorspace)
+ {
+ ColorSpaceChanged?.Invoke(this, colorspace);
+ RaisePropertyChanged(nameof(ColorSpace));
+ }
+
+ /// <summary>
+ /// Called when the Customer has changed.
+ /// </summary>
+ protected virtual void OnCustomerChanged(Customer customer)
+ {
+ CustomerChanged?.Invoke(this, customer);
+ RaisePropertyChanged(nameof(Customer));
+ }
+
+ /// <summary>
+ /// Called when the JobRuns has changed.
+ /// </summary>
+ protected virtual void OnJobRunsChanged(SynchronizedObservableCollection<JobRun> jobruns)
+ {
+ JobRunsChanged?.Invoke(this, jobruns);
+ RaisePropertyChanged(nameof(JobRuns));
+ }
+
+ /// <summary>
+ /// Called when the Machine has changed.
+ /// </summary>
+ protected virtual void OnMachineChanged(Machine machine)
+ {
+ MachineChanged?.Invoke(this, machine);
+ RaisePropertyChanged(nameof(Machine));
+ }
+
+ /// <summary>
+ /// Called when the Rml has changed.
+ /// </summary>
+ protected virtual void OnRmlChanged(Rml rml)
+ {
+ RmlChanged?.Invoke(this, rml);
+ RaisePropertyChanged(nameof(Rml));
+ }
+
+ /// <summary>
+ /// Called when the SpoolType has changed.
+ /// </summary>
+ protected virtual void OnSpoolTypeChanged(SpoolType spooltype)
+ {
+ SpoolTypeChanged?.Invoke(this, spooltype);
+ RaisePropertyChanged(nameof(SpoolType));
+ }
+
+ /// <summary>
+ /// Called when the User has changed.
+ /// </summary>
+ protected virtual void OnUserChanged(User user)
+ {
+ UserChanged?.Invoke(this, user);
+ RaisePropertyChanged(nameof(User));
+ }
+
+ /// <summary>
+ /// Called when the WindingMethod has changed.
+ /// </summary>
+ protected virtual void OnWindingMethodChanged(WindingMethod windingmethod)
+ {
+ WindingMethodChanged?.Invoke(this, windingmethod);
+ RaisePropertyChanged(nameof(WindingMethod));
+ }
+
+ /// <summary>
+ /// Called when the Segments has changed.
+ /// </summary>
+ protected virtual void OnSegmentsChanged(SynchronizedObservableCollection<Segment> segments)
+ {
+ SegmentsChanged?.Invoke(this, segments);
+ RaisePropertyChanged(nameof(Segments));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="JobBase" /> class.
+ /// </summary>
+ public JobBase() : base()
+ {
+
+ JobRuns = new SynchronizedObservableCollection<JobRun>();
+
+ Segments = new SynchronizedObservableCollection<Segment>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/JobRun.cs b/Software/Visual_Studio/Tango.BL/Entities/JobRun.cs
index 67af396e1..30f28f9f4 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/JobRun.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/JobRun.cs
@@ -1,295 +1,40 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
+using Newtonsoft.Json;
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.BL.Enumerations;
namespace Tango.BL.Entities
{
-
- /// <summary>
- ///
- /// </summary>
-
- [Table("JOB_RUNS")]
- public partial class JobRun : ObservableEntity<JobRun>
+ public partial class JobRun : JobRunBase
{
-
- public event EventHandler<DateTime> StartDateChanged;
-
- public event EventHandler<DateTime> EndDateChanged;
-
- public event EventHandler<Int32> StatusChanged;
-
- public event EventHandler<Double> EndPositionChanged;
-
- public event EventHandler<String> FailedMessageChanged;
-
- public event EventHandler<Job> JobChanged;
-
- protected String _jobguid;
-
- /// <summary>
- /// Gets or sets the jobrun job guid.
- /// </summary>
-
- [Column("JOB_GUID")]
- [ForeignKey("Job")]
-
- public String JobGuid
- {
- get
- {
- return _jobguid;
- }
-
- set
- {
- if (_jobguid != value)
- {
- _jobguid = value;
- }
- }
- }
-
- protected DateTime _startdate;
-
- /// <summary>
- /// Gets or sets the jobrun start date.
- /// </summary>
-
- [Column("START_DATE")]
-
- public DateTime StartDate
- {
- get
- {
- return _startdate;
- }
-
- set
- {
- if (_startdate != value)
- {
- _startdate = value;
-
- OnStartDateChanged(value);
-
- }
- }
- }
-
- protected DateTime _enddate;
-
- /// <summary>
- /// Gets or sets the jobrun end date.
- /// </summary>
-
- [Column("END_DATE")]
-
- public DateTime EndDate
- {
- get
- {
- return _enddate;
- }
-
- set
- {
- if (_enddate != value)
- {
- _enddate = value;
-
- OnEndDateChanged(value);
-
- }
- }
- }
-
- protected Int32 _status;
-
- /// <summary>
- /// 0 = COMPLETED
- /// 1 = ABORTED
- /// 2 = FAILED
- /// </summary>
-
- [Column("STATUS")]
-
- public Int32 Status
- {
- get
- {
- return _status;
- }
-
- set
- {
- if (_status != value)
- {
- _status = value;
-
- OnStatusChanged(value);
-
- }
- }
- }
-
- protected Double _endposition;
-
- /// <summary>
- /// Gets or sets the jobrun end position.
- /// </summary>
-
- [Column("END_POSITION")]
-
- public Double EndPosition
+ [NotMapped]
+ [JsonIgnore]
+ public JobRunStatus JobRunStatus
{
- get
- {
- return _endposition;
- }
-
- set
- {
- if (_endposition != value)
- {
- _endposition = value;
-
- OnEndPositionChanged(value);
-
- }
- }
+ get { return (JobRunStatus)Status; }
+ set { Status = (int)value; }
}
- protected String _failedmessage;
-
- /// <summary>
- /// Gets or sets the jobrun failed message.
- /// </summary>
-
- [Column("FAILED_MESSAGE")]
-
- public String FailedMessage
+ protected override void RaisePropertyChanged(string propName)
{
- get
- {
- return _failedmessage;
- }
+ base.RaisePropertyChanged(propName);
- set
+ if (propName == nameof(Status))
{
- if (_failedmessage != value)
- {
- _failedmessage = value;
-
- OnFailedMessageChanged(value);
-
- }
+ RaisePropertyChanged(nameof(JobRunStatus));
}
}
- protected Job _job;
-
- /// <summary>
- /// Gets or sets the jobrun job.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual Job Job
- {
- get
- {
- return _job;
- }
-
- set
- {
- if (_job != value)
- {
- _job = value;
-
- OnJobChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the StartDate has changed.
- /// </summary>
- protected virtual void OnStartDateChanged(DateTime startdate)
- {
- StartDateChanged?.Invoke(this, startdate);
- RaisePropertyChanged(nameof(StartDate));
- }
-
- /// <summary>
- /// Called when the EndDate has changed.
- /// </summary>
- protected virtual void OnEndDateChanged(DateTime enddate)
- {
- EndDateChanged?.Invoke(this, enddate);
- RaisePropertyChanged(nameof(EndDate));
- }
-
- /// <summary>
- /// Called when the Status has changed.
- /// </summary>
- protected virtual void OnStatusChanged(Int32 status)
- {
- StatusChanged?.Invoke(this, status);
- RaisePropertyChanged(nameof(Status));
- }
-
- /// <summary>
- /// Called when the EndPosition has changed.
- /// </summary>
- protected virtual void OnEndPositionChanged(Double endposition)
- {
- EndPositionChanged?.Invoke(this, endposition);
- RaisePropertyChanged(nameof(EndPosition));
- }
-
- /// <summary>
- /// Called when the FailedMessage has changed.
- /// </summary>
- protected virtual void OnFailedMessageChanged(String failedmessage)
- {
- FailedMessageChanged?.Invoke(this, failedmessage);
- RaisePropertyChanged(nameof(FailedMessage));
- }
-
- /// <summary>
- /// Called when the Job has changed.
- /// </summary>
- protected virtual void OnJobChanged(Job job)
- {
- JobChanged?.Invoke(this, job);
- RaisePropertyChanged(nameof(Job));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="JobRun" /> class.
/// </summary>
public JobRun() : base()
{
+
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/JobRunBase.cs b/Software/Visual_Studio/Tango.BL/Entities/JobRunBase.cs
new file mode 100644
index 000000000..2cb5025a8
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/JobRunBase.cs
@@ -0,0 +1,295 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+
+ /// <summary>
+ ///
+ /// </summary>
+
+ [Table("JOB_RUNS")]
+ public abstract class JobRunBase : ObservableEntity<JobRun>
+ {
+
+ public event EventHandler<DateTime> StartDateChanged;
+
+ public event EventHandler<DateTime> EndDateChanged;
+
+ public event EventHandler<Int32> StatusChanged;
+
+ public event EventHandler<Double> EndPositionChanged;
+
+ public event EventHandler<String> FailedMessageChanged;
+
+ public event EventHandler<Job> JobChanged;
+
+ protected String _jobguid;
+
+ /// <summary>
+ /// Gets or sets the jobrunbase job guid.
+ /// </summary>
+
+ [Column("JOB_GUID")]
+ [ForeignKey("Job")]
+
+ public String JobGuid
+ {
+ get
+ {
+ return _jobguid;
+ }
+
+ set
+ {
+ if (_jobguid != value)
+ {
+ _jobguid = value;
+ }
+ }
+ }
+
+ protected DateTime _startdate;
+
+ /// <summary>
+ /// Gets or sets the jobrunbase start date.
+ /// </summary>
+
+ [Column("START_DATE")]
+
+ public DateTime StartDate
+ {
+ get
+ {
+ return _startdate;
+ }
+
+ set
+ {
+ if (_startdate != value)
+ {
+ _startdate = value;
+
+ OnStartDateChanged(value);
+
+ }
+ }
+ }
+
+ protected DateTime _enddate;
+
+ /// <summary>
+ /// Gets or sets the jobrunbase end date.
+ /// </summary>
+
+ [Column("END_DATE")]
+
+ public DateTime EndDate
+ {
+ get
+ {
+ return _enddate;
+ }
+
+ set
+ {
+ if (_enddate != value)
+ {
+ _enddate = value;
+
+ OnEndDateChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _status;
+
+ /// <summary>
+ /// 0 = COMPLETED
+ /// 1 = ABORTED
+ /// 2 = FAILED
+ /// </summary>
+
+ [Column("STATUS")]
+
+ public Int32 Status
+ {
+ get
+ {
+ return _status;
+ }
+
+ set
+ {
+ if (_status != value)
+ {
+ _status = value;
+
+ OnStatusChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _endposition;
+
+ /// <summary>
+ /// Gets or sets the jobrunbase end position.
+ /// </summary>
+
+ [Column("END_POSITION")]
+
+ public Double EndPosition
+ {
+ get
+ {
+ return _endposition;
+ }
+
+ set
+ {
+ if (_endposition != value)
+ {
+ _endposition = value;
+
+ OnEndPositionChanged(value);
+
+ }
+ }
+ }
+
+ protected String _failedmessage;
+
+ /// <summary>
+ /// Gets or sets the jobrunbase failed message.
+ /// </summary>
+
+ [Column("FAILED_MESSAGE")]
+
+ public String FailedMessage
+ {
+ get
+ {
+ return _failedmessage;
+ }
+
+ set
+ {
+ if (_failedmessage != value)
+ {
+ _failedmessage = value;
+
+ OnFailedMessageChanged(value);
+
+ }
+ }
+ }
+
+ protected Job _job;
+
+ /// <summary>
+ /// Gets or sets the jobrunbase job.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual Job Job
+ {
+ get
+ {
+ return _job;
+ }
+
+ set
+ {
+ if (_job != value)
+ {
+ _job = value;
+
+ OnJobChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the StartDate has changed.
+ /// </summary>
+ protected virtual void OnStartDateChanged(DateTime startdate)
+ {
+ StartDateChanged?.Invoke(this, startdate);
+ RaisePropertyChanged(nameof(StartDate));
+ }
+
+ /// <summary>
+ /// Called when the EndDate has changed.
+ /// </summary>
+ protected virtual void OnEndDateChanged(DateTime enddate)
+ {
+ EndDateChanged?.Invoke(this, enddate);
+ RaisePropertyChanged(nameof(EndDate));
+ }
+
+ /// <summary>
+ /// Called when the Status has changed.
+ /// </summary>
+ protected virtual void OnStatusChanged(Int32 status)
+ {
+ StatusChanged?.Invoke(this, status);
+ RaisePropertyChanged(nameof(Status));
+ }
+
+ /// <summary>
+ /// Called when the EndPosition has changed.
+ /// </summary>
+ protected virtual void OnEndPositionChanged(Double endposition)
+ {
+ EndPositionChanged?.Invoke(this, endposition);
+ RaisePropertyChanged(nameof(EndPosition));
+ }
+
+ /// <summary>
+ /// Called when the FailedMessage has changed.
+ /// </summary>
+ protected virtual void OnFailedMessageChanged(String failedmessage)
+ {
+ FailedMessageChanged?.Invoke(this, failedmessage);
+ RaisePropertyChanged(nameof(FailedMessage));
+ }
+
+ /// <summary>
+ /// Called when the Job has changed.
+ /// </summary>
+ protected virtual void OnJobChanged(Job job)
+ {
+ JobChanged?.Invoke(this, job);
+ RaisePropertyChanged(nameof(Job));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="JobRunBase" /> class.
+ /// </summary>
+ public JobRunBase() : base()
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/LinearMassDensityUnit.cs b/Software/Visual_Studio/Tango.BL/Entities/LinearMassDensityUnit.cs
index 308f82a67..4d09f6409 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/LinearMassDensityUnit.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/LinearMassDensityUnit.cs
@@ -1,150 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("LINEAR_MASS_DENSITY_UNITS")]
- public partial class LinearMassDensityUnit : ObservableEntity<LinearMassDensityUnit>
+ public partial class LinearMassDensityUnit : LinearMassDensityUnitBase
{
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Rml>> RmlsChanged;
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the linearmassdensityunit name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the linearmassdensityunit code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<Rml> _rmls;
-
- /// <summary>
- /// Gets or sets the linearmassdensityunit rmls.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Rml> Rmls
- {
- get
- {
- return _rmls;
- }
-
- set
- {
- if (_rmls != value)
- {
- _rmls = value;
-
- OnRmlsChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Rmls has changed.
- /// </summary>
- protected virtual void OnRmlsChanged(SynchronizedObservableCollection<Rml> rmls)
- {
- RmlsChanged?.Invoke(this, rmls);
- RaisePropertyChanged(nameof(Rmls));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="LinearMassDensityUnit" /> class.
/// </summary>
public LinearMassDensityUnit() : base()
{
- Rmls = new SynchronizedObservableCollection<Rml>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/LinearMassDensityUnitBase.cs b/Software/Visual_Studio/Tango.BL/Entities/LinearMassDensityUnitBase.cs
new file mode 100644
index 000000000..7d97e2ea4
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/LinearMassDensityUnitBase.cs
@@ -0,0 +1,150 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("LINEAR_MASS_DENSITY_UNITS")]
+ public abstract class LinearMassDensityUnitBase : ObservableEntity<LinearMassDensityUnit>
+ {
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Rml>> RmlsChanged;
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the linearmassdensityunitbase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the linearmassdensityunitbase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Rml> _rmls;
+
+ /// <summary>
+ /// Gets or sets the linearmassdensityunitbase rmls.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Rml> Rmls
+ {
+ get
+ {
+ return _rmls;
+ }
+
+ set
+ {
+ if (_rmls != value)
+ {
+ _rmls = value;
+
+ OnRmlsChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Rmls has changed.
+ /// </summary>
+ protected virtual void OnRmlsChanged(SynchronizedObservableCollection<Rml> rmls)
+ {
+ RmlsChanged?.Invoke(this, rmls);
+ RaisePropertyChanged(nameof(Rmls));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="LinearMassDensityUnitBase" /> class.
+ /// </summary>
+ public LinearMassDensityUnitBase() : base()
+ {
+
+ Rmls = new SynchronizedObservableCollection<Rml>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/LiquidType.cs b/Software/Visual_Studio/Tango.BL/Entities/LiquidType.cs
index c8b4658ef..2dcb98a24 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/LiquidType.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/LiquidType.cs
@@ -1,288 +1,16 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("LIQUID_TYPES")]
- public partial class LiquidType : ObservableEntity<LiquidType>
+ public partial class LiquidType : LiquidTypeBase
{
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<Double> VersionChanged;
-
- public event EventHandler<Int32> ColorChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Cat>> CatsChanged;
-
- public event EventHandler<SynchronizedObservableCollection<IdsPack>> IdsPacksChanged;
-
- public event EventHandler<SynchronizedObservableCollection<LiquidTypesRml>> LiquidTypesRmlsChanged;
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the liquidtype code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the liquidtype name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected Double _version;
-
- /// <summary>
- /// Gets or sets the liquidtype version.
- /// </summary>
-
- [Column("VERSION")]
-
- public Double Version
- {
- get
- {
- return _version;
- }
-
- set
- {
- if (_version != value)
- {
- _version = value;
-
- OnVersionChanged(value);
-
- }
- }
- }
-
- protected Int32 _color;
-
- /// <summary>
- /// Gets or sets the liquidtype color.
- /// </summary>
-
- [Column("COLOR")]
-
- public Int32 Color
- {
- get
- {
- return _color;
- }
-
- set
- {
- if (_color != value)
- {
- _color = value;
-
- OnColorChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<Cat> _cats;
-
- /// <summary>
- /// Gets or sets the liquidtype cats.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Cat> Cats
- {
- get
- {
- return _cats;
- }
-
- set
- {
- if (_cats != value)
- {
- _cats = value;
-
- OnCatsChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<IdsPack> _idspacks;
-
- /// <summary>
- /// Gets or sets the liquidtype ids packs.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<IdsPack> IdsPacks
- {
- get
- {
- return _idspacks;
- }
-
- set
- {
- if (_idspacks != value)
- {
- _idspacks = value;
-
- OnIdsPacksChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<LiquidTypesRml> _liquidtypesrmls;
-
- /// <summary>
- /// Gets or sets the liquidtype liquid types rmls.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<LiquidTypesRml> LiquidTypesRmls
+ public PMR.ColorLab.LiquidType ToColorLibLiquidType()
{
- get
- {
- return _liquidtypesrmls;
- }
-
- set
- {
- if (_liquidtypesrmls != value)
- {
- _liquidtypesrmls = value;
-
- OnLiquidTypesRmlsChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Version has changed.
- /// </summary>
- protected virtual void OnVersionChanged(Double version)
- {
- VersionChanged?.Invoke(this, version);
- RaisePropertyChanged(nameof(Version));
- }
-
- /// <summary>
- /// Called when the Color has changed.
- /// </summary>
- protected virtual void OnColorChanged(Int32 color)
- {
- ColorChanged?.Invoke(this, color);
- RaisePropertyChanged(nameof(Color));
- }
-
- /// <summary>
- /// Called when the Cats has changed.
- /// </summary>
- protected virtual void OnCatsChanged(SynchronizedObservableCollection<Cat> cats)
- {
- CatsChanged?.Invoke(this, cats);
- RaisePropertyChanged(nameof(Cats));
- }
-
- /// <summary>
- /// Called when the IdsPacks has changed.
- /// </summary>
- protected virtual void OnIdsPacksChanged(SynchronizedObservableCollection<IdsPack> idspacks)
- {
- IdsPacksChanged?.Invoke(this, idspacks);
- RaisePropertyChanged(nameof(IdsPacks));
- }
-
- /// <summary>
- /// Called when the LiquidTypesRmls has changed.
- /// </summary>
- protected virtual void OnLiquidTypesRmlsChanged(SynchronizedObservableCollection<LiquidTypesRml> liquidtypesrmls)
- {
- LiquidTypesRmlsChanged?.Invoke(this, liquidtypesrmls);
- RaisePropertyChanged(nameof(LiquidTypesRmls));
+ return (PMR.ColorLab.LiquidType)Code;
}
/// <summary>
@@ -291,12 +19,6 @@ namespace Tango.BL.Entities
public LiquidType() : base()
{
- Cats = new SynchronizedObservableCollection<Cat>();
-
- IdsPacks = new SynchronizedObservableCollection<IdsPack>();
-
- LiquidTypesRmls = new SynchronizedObservableCollection<LiquidTypesRml>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/LiquidTypeBase.cs b/Software/Visual_Studio/Tango.BL/Entities/LiquidTypeBase.cs
new file mode 100644
index 000000000..254e13822
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/LiquidTypeBase.cs
@@ -0,0 +1,302 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("LIQUID_TYPES")]
+ public abstract class LiquidTypeBase : ObservableEntity<LiquidType>
+ {
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<Double> VersionChanged;
+
+ public event EventHandler<Int32> ColorChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Cat>> CatsChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<IdsPack>> IdsPacksChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<LiquidTypesRml>> LiquidTypesRmlsChanged;
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the liquidtypebase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the liquidtypebase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _version;
+
+ /// <summary>
+ /// Gets or sets the liquidtypebase version.
+ /// </summary>
+
+ [Column("VERSION")]
+
+ public Double Version
+ {
+ get
+ {
+ return _version;
+ }
+
+ set
+ {
+ if (_version != value)
+ {
+ _version = value;
+
+ OnVersionChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _color;
+
+ /// <summary>
+ /// Gets or sets the liquidtypebase color.
+ /// </summary>
+
+ [Column("COLOR")]
+
+ public Int32 Color
+ {
+ get
+ {
+ return _color;
+ }
+
+ set
+ {
+ if (_color != value)
+ {
+ _color = value;
+
+ OnColorChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Cat> _cats;
+
+ /// <summary>
+ /// Gets or sets the liquidtypebase cats.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Cat> Cats
+ {
+ get
+ {
+ return _cats;
+ }
+
+ set
+ {
+ if (_cats != value)
+ {
+ _cats = value;
+
+ OnCatsChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<IdsPack> _idspacks;
+
+ /// <summary>
+ /// Gets or sets the liquidtypebase ids packs.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<IdsPack> IdsPacks
+ {
+ get
+ {
+ return _idspacks;
+ }
+
+ set
+ {
+ if (_idspacks != value)
+ {
+ _idspacks = value;
+
+ OnIdsPacksChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<LiquidTypesRml> _liquidtypesrmls;
+
+ /// <summary>
+ /// Gets or sets the liquidtypebase liquid types rmls.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<LiquidTypesRml> LiquidTypesRmls
+ {
+ get
+ {
+ return _liquidtypesrmls;
+ }
+
+ set
+ {
+ if (_liquidtypesrmls != value)
+ {
+ _liquidtypesrmls = value;
+
+ OnLiquidTypesRmlsChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Version has changed.
+ /// </summary>
+ protected virtual void OnVersionChanged(Double version)
+ {
+ VersionChanged?.Invoke(this, version);
+ RaisePropertyChanged(nameof(Version));
+ }
+
+ /// <summary>
+ /// Called when the Color has changed.
+ /// </summary>
+ protected virtual void OnColorChanged(Int32 color)
+ {
+ ColorChanged?.Invoke(this, color);
+ RaisePropertyChanged(nameof(Color));
+ }
+
+ /// <summary>
+ /// Called when the Cats has changed.
+ /// </summary>
+ protected virtual void OnCatsChanged(SynchronizedObservableCollection<Cat> cats)
+ {
+ CatsChanged?.Invoke(this, cats);
+ RaisePropertyChanged(nameof(Cats));
+ }
+
+ /// <summary>
+ /// Called when the IdsPacks has changed.
+ /// </summary>
+ protected virtual void OnIdsPacksChanged(SynchronizedObservableCollection<IdsPack> idspacks)
+ {
+ IdsPacksChanged?.Invoke(this, idspacks);
+ RaisePropertyChanged(nameof(IdsPacks));
+ }
+
+ /// <summary>
+ /// Called when the LiquidTypesRmls has changed.
+ /// </summary>
+ protected virtual void OnLiquidTypesRmlsChanged(SynchronizedObservableCollection<LiquidTypesRml> liquidtypesrmls)
+ {
+ LiquidTypesRmlsChanged?.Invoke(this, liquidtypesrmls);
+ RaisePropertyChanged(nameof(LiquidTypesRmls));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="LiquidTypeBase" /> class.
+ /// </summary>
+ public LiquidTypeBase() : base()
+ {
+
+ Cats = new SynchronizedObservableCollection<Cat>();
+
+ IdsPacks = new SynchronizedObservableCollection<IdsPack>();
+
+ LiquidTypesRmls = new SynchronizedObservableCollection<LiquidTypesRml>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/LiquidTypesRml.cs b/Software/Visual_Studio/Tango.BL/Entities/LiquidTypesRml.cs
index b217cee6b..62f4de560 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/LiquidTypesRml.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/LiquidTypesRml.cs
@@ -1,230 +1,26 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.PMR.ColorLab;
namespace Tango.BL.Entities
{
- [Table("LIQUID_TYPES_RMLS")]
- public partial class LiquidTypesRml : ObservableEntity<LiquidTypesRml>
+ public partial class LiquidTypesRml : LiquidTypesRmlBase
{
-
- public event EventHandler<Double> MaxNlPerCmChanged;
-
- public event EventHandler<Byte[]> DefaultCatDataChanged;
-
- public event EventHandler<LiquidType> LiquidTypeChanged;
-
- public event EventHandler<Rml> RmlChanged;
-
- protected String _liquidtypeguid;
-
- /// <summary>
- /// Gets or sets the liquidtypesrml liquid type guid.
- /// </summary>
-
- [Column("LIQUID_TYPE_GUID")]
- [ForeignKey("LiquidType")]
-
- public String LiquidTypeGuid
- {
- get
- {
- return _liquidtypeguid;
- }
-
- set
- {
- if (_liquidtypeguid != value)
- {
- _liquidtypeguid = value;
- }
- }
- }
-
- protected String _rmlguid;
-
- /// <summary>
- /// Gets or sets the liquidtypesrml rml guid.
- /// </summary>
-
- [Column("RML_GUID")]
- [ForeignKey("Rml")]
-
- public String RmlGuid
+ public CalibrationData GetCalibrationData()
{
- get
- {
- return _rmlguid;
- }
-
- set
+ if (DefaultCatData == null)
{
- if (_rmlguid != value)
- {
- _rmlguid = value;
- }
+ throw LogManager.Log(new NullReferenceException("The default RML calibration data is null."));
}
+ return CalibrationData.Parser.ParseFrom(DefaultCatData);
}
- protected Double _maxnlpercm;
-
- /// <summary>
- /// Gets or sets the liquidtypesrml max nl per cm.
- /// </summary>
-
- [Column("MAX_NL_PER_CM")]
-
- public Double MaxNlPerCm
+ public void PutCalibrationData(CalibrationData data)
{
- get
- {
- return _maxnlpercm;
- }
-
- set
- {
- if (_maxnlpercm != value)
- {
- _maxnlpercm = value;
-
- OnMaxNlPerCmChanged(value);
-
- }
- }
- }
-
- protected Byte[] _defaultcatdata;
-
- /// <summary>
- /// Gets or sets the liquidtypesrml default cat data.
- /// </summary>
-
- [Column("DEFAULT_CAT_DATA")]
-
- public Byte[] DefaultCatData
- {
- get
- {
- return _defaultcatdata;
- }
-
- set
- {
- if (_defaultcatdata != value)
- {
- _defaultcatdata = value;
-
- OnDefaultCatDataChanged(value);
-
- }
- }
- }
-
- protected LiquidType _liquidtype;
-
- /// <summary>
- /// Gets or sets the liquidtypesrml liquid types.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual LiquidType LiquidType
- {
- get
- {
- return _liquidtype;
- }
-
- set
- {
- if (_liquidtype != value)
- {
- _liquidtype = value;
-
- OnLiquidTypeChanged(value);
-
- }
- }
- }
-
- protected Rml _rml;
-
- /// <summary>
- /// Gets or sets the liquidtypesrml rml.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual Rml Rml
- {
- get
- {
- return _rml;
- }
-
- set
- {
- if (_rml != value)
- {
- _rml = value;
-
- OnRmlChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the MaxNlPerCm has changed.
- /// </summary>
- protected virtual void OnMaxNlPerCmChanged(Double maxnlpercm)
- {
- MaxNlPerCmChanged?.Invoke(this, maxnlpercm);
- RaisePropertyChanged(nameof(MaxNlPerCm));
- }
-
- /// <summary>
- /// Called when the DefaultCatData has changed.
- /// </summary>
- protected virtual void OnDefaultCatDataChanged(Byte[] defaultcatdata)
- {
- DefaultCatDataChanged?.Invoke(this, defaultcatdata);
- RaisePropertyChanged(nameof(DefaultCatData));
- }
-
- /// <summary>
- /// Called when the LiquidType has changed.
- /// </summary>
- protected virtual void OnLiquidTypeChanged(LiquidType liquidtype)
- {
- LiquidTypeChanged?.Invoke(this, liquidtype);
- RaisePropertyChanged(nameof(LiquidType));
- }
-
- /// <summary>
- /// Called when the Rml has changed.
- /// </summary>
- protected virtual void OnRmlChanged(Rml rml)
- {
- RmlChanged?.Invoke(this, rml);
- RaisePropertyChanged(nameof(Rml));
+ DefaultCatData = data.ToBytes();
}
/// <summary>
@@ -232,6 +28,7 @@ namespace Tango.BL.Entities
/// </summary>
public LiquidTypesRml() : base()
{
+
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/LiquidTypesRmlBase.cs b/Software/Visual_Studio/Tango.BL/Entities/LiquidTypesRmlBase.cs
new file mode 100644
index 000000000..cc5f702e4
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/LiquidTypesRmlBase.cs
@@ -0,0 +1,237 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("LIQUID_TYPES_RMLS")]
+ public abstract class LiquidTypesRmlBase : ObservableEntity<LiquidTypesRml>
+ {
+
+ public event EventHandler<Double> MaxNlPerCmChanged;
+
+ public event EventHandler<Byte[]> DefaultCatDataChanged;
+
+ public event EventHandler<LiquidType> LiquidTypeChanged;
+
+ public event EventHandler<Rml> RmlChanged;
+
+ protected String _liquidtypeguid;
+
+ /// <summary>
+ /// Gets or sets the liquidtypesrmlbase liquid type guid.
+ /// </summary>
+
+ [Column("LIQUID_TYPE_GUID")]
+ [ForeignKey("LiquidType")]
+
+ public String LiquidTypeGuid
+ {
+ get
+ {
+ return _liquidtypeguid;
+ }
+
+ set
+ {
+ if (_liquidtypeguid != value)
+ {
+ _liquidtypeguid = value;
+ }
+ }
+ }
+
+ protected String _rmlguid;
+
+ /// <summary>
+ /// Gets or sets the liquidtypesrmlbase rml guid.
+ /// </summary>
+
+ [Column("RML_GUID")]
+ [ForeignKey("Rml")]
+
+ public String RmlGuid
+ {
+ get
+ {
+ return _rmlguid;
+ }
+
+ set
+ {
+ if (_rmlguid != value)
+ {
+ _rmlguid = value;
+ }
+ }
+ }
+
+ protected Double _maxnlpercm;
+
+ /// <summary>
+ /// Gets or sets the liquidtypesrmlbase max nl per cm.
+ /// </summary>
+
+ [Column("MAX_NL_PER_CM")]
+
+ public Double MaxNlPerCm
+ {
+ get
+ {
+ return _maxnlpercm;
+ }
+
+ set
+ {
+ if (_maxnlpercm != value)
+ {
+ _maxnlpercm = value;
+
+ OnMaxNlPerCmChanged(value);
+
+ }
+ }
+ }
+
+ protected Byte[] _defaultcatdata;
+
+ /// <summary>
+ /// Gets or sets the liquidtypesrmlbase default cat data.
+ /// </summary>
+
+ [Column("DEFAULT_CAT_DATA")]
+
+ public Byte[] DefaultCatData
+ {
+ get
+ {
+ return _defaultcatdata;
+ }
+
+ set
+ {
+ if (_defaultcatdata != value)
+ {
+ _defaultcatdata = value;
+
+ OnDefaultCatDataChanged(value);
+
+ }
+ }
+ }
+
+ protected LiquidType _liquidtype;
+
+ /// <summary>
+ /// Gets or sets the liquidtypesrmlbase liquid types.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual LiquidType LiquidType
+ {
+ get
+ {
+ return _liquidtype;
+ }
+
+ set
+ {
+ if (_liquidtype != value)
+ {
+ _liquidtype = value;
+
+ OnLiquidTypeChanged(value);
+
+ }
+ }
+ }
+
+ protected Rml _rml;
+
+ /// <summary>
+ /// Gets or sets the liquidtypesrmlbase rml.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual Rml Rml
+ {
+ get
+ {
+ return _rml;
+ }
+
+ set
+ {
+ if (_rml != value)
+ {
+ _rml = value;
+
+ OnRmlChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the MaxNlPerCm has changed.
+ /// </summary>
+ protected virtual void OnMaxNlPerCmChanged(Double maxnlpercm)
+ {
+ MaxNlPerCmChanged?.Invoke(this, maxnlpercm);
+ RaisePropertyChanged(nameof(MaxNlPerCm));
+ }
+
+ /// <summary>
+ /// Called when the DefaultCatData has changed.
+ /// </summary>
+ protected virtual void OnDefaultCatDataChanged(Byte[] defaultcatdata)
+ {
+ DefaultCatDataChanged?.Invoke(this, defaultcatdata);
+ RaisePropertyChanged(nameof(DefaultCatData));
+ }
+
+ /// <summary>
+ /// Called when the LiquidType has changed.
+ /// </summary>
+ protected virtual void OnLiquidTypeChanged(LiquidType liquidtype)
+ {
+ LiquidTypeChanged?.Invoke(this, liquidtype);
+ RaisePropertyChanged(nameof(LiquidType));
+ }
+
+ /// <summary>
+ /// Called when the Rml has changed.
+ /// </summary>
+ protected virtual void OnRmlChanged(Rml rml)
+ {
+ RmlChanged?.Invoke(this, rml);
+ RaisePropertyChanged(nameof(Rml));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="LiquidTypesRmlBase" /> class.
+ /// </summary>
+ public LiquidTypesRmlBase() : base()
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/Machine.cs b/Software/Visual_Studio/Tango.BL/Entities/Machine.cs
index e183235ee..01d422a6b 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/Machine.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/Machine.cs
@@ -1,1144 +1,153 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
+using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Reflection;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.BL.Enumerations;
namespace Tango.BL.Entities
{
- [Table("MACHINES")]
- public partial class Machine : ObservableEntity<Machine>
+ public partial class Machine : MachineBase
{
-
- public event EventHandler<String> SerialNumberChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<DateTime> ProductionDateChanged;
-
- public event EventHandler<String> TargetJobTypesChanged;
-
- public event EventHandler<String> TargetColorSpaceCodesChanged;
-
- public event EventHandler<Double> DefaultSegmentLengthChanged;
-
- public event EventHandler<String> OsKeyChanged;
-
- public event EventHandler<Boolean> AutoLoginChanged;
-
- public event EventHandler<Boolean> AutoCheckForUpdatesChanged;
-
- public event EventHandler<Boolean> SetupActivationChanged;
-
- public event EventHandler<Boolean> SetupRemoteAssistanceChanged;
-
- public event EventHandler<Boolean> SetupUwfChanged;
-
- public event EventHandler<Boolean> SetupFirmwareChanged;
-
- public event EventHandler<Boolean> SetupFpgaChanged;
-
- public event EventHandler<Boolean> IsDemoChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Cat>> CatsChanged;
-
- public event EventHandler<ColorSpace> DefaultColorSpaceChanged;
-
- public event EventHandler<Configuration> ConfigurationChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Job>> JobsChanged;
-
- public event EventHandler<MachineVersion> MachineVersionChanged;
-
- public event EventHandler<SynchronizedObservableCollection<MachinesEvent>> MachinesEventsChanged;
-
- public event EventHandler<Organization> OrganizationChanged;
-
- public event EventHandler<Rml> DefaultRmlChanged;
-
- public event EventHandler<SpoolType> DefaultSpoolTypeChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Spool>> SpoolsChanged;
-
- protected String _serialnumber;
-
- /// <summary>
- /// Gets or sets the machine serial number.
- /// </summary>
-
- [Column("SERIAL_NUMBER")]
-
- public String SerialNumber
- {
- get
- {
- return _serialnumber;
- }
-
- set
- {
- if (_serialnumber != value)
- {
- _serialnumber = value;
-
- OnSerialNumberChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the machine name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected DateTime _productiondate;
-
- /// <summary>
- /// Gets or sets the machine production date.
- /// </summary>
-
- [Column("PRODUCTION_DATE")]
-
- public DateTime ProductionDate
- {
- get
- {
- return _productiondate;
- }
-
- set
- {
- if (_productiondate != value)
- {
- _productiondate = value;
-
- OnProductionDateChanged(value);
-
- }
- }
- }
-
- protected String _organizationguid;
-
- /// <summary>
- /// Gets or sets the machine organization guid.
- /// </summary>
-
- [Column("ORGANIZATION_GUID")]
- [ForeignKey("Organization")]
-
- public String OrganizationGuid
- {
- get
- {
- return _organizationguid;
- }
-
- set
- {
- if (_organizationguid != value)
- {
- _organizationguid = value;
- }
- }
- }
-
- protected String _machineversionguid;
-
- /// <summary>
- /// Gets or sets the machine machine version guid.
- /// </summary>
-
- [Column("MACHINE_VERSION_GUID")]
- [ForeignKey("MachineVersion")]
-
- public String MachineVersionGuid
- {
- get
- {
- return _machineversionguid;
- }
-
- set
- {
- if (_machineversionguid != value)
- {
- _machineversionguid = value;
- }
- }
- }
-
- protected String _configurationguid;
+ #region Properties
/// <summary>
- /// Gets or sets the machine configuration guid.
+ /// Gets or sets the <see cref="TargetJobTypes"/> property as a collection of <see cref="JobTypes"/>.
/// </summary>
-
- [Column("CONFIGURATION_GUID")]
- [ForeignKey("Configuration")]
-
- public String ConfigurationGuid
- {
- get
- {
- return _configurationguid;
- }
-
- set
- {
- if (_configurationguid != value)
- {
- _configurationguid = value;
- }
- }
- }
-
- protected String _defaultrmlguid;
-
- /// <summary>
- /// Gets or sets the machine default rml guid.
- /// </summary>
-
- [Column("DEFAULT_RML_GUID")]
- [ForeignKey("DefaultRml")]
-
- public String DefaultRmlGuid
- {
- get
- {
- return _defaultrmlguid;
- }
-
- set
- {
- if (_defaultrmlguid != value)
- {
- _defaultrmlguid = value;
- }
- }
- }
-
- protected String _loadedrmlguid;
-
- /// <summary>
- /// Gets or sets the machine loaded rml guid.
- /// </summary>
-
- [Column("LOADED_RML_GUID")]
-
- public String LoadedRmlGuid
- {
- get
- {
- return _loadedrmlguid;
- }
-
- set
- {
- if (_loadedrmlguid != value)
- {
- _loadedrmlguid = value;
- }
- }
- }
-
- protected String _targetjobtypes;
-
- /// <summary>
- /// Gets or sets the machine target job types.
- /// </summary>
-
- [Column("TARGET_JOB_TYPES")]
-
- public String TargetJobTypes
- {
- get
- {
- return _targetjobtypes;
- }
-
- set
- {
- if (_targetjobtypes != value)
- {
- _targetjobtypes = value;
-
- OnTargetJobTypesChanged(value);
-
- }
- }
- }
-
- protected String _targetcolorspacecodes;
-
- /// <summary>
- /// Gets or sets the machine target color space codes.
- /// </summary>
-
- [Column("TARGET_COLOR_SPACE_CODES")]
-
- public String TargetColorSpaceCodes
- {
- get
- {
- return _targetcolorspacecodes;
- }
-
- set
- {
- if (_targetcolorspacecodes != value)
- {
- _targetcolorspacecodes = value;
-
- OnTargetColorSpaceCodesChanged(value);
-
- }
- }
- }
-
- protected String _defaultcolorspaceguid;
-
- /// <summary>
- /// Gets or sets the machine default color space guid.
- /// </summary>
-
- [Column("DEFAULT_COLOR_SPACE_GUID")]
- [ForeignKey("DefaultColorSpace")]
-
- public String DefaultColorSpaceGuid
- {
- get
- {
- return _defaultcolorspaceguid;
- }
-
- set
- {
- if (_defaultcolorspaceguid != value)
- {
- _defaultcolorspaceguid = value;
- }
- }
- }
-
- protected Double _defaultsegmentlength;
-
- /// <summary>
- /// Gets or sets the machine default segment length.
- /// </summary>
-
- [Column("DEFAULT_SEGMENT_LENGTH")]
-
- public Double DefaultSegmentLength
- {
- get
- {
- return _defaultsegmentlength;
- }
-
- set
- {
- if (_defaultsegmentlength != value)
- {
- _defaultsegmentlength = value;
-
- OnDefaultSegmentLengthChanged(value);
-
- }
- }
- }
-
- protected String _defaultspooltypeguid;
-
- /// <summary>
- /// Gets or sets the machine default spool type guid.
- /// </summary>
-
- [Column("DEFAULT_SPOOL_TYPE_GUID")]
- [ForeignKey("DefaultSpoolType")]
-
- public String DefaultSpoolTypeGuid
- {
- get
- {
- return _defaultspooltypeguid;
- }
-
- set
- {
- if (_defaultspooltypeguid != value)
- {
- _defaultspooltypeguid = value;
- }
- }
- }
-
- protected String _oskey;
-
- /// <summary>
- /// Gets or sets the machine os key.
- /// </summary>
-
- [Column("OS_KEY")]
-
- public String OsKey
- {
- get
- {
- return _oskey;
- }
-
- set
- {
- if (_oskey != value)
- {
- _oskey = value;
-
- OnOsKeyChanged(value);
-
- }
- }
- }
-
- protected Boolean _autologin;
-
- /// <summary>
- /// Gets or sets the machine auto login.
- /// </summary>
-
- [Column("AUTO_LOGIN")]
-
- public Boolean AutoLogin
- {
- get
- {
- return _autologin;
- }
-
- set
- {
- if (_autologin != value)
- {
- _autologin = value;
-
- OnAutoLoginChanged(value);
-
- }
- }
- }
-
- protected Boolean _autocheckforupdates;
-
- /// <summary>
- /// Gets or sets the machine auto check for updates.
- /// </summary>
-
- [Column("AUTO_CHECK_FOR_UPDATES")]
-
- public Boolean AutoCheckForUpdates
- {
- get
- {
- return _autocheckforupdates;
- }
-
- set
- {
- if (_autocheckforupdates != value)
- {
- _autocheckforupdates = value;
-
- OnAutoCheckForUpdatesChanged(value);
-
- }
- }
- }
-
- protected Boolean _setupactivation;
-
- /// <summary>
- /// Gets or sets the machine setup activation.
- /// </summary>
-
- [Column("SETUP_ACTIVATION")]
-
- public Boolean SetupActivation
- {
- get
- {
- return _setupactivation;
- }
-
- set
- {
- if (_setupactivation != value)
- {
- _setupactivation = value;
-
- OnSetupActivationChanged(value);
-
- }
- }
- }
-
- protected Boolean _setupremoteassistance;
-
- /// <summary>
- /// Gets or sets the machine setup remote assistance.
- /// </summary>
-
- [Column("SETUP_REMOTE_ASSISTANCE")]
-
- public Boolean SetupRemoteAssistance
- {
- get
- {
- return _setupremoteassistance;
- }
-
- set
- {
- if (_setupremoteassistance != value)
- {
- _setupremoteassistance = value;
-
- OnSetupRemoteAssistanceChanged(value);
-
- }
- }
- }
-
- protected Boolean _setupuwf;
-
- /// <summary>
- /// Gets or sets the machine setup uwf.
- /// </summary>
-
- [Column("SETUP_UWF")]
-
- public Boolean SetupUwf
- {
- get
- {
- return _setupuwf;
- }
-
- set
- {
- if (_setupuwf != value)
- {
- _setupuwf = value;
-
- OnSetupUwfChanged(value);
-
- }
- }
- }
-
- protected Boolean _setupfirmware;
-
- /// <summary>
- /// Gets or sets the machine setup firmware.
- /// </summary>
-
- [Column("SETUP_FIRMWARE")]
-
- public Boolean SetupFirmware
- {
- get
- {
- return _setupfirmware;
- }
-
- set
- {
- if (_setupfirmware != value)
- {
- _setupfirmware = value;
-
- OnSetupFirmwareChanged(value);
-
- }
- }
- }
-
- protected Boolean _setupfpga;
-
- /// <summary>
- /// Gets or sets the machine setup fpga.
- /// </summary>
-
- [Column("SETUP_FPGA")]
-
- public Boolean SetupFpga
- {
- get
- {
- return _setupfpga;
- }
-
- set
- {
- if (_setupfpga != value)
- {
- _setupfpga = value;
-
- OnSetupFpgaChanged(value);
-
- }
- }
- }
-
- protected Boolean _isdemo;
-
- /// <summary>
- /// Gets or sets the machine is demo.
- /// </summary>
-
- [Column("IS_DEMO")]
-
- public Boolean IsDemo
- {
- get
- {
- return _isdemo;
- }
-
- set
- {
- if (_isdemo != value)
- {
- _isdemo = value;
-
- OnIsDemoChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<Cat> _cats;
-
- /// <summary>
- /// Gets or sets the machine cats.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Cat> Cats
- {
- get
- {
- return _cats;
- }
-
- set
- {
- if (_cats != value)
- {
- _cats = value;
-
- OnCatsChanged(value);
-
- }
- }
- }
-
- protected ColorSpace _defaultcolorspace;
-
- /// <summary>
- /// Gets or sets the machine color spaces.
- /// </summary>
-
- [XmlIgnore]
+ [NotMapped]
[JsonIgnore]
- public virtual ColorSpace DefaultColorSpace
+ public List<JobTypes> SupportedJobTypes
{
- get
- {
- return _defaultcolorspace;
- }
-
- set
+ get
{
- if (_defaultcolorspace != value)
+ try
{
- _defaultcolorspace = value;
-
- OnDefaultColorSpaceChanged(value);
-
+ if (!String.IsNullOrWhiteSpace(TargetJobTypes))
+ {
+ return TargetJobTypes.Split(',').Select(x => (JobTypes)int.Parse(x)).ToList();
+ }
+ else
+ {
+ return new List<JobTypes>();
+ }
}
- }
- }
-
- protected Configuration _configuration;
-
- /// <summary>
- /// Gets or sets the machine configuration.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual Configuration Configuration
- {
- get
- {
- return _configuration;
- }
-
- set
- {
- if (_configuration != value)
+ catch (Exception ex)
{
- _configuration = value;
-
- OnConfigurationChanged(value);
-
+ LogManager.Log(ex, "Could not parse machine target job types!");
+ return new List<JobTypes>();
}
}
- }
-
- protected SynchronizedObservableCollection<Job> _jobs;
-
- /// <summary>
- /// Gets or sets the machine jobs.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Job> Jobs
- {
- get
- {
- return _jobs;
- }
-
- set
+ set
{
- if (_jobs != value)
- {
- _jobs = value;
-
- OnJobsChanged(value);
-
- }
+ TargetJobTypes = String.Join(",", value.Select(x => x.ToInt32()));
}
}
- protected MachineVersion _machineversion;
-
/// <summary>
- /// Gets or sets the machine machine versions.
+ /// Gets or sets the <see cref="TargetColorSpaceCodes"/> property as a collection of <see cref="ColorSpaces"/>.
/// </summary>
-
- [XmlIgnore]
+ [NotMapped]
[JsonIgnore]
- public virtual MachineVersion MachineVersion
+ public List<ColorSpaces> SupportedColorSpaces
{
- get
- {
- return _machineversion;
- }
-
- set
+ get
{
- if (_machineversion != value)
+ try
{
- _machineversion = value;
-
- OnMachineVersionChanged(value);
-
+ if (!String.IsNullOrWhiteSpace(TargetColorSpaceCodes))
+ {
+ return TargetColorSpaceCodes.Split(',').Select(x => (ColorSpaces)int.Parse(x)).ToList();
+ }
+ else
+ {
+ return new List<ColorSpaces>();
+ }
}
- }
- }
-
- protected SynchronizedObservableCollection<MachinesEvent> _machinesevents;
-
- /// <summary>
- /// Gets or sets the machine machines events.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<MachinesEvent> MachinesEvents
- {
- get
- {
- return _machinesevents;
- }
-
- set
- {
- if (_machinesevents != value)
+ catch (Exception ex)
{
- _machinesevents = value;
-
- OnMachinesEventsChanged(value);
-
+ LogManager.Log(ex, "Could not parse machine target color space codes!");
+ return new List<ColorSpaces>();
}
}
- }
-
- protected Organization _organization;
-
- /// <summary>
- /// Gets or sets the machine organization.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual Organization Organization
- {
- get
- {
- return _organization;
- }
-
- set
+ set
{
- if (_organization != value)
- {
- _organization = value;
-
- OnOrganizationChanged(value);
-
- }
+ TargetColorSpaceCodes = String.Join(",", value.Select(x => x.ToInt32()));
}
}
- protected Rml _defaultrml;
-
- /// <summary>
- /// Gets or sets the machine rml.
- /// </summary>
+ #endregion
- [XmlIgnore]
- [JsonIgnore]
- public virtual Rml DefaultRml
+ protected override void RaisePropertyChanged(string propName)
{
- get
- {
- return _defaultrml;
- }
-
- set
- {
- if (_defaultrml != value)
- {
- _defaultrml = value;
-
- OnDefaultRmlChanged(value);
-
- }
- }
- }
-
- protected SpoolType _defaultspooltype;
-
- /// <summary>
- /// Gets or sets the machine spool types.
- /// </summary>
+ base.RaisePropertyChanged(propName);
- [XmlIgnore]
- [JsonIgnore]
- public virtual SpoolType DefaultSpoolType
- {
- get
+ if (propName == nameof(TargetJobTypes))
{
- return _defaultspooltype;
+ RaisePropertyChanged(nameof(SupportedJobTypes));
}
-
- set
+ else if (propName == nameof(TargetColorSpaceCodes))
{
- if (_defaultspooltype != value)
- {
- _defaultspooltype = value;
-
- OnDefaultSpoolTypeChanged(value);
-
- }
+ RaisePropertyChanged(nameof(SupportedColorSpaces));
}
}
- protected SynchronizedObservableCollection<Spool> _spools;
-
- /// <summary>
- /// Gets or sets the machine spools.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Spool> Spools
+ public override void Save(ObservablesContext context)
{
- get
+ foreach (var job in Jobs)
{
- return _spools;
- }
+ job.JobIndex = Jobs.IndexOf(job);
- set
- {
- if (_spools != value)
+ foreach (var segment in job.Segments)
{
- _spools = value;
+ //segment.SegmentIndex = job.Segments.IndexOf(segment);
- OnSpoolsChanged(value);
+ foreach (var stop in segment.BrushStops)
+ {
+ foreach (var prop in typeof(BrushStop).GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(x => x.PropertyType == typeof(double)))
+ {
+ double value = (double)prop.GetValue(stop);
+ if (double.IsInfinity(value))
+ {
+ prop.SetValue(stop, 0d);
+ }
+ }
+ }
}
}
- }
- /// <summary>
- /// Called when the SerialNumber has changed.
- /// </summary>
- protected virtual void OnSerialNumberChanged(String serialnumber)
- {
- SerialNumberChanged?.Invoke(this, serialnumber);
- RaisePropertyChanged(nameof(SerialNumber));
+ base.Save(context);
}
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the ProductionDate has changed.
- /// </summary>
- protected virtual void OnProductionDateChanged(DateTime productiondate)
- {
- ProductionDateChanged?.Invoke(this, productiondate);
- RaisePropertyChanged(nameof(ProductionDate));
- }
-
- /// <summary>
- /// Called when the TargetJobTypes has changed.
- /// </summary>
- protected virtual void OnTargetJobTypesChanged(String targetjobtypes)
+ public override Machine Clone()
{
- TargetJobTypesChanged?.Invoke(this, targetjobtypes);
- RaisePropertyChanged(nameof(TargetJobTypes));
- }
+ var cloned = base.Clone();
+ cloned.Cats = Cats.Select(x => x.Clone(cloned)).ToSynchronizedObservableCollection();
+ cloned.Configuration = Configuration.Clone();
+ cloned.ConfigurationGuid = cloned.Configuration.Guid;
+ cloned.Spools = Spools.Select(x => x.Clone(cloned)).ToSynchronizedObservableCollection();
- /// <summary>
- /// Called when the TargetColorSpaceCodes has changed.
- /// </summary>
- protected virtual void OnTargetColorSpaceCodesChanged(String targetcolorspacecodes)
- {
- TargetColorSpaceCodesChanged?.Invoke(this, targetcolorspacecodes);
- RaisePropertyChanged(nameof(TargetColorSpaceCodes));
+ return cloned;
}
- /// <summary>
- /// Called when the DefaultSegmentLength has changed.
- /// </summary>
- protected virtual void OnDefaultSegmentLengthChanged(Double defaultsegmentlength)
+ public override List<string> GetIgnoreProperties()
{
- DefaultSegmentLengthChanged?.Invoke(this, defaultsegmentlength);
- RaisePropertyChanged(nameof(DefaultSegmentLength));
- }
-
- /// <summary>
- /// Called when the OsKey has changed.
- /// </summary>
- protected virtual void OnOsKeyChanged(String oskey)
- {
- OsKeyChanged?.Invoke(this, oskey);
- RaisePropertyChanged(nameof(OsKey));
- }
-
- /// <summary>
- /// Called when the AutoLogin has changed.
- /// </summary>
- protected virtual void OnAutoLoginChanged(Boolean autologin)
- {
- AutoLoginChanged?.Invoke(this, autologin);
- RaisePropertyChanged(nameof(AutoLogin));
- }
-
- /// <summary>
- /// Called when the AutoCheckForUpdates has changed.
- /// </summary>
- protected virtual void OnAutoCheckForUpdatesChanged(Boolean autocheckforupdates)
- {
- AutoCheckForUpdatesChanged?.Invoke(this, autocheckforupdates);
- RaisePropertyChanged(nameof(AutoCheckForUpdates));
- }
-
- /// <summary>
- /// Called when the SetupActivation has changed.
- /// </summary>
- protected virtual void OnSetupActivationChanged(Boolean setupactivation)
- {
- SetupActivationChanged?.Invoke(this, setupactivation);
- RaisePropertyChanged(nameof(SetupActivation));
- }
-
- /// <summary>
- /// Called when the SetupRemoteAssistance has changed.
- /// </summary>
- protected virtual void OnSetupRemoteAssistanceChanged(Boolean setupremoteassistance)
- {
- SetupRemoteAssistanceChanged?.Invoke(this, setupremoteassistance);
- RaisePropertyChanged(nameof(SetupRemoteAssistance));
- }
-
- /// <summary>
- /// Called when the SetupUwf has changed.
- /// </summary>
- protected virtual void OnSetupUwfChanged(Boolean setupuwf)
- {
- SetupUwfChanged?.Invoke(this, setupuwf);
- RaisePropertyChanged(nameof(SetupUwf));
- }
-
- /// <summary>
- /// Called when the SetupFirmware has changed.
- /// </summary>
- protected virtual void OnSetupFirmwareChanged(Boolean setupfirmware)
- {
- SetupFirmwareChanged?.Invoke(this, setupfirmware);
- RaisePropertyChanged(nameof(SetupFirmware));
- }
-
- /// <summary>
- /// Called when the SetupFpga has changed.
- /// </summary>
- protected virtual void OnSetupFpgaChanged(Boolean setupfpga)
- {
- SetupFpgaChanged?.Invoke(this, setupfpga);
- RaisePropertyChanged(nameof(SetupFpga));
- }
-
- /// <summary>
- /// Called when the IsDemo has changed.
- /// </summary>
- protected virtual void OnIsDemoChanged(Boolean isdemo)
- {
- IsDemoChanged?.Invoke(this, isdemo);
- RaisePropertyChanged(nameof(IsDemo));
- }
-
- /// <summary>
- /// Called when the Cats has changed.
- /// </summary>
- protected virtual void OnCatsChanged(SynchronizedObservableCollection<Cat> cats)
- {
- CatsChanged?.Invoke(this, cats);
- RaisePropertyChanged(nameof(Cats));
- }
-
- /// <summary>
- /// Called when the DefaultColorSpace has changed.
- /// </summary>
- protected virtual void OnDefaultColorSpaceChanged(ColorSpace defaultcolorspace)
- {
- DefaultColorSpaceChanged?.Invoke(this, defaultcolorspace);
- RaisePropertyChanged(nameof(DefaultColorSpace));
- }
-
- /// <summary>
- /// Called when the Configuration has changed.
- /// </summary>
- protected virtual void OnConfigurationChanged(Configuration configuration)
- {
- ConfigurationChanged?.Invoke(this, configuration);
- RaisePropertyChanged(nameof(Configuration));
- }
-
- /// <summary>
- /// Called when the Jobs has changed.
- /// </summary>
- protected virtual void OnJobsChanged(SynchronizedObservableCollection<Job> jobs)
- {
- JobsChanged?.Invoke(this, jobs);
- RaisePropertyChanged(nameof(Jobs));
- }
-
- /// <summary>
- /// Called when the MachineVersion has changed.
- /// </summary>
- protected virtual void OnMachineVersionChanged(MachineVersion machineversion)
- {
- MachineVersionChanged?.Invoke(this, machineversion);
- RaisePropertyChanged(nameof(MachineVersion));
- }
-
- /// <summary>
- /// Called when the MachinesEvents has changed.
- /// </summary>
- protected virtual void OnMachinesEventsChanged(SynchronizedObservableCollection<MachinesEvent> machinesevents)
- {
- MachinesEventsChanged?.Invoke(this, machinesevents);
- RaisePropertyChanged(nameof(MachinesEvents));
- }
-
- /// <summary>
- /// Called when the Organization has changed.
- /// </summary>
- protected virtual void OnOrganizationChanged(Organization organization)
- {
- OrganizationChanged?.Invoke(this, organization);
- RaisePropertyChanged(nameof(Organization));
- }
-
- /// <summary>
- /// Called when the DefaultRml has changed.
- /// </summary>
- protected virtual void OnDefaultRmlChanged(Rml defaultrml)
- {
- DefaultRmlChanged?.Invoke(this, defaultrml);
- RaisePropertyChanged(nameof(DefaultRml));
- }
-
- /// <summary>
- /// Called when the DefaultSpoolType has changed.
- /// </summary>
- protected virtual void OnDefaultSpoolTypeChanged(SpoolType defaultspooltype)
- {
- DefaultSpoolTypeChanged?.Invoke(this, defaultspooltype);
- RaisePropertyChanged(nameof(DefaultSpoolType));
- }
-
- /// <summary>
- /// Called when the Spools has changed.
- /// </summary>
- protected virtual void OnSpoolsChanged(SynchronizedObservableCollection<Spool> spools)
- {
- SpoolsChanged?.Invoke(this, spools);
- RaisePropertyChanged(nameof(Spools));
+ return base.GetIgnoreProperties().Concat(new List<string>()
+ {
+ nameof(this.Organization),
+ nameof(this.DefaultRml),
+ nameof(this.DefaultColorSpace),
+ nameof(this.DefaultSpoolType),
+ nameof(this.Jobs),
+ nameof(this.MachinesEvents),
+ nameof(this.MachineVersion),
+ nameof(this.Name),
+ nameof(this.SerialNumber),
+ }).ToList();
}
/// <summary>
@@ -1147,14 +156,6 @@ namespace Tango.BL.Entities
public Machine() : base()
{
- Cats = new SynchronizedObservableCollection<Cat>();
-
- Jobs = new SynchronizedObservableCollection<Job>();
-
- MachinesEvents = new SynchronizedObservableCollection<MachinesEvent>();
-
- Spools = new SynchronizedObservableCollection<Spool>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/MachineBase.cs b/Software/Visual_Studio/Tango.BL/Entities/MachineBase.cs
new file mode 100644
index 000000000..892f535d5
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/MachineBase.cs
@@ -0,0 +1,1160 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("MACHINES")]
+ public abstract class MachineBase : ObservableEntity<Machine>
+ {
+
+ public event EventHandler<String> SerialNumberChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<DateTime> ProductionDateChanged;
+
+ public event EventHandler<String> TargetJobTypesChanged;
+
+ public event EventHandler<String> TargetColorSpaceCodesChanged;
+
+ public event EventHandler<Double> DefaultSegmentLengthChanged;
+
+ public event EventHandler<String> OsKeyChanged;
+
+ public event EventHandler<Boolean> AutoLoginChanged;
+
+ public event EventHandler<Boolean> AutoCheckForUpdatesChanged;
+
+ public event EventHandler<Boolean> SetupActivationChanged;
+
+ public event EventHandler<Boolean> SetupRemoteAssistanceChanged;
+
+ public event EventHandler<Boolean> SetupUwfChanged;
+
+ public event EventHandler<Boolean> SetupFirmwareChanged;
+
+ public event EventHandler<Boolean> SetupFpgaChanged;
+
+ public event EventHandler<Boolean> IsDemoChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Cat>> CatsChanged;
+
+ public event EventHandler<ColorSpace> DefaultColorSpaceChanged;
+
+ public event EventHandler<Configuration> ConfigurationChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Job>> JobsChanged;
+
+ public event EventHandler<MachineVersion> MachineVersionChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<MachinesEvent>> MachinesEventsChanged;
+
+ public event EventHandler<Organization> OrganizationChanged;
+
+ public event EventHandler<Rml> DefaultRmlChanged;
+
+ public event EventHandler<SpoolType> DefaultSpoolTypeChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Spool>> SpoolsChanged;
+
+ protected String _serialnumber;
+
+ /// <summary>
+ /// Gets or sets the machinebase serial number.
+ /// </summary>
+
+ [Column("SERIAL_NUMBER")]
+
+ public String SerialNumber
+ {
+ get
+ {
+ return _serialnumber;
+ }
+
+ set
+ {
+ if (_serialnumber != value)
+ {
+ _serialnumber = value;
+
+ OnSerialNumberChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the machinebase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected DateTime _productiondate;
+
+ /// <summary>
+ /// Gets or sets the machinebase production date.
+ /// </summary>
+
+ [Column("PRODUCTION_DATE")]
+
+ public DateTime ProductionDate
+ {
+ get
+ {
+ return _productiondate;
+ }
+
+ set
+ {
+ if (_productiondate != value)
+ {
+ _productiondate = value;
+
+ OnProductionDateChanged(value);
+
+ }
+ }
+ }
+
+ protected String _organizationguid;
+
+ /// <summary>
+ /// Gets or sets the machinebase organization guid.
+ /// </summary>
+
+ [Column("ORGANIZATION_GUID")]
+ [ForeignKey("Organization")]
+
+ public String OrganizationGuid
+ {
+ get
+ {
+ return _organizationguid;
+ }
+
+ set
+ {
+ if (_organizationguid != value)
+ {
+ _organizationguid = value;
+ }
+ }
+ }
+
+ protected String _machineversionguid;
+
+ /// <summary>
+ /// Gets or sets the machinebase machine version guid.
+ /// </summary>
+
+ [Column("MACHINE_VERSION_GUID")]
+ [ForeignKey("MachineVersion")]
+
+ public String MachineVersionGuid
+ {
+ get
+ {
+ return _machineversionguid;
+ }
+
+ set
+ {
+ if (_machineversionguid != value)
+ {
+ _machineversionguid = value;
+ }
+ }
+ }
+
+ protected String _configurationguid;
+
+ /// <summary>
+ /// Gets or sets the machinebase configuration guid.
+ /// </summary>
+
+ [Column("CONFIGURATION_GUID")]
+ [ForeignKey("Configuration")]
+
+ public String ConfigurationGuid
+ {
+ get
+ {
+ return _configurationguid;
+ }
+
+ set
+ {
+ if (_configurationguid != value)
+ {
+ _configurationguid = value;
+ }
+ }
+ }
+
+ protected String _defaultrmlguid;
+
+ /// <summary>
+ /// Gets or sets the machinebase default rml guid.
+ /// </summary>
+
+ [Column("DEFAULT_RML_GUID")]
+ [ForeignKey("DefaultRml")]
+
+ public String DefaultRmlGuid
+ {
+ get
+ {
+ return _defaultrmlguid;
+ }
+
+ set
+ {
+ if (_defaultrmlguid != value)
+ {
+ _defaultrmlguid = value;
+ }
+ }
+ }
+
+ protected String _loadedrmlguid;
+
+ /// <summary>
+ /// Gets or sets the machinebase loaded rml guid.
+ /// </summary>
+
+ [Column("LOADED_RML_GUID")]
+
+ public String LoadedRmlGuid
+ {
+ get
+ {
+ return _loadedrmlguid;
+ }
+
+ set
+ {
+ if (_loadedrmlguid != value)
+ {
+ _loadedrmlguid = value;
+ }
+ }
+ }
+
+ protected String _targetjobtypes;
+
+ /// <summary>
+ /// Gets or sets the machinebase target job types.
+ /// </summary>
+
+ [Column("TARGET_JOB_TYPES")]
+
+ public String TargetJobTypes
+ {
+ get
+ {
+ return _targetjobtypes;
+ }
+
+ set
+ {
+ if (_targetjobtypes != value)
+ {
+ _targetjobtypes = value;
+
+ OnTargetJobTypesChanged(value);
+
+ }
+ }
+ }
+
+ protected String _targetcolorspacecodes;
+
+ /// <summary>
+ /// Gets or sets the machinebase target color space codes.
+ /// </summary>
+
+ [Column("TARGET_COLOR_SPACE_CODES")]
+
+ public String TargetColorSpaceCodes
+ {
+ get
+ {
+ return _targetcolorspacecodes;
+ }
+
+ set
+ {
+ if (_targetcolorspacecodes != value)
+ {
+ _targetcolorspacecodes = value;
+
+ OnTargetColorSpaceCodesChanged(value);
+
+ }
+ }
+ }
+
+ protected String _defaultcolorspaceguid;
+
+ /// <summary>
+ /// Gets or sets the machinebase default color space guid.
+ /// </summary>
+
+ [Column("DEFAULT_COLOR_SPACE_GUID")]
+ [ForeignKey("DefaultColorSpace")]
+
+ public String DefaultColorSpaceGuid
+ {
+ get
+ {
+ return _defaultcolorspaceguid;
+ }
+
+ set
+ {
+ if (_defaultcolorspaceguid != value)
+ {
+ _defaultcolorspaceguid = value;
+ }
+ }
+ }
+
+ protected Double _defaultsegmentlength;
+
+ /// <summary>
+ /// Gets or sets the machinebase default segment length.
+ /// </summary>
+
+ [Column("DEFAULT_SEGMENT_LENGTH")]
+
+ public Double DefaultSegmentLength
+ {
+ get
+ {
+ return _defaultsegmentlength;
+ }
+
+ set
+ {
+ if (_defaultsegmentlength != value)
+ {
+ _defaultsegmentlength = value;
+
+ OnDefaultSegmentLengthChanged(value);
+
+ }
+ }
+ }
+
+ protected String _defaultspooltypeguid;
+
+ /// <summary>
+ /// Gets or sets the machinebase default spool type guid.
+ /// </summary>
+
+ [Column("DEFAULT_SPOOL_TYPE_GUID")]
+ [ForeignKey("DefaultSpoolType")]
+
+ public String DefaultSpoolTypeGuid
+ {
+ get
+ {
+ return _defaultspooltypeguid;
+ }
+
+ set
+ {
+ if (_defaultspooltypeguid != value)
+ {
+ _defaultspooltypeguid = value;
+ }
+ }
+ }
+
+ protected String _oskey;
+
+ /// <summary>
+ /// Gets or sets the machinebase os key.
+ /// </summary>
+
+ [Column("OS_KEY")]
+
+ public String OsKey
+ {
+ get
+ {
+ return _oskey;
+ }
+
+ set
+ {
+ if (_oskey != value)
+ {
+ _oskey = value;
+
+ OnOsKeyChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _autologin;
+
+ /// <summary>
+ /// Gets or sets the machinebase auto login.
+ /// </summary>
+
+ [Column("AUTO_LOGIN")]
+
+ public Boolean AutoLogin
+ {
+ get
+ {
+ return _autologin;
+ }
+
+ set
+ {
+ if (_autologin != value)
+ {
+ _autologin = value;
+
+ OnAutoLoginChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _autocheckforupdates;
+
+ /// <summary>
+ /// Gets or sets the machinebase auto check for updates.
+ /// </summary>
+
+ [Column("AUTO_CHECK_FOR_UPDATES")]
+
+ public Boolean AutoCheckForUpdates
+ {
+ get
+ {
+ return _autocheckforupdates;
+ }
+
+ set
+ {
+ if (_autocheckforupdates != value)
+ {
+ _autocheckforupdates = value;
+
+ OnAutoCheckForUpdatesChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _setupactivation;
+
+ /// <summary>
+ /// Gets or sets the machinebase setup activation.
+ /// </summary>
+
+ [Column("SETUP_ACTIVATION")]
+
+ public Boolean SetupActivation
+ {
+ get
+ {
+ return _setupactivation;
+ }
+
+ set
+ {
+ if (_setupactivation != value)
+ {
+ _setupactivation = value;
+
+ OnSetupActivationChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _setupremoteassistance;
+
+ /// <summary>
+ /// Gets or sets the machinebase setup remote assistance.
+ /// </summary>
+
+ [Column("SETUP_REMOTE_ASSISTANCE")]
+
+ public Boolean SetupRemoteAssistance
+ {
+ get
+ {
+ return _setupremoteassistance;
+ }
+
+ set
+ {
+ if (_setupremoteassistance != value)
+ {
+ _setupremoteassistance = value;
+
+ OnSetupRemoteAssistanceChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _setupuwf;
+
+ /// <summary>
+ /// Gets or sets the machinebase setup uwf.
+ /// </summary>
+
+ [Column("SETUP_UWF")]
+
+ public Boolean SetupUwf
+ {
+ get
+ {
+ return _setupuwf;
+ }
+
+ set
+ {
+ if (_setupuwf != value)
+ {
+ _setupuwf = value;
+
+ OnSetupUwfChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _setupfirmware;
+
+ /// <summary>
+ /// Gets or sets the machinebase setup firmware.
+ /// </summary>
+
+ [Column("SETUP_FIRMWARE")]
+
+ public Boolean SetupFirmware
+ {
+ get
+ {
+ return _setupfirmware;
+ }
+
+ set
+ {
+ if (_setupfirmware != value)
+ {
+ _setupfirmware = value;
+
+ OnSetupFirmwareChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _setupfpga;
+
+ /// <summary>
+ /// Gets or sets the machinebase setup fpga.
+ /// </summary>
+
+ [Column("SETUP_FPGA")]
+
+ public Boolean SetupFpga
+ {
+ get
+ {
+ return _setupfpga;
+ }
+
+ set
+ {
+ if (_setupfpga != value)
+ {
+ _setupfpga = value;
+
+ OnSetupFpgaChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _isdemo;
+
+ /// <summary>
+ /// Gets or sets the machinebase is demo.
+ /// </summary>
+
+ [Column("IS_DEMO")]
+
+ public Boolean IsDemo
+ {
+ get
+ {
+ return _isdemo;
+ }
+
+ set
+ {
+ if (_isdemo != value)
+ {
+ _isdemo = value;
+
+ OnIsDemoChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Cat> _cats;
+
+ /// <summary>
+ /// Gets or sets the machinebase cats.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Cat> Cats
+ {
+ get
+ {
+ return _cats;
+ }
+
+ set
+ {
+ if (_cats != value)
+ {
+ _cats = value;
+
+ OnCatsChanged(value);
+
+ }
+ }
+ }
+
+ protected ColorSpace _defaultcolorspace;
+
+ /// <summary>
+ /// Gets or sets the machinebase color spaces.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual ColorSpace DefaultColorSpace
+ {
+ get
+ {
+ return _defaultcolorspace;
+ }
+
+ set
+ {
+ if (_defaultcolorspace != value)
+ {
+ _defaultcolorspace = value;
+
+ OnDefaultColorSpaceChanged(value);
+
+ }
+ }
+ }
+
+ protected Configuration _configuration;
+
+ /// <summary>
+ /// Gets or sets the machinebase configuration.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual Configuration Configuration
+ {
+ get
+ {
+ return _configuration;
+ }
+
+ set
+ {
+ if (_configuration != value)
+ {
+ _configuration = value;
+
+ OnConfigurationChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Job> _jobs;
+
+ /// <summary>
+ /// Gets or sets the machinebase jobs.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Job> Jobs
+ {
+ get
+ {
+ return _jobs;
+ }
+
+ set
+ {
+ if (_jobs != value)
+ {
+ _jobs = value;
+
+ OnJobsChanged(value);
+
+ }
+ }
+ }
+
+ protected MachineVersion _machineversion;
+
+ /// <summary>
+ /// Gets or sets the machinebase machine versions.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual MachineVersion MachineVersion
+ {
+ get
+ {
+ return _machineversion;
+ }
+
+ set
+ {
+ if (_machineversion != value)
+ {
+ _machineversion = value;
+
+ OnMachineVersionChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<MachinesEvent> _machinesevents;
+
+ /// <summary>
+ /// Gets or sets the machinebase machines events.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<MachinesEvent> MachinesEvents
+ {
+ get
+ {
+ return _machinesevents;
+ }
+
+ set
+ {
+ if (_machinesevents != value)
+ {
+ _machinesevents = value;
+
+ OnMachinesEventsChanged(value);
+
+ }
+ }
+ }
+
+ protected Organization _organization;
+
+ /// <summary>
+ /// Gets or sets the machinebase organization.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual Organization Organization
+ {
+ get
+ {
+ return _organization;
+ }
+
+ set
+ {
+ if (_organization != value)
+ {
+ _organization = value;
+
+ OnOrganizationChanged(value);
+
+ }
+ }
+ }
+
+ protected Rml _defaultrml;
+
+ /// <summary>
+ /// Gets or sets the machinebase rml.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual Rml DefaultRml
+ {
+ get
+ {
+ return _defaultrml;
+ }
+
+ set
+ {
+ if (_defaultrml != value)
+ {
+ _defaultrml = value;
+
+ OnDefaultRmlChanged(value);
+
+ }
+ }
+ }
+
+ protected SpoolType _defaultspooltype;
+
+ /// <summary>
+ /// Gets or sets the machinebase spool types.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual SpoolType DefaultSpoolType
+ {
+ get
+ {
+ return _defaultspooltype;
+ }
+
+ set
+ {
+ if (_defaultspooltype != value)
+ {
+ _defaultspooltype = value;
+
+ OnDefaultSpoolTypeChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Spool> _spools;
+
+ /// <summary>
+ /// Gets or sets the machinebase spools.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Spool> Spools
+ {
+ get
+ {
+ return _spools;
+ }
+
+ set
+ {
+ if (_spools != value)
+ {
+ _spools = value;
+
+ OnSpoolsChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the SerialNumber has changed.
+ /// </summary>
+ protected virtual void OnSerialNumberChanged(String serialnumber)
+ {
+ SerialNumberChanged?.Invoke(this, serialnumber);
+ RaisePropertyChanged(nameof(SerialNumber));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the ProductionDate has changed.
+ /// </summary>
+ protected virtual void OnProductionDateChanged(DateTime productiondate)
+ {
+ ProductionDateChanged?.Invoke(this, productiondate);
+ RaisePropertyChanged(nameof(ProductionDate));
+ }
+
+ /// <summary>
+ /// Called when the TargetJobTypes has changed.
+ /// </summary>
+ protected virtual void OnTargetJobTypesChanged(String targetjobtypes)
+ {
+ TargetJobTypesChanged?.Invoke(this, targetjobtypes);
+ RaisePropertyChanged(nameof(TargetJobTypes));
+ }
+
+ /// <summary>
+ /// Called when the TargetColorSpaceCodes has changed.
+ /// </summary>
+ protected virtual void OnTargetColorSpaceCodesChanged(String targetcolorspacecodes)
+ {
+ TargetColorSpaceCodesChanged?.Invoke(this, targetcolorspacecodes);
+ RaisePropertyChanged(nameof(TargetColorSpaceCodes));
+ }
+
+ /// <summary>
+ /// Called when the DefaultSegmentLength has changed.
+ /// </summary>
+ protected virtual void OnDefaultSegmentLengthChanged(Double defaultsegmentlength)
+ {
+ DefaultSegmentLengthChanged?.Invoke(this, defaultsegmentlength);
+ RaisePropertyChanged(nameof(DefaultSegmentLength));
+ }
+
+ /// <summary>
+ /// Called when the OsKey has changed.
+ /// </summary>
+ protected virtual void OnOsKeyChanged(String oskey)
+ {
+ OsKeyChanged?.Invoke(this, oskey);
+ RaisePropertyChanged(nameof(OsKey));
+ }
+
+ /// <summary>
+ /// Called when the AutoLogin has changed.
+ /// </summary>
+ protected virtual void OnAutoLoginChanged(Boolean autologin)
+ {
+ AutoLoginChanged?.Invoke(this, autologin);
+ RaisePropertyChanged(nameof(AutoLogin));
+ }
+
+ /// <summary>
+ /// Called when the AutoCheckForUpdates has changed.
+ /// </summary>
+ protected virtual void OnAutoCheckForUpdatesChanged(Boolean autocheckforupdates)
+ {
+ AutoCheckForUpdatesChanged?.Invoke(this, autocheckforupdates);
+ RaisePropertyChanged(nameof(AutoCheckForUpdates));
+ }
+
+ /// <summary>
+ /// Called when the SetupActivation has changed.
+ /// </summary>
+ protected virtual void OnSetupActivationChanged(Boolean setupactivation)
+ {
+ SetupActivationChanged?.Invoke(this, setupactivation);
+ RaisePropertyChanged(nameof(SetupActivation));
+ }
+
+ /// <summary>
+ /// Called when the SetupRemoteAssistance has changed.
+ /// </summary>
+ protected virtual void OnSetupRemoteAssistanceChanged(Boolean setupremoteassistance)
+ {
+ SetupRemoteAssistanceChanged?.Invoke(this, setupremoteassistance);
+ RaisePropertyChanged(nameof(SetupRemoteAssistance));
+ }
+
+ /// <summary>
+ /// Called when the SetupUwf has changed.
+ /// </summary>
+ protected virtual void OnSetupUwfChanged(Boolean setupuwf)
+ {
+ SetupUwfChanged?.Invoke(this, setupuwf);
+ RaisePropertyChanged(nameof(SetupUwf));
+ }
+
+ /// <summary>
+ /// Called when the SetupFirmware has changed.
+ /// </summary>
+ protected virtual void OnSetupFirmwareChanged(Boolean setupfirmware)
+ {
+ SetupFirmwareChanged?.Invoke(this, setupfirmware);
+ RaisePropertyChanged(nameof(SetupFirmware));
+ }
+
+ /// <summary>
+ /// Called when the SetupFpga has changed.
+ /// </summary>
+ protected virtual void OnSetupFpgaChanged(Boolean setupfpga)
+ {
+ SetupFpgaChanged?.Invoke(this, setupfpga);
+ RaisePropertyChanged(nameof(SetupFpga));
+ }
+
+ /// <summary>
+ /// Called when the IsDemo has changed.
+ /// </summary>
+ protected virtual void OnIsDemoChanged(Boolean isdemo)
+ {
+ IsDemoChanged?.Invoke(this, isdemo);
+ RaisePropertyChanged(nameof(IsDemo));
+ }
+
+ /// <summary>
+ /// Called when the Cats has changed.
+ /// </summary>
+ protected virtual void OnCatsChanged(SynchronizedObservableCollection<Cat> cats)
+ {
+ CatsChanged?.Invoke(this, cats);
+ RaisePropertyChanged(nameof(Cats));
+ }
+
+ /// <summary>
+ /// Called when the DefaultColorSpace has changed.
+ /// </summary>
+ protected virtual void OnDefaultColorSpaceChanged(ColorSpace defaultcolorspace)
+ {
+ DefaultColorSpaceChanged?.Invoke(this, defaultcolorspace);
+ RaisePropertyChanged(nameof(DefaultColorSpace));
+ }
+
+ /// <summary>
+ /// Called when the Configuration has changed.
+ /// </summary>
+ protected virtual void OnConfigurationChanged(Configuration configuration)
+ {
+ ConfigurationChanged?.Invoke(this, configuration);
+ RaisePropertyChanged(nameof(Configuration));
+ }
+
+ /// <summary>
+ /// Called when the Jobs has changed.
+ /// </summary>
+ protected virtual void OnJobsChanged(SynchronizedObservableCollection<Job> jobs)
+ {
+ JobsChanged?.Invoke(this, jobs);
+ RaisePropertyChanged(nameof(Jobs));
+ }
+
+ /// <summary>
+ /// Called when the MachineVersion has changed.
+ /// </summary>
+ protected virtual void OnMachineVersionChanged(MachineVersion machineversion)
+ {
+ MachineVersionChanged?.Invoke(this, machineversion);
+ RaisePropertyChanged(nameof(MachineVersion));
+ }
+
+ /// <summary>
+ /// Called when the MachinesEvents has changed.
+ /// </summary>
+ protected virtual void OnMachinesEventsChanged(SynchronizedObservableCollection<MachinesEvent> machinesevents)
+ {
+ MachinesEventsChanged?.Invoke(this, machinesevents);
+ RaisePropertyChanged(nameof(MachinesEvents));
+ }
+
+ /// <summary>
+ /// Called when the Organization has changed.
+ /// </summary>
+ protected virtual void OnOrganizationChanged(Organization organization)
+ {
+ OrganizationChanged?.Invoke(this, organization);
+ RaisePropertyChanged(nameof(Organization));
+ }
+
+ /// <summary>
+ /// Called when the DefaultRml has changed.
+ /// </summary>
+ protected virtual void OnDefaultRmlChanged(Rml defaultrml)
+ {
+ DefaultRmlChanged?.Invoke(this, defaultrml);
+ RaisePropertyChanged(nameof(DefaultRml));
+ }
+
+ /// <summary>
+ /// Called when the DefaultSpoolType has changed.
+ /// </summary>
+ protected virtual void OnDefaultSpoolTypeChanged(SpoolType defaultspooltype)
+ {
+ DefaultSpoolTypeChanged?.Invoke(this, defaultspooltype);
+ RaisePropertyChanged(nameof(DefaultSpoolType));
+ }
+
+ /// <summary>
+ /// Called when the Spools has changed.
+ /// </summary>
+ protected virtual void OnSpoolsChanged(SynchronizedObservableCollection<Spool> spools)
+ {
+ SpoolsChanged?.Invoke(this, spools);
+ RaisePropertyChanged(nameof(Spools));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MachineBase" /> class.
+ /// </summary>
+ public MachineBase() : base()
+ {
+
+ Cats = new SynchronizedObservableCollection<Cat>();
+
+ Jobs = new SynchronizedObservableCollection<Job>();
+
+ MachinesEvents = new SynchronizedObservableCollection<MachinesEvent>();
+
+ Spools = new SynchronizedObservableCollection<Spool>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/MachineStudioVersion.cs b/Software/Visual_Studio/Tango.BL/Entities/MachineStudioVersion.cs
index 3686f3a0a..b0a555f92 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/MachineStudioVersion.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/MachineStudioVersion.cs
@@ -1,288 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("MACHINE_STUDIO_VERSIONS")]
- public partial class MachineStudioVersion : ObservableEntity<MachineStudioVersion>
+ public partial class MachineStudioVersion : MachineStudioVersionBase
{
-
- public event EventHandler<String> VersionChanged;
-
- public event EventHandler<String> BlobNameChanged;
-
- public event EventHandler<String> CommentsChanged;
-
- public event EventHandler<Boolean> ForceUpdateChanged;
-
- public event EventHandler<Boolean> StableChanged;
-
- public event EventHandler<User> UserChanged;
-
- protected String _version;
-
- /// <summary>
- /// Gets or sets the machinestudioversion version.
- /// </summary>
-
- [Column("VERSION")]
-
- public String Version
- {
- get
- {
- return _version;
- }
-
- set
- {
- if (_version != value)
- {
- _version = value;
-
- OnVersionChanged(value);
-
- }
- }
- }
-
- protected String _blobname;
-
- /// <summary>
- /// Gets or sets the machinestudioversion blob name.
- /// </summary>
-
- [Column("BLOB_NAME")]
-
- public String BlobName
- {
- get
- {
- return _blobname;
- }
-
- set
- {
- if (_blobname != value)
- {
- _blobname = value;
-
- OnBlobNameChanged(value);
-
- }
- }
- }
-
- protected String _comments;
-
- /// <summary>
- /// Gets or sets the machinestudioversion comments.
- /// </summary>
-
- [Column("COMMENTS")]
-
- public String Comments
- {
- get
- {
- return _comments;
- }
-
- set
- {
- if (_comments != value)
- {
- _comments = value;
-
- OnCommentsChanged(value);
-
- }
- }
- }
-
- protected String _userguid;
-
- /// <summary>
- /// Gets or sets the machinestudioversion user guid.
- /// </summary>
-
- [Column("USER_GUID")]
- [ForeignKey("User")]
-
- public String UserGuid
- {
- get
- {
- return _userguid;
- }
-
- set
- {
- if (_userguid != value)
- {
- _userguid = value;
- }
- }
- }
-
- protected Boolean _forceupdate;
-
- /// <summary>
- /// Gets or sets the machinestudioversion force update.
- /// </summary>
-
- [Column("FORCE_UPDATE")]
-
- public Boolean ForceUpdate
- {
- get
- {
- return _forceupdate;
- }
-
- set
- {
- if (_forceupdate != value)
- {
- _forceupdate = value;
-
- OnForceUpdateChanged(value);
-
- }
- }
- }
-
- protected Boolean _stable;
-
- /// <summary>
- /// Gets or sets the machinestudioversion stable.
- /// </summary>
-
- [Column("STABLE")]
-
- public Boolean Stable
- {
- get
- {
- return _stable;
- }
-
- set
- {
- if (_stable != value)
- {
- _stable = value;
-
- OnStableChanged(value);
-
- }
- }
- }
-
- protected User _user;
-
- /// <summary>
- /// Gets or sets the machinestudioversion user.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual User User
- {
- get
- {
- return _user;
- }
-
- set
- {
- if (_user != value)
- {
- _user = value;
-
- OnUserChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Version has changed.
- /// </summary>
- protected virtual void OnVersionChanged(String version)
- {
- VersionChanged?.Invoke(this, version);
- RaisePropertyChanged(nameof(Version));
- }
-
- /// <summary>
- /// Called when the BlobName has changed.
- /// </summary>
- protected virtual void OnBlobNameChanged(String blobname)
- {
- BlobNameChanged?.Invoke(this, blobname);
- RaisePropertyChanged(nameof(BlobName));
- }
-
- /// <summary>
- /// Called when the Comments has changed.
- /// </summary>
- protected virtual void OnCommentsChanged(String comments)
- {
- CommentsChanged?.Invoke(this, comments);
- RaisePropertyChanged(nameof(Comments));
- }
-
- /// <summary>
- /// Called when the ForceUpdate has changed.
- /// </summary>
- protected virtual void OnForceUpdateChanged(Boolean forceupdate)
- {
- ForceUpdateChanged?.Invoke(this, forceupdate);
- RaisePropertyChanged(nameof(ForceUpdate));
- }
-
- /// <summary>
- /// Called when the Stable has changed.
- /// </summary>
- protected virtual void OnStableChanged(Boolean stable)
- {
- StableChanged?.Invoke(this, stable);
- RaisePropertyChanged(nameof(Stable));
- }
-
- /// <summary>
- /// Called when the User has changed.
- /// </summary>
- protected virtual void OnUserChanged(User user)
- {
- UserChanged?.Invoke(this, user);
- RaisePropertyChanged(nameof(User));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="MachineStudioVersion" /> class.
/// </summary>
public MachineStudioVersion() : base()
{
+
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/MachineStudioVersionBase.cs b/Software/Visual_Studio/Tango.BL/Entities/MachineStudioVersionBase.cs
new file mode 100644
index 000000000..0033b6697
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/MachineStudioVersionBase.cs
@@ -0,0 +1,288 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("MACHINE_STUDIO_VERSIONS")]
+ public abstract class MachineStudioVersionBase : ObservableEntity<MachineStudioVersion>
+ {
+
+ public event EventHandler<String> VersionChanged;
+
+ public event EventHandler<String> BlobNameChanged;
+
+ public event EventHandler<String> CommentsChanged;
+
+ public event EventHandler<Boolean> ForceUpdateChanged;
+
+ public event EventHandler<Boolean> StableChanged;
+
+ public event EventHandler<User> UserChanged;
+
+ protected String _version;
+
+ /// <summary>
+ /// Gets or sets the machinestudioversionbase version.
+ /// </summary>
+
+ [Column("VERSION")]
+
+ public String Version
+ {
+ get
+ {
+ return _version;
+ }
+
+ set
+ {
+ if (_version != value)
+ {
+ _version = value;
+
+ OnVersionChanged(value);
+
+ }
+ }
+ }
+
+ protected String _blobname;
+
+ /// <summary>
+ /// Gets or sets the machinestudioversionbase blob name.
+ /// </summary>
+
+ [Column("BLOB_NAME")]
+
+ public String BlobName
+ {
+ get
+ {
+ return _blobname;
+ }
+
+ set
+ {
+ if (_blobname != value)
+ {
+ _blobname = value;
+
+ OnBlobNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _comments;
+
+ /// <summary>
+ /// Gets or sets the machinestudioversionbase comments.
+ /// </summary>
+
+ [Column("COMMENTS")]
+
+ public String Comments
+ {
+ get
+ {
+ return _comments;
+ }
+
+ set
+ {
+ if (_comments != value)
+ {
+ _comments = value;
+
+ OnCommentsChanged(value);
+
+ }
+ }
+ }
+
+ protected String _userguid;
+
+ /// <summary>
+ /// Gets or sets the machinestudioversionbase user guid.
+ /// </summary>
+
+ [Column("USER_GUID")]
+ [ForeignKey("User")]
+
+ public String UserGuid
+ {
+ get
+ {
+ return _userguid;
+ }
+
+ set
+ {
+ if (_userguid != value)
+ {
+ _userguid = value;
+ }
+ }
+ }
+
+ protected Boolean _forceupdate;
+
+ /// <summary>
+ /// Gets or sets the machinestudioversionbase force update.
+ /// </summary>
+
+ [Column("FORCE_UPDATE")]
+
+ public Boolean ForceUpdate
+ {
+ get
+ {
+ return _forceupdate;
+ }
+
+ set
+ {
+ if (_forceupdate != value)
+ {
+ _forceupdate = value;
+
+ OnForceUpdateChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _stable;
+
+ /// <summary>
+ /// Gets or sets the machinestudioversionbase stable.
+ /// </summary>
+
+ [Column("STABLE")]
+
+ public Boolean Stable
+ {
+ get
+ {
+ return _stable;
+ }
+
+ set
+ {
+ if (_stable != value)
+ {
+ _stable = value;
+
+ OnStableChanged(value);
+
+ }
+ }
+ }
+
+ protected User _user;
+
+ /// <summary>
+ /// Gets or sets the machinestudioversionbase user.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual User User
+ {
+ get
+ {
+ return _user;
+ }
+
+ set
+ {
+ if (_user != value)
+ {
+ _user = value;
+
+ OnUserChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Version has changed.
+ /// </summary>
+ protected virtual void OnVersionChanged(String version)
+ {
+ VersionChanged?.Invoke(this, version);
+ RaisePropertyChanged(nameof(Version));
+ }
+
+ /// <summary>
+ /// Called when the BlobName has changed.
+ /// </summary>
+ protected virtual void OnBlobNameChanged(String blobname)
+ {
+ BlobNameChanged?.Invoke(this, blobname);
+ RaisePropertyChanged(nameof(BlobName));
+ }
+
+ /// <summary>
+ /// Called when the Comments has changed.
+ /// </summary>
+ protected virtual void OnCommentsChanged(String comments)
+ {
+ CommentsChanged?.Invoke(this, comments);
+ RaisePropertyChanged(nameof(Comments));
+ }
+
+ /// <summary>
+ /// Called when the ForceUpdate has changed.
+ /// </summary>
+ protected virtual void OnForceUpdateChanged(Boolean forceupdate)
+ {
+ ForceUpdateChanged?.Invoke(this, forceupdate);
+ RaisePropertyChanged(nameof(ForceUpdate));
+ }
+
+ /// <summary>
+ /// Called when the Stable has changed.
+ /// </summary>
+ protected virtual void OnStableChanged(Boolean stable)
+ {
+ StableChanged?.Invoke(this, stable);
+ RaisePropertyChanged(nameof(Stable));
+ }
+
+ /// <summary>
+ /// Called when the User has changed.
+ /// </summary>
+ protected virtual void OnUserChanged(User user)
+ {
+ UserChanged?.Invoke(this, user);
+ RaisePropertyChanged(nameof(User));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MachineStudioVersionBase" /> class.
+ /// </summary>
+ public MachineStudioVersionBase() : base()
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/MachineVersion.cs b/Software/Visual_Studio/Tango.BL/Entities/MachineVersion.cs
index 3380f9b90..56fa7d0aa 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/MachineVersion.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/MachineVersion.cs
@@ -1,214 +1,55 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
+using System.Data.Entity;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.BL.Builders;
namespace Tango.BL.Entities
{
- [Table("MACHINE_VERSIONS")]
- public partial class MachineVersion : ObservableEntity<MachineVersion>
+ public partial class MachineVersion : MachineVersionBase
{
-
- public event EventHandler<Double> VersionChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<String> PrototypeMachineDataChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Machine>> MachinesChanged;
-
- public event EventHandler<SynchronizedObservableCollection<TangoVersion>> TangoVersionsChanged;
-
- protected Double _version;
-
- /// <summary>
- /// Gets or sets the machineversion version.
- /// </summary>
-
- [Column("VERSION")]
-
- public Double Version
+ public async Task ApplyPrototypeMachine(Machine machine, ObservablesContext context)
{
- get
- {
- return _version;
- }
-
- set
- {
- if (_version != value)
- {
- _version = value;
-
- OnVersionChanged(value);
+ machine = await new MachineBuilder(context)
+ .Set(machine)
+ .WithOrganization()
+ .WithConfiguration()
+ .WithSpools()
+ .WithCats()
+ .BuildAsync();
- }
- }
+ PrototypeMachineData = machine.ToJson();
}
- protected String _name;
-
- /// <summary>
- /// Gets or sets the machineversion name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
+ public Machine CreatePrototypeMachine(ObservablesContext context)
{
- get
- {
- return _name;
- }
+ Machine machine = Machine.FromJson(PrototypeMachineData);
+ machine.OrganizationGuid = null;
+ machine.ConfigurationGuid = null;
+ machine.ConfigurationGuid = machine.Configuration.Guid;
- set
+ foreach (var cat in machine.Cats)
{
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
+ cat.MachineGuid = machine.Guid;
}
- }
-
- protected String _prototypemachinedata;
- /// <summary>
- /// Gets or sets the machineversion prototype machine data.
- /// </summary>
-
- [Column("PROTOTYPE_MACHINE_DATA")]
-
- public String PrototypeMachineData
- {
- get
- {
- return _prototypemachinedata;
- }
+ machine.MachineVersionGuid = Guid;
+ machine.ProductionDate = DateTime.UtcNow;
- set
+ foreach (var idsPack in machine.Configuration.IdsPacks)
{
- if (_prototypemachinedata != value)
- {
- _prototypemachinedata = value;
-
- OnPrototypeMachineDataChanged(value);
-
- }
+ idsPack.DispenserGuid = null;
+ idsPack.ConfigurationGuid = machine.ConfigurationGuid;
}
- }
-
- protected SynchronizedObservableCollection<Machine> _machines;
- /// <summary>
- /// Gets or sets the machineversion machines.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Machine> Machines
- {
- get
+ foreach (var spool in machine.Spools)
{
- return _machines;
+ spool.MachineGuid = machine.Guid;
}
- set
- {
- if (_machines != value)
- {
- _machines = value;
-
- OnMachinesChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<TangoVersion> _tangoversions;
-
- /// <summary>
- /// Gets or sets the machineversion tango versions.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<TangoVersion> TangoVersions
- {
- get
- {
- return _tangoversions;
- }
-
- set
- {
- if (_tangoversions != value)
- {
- _tangoversions = value;
-
- OnTangoVersionsChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Version has changed.
- /// </summary>
- protected virtual void OnVersionChanged(Double version)
- {
- VersionChanged?.Invoke(this, version);
- RaisePropertyChanged(nameof(Version));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the PrototypeMachineData has changed.
- /// </summary>
- protected virtual void OnPrototypeMachineDataChanged(String prototypemachinedata)
- {
- PrototypeMachineDataChanged?.Invoke(this, prototypemachinedata);
- RaisePropertyChanged(nameof(PrototypeMachineData));
- }
-
- /// <summary>
- /// Called when the Machines has changed.
- /// </summary>
- protected virtual void OnMachinesChanged(SynchronizedObservableCollection<Machine> machines)
- {
- MachinesChanged?.Invoke(this, machines);
- RaisePropertyChanged(nameof(Machines));
- }
-
- /// <summary>
- /// Called when the TangoVersions has changed.
- /// </summary>
- protected virtual void OnTangoVersionsChanged(SynchronizedObservableCollection<TangoVersion> tangoversions)
- {
- TangoVersionsChanged?.Invoke(this, tangoversions);
- RaisePropertyChanged(nameof(TangoVersions));
+ return machine;
}
/// <summary>
@@ -217,10 +58,6 @@ namespace Tango.BL.Entities
public MachineVersion() : base()
{
- Machines = new SynchronizedObservableCollection<Machine>();
-
- TangoVersions = new SynchronizedObservableCollection<TangoVersion>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/MachineVersionBase.cs b/Software/Visual_Studio/Tango.BL/Entities/MachineVersionBase.cs
new file mode 100644
index 000000000..aa44417c0
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/MachineVersionBase.cs
@@ -0,0 +1,226 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("MACHINE_VERSIONS")]
+ public abstract class MachineVersionBase : ObservableEntity<MachineVersion>
+ {
+
+ public event EventHandler<Double> VersionChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<String> PrototypeMachineDataChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Machine>> MachinesChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<TangoVersion>> TangoVersionsChanged;
+
+ protected Double _version;
+
+ /// <summary>
+ /// Gets or sets the machineversionbase version.
+ /// </summary>
+
+ [Column("VERSION")]
+
+ public Double Version
+ {
+ get
+ {
+ return _version;
+ }
+
+ set
+ {
+ if (_version != value)
+ {
+ _version = value;
+
+ OnVersionChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the machineversionbase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _prototypemachinedata;
+
+ /// <summary>
+ /// Gets or sets the machineversionbase prototype machine data.
+ /// </summary>
+
+ [Column("PROTOTYPE_MACHINE_DATA")]
+
+ public String PrototypeMachineData
+ {
+ get
+ {
+ return _prototypemachinedata;
+ }
+
+ set
+ {
+ if (_prototypemachinedata != value)
+ {
+ _prototypemachinedata = value;
+
+ OnPrototypeMachineDataChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Machine> _machines;
+
+ /// <summary>
+ /// Gets or sets the machineversionbase machines.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Machine> Machines
+ {
+ get
+ {
+ return _machines;
+ }
+
+ set
+ {
+ if (_machines != value)
+ {
+ _machines = value;
+
+ OnMachinesChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<TangoVersion> _tangoversions;
+
+ /// <summary>
+ /// Gets or sets the machineversionbase tango versions.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<TangoVersion> TangoVersions
+ {
+ get
+ {
+ return _tangoversions;
+ }
+
+ set
+ {
+ if (_tangoversions != value)
+ {
+ _tangoversions = value;
+
+ OnTangoVersionsChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Version has changed.
+ /// </summary>
+ protected virtual void OnVersionChanged(Double version)
+ {
+ VersionChanged?.Invoke(this, version);
+ RaisePropertyChanged(nameof(Version));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the PrototypeMachineData has changed.
+ /// </summary>
+ protected virtual void OnPrototypeMachineDataChanged(String prototypemachinedata)
+ {
+ PrototypeMachineDataChanged?.Invoke(this, prototypemachinedata);
+ RaisePropertyChanged(nameof(PrototypeMachineData));
+ }
+
+ /// <summary>
+ /// Called when the Machines has changed.
+ /// </summary>
+ protected virtual void OnMachinesChanged(SynchronizedObservableCollection<Machine> machines)
+ {
+ MachinesChanged?.Invoke(this, machines);
+ RaisePropertyChanged(nameof(Machines));
+ }
+
+ /// <summary>
+ /// Called when the TangoVersions has changed.
+ /// </summary>
+ protected virtual void OnTangoVersionsChanged(SynchronizedObservableCollection<TangoVersion> tangoversions)
+ {
+ TangoVersionsChanged?.Invoke(this, tangoversions);
+ RaisePropertyChanged(nameof(TangoVersions));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MachineVersionBase" /> class.
+ /// </summary>
+ public MachineVersionBase() : base()
+ {
+
+ Machines = new SynchronizedObservableCollection<Machine>();
+
+ TangoVersions = new SynchronizedObservableCollection<TangoVersion>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/MachinesEvent.cs b/Software/Visual_Studio/Tango.BL/Entities/MachinesEvent.cs
index f1485d998..a81de795e 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/MachinesEvent.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/MachinesEvent.cs
@@ -1,331 +1,78 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.BL.Enumerations;
+using Tango.PMR.Diagnostics;
namespace Tango.BL.Entities
{
- [Table("MACHINES_EVENTS")]
- public partial class MachinesEvent : ObservableEntity<MachinesEvent>
+ [Serializable]
+ public partial class MachinesEvent : MachinesEventBase
{
+ private static Dictionary<EventTypes, EventType> _eventTypesGuids;
+ private static bool _eventFactoryInitialized;
- public event EventHandler<String> HostNameChanged;
-
- public event EventHandler<DateTime> DateTimeChanged;
-
- public event EventHandler<String> DescriptionChanged;
-
- public event EventHandler<EventType> EventTypeChanged;
-
- public event EventHandler<Machine> MachineChanged;
-
- public event EventHandler<User> UserChanged;
-
- protected String _hostname;
-
- /// <summary>
- /// Gets or sets the machinesevent host name.
- /// </summary>
-
- [Column("HOST_NAME")]
-
- public String HostName
+ private void InitializeEventFactory()
{
- get
- {
- return _hostname;
- }
-
- set
+ if (!_eventFactoryInitialized)
{
- if (_hostname != value)
- {
- _hostname = value;
-
- OnHostNameChanged(value);
-
- }
- }
- }
-
- protected String _machineguid;
-
- /// <summary>
- /// Gets or sets the machinesevent machine guid.
- /// </summary>
-
- [Column("MACHINE_GUID")]
- [ForeignKey("Machine")]
+ _eventFactoryInitialized = true;
- public String MachineGuid
- {
- get
- {
- return _machineguid;
- }
+ _eventTypesGuids = new Dictionary<EventTypes, EventType>();
- set
- {
- if (_machineguid != value)
+ foreach (var type in ObservablesStaticCollections.Instance.EventTypes)
{
- _machineguid = value;
+ _eventTypesGuids.Add((EventTypes)type.Code, type);
}
}
}
- protected String _eventtypeguid;
-
- /// <summary>
- /// Gets or sets the machinesevent event type guid.
- /// </summary>
-
- [Column("EVENT_TYPE_GUID")]
- [ForeignKey("EventType")]
-
- public String EventTypeGuid
+ public MachinesEvent(Event pmrEvent) : this()
{
- get
- {
- return _eventtypeguid;
- }
+ InitializeEventFactory();
- set
- {
- if (_eventtypeguid != value)
- {
- _eventtypeguid = value;
- }
- }
+ DateTime = DateTime.UtcNow;
+ Description = pmrEvent.Message;
+ EventType = _eventTypesGuids[(EventTypes)pmrEvent.Type];
}
- protected String _userguid;
-
- /// <summary>
- /// Gets or sets the machinesevent user guid.
- /// </summary>
-
- [Column("USER_GUID")]
- [ForeignKey("User")]
-
- public String UserGuid
+ [NotMapped]
+ public int Code
{
- get
- {
- return _userguid;
- }
-
- set
- {
- if (_userguid != value)
- {
- _userguid = value;
- }
- }
+ get { return EventType.Code; }
}
- protected DateTime _datetime;
-
- /// <summary>
- /// Gets or sets the machinesevent date time.
- /// </summary>
-
- [Column("DATE_TIME")]
-
- public DateTime DateTime
+ [NotMapped]
+ public String Name
{
- get
- {
- return _datetime;
- }
-
- set
- {
- if (_datetime != value)
- {
- _datetime = value;
-
- OnDateTimeChanged(value);
-
- }
- }
+ get { return EventType.Name; }
}
- protected String _description;
-
- /// <summary>
- /// Gets or sets the machinesevent description.
- /// </summary>
-
- [Column("DESCRIPTION")]
-
- public String Description
+ [NotMapped]
+ public EventTypesCategories Category
{
- get
- {
- return _description;
- }
-
- set
- {
- if (_description != value)
- {
- _description = value;
-
- OnDescriptionChanged(value);
-
- }
- }
+ get { return (EventTypesCategories)EventType.EventTypesCategory.Code; }
}
- protected EventType _eventtype;
-
- /// <summary>
- /// Gets or sets the machinesevent event types.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual EventType EventType
+ [NotMapped]
+ public EventTypesGroups Group
{
- get
- {
- return _eventtype;
- }
-
- set
- {
- if (_eventtype != value)
- {
- _eventtype = value;
-
- OnEventTypeChanged(value);
-
- }
- }
+ get { return (EventTypesGroups)EventType.EventTypesGroup.Code; }
}
- protected Machine _machine;
-
- /// <summary>
- /// Gets or sets the machinesevent machine.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual Machine Machine
+ [NotMapped]
+ public EventTypes Type
{
- get
- {
- return _machine;
- }
-
- set
- {
- if (_machine != value)
- {
- _machine = value;
-
- OnMachineChanged(value);
-
- }
- }
+ get { return (EventTypes)EventType.Code; }
}
- protected User _user;
-
- /// <summary>
- /// Gets or sets the machinesevent user.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual User User
+ [NotMapped]
+ public List<ActionTypes> ActionTypes
{
- get
- {
- return _user;
- }
-
- set
- {
- if (_user != value)
- {
- _user = value;
-
- OnUserChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the HostName has changed.
- /// </summary>
- protected virtual void OnHostNameChanged(String hostname)
- {
- HostNameChanged?.Invoke(this, hostname);
- RaisePropertyChanged(nameof(HostName));
- }
-
- /// <summary>
- /// Called when the DateTime has changed.
- /// </summary>
- protected virtual void OnDateTimeChanged(DateTime datetime)
- {
- DateTimeChanged?.Invoke(this, datetime);
- RaisePropertyChanged(nameof(DateTime));
- }
-
- /// <summary>
- /// Called when the Description has changed.
- /// </summary>
- protected virtual void OnDescriptionChanged(String description)
- {
- DescriptionChanged?.Invoke(this, description);
- RaisePropertyChanged(nameof(Description));
- }
-
- /// <summary>
- /// Called when the EventType has changed.
- /// </summary>
- protected virtual void OnEventTypeChanged(EventType eventtype)
- {
- EventTypeChanged?.Invoke(this, eventtype);
- RaisePropertyChanged(nameof(EventType));
- }
-
- /// <summary>
- /// Called when the Machine has changed.
- /// </summary>
- protected virtual void OnMachineChanged(Machine machine)
- {
- MachineChanged?.Invoke(this, machine);
- RaisePropertyChanged(nameof(Machine));
- }
-
- /// <summary>
- /// Called when the User has changed.
- /// </summary>
- protected virtual void OnUserChanged(User user)
- {
- UserChanged?.Invoke(this, user);
- RaisePropertyChanged(nameof(User));
+ get { return EventType.EventTypesActions.Select(x => (ActionTypes)x.ActionType.Code).Distinct().ToList(); }
}
/// <summary>
@@ -333,6 +80,7 @@ namespace Tango.BL.Entities
/// </summary>
public MachinesEvent() : base()
{
+
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/MachinesEventBase.cs b/Software/Visual_Studio/Tango.BL/Entities/MachinesEventBase.cs
new file mode 100644
index 000000000..ac300b9b9
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/MachinesEventBase.cs
@@ -0,0 +1,338 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("MACHINES_EVENTS")]
+ public abstract class MachinesEventBase : ObservableEntity<MachinesEvent>
+ {
+
+ public event EventHandler<String> HostNameChanged;
+
+ public event EventHandler<DateTime> DateTimeChanged;
+
+ public event EventHandler<String> DescriptionChanged;
+
+ public event EventHandler<EventType> EventTypeChanged;
+
+ public event EventHandler<Machine> MachineChanged;
+
+ public event EventHandler<User> UserChanged;
+
+ protected String _hostname;
+
+ /// <summary>
+ /// Gets or sets the machineseventbase host name.
+ /// </summary>
+
+ [Column("HOST_NAME")]
+
+ public String HostName
+ {
+ get
+ {
+ return _hostname;
+ }
+
+ set
+ {
+ if (_hostname != value)
+ {
+ _hostname = value;
+
+ OnHostNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _machineguid;
+
+ /// <summary>
+ /// Gets or sets the machineseventbase machine guid.
+ /// </summary>
+
+ [Column("MACHINE_GUID")]
+ [ForeignKey("Machine")]
+
+ public String MachineGuid
+ {
+ get
+ {
+ return _machineguid;
+ }
+
+ set
+ {
+ if (_machineguid != value)
+ {
+ _machineguid = value;
+ }
+ }
+ }
+
+ protected String _eventtypeguid;
+
+ /// <summary>
+ /// Gets or sets the machineseventbase event type guid.
+ /// </summary>
+
+ [Column("EVENT_TYPE_GUID")]
+ [ForeignKey("EventType")]
+
+ public String EventTypeGuid
+ {
+ get
+ {
+ return _eventtypeguid;
+ }
+
+ set
+ {
+ if (_eventtypeguid != value)
+ {
+ _eventtypeguid = value;
+ }
+ }
+ }
+
+ protected String _userguid;
+
+ /// <summary>
+ /// Gets or sets the machineseventbase user guid.
+ /// </summary>
+
+ [Column("USER_GUID")]
+ [ForeignKey("User")]
+
+ public String UserGuid
+ {
+ get
+ {
+ return _userguid;
+ }
+
+ set
+ {
+ if (_userguid != value)
+ {
+ _userguid = value;
+ }
+ }
+ }
+
+ protected DateTime _datetime;
+
+ /// <summary>
+ /// Gets or sets the machineseventbase date time.
+ /// </summary>
+
+ [Column("DATE_TIME")]
+
+ public DateTime DateTime
+ {
+ get
+ {
+ return _datetime;
+ }
+
+ set
+ {
+ if (_datetime != value)
+ {
+ _datetime = value;
+
+ OnDateTimeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _description;
+
+ /// <summary>
+ /// Gets or sets the machineseventbase description.
+ /// </summary>
+
+ [Column("DESCRIPTION")]
+
+ public String Description
+ {
+ get
+ {
+ return _description;
+ }
+
+ set
+ {
+ if (_description != value)
+ {
+ _description = value;
+
+ OnDescriptionChanged(value);
+
+ }
+ }
+ }
+
+ protected EventType _eventtype;
+
+ /// <summary>
+ /// Gets or sets the machineseventbase event types.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual EventType EventType
+ {
+ get
+ {
+ return _eventtype;
+ }
+
+ set
+ {
+ if (_eventtype != value)
+ {
+ _eventtype = value;
+
+ OnEventTypeChanged(value);
+
+ }
+ }
+ }
+
+ protected Machine _machine;
+
+ /// <summary>
+ /// Gets or sets the machineseventbase machine.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual Machine Machine
+ {
+ get
+ {
+ return _machine;
+ }
+
+ set
+ {
+ if (_machine != value)
+ {
+ _machine = value;
+
+ OnMachineChanged(value);
+
+ }
+ }
+ }
+
+ protected User _user;
+
+ /// <summary>
+ /// Gets or sets the machineseventbase user.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual User User
+ {
+ get
+ {
+ return _user;
+ }
+
+ set
+ {
+ if (_user != value)
+ {
+ _user = value;
+
+ OnUserChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the HostName has changed.
+ /// </summary>
+ protected virtual void OnHostNameChanged(String hostname)
+ {
+ HostNameChanged?.Invoke(this, hostname);
+ RaisePropertyChanged(nameof(HostName));
+ }
+
+ /// <summary>
+ /// Called when the DateTime has changed.
+ /// </summary>
+ protected virtual void OnDateTimeChanged(DateTime datetime)
+ {
+ DateTimeChanged?.Invoke(this, datetime);
+ RaisePropertyChanged(nameof(DateTime));
+ }
+
+ /// <summary>
+ /// Called when the Description has changed.
+ /// </summary>
+ protected virtual void OnDescriptionChanged(String description)
+ {
+ DescriptionChanged?.Invoke(this, description);
+ RaisePropertyChanged(nameof(Description));
+ }
+
+ /// <summary>
+ /// Called when the EventType has changed.
+ /// </summary>
+ protected virtual void OnEventTypeChanged(EventType eventtype)
+ {
+ EventTypeChanged?.Invoke(this, eventtype);
+ RaisePropertyChanged(nameof(EventType));
+ }
+
+ /// <summary>
+ /// Called when the Machine has changed.
+ /// </summary>
+ protected virtual void OnMachineChanged(Machine machine)
+ {
+ MachineChanged?.Invoke(this, machine);
+ RaisePropertyChanged(nameof(Machine));
+ }
+
+ /// <summary>
+ /// Called when the User has changed.
+ /// </summary>
+ protected virtual void OnUserChanged(User user)
+ {
+ UserChanged?.Invoke(this, user);
+ RaisePropertyChanged(nameof(User));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MachinesEventBase" /> class.
+ /// </summary>
+ public MachinesEventBase() : base()
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/MediaColor.cs b/Software/Visual_Studio/Tango.BL/Entities/MediaColor.cs
index f8dbd1041..b9020406b 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/MediaColor.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/MediaColor.cs
@@ -1,226 +1,45 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
+using ColorMine.ColorSpaces;
+using Newtonsoft.Json;
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Media;
namespace Tango.BL.Entities
{
- [Table("MEDIA_COLORS")]
- public partial class MediaColor : ObservableEntity<MediaColor>
+ public partial class MediaColor : MediaColorBase
{
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<Double> LChanged;
-
- public event EventHandler<Double> AChanged;
-
- public event EventHandler<Double> BChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Rml>> RmlsChanged;
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the mediacolor name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected Double _l;
-
- /// <summary>
- /// Gets or sets the mediacolor l.
- /// </summary>
-
- [Column("L")]
-
- public Double L
- {
- get
- {
- return _l;
- }
-
- set
- {
- if (_l != value)
- {
- _l = value;
-
- OnLChanged(value);
-
- }
- }
- }
-
- protected Double _a;
-
- /// <summary>
- /// Gets or sets the mediacolor a.
- /// </summary>
-
- [Column("A")]
-
- public Double A
- {
- get
- {
- return _a;
- }
-
- set
- {
- if (_a != value)
- {
- _a = value;
-
- OnAChanged(value);
-
- }
- }
- }
-
- protected Double _b;
-
- /// <summary>
- /// Gets or sets the mediacolor b.
- /// </summary>
-
- [Column("B")]
-
- public Double B
+ [NotMapped]
+ [JsonIgnore]
+ public Color Color
{
- get
+ get
{
- return _b;
- }
-
- set
- {
- if (_b != value)
- {
- _b = value;
-
- OnBChanged(value);
-
- }
+ Lab lab = new Lab(L, A, B);
+ var rgb = lab.To<Rgb>();
+ return Color.FromRgb((byte)rgb.R, (byte)rgb.G, (byte)rgb.B);
}
}
- protected SynchronizedObservableCollection<Rml> _rmls;
-
- /// <summary>
- /// Gets or sets the mediacolor rmls.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Rml> Rmls
+ protected override void RaisePropertyChanged(string propName)
{
- get
- {
- return _rmls;
- }
+ base.RaisePropertyChanged(propName);
- set
+ if (propName == nameof(L) || propName == nameof(A) || propName == nameof(B))
{
- if (_rmls != value)
- {
- _rmls = value;
-
- OnRmlsChanged(value);
-
- }
+ RaisePropertyChanged(nameof(Color));
}
}
/// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the L has changed.
- /// </summary>
- protected virtual void OnLChanged(Double l)
- {
- LChanged?.Invoke(this, l);
- RaisePropertyChanged(nameof(L));
- }
-
- /// <summary>
- /// Called when the A has changed.
- /// </summary>
- protected virtual void OnAChanged(Double a)
- {
- AChanged?.Invoke(this, a);
- RaisePropertyChanged(nameof(A));
- }
-
- /// <summary>
- /// Called when the B has changed.
- /// </summary>
- protected virtual void OnBChanged(Double b)
- {
- BChanged?.Invoke(this, b);
- RaisePropertyChanged(nameof(B));
- }
-
- /// <summary>
- /// Called when the Rmls has changed.
- /// </summary>
- protected virtual void OnRmlsChanged(SynchronizedObservableCollection<Rml> rmls)
- {
- RmlsChanged?.Invoke(this, rmls);
- RaisePropertyChanged(nameof(Rmls));
- }
-
- /// <summary>
/// Initializes a new instance of the <see cref="MediaColor" /> class.
/// </summary>
public MediaColor() : base()
{
- Rmls = new SynchronizedObservableCollection<Rml>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/MediaColorBase.cs b/Software/Visual_Studio/Tango.BL/Entities/MediaColorBase.cs
new file mode 100644
index 000000000..529441857
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/MediaColorBase.cs
@@ -0,0 +1,226 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("MEDIA_COLORS")]
+ public abstract class MediaColorBase : ObservableEntity<MediaColor>
+ {
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<Double> LChanged;
+
+ public event EventHandler<Double> AChanged;
+
+ public event EventHandler<Double> BChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Rml>> RmlsChanged;
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the mediacolorbase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _l;
+
+ /// <summary>
+ /// Gets or sets the mediacolorbase l.
+ /// </summary>
+
+ [Column("L")]
+
+ public Double L
+ {
+ get
+ {
+ return _l;
+ }
+
+ set
+ {
+ if (_l != value)
+ {
+ _l = value;
+
+ OnLChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _a;
+
+ /// <summary>
+ /// Gets or sets the mediacolorbase a.
+ /// </summary>
+
+ [Column("A")]
+
+ public Double A
+ {
+ get
+ {
+ return _a;
+ }
+
+ set
+ {
+ if (_a != value)
+ {
+ _a = value;
+
+ OnAChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _b;
+
+ /// <summary>
+ /// Gets or sets the mediacolorbase b.
+ /// </summary>
+
+ [Column("B")]
+
+ public Double B
+ {
+ get
+ {
+ return _b;
+ }
+
+ set
+ {
+ if (_b != value)
+ {
+ _b = value;
+
+ OnBChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Rml> _rmls;
+
+ /// <summary>
+ /// Gets or sets the mediacolorbase rmls.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Rml> Rmls
+ {
+ get
+ {
+ return _rmls;
+ }
+
+ set
+ {
+ if (_rmls != value)
+ {
+ _rmls = value;
+
+ OnRmlsChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the L has changed.
+ /// </summary>
+ protected virtual void OnLChanged(Double l)
+ {
+ LChanged?.Invoke(this, l);
+ RaisePropertyChanged(nameof(L));
+ }
+
+ /// <summary>
+ /// Called when the A has changed.
+ /// </summary>
+ protected virtual void OnAChanged(Double a)
+ {
+ AChanged?.Invoke(this, a);
+ RaisePropertyChanged(nameof(A));
+ }
+
+ /// <summary>
+ /// Called when the B has changed.
+ /// </summary>
+ protected virtual void OnBChanged(Double b)
+ {
+ BChanged?.Invoke(this, b);
+ RaisePropertyChanged(nameof(B));
+ }
+
+ /// <summary>
+ /// Called when the Rmls has changed.
+ /// </summary>
+ protected virtual void OnRmlsChanged(SynchronizedObservableCollection<Rml> rmls)
+ {
+ RmlsChanged?.Invoke(this, rmls);
+ RaisePropertyChanged(nameof(Rmls));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MediaColorBase" /> class.
+ /// </summary>
+ public MediaColorBase() : base()
+ {
+
+ Rmls = new SynchronizedObservableCollection<Rml>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/MediaCondition.cs b/Software/Visual_Studio/Tango.BL/Entities/MediaCondition.cs
index 5bddd398d..856601347 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/MediaCondition.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/MediaCondition.cs
@@ -1,150 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("MEDIA_CONDITIONS")]
- public partial class MediaCondition : ObservableEntity<MediaCondition>
+ public partial class MediaCondition : MediaConditionBase
{
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Rml>> RmlsChanged;
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the mediacondition name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the mediacondition code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<Rml> _rmls;
-
- /// <summary>
- /// Gets or sets the mediacondition rmls.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Rml> Rmls
- {
- get
- {
- return _rmls;
- }
-
- set
- {
- if (_rmls != value)
- {
- _rmls = value;
-
- OnRmlsChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Rmls has changed.
- /// </summary>
- protected virtual void OnRmlsChanged(SynchronizedObservableCollection<Rml> rmls)
- {
- RmlsChanged?.Invoke(this, rmls);
- RaisePropertyChanged(nameof(Rmls));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="MediaCondition" /> class.
/// </summary>
public MediaCondition() : base()
{
- Rmls = new SynchronizedObservableCollection<Rml>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/MediaConditionBase.cs b/Software/Visual_Studio/Tango.BL/Entities/MediaConditionBase.cs
new file mode 100644
index 000000000..89d04cf7b
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/MediaConditionBase.cs
@@ -0,0 +1,150 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("MEDIA_CONDITIONS")]
+ public abstract class MediaConditionBase : ObservableEntity<MediaCondition>
+ {
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Rml>> RmlsChanged;
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the mediaconditionbase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the mediaconditionbase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Rml> _rmls;
+
+ /// <summary>
+ /// Gets or sets the mediaconditionbase rmls.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Rml> Rmls
+ {
+ get
+ {
+ return _rmls;
+ }
+
+ set
+ {
+ if (_rmls != value)
+ {
+ _rmls = value;
+
+ OnRmlsChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Rmls has changed.
+ /// </summary>
+ protected virtual void OnRmlsChanged(SynchronizedObservableCollection<Rml> rmls)
+ {
+ RmlsChanged?.Invoke(this, rmls);
+ RaisePropertyChanged(nameof(Rmls));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MediaConditionBase" /> class.
+ /// </summary>
+ public MediaConditionBase() : base()
+ {
+
+ Rmls = new SynchronizedObservableCollection<Rml>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/MediaMaterial.cs b/Software/Visual_Studio/Tango.BL/Entities/MediaMaterial.cs
index 8ea998ef3..64a6b8153 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/MediaMaterial.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/MediaMaterial.cs
@@ -1,150 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("MEDIA_MATERIALS")]
- public partial class MediaMaterial : ObservableEntity<MediaMaterial>
+ public partial class MediaMaterial : MediaMaterialBase
{
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Rml>> RmlsChanged;
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the mediamaterial name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the mediamaterial code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<Rml> _rmls;
-
- /// <summary>
- /// Gets or sets the mediamaterial rmls.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Rml> Rmls
- {
- get
- {
- return _rmls;
- }
-
- set
- {
- if (_rmls != value)
- {
- _rmls = value;
-
- OnRmlsChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Rmls has changed.
- /// </summary>
- protected virtual void OnRmlsChanged(SynchronizedObservableCollection<Rml> rmls)
- {
- RmlsChanged?.Invoke(this, rmls);
- RaisePropertyChanged(nameof(Rmls));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="MediaMaterial" /> class.
/// </summary>
public MediaMaterial() : base()
{
- Rmls = new SynchronizedObservableCollection<Rml>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/MediaMaterialBase.cs b/Software/Visual_Studio/Tango.BL/Entities/MediaMaterialBase.cs
new file mode 100644
index 000000000..9bbd36c9e
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/MediaMaterialBase.cs
@@ -0,0 +1,150 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("MEDIA_MATERIALS")]
+ public abstract class MediaMaterialBase : ObservableEntity<MediaMaterial>
+ {
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Rml>> RmlsChanged;
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the mediamaterialbase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the mediamaterialbase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Rml> _rmls;
+
+ /// <summary>
+ /// Gets or sets the mediamaterialbase rmls.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Rml> Rmls
+ {
+ get
+ {
+ return _rmls;
+ }
+
+ set
+ {
+ if (_rmls != value)
+ {
+ _rmls = value;
+
+ OnRmlsChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Rmls has changed.
+ /// </summary>
+ protected virtual void OnRmlsChanged(SynchronizedObservableCollection<Rml> rmls)
+ {
+ RmlsChanged?.Invoke(this, rmls);
+ RaisePropertyChanged(nameof(Rmls));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MediaMaterialBase" /> class.
+ /// </summary>
+ public MediaMaterialBase() : base()
+ {
+
+ Rmls = new SynchronizedObservableCollection<Rml>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/MediaPurpos.cs b/Software/Visual_Studio/Tango.BL/Entities/MediaPurpos.cs
index a9f21821a..a627f7861 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/MediaPurpos.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/MediaPurpos.cs
@@ -1,150 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("MEDIA_PURPOSES")]
- public partial class MediaPurpos : ObservableEntity<MediaPurpos>
+ public partial class MediaPurpos : MediaPurposBase
{
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Rml>> RmlsChanged;
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the mediapurpos name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the mediapurpos code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<Rml> _rmls;
-
- /// <summary>
- /// Gets or sets the mediapurpos rmls.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Rml> Rmls
- {
- get
- {
- return _rmls;
- }
-
- set
- {
- if (_rmls != value)
- {
- _rmls = value;
-
- OnRmlsChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Rmls has changed.
- /// </summary>
- protected virtual void OnRmlsChanged(SynchronizedObservableCollection<Rml> rmls)
- {
- RmlsChanged?.Invoke(this, rmls);
- RaisePropertyChanged(nameof(Rmls));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="MediaPurpos" /> class.
/// </summary>
public MediaPurpos() : base()
{
- Rmls = new SynchronizedObservableCollection<Rml>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/MediaPurposBase.cs b/Software/Visual_Studio/Tango.BL/Entities/MediaPurposBase.cs
new file mode 100644
index 000000000..99bd98b4e
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/MediaPurposBase.cs
@@ -0,0 +1,150 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("MEDIA_PURPOSES")]
+ public abstract class MediaPurposBase : ObservableEntity<MediaPurpos>
+ {
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Rml>> RmlsChanged;
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the mediapurposbase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the mediapurposbase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Rml> _rmls;
+
+ /// <summary>
+ /// Gets or sets the mediapurposbase rmls.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Rml> Rmls
+ {
+ get
+ {
+ return _rmls;
+ }
+
+ set
+ {
+ if (_rmls != value)
+ {
+ _rmls = value;
+
+ OnRmlsChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Rmls has changed.
+ /// </summary>
+ protected virtual void OnRmlsChanged(SynchronizedObservableCollection<Rml> rmls)
+ {
+ RmlsChanged?.Invoke(this, rmls);
+ RaisePropertyChanged(nameof(Rmls));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MediaPurposBase" /> class.
+ /// </summary>
+ public MediaPurposBase() : base()
+ {
+
+ Rmls = new SynchronizedObservableCollection<Rml>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/MidTankType.cs b/Software/Visual_Studio/Tango.BL/Entities/MidTankType.cs
index a0e44ef3e..ad0f2d8a7 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/MidTankType.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/MidTankType.cs
@@ -1,188 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("MID_TANK_TYPES")]
- public partial class MidTankType : ObservableEntity<MidTankType>
+ public partial class MidTankType : MidTankTypeBase
{
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<Double> LiterCapacityChanged;
-
- public event EventHandler<SynchronizedObservableCollection<IdsPack>> IdsPacksChanged;
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the midtanktype code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the midtanktype name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected Double _litercapacity;
-
- /// <summary>
- /// Gets or sets the midtanktype liter capacity.
- /// </summary>
-
- [Column("LITER_CAPACITY")]
-
- public Double LiterCapacity
- {
- get
- {
- return _litercapacity;
- }
-
- set
- {
- if (_litercapacity != value)
- {
- _litercapacity = value;
-
- OnLiterCapacityChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<IdsPack> _idspacks;
-
- /// <summary>
- /// Gets or sets the midtanktype ids packs.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<IdsPack> IdsPacks
- {
- get
- {
- return _idspacks;
- }
-
- set
- {
- if (_idspacks != value)
- {
- _idspacks = value;
-
- OnIdsPacksChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the LiterCapacity has changed.
- /// </summary>
- protected virtual void OnLiterCapacityChanged(Double litercapacity)
- {
- LiterCapacityChanged?.Invoke(this, litercapacity);
- RaisePropertyChanged(nameof(LiterCapacity));
- }
-
- /// <summary>
- /// Called when the IdsPacks has changed.
- /// </summary>
- protected virtual void OnIdsPacksChanged(SynchronizedObservableCollection<IdsPack> idspacks)
- {
- IdsPacksChanged?.Invoke(this, idspacks);
- RaisePropertyChanged(nameof(IdsPacks));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="MidTankType" /> class.
/// </summary>
public MidTankType() : base()
{
- IdsPacks = new SynchronizedObservableCollection<IdsPack>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/MidTankTypeBase.cs b/Software/Visual_Studio/Tango.BL/Entities/MidTankTypeBase.cs
new file mode 100644
index 000000000..c15bfd1ce
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/MidTankTypeBase.cs
@@ -0,0 +1,188 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("MID_TANK_TYPES")]
+ public abstract class MidTankTypeBase : ObservableEntity<MidTankType>
+ {
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<Double> LiterCapacityChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<IdsPack>> IdsPacksChanged;
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the midtanktypebase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the midtanktypebase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _litercapacity;
+
+ /// <summary>
+ /// Gets or sets the midtanktypebase liter capacity.
+ /// </summary>
+
+ [Column("LITER_CAPACITY")]
+
+ public Double LiterCapacity
+ {
+ get
+ {
+ return _litercapacity;
+ }
+
+ set
+ {
+ if (_litercapacity != value)
+ {
+ _litercapacity = value;
+
+ OnLiterCapacityChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<IdsPack> _idspacks;
+
+ /// <summary>
+ /// Gets or sets the midtanktypebase ids packs.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<IdsPack> IdsPacks
+ {
+ get
+ {
+ return _idspacks;
+ }
+
+ set
+ {
+ if (_idspacks != value)
+ {
+ _idspacks = value;
+
+ OnIdsPacksChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the LiterCapacity has changed.
+ /// </summary>
+ protected virtual void OnLiterCapacityChanged(Double litercapacity)
+ {
+ LiterCapacityChanged?.Invoke(this, litercapacity);
+ RaisePropertyChanged(nameof(LiterCapacity));
+ }
+
+ /// <summary>
+ /// Called when the IdsPacks has changed.
+ /// </summary>
+ protected virtual void OnIdsPacksChanged(SynchronizedObservableCollection<IdsPack> idspacks)
+ {
+ IdsPacksChanged?.Invoke(this, idspacks);
+ RaisePropertyChanged(nameof(IdsPacks));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MidTankTypeBase" /> class.
+ /// </summary>
+ public MidTankTypeBase() : base()
+ {
+
+ IdsPacks = new SynchronizedObservableCollection<IdsPack>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/Organization.cs b/Software/Visual_Studio/Tango.BL/Entities/Organization.cs
index ead112405..738c77efb 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/Organization.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/Organization.cs
@@ -1,314 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("ORGANIZATIONS")]
- public partial class Organization : ObservableEntity<Organization>
+ public partial class Organization : OrganizationBase
{
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<Address> AddressChanged;
-
- public event EventHandler<Contact> ContactChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Customer>> CustomersChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Machine>> MachinesChanged;
-
- public event EventHandler<SynchronizedObservableCollection<User>> UsersChanged;
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the organization name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected String _contactguid;
-
- /// <summary>
- /// Gets or sets the organization contact guid.
- /// </summary>
-
- [Column("CONTACT_GUID")]
- [ForeignKey("Contact")]
-
- public String ContactGuid
- {
- get
- {
- return _contactguid;
- }
-
- set
- {
- if (_contactguid != value)
- {
- _contactguid = value;
- }
- }
- }
-
- protected String _addressguid;
-
- /// <summary>
- /// Gets or sets the organization address guid.
- /// </summary>
-
- [Column("ADDRESS_GUID")]
- [ForeignKey("Address")]
-
- public String AddressGuid
- {
- get
- {
- return _addressguid;
- }
-
- set
- {
- if (_addressguid != value)
- {
- _addressguid = value;
- }
- }
- }
-
- protected Address _address;
-
- /// <summary>
- /// Gets or sets the organization address.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual Address Address
- {
- get
- {
- return _address;
- }
-
- set
- {
- if (_address != value)
- {
- _address = value;
-
- OnAddressChanged(value);
-
- }
- }
- }
-
- protected Contact _contact;
-
- /// <summary>
- /// Gets or sets the organization contact.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual Contact Contact
- {
- get
- {
- return _contact;
- }
-
- set
- {
- if (_contact != value)
- {
- _contact = value;
-
- OnContactChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<Customer> _customers;
-
- /// <summary>
- /// Gets or sets the organization customers.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Customer> Customers
- {
- get
- {
- return _customers;
- }
-
- set
- {
- if (_customers != value)
- {
- _customers = value;
-
- OnCustomersChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<Machine> _machines;
-
- /// <summary>
- /// Gets or sets the organization machines.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Machine> Machines
- {
- get
- {
- return _machines;
- }
-
- set
- {
- if (_machines != value)
- {
- _machines = value;
-
- OnMachinesChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<User> _users;
-
- /// <summary>
- /// Gets or sets the organization users.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<User> Users
- {
- get
- {
- return _users;
- }
-
- set
- {
- if (_users != value)
- {
- _users = value;
-
- OnUsersChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Address has changed.
- /// </summary>
- protected virtual void OnAddressChanged(Address address)
- {
- AddressChanged?.Invoke(this, address);
- RaisePropertyChanged(nameof(Address));
- }
-
- /// <summary>
- /// Called when the Contact has changed.
- /// </summary>
- protected virtual void OnContactChanged(Contact contact)
- {
- ContactChanged?.Invoke(this, contact);
- RaisePropertyChanged(nameof(Contact));
- }
-
- /// <summary>
- /// Called when the Customers has changed.
- /// </summary>
- protected virtual void OnCustomersChanged(SynchronizedObservableCollection<Customer> customers)
- {
- CustomersChanged?.Invoke(this, customers);
- RaisePropertyChanged(nameof(Customers));
- }
-
- /// <summary>
- /// Called when the Machines has changed.
- /// </summary>
- protected virtual void OnMachinesChanged(SynchronizedObservableCollection<Machine> machines)
- {
- MachinesChanged?.Invoke(this, machines);
- RaisePropertyChanged(nameof(Machines));
- }
-
- /// <summary>
- /// Called when the Users has changed.
- /// </summary>
- protected virtual void OnUsersChanged(SynchronizedObservableCollection<User> users)
- {
- UsersChanged?.Invoke(this, users);
- RaisePropertyChanged(nameof(Users));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="Organization" /> class.
/// </summary>
public Organization() : base()
{
- Customers = new SynchronizedObservableCollection<Customer>();
-
- Machines = new SynchronizedObservableCollection<Machine>();
-
- Users = new SynchronizedObservableCollection<User>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/OrganizationBase.cs b/Software/Visual_Studio/Tango.BL/Entities/OrganizationBase.cs
new file mode 100644
index 000000000..1d2fea8d0
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/OrganizationBase.cs
@@ -0,0 +1,314 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("ORGANIZATIONS")]
+ public abstract class OrganizationBase : ObservableEntity<Organization>
+ {
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<Address> AddressChanged;
+
+ public event EventHandler<Contact> ContactChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Customer>> CustomersChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Machine>> MachinesChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<User>> UsersChanged;
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the organizationbase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _contactguid;
+
+ /// <summary>
+ /// Gets or sets the organizationbase contact guid.
+ /// </summary>
+
+ [Column("CONTACT_GUID")]
+ [ForeignKey("Contact")]
+
+ public String ContactGuid
+ {
+ get
+ {
+ return _contactguid;
+ }
+
+ set
+ {
+ if (_contactguid != value)
+ {
+ _contactguid = value;
+ }
+ }
+ }
+
+ protected String _addressguid;
+
+ /// <summary>
+ /// Gets or sets the organizationbase address guid.
+ /// </summary>
+
+ [Column("ADDRESS_GUID")]
+ [ForeignKey("Address")]
+
+ public String AddressGuid
+ {
+ get
+ {
+ return _addressguid;
+ }
+
+ set
+ {
+ if (_addressguid != value)
+ {
+ _addressguid = value;
+ }
+ }
+ }
+
+ protected Address _address;
+
+ /// <summary>
+ /// Gets or sets the organizationbase address.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual Address Address
+ {
+ get
+ {
+ return _address;
+ }
+
+ set
+ {
+ if (_address != value)
+ {
+ _address = value;
+
+ OnAddressChanged(value);
+
+ }
+ }
+ }
+
+ protected Contact _contact;
+
+ /// <summary>
+ /// Gets or sets the organizationbase contact.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual Contact Contact
+ {
+ get
+ {
+ return _contact;
+ }
+
+ set
+ {
+ if (_contact != value)
+ {
+ _contact = value;
+
+ OnContactChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Customer> _customers;
+
+ /// <summary>
+ /// Gets or sets the organizationbase customers.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Customer> Customers
+ {
+ get
+ {
+ return _customers;
+ }
+
+ set
+ {
+ if (_customers != value)
+ {
+ _customers = value;
+
+ OnCustomersChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Machine> _machines;
+
+ /// <summary>
+ /// Gets or sets the organizationbase machines.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Machine> Machines
+ {
+ get
+ {
+ return _machines;
+ }
+
+ set
+ {
+ if (_machines != value)
+ {
+ _machines = value;
+
+ OnMachinesChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<User> _users;
+
+ /// <summary>
+ /// Gets or sets the organizationbase users.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<User> Users
+ {
+ get
+ {
+ return _users;
+ }
+
+ set
+ {
+ if (_users != value)
+ {
+ _users = value;
+
+ OnUsersChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Address has changed.
+ /// </summary>
+ protected virtual void OnAddressChanged(Address address)
+ {
+ AddressChanged?.Invoke(this, address);
+ RaisePropertyChanged(nameof(Address));
+ }
+
+ /// <summary>
+ /// Called when the Contact has changed.
+ /// </summary>
+ protected virtual void OnContactChanged(Contact contact)
+ {
+ ContactChanged?.Invoke(this, contact);
+ RaisePropertyChanged(nameof(Contact));
+ }
+
+ /// <summary>
+ /// Called when the Customers has changed.
+ /// </summary>
+ protected virtual void OnCustomersChanged(SynchronizedObservableCollection<Customer> customers)
+ {
+ CustomersChanged?.Invoke(this, customers);
+ RaisePropertyChanged(nameof(Customers));
+ }
+
+ /// <summary>
+ /// Called when the Machines has changed.
+ /// </summary>
+ protected virtual void OnMachinesChanged(SynchronizedObservableCollection<Machine> machines)
+ {
+ MachinesChanged?.Invoke(this, machines);
+ RaisePropertyChanged(nameof(Machines));
+ }
+
+ /// <summary>
+ /// Called when the Users has changed.
+ /// </summary>
+ protected virtual void OnUsersChanged(SynchronizedObservableCollection<User> users)
+ {
+ UsersChanged?.Invoke(this, users);
+ RaisePropertyChanged(nameof(Users));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="OrganizationBase" /> class.
+ /// </summary>
+ public OrganizationBase() : base()
+ {
+
+ Customers = new SynchronizedObservableCollection<Customer>();
+
+ Machines = new SynchronizedObservableCollection<Machine>();
+
+ Users = new SynchronizedObservableCollection<User>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/Permission.cs b/Software/Visual_Studio/Tango.BL/Entities/Permission.cs
index cef16afd2..1722afe79 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/Permission.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/Permission.cs
@@ -1,188 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("PERMISSIONS")]
- public partial class Permission : ObservableEntity<Permission>
+ public partial class Permission : PermissionBase
{
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<String> DescriptionChanged;
-
- public event EventHandler<SynchronizedObservableCollection<RolesPermission>> RolesPermissionsChanged;
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the permission code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the permission name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected String _description;
-
- /// <summary>
- /// Gets or sets the permission description.
- /// </summary>
-
- [Column("DESCRIPTION")]
-
- public String Description
- {
- get
- {
- return _description;
- }
-
- set
- {
- if (_description != value)
- {
- _description = value;
-
- OnDescriptionChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<RolesPermission> _rolespermissions;
-
- /// <summary>
- /// Gets or sets the permission roles permissions.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<RolesPermission> RolesPermissions
- {
- get
- {
- return _rolespermissions;
- }
-
- set
- {
- if (_rolespermissions != value)
- {
- _rolespermissions = value;
-
- OnRolesPermissionsChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Description has changed.
- /// </summary>
- protected virtual void OnDescriptionChanged(String description)
- {
- DescriptionChanged?.Invoke(this, description);
- RaisePropertyChanged(nameof(Description));
- }
-
- /// <summary>
- /// Called when the RolesPermissions has changed.
- /// </summary>
- protected virtual void OnRolesPermissionsChanged(SynchronizedObservableCollection<RolesPermission> rolespermissions)
- {
- RolesPermissionsChanged?.Invoke(this, rolespermissions);
- RaisePropertyChanged(nameof(RolesPermissions));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="Permission" /> class.
/// </summary>
public Permission() : base()
{
- RolesPermissions = new SynchronizedObservableCollection<RolesPermission>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/PermissionBase.cs b/Software/Visual_Studio/Tango.BL/Entities/PermissionBase.cs
new file mode 100644
index 000000000..f040710e6
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/PermissionBase.cs
@@ -0,0 +1,188 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("PERMISSIONS")]
+ public abstract class PermissionBase : ObservableEntity<Permission>
+ {
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<String> DescriptionChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<RolesPermission>> RolesPermissionsChanged;
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the permissionbase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the permissionbase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _description;
+
+ /// <summary>
+ /// Gets or sets the permissionbase description.
+ /// </summary>
+
+ [Column("DESCRIPTION")]
+
+ public String Description
+ {
+ get
+ {
+ return _description;
+ }
+
+ set
+ {
+ if (_description != value)
+ {
+ _description = value;
+
+ OnDescriptionChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<RolesPermission> _rolespermissions;
+
+ /// <summary>
+ /// Gets or sets the permissionbase roles permissions.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<RolesPermission> RolesPermissions
+ {
+ get
+ {
+ return _rolespermissions;
+ }
+
+ set
+ {
+ if (_rolespermissions != value)
+ {
+ _rolespermissions = value;
+
+ OnRolesPermissionsChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Description has changed.
+ /// </summary>
+ protected virtual void OnDescriptionChanged(String description)
+ {
+ DescriptionChanged?.Invoke(this, description);
+ RaisePropertyChanged(nameof(Description));
+ }
+
+ /// <summary>
+ /// Called when the RolesPermissions has changed.
+ /// </summary>
+ protected virtual void OnRolesPermissionsChanged(SynchronizedObservableCollection<RolesPermission> rolespermissions)
+ {
+ RolesPermissionsChanged?.Invoke(this, rolespermissions);
+ RaisePropertyChanged(nameof(RolesPermissions));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="PermissionBase" /> class.
+ /// </summary>
+ public PermissionBase() : base()
+ {
+
+ RolesPermissions = new SynchronizedObservableCollection<RolesPermission>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/ProcessParametersTable.cs b/Software/Visual_Studio/Tango.BL/Entities/ProcessParametersTable.cs
index 4ad4d9790..549aff6e7 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/ProcessParametersTable.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/ProcessParametersTable.cs
@@ -1,889 +1,28 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("PROCESS_PARAMETERS_TABLES")]
- public partial class ProcessParametersTable : ObservableEntity<ProcessParametersTable>
+ public partial class ProcessParametersTable : ProcessParametersTableBase
{
+ public event EventHandler DyeingSpeedMinInkUptakeChanged;
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<Double> DyeingSpeedChanged;
-
- public event EventHandler<Double> MinInkUptakeChanged;
-
- public event EventHandler<Double> MaxInkUptakeChanged;
-
- public event EventHandler<Double> FeederTensionChanged;
-
- public event EventHandler<Double> PullerTensionChanged;
-
- public event EventHandler<Double> WinderTensionChanged;
-
- public event EventHandler<Double> MixerTempChanged;
-
- public event EventHandler<Double> HeadZone1TempChanged;
-
- public event EventHandler<Double> HeadZone2TempChanged;
-
- public event EventHandler<Double> HeadZone3TempChanged;
-
- public event EventHandler<Double> HeadZone4TempChanged;
-
- public event EventHandler<Double> HeadZone5TempChanged;
-
- public event EventHandler<Double> HeadZone6TempChanged;
-
- public event EventHandler<Double> DryerAirFlowChanged;
-
- public event EventHandler<Double> DryerZone1TempChanged;
-
- public event EventHandler<Double> DryerZone2TempChanged;
-
- public event EventHandler<Double> DryerZone3TempChanged;
-
- public event EventHandler<Double> DryerBufferLengthChanged;
-
- public event EventHandler<Double> HeadAirFlowChanged;
-
- public event EventHandler<Int32> TableIndexChanged;
-
- public event EventHandler<ProcessParametersTablesGroup> ProcessParametersTablesGroupChanged;
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the processparameterstable name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected Double _dyeingspeed;
-
- /// <summary>
- /// Gets or sets the processparameterstable dyeing speed.
- /// </summary>
-
- [Column("DYEING_SPEED")]
-
- public Double DyeingSpeed
- {
- get
- {
- return _dyeingspeed;
- }
-
- set
- {
- if (_dyeingspeed != value)
- {
- _dyeingspeed = value;
-
- OnDyeingSpeedChanged(value);
-
- }
- }
- }
-
- protected Double _mininkuptake;
-
- /// <summary>
- /// Gets or sets the processparameterstable min ink uptake.
- /// </summary>
-
- [Column("MIN_INK_UPTAKE")]
-
- public Double MinInkUptake
- {
- get
- {
- return _mininkuptake;
- }
-
- set
- {
- if (_mininkuptake != value)
- {
- _mininkuptake = value;
-
- OnMinInkUptakeChanged(value);
-
- }
- }
- }
-
- protected Double _maxinkuptake;
-
- /// <summary>
- /// Gets or sets the processparameterstable max ink uptake.
- /// </summary>
-
- [Column("MAX_INK_UPTAKE")]
-
- public Double MaxInkUptake
- {
- get
- {
- return _maxinkuptake;
- }
-
- set
- {
- if (_maxinkuptake != value)
- {
- _maxinkuptake = value;
-
- OnMaxInkUptakeChanged(value);
-
- }
- }
- }
-
- protected Double _feedertension;
-
- /// <summary>
- /// Gets or sets the processparameterstable feeder tension.
- /// </summary>
-
- [Column("FEEDER_TENSION")]
-
- public Double FeederTension
- {
- get
- {
- return _feedertension;
- }
-
- set
- {
- if (_feedertension != value)
- {
- _feedertension = value;
-
- OnFeederTensionChanged(value);
-
- }
- }
- }
-
- protected Double _pullertension;
-
- /// <summary>
- /// Gets or sets the processparameterstable puller tension.
- /// </summary>
-
- [Column("PULLER_TENSION")]
-
- public Double PullerTension
- {
- get
- {
- return _pullertension;
- }
-
- set
- {
- if (_pullertension != value)
- {
- _pullertension = value;
-
- OnPullerTensionChanged(value);
-
- }
- }
- }
-
- protected Double _windertension;
-
- /// <summary>
- /// Gets or sets the processparameterstable winder tension.
- /// </summary>
-
- [Column("WINDER_TENSION")]
-
- public Double WinderTension
+ protected override void RaisePropertyChanged(string propName)
{
- get
- {
- return _windertension;
- }
+ base.RaisePropertyChanged(propName);
- set
+ if (propName == nameof(DyeingSpeed) || propName == nameof(MinInkUptake))
{
- if (_windertension != value)
- {
- _windertension = value;
-
- OnWinderTensionChanged(value);
-
- }
+ OnDyeingSpeedMinInkUptakeChanged();
}
}
- protected Double _mixertemp;
-
- /// <summary>
- /// Gets or sets the processparameterstable mixer temp.
- /// </summary>
-
- [Column("MIXER_TEMP")]
-
- public Double MixerTemp
+ protected virtual void OnDyeingSpeedMinInkUptakeChanged()
{
- get
- {
- return _mixertemp;
- }
-
- set
- {
- if (_mixertemp != value)
- {
- _mixertemp = value;
-
- OnMixerTempChanged(value);
-
- }
- }
- }
-
- protected Double _headzone1temp;
-
- /// <summary>
- /// Gets or sets the processparameterstable head zone1 temp.
- /// </summary>
-
- [Column("HEAD_ZONE1_TEMP")]
-
- public Double HeadZone1Temp
- {
- get
- {
- return _headzone1temp;
- }
-
- set
- {
- if (_headzone1temp != value)
- {
- _headzone1temp = value;
-
- OnHeadZone1TempChanged(value);
-
- }
- }
- }
-
- protected Double _headzone2temp;
-
- /// <summary>
- /// Gets or sets the processparameterstable head zone2 temp.
- /// </summary>
-
- [Column("HEAD_ZONE2_TEMP")]
-
- public Double HeadZone2Temp
- {
- get
- {
- return _headzone2temp;
- }
-
- set
- {
- if (_headzone2temp != value)
- {
- _headzone2temp = value;
-
- OnHeadZone2TempChanged(value);
-
- }
- }
- }
-
- protected Double _headzone3temp;
-
- /// <summary>
- /// Gets or sets the processparameterstable head zone3 temp.
- /// </summary>
-
- [Column("HEAD_ZONE3_TEMP")]
-
- public Double HeadZone3Temp
- {
- get
- {
- return _headzone3temp;
- }
-
- set
- {
- if (_headzone3temp != value)
- {
- _headzone3temp = value;
-
- OnHeadZone3TempChanged(value);
-
- }
- }
- }
-
- protected Double _headzone4temp;
-
- /// <summary>
- /// Gets or sets the processparameterstable head zone4 temp.
- /// </summary>
-
- [Column("HEAD_ZONE4_TEMP")]
-
- public Double HeadZone4Temp
- {
- get
- {
- return _headzone4temp;
- }
-
- set
- {
- if (_headzone4temp != value)
- {
- _headzone4temp = value;
-
- OnHeadZone4TempChanged(value);
-
- }
- }
- }
-
- protected Double _headzone5temp;
-
- /// <summary>
- /// Gets or sets the processparameterstable head zone5 temp.
- /// </summary>
-
- [Column("HEAD_ZONE5_TEMP")]
-
- public Double HeadZone5Temp
- {
- get
- {
- return _headzone5temp;
- }
-
- set
- {
- if (_headzone5temp != value)
- {
- _headzone5temp = value;
-
- OnHeadZone5TempChanged(value);
-
- }
- }
- }
-
- protected Double _headzone6temp;
-
- /// <summary>
- /// Gets or sets the processparameterstable head zone6 temp.
- /// </summary>
-
- [Column("HEAD_ZONE6_TEMP")]
-
- public Double HeadZone6Temp
- {
- get
- {
- return _headzone6temp;
- }
-
- set
- {
- if (_headzone6temp != value)
- {
- _headzone6temp = value;
-
- OnHeadZone6TempChanged(value);
-
- }
- }
- }
-
- protected Double _dryerairflow;
-
- /// <summary>
- /// Gets or sets the processparameterstable dryer air flow.
- /// </summary>
-
- [Column("DRYER_AIR_FLOW")]
-
- public Double DryerAirFlow
- {
- get
- {
- return _dryerairflow;
- }
-
- set
- {
- if (_dryerairflow != value)
- {
- _dryerairflow = value;
-
- OnDryerAirFlowChanged(value);
-
- }
- }
- }
-
- protected Double _dryerzone1temp;
-
- /// <summary>
- /// Gets or sets the processparameterstable dryer zone1 temp.
- /// </summary>
-
- [Column("DRYER_ZONE1_TEMP")]
-
- public Double DryerZone1Temp
- {
- get
- {
- return _dryerzone1temp;
- }
-
- set
- {
- if (_dryerzone1temp != value)
- {
- _dryerzone1temp = value;
-
- OnDryerZone1TempChanged(value);
-
- }
- }
- }
-
- protected Double _dryerzone2temp;
-
- /// <summary>
- /// Gets or sets the processparameterstable dryer zone2 temp.
- /// </summary>
-
- [Column("DRYER_ZONE2_TEMP")]
-
- public Double DryerZone2Temp
- {
- get
- {
- return _dryerzone2temp;
- }
-
- set
- {
- if (_dryerzone2temp != value)
- {
- _dryerzone2temp = value;
-
- OnDryerZone2TempChanged(value);
-
- }
- }
- }
-
- protected Double _dryerzone3temp;
-
- /// <summary>
- /// Gets or sets the processparameterstable dryer zone3 temp.
- /// </summary>
-
- [Column("DRYER_ZONE3_TEMP")]
-
- public Double DryerZone3Temp
- {
- get
- {
- return _dryerzone3temp;
- }
-
- set
- {
- if (_dryerzone3temp != value)
- {
- _dryerzone3temp = value;
-
- OnDryerZone3TempChanged(value);
-
- }
- }
- }
-
- protected Double _dryerbufferlength;
-
- /// <summary>
- /// Gets or sets the processparameterstable dryer buffer length.
- /// </summary>
-
- [Column("DRYER_BUFFER_LENGTH")]
-
- public Double DryerBufferLength
- {
- get
- {
- return _dryerbufferlength;
- }
-
- set
- {
- if (_dryerbufferlength != value)
- {
- _dryerbufferlength = value;
-
- OnDryerBufferLengthChanged(value);
-
- }
- }
- }
-
- protected Double _headairflow;
-
- /// <summary>
- /// Gets or sets the processparameterstable head air flow.
- /// </summary>
-
- [Column("HEAD_AIR_FLOW")]
-
- public Double HeadAirFlow
- {
- get
- {
- return _headairflow;
- }
-
- set
- {
- if (_headairflow != value)
- {
- _headairflow = value;
-
- OnHeadAirFlowChanged(value);
-
- }
- }
- }
-
- protected String _processparameterstablesgroupguid;
-
- /// <summary>
- /// Gets or sets the processparameterstable process parameters tables group guid.
- /// </summary>
-
- [Column("PROCESS_PARAMETERS_TABLES_GROUP_GUID")]
- [ForeignKey("ProcessParametersTablesGroup")]
-
- public String ProcessParametersTablesGroupGuid
- {
- get
- {
- return _processparameterstablesgroupguid;
- }
-
- set
- {
- if (_processparameterstablesgroupguid != value)
- {
- _processparameterstablesgroupguid = value;
- }
- }
- }
-
- protected Int32 _tableindex;
-
- /// <summary>
- /// Gets or sets the processparameterstable table index.
- /// </summary>
-
- [Column("TABLE_INDEX")]
-
- public Int32 TableIndex
- {
- get
- {
- return _tableindex;
- }
-
- set
- {
- if (_tableindex != value)
- {
- _tableindex = value;
-
- OnTableIndexChanged(value);
-
- }
- }
- }
-
- protected ProcessParametersTablesGroup _processparameterstablesgroup;
-
- /// <summary>
- /// Gets or sets the processparameterstable process parameters tables groups.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual ProcessParametersTablesGroup ProcessParametersTablesGroup
- {
- get
- {
- return _processparameterstablesgroup;
- }
-
- set
- {
- if (_processparameterstablesgroup != value)
- {
- _processparameterstablesgroup = value;
-
- OnProcessParametersTablesGroupChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the DyeingSpeed has changed.
- /// </summary>
- protected virtual void OnDyeingSpeedChanged(Double dyeingspeed)
- {
- DyeingSpeedChanged?.Invoke(this, dyeingspeed);
- RaisePropertyChanged(nameof(DyeingSpeed));
- }
-
- /// <summary>
- /// Called when the MinInkUptake has changed.
- /// </summary>
- protected virtual void OnMinInkUptakeChanged(Double mininkuptake)
- {
- MinInkUptakeChanged?.Invoke(this, mininkuptake);
- RaisePropertyChanged(nameof(MinInkUptake));
- }
-
- /// <summary>
- /// Called when the MaxInkUptake has changed.
- /// </summary>
- protected virtual void OnMaxInkUptakeChanged(Double maxinkuptake)
- {
- MaxInkUptakeChanged?.Invoke(this, maxinkuptake);
- RaisePropertyChanged(nameof(MaxInkUptake));
- }
-
- /// <summary>
- /// Called when the FeederTension has changed.
- /// </summary>
- protected virtual void OnFeederTensionChanged(Double feedertension)
- {
- FeederTensionChanged?.Invoke(this, feedertension);
- RaisePropertyChanged(nameof(FeederTension));
- }
-
- /// <summary>
- /// Called when the PullerTension has changed.
- /// </summary>
- protected virtual void OnPullerTensionChanged(Double pullertension)
- {
- PullerTensionChanged?.Invoke(this, pullertension);
- RaisePropertyChanged(nameof(PullerTension));
- }
-
- /// <summary>
- /// Called when the WinderTension has changed.
- /// </summary>
- protected virtual void OnWinderTensionChanged(Double windertension)
- {
- WinderTensionChanged?.Invoke(this, windertension);
- RaisePropertyChanged(nameof(WinderTension));
- }
-
- /// <summary>
- /// Called when the MixerTemp has changed.
- /// </summary>
- protected virtual void OnMixerTempChanged(Double mixertemp)
- {
- MixerTempChanged?.Invoke(this, mixertemp);
- RaisePropertyChanged(nameof(MixerTemp));
- }
-
- /// <summary>
- /// Called when the HeadZone1Temp has changed.
- /// </summary>
- protected virtual void OnHeadZone1TempChanged(Double headzone1temp)
- {
- HeadZone1TempChanged?.Invoke(this, headzone1temp);
- RaisePropertyChanged(nameof(HeadZone1Temp));
- }
-
- /// <summary>
- /// Called when the HeadZone2Temp has changed.
- /// </summary>
- protected virtual void OnHeadZone2TempChanged(Double headzone2temp)
- {
- HeadZone2TempChanged?.Invoke(this, headzone2temp);
- RaisePropertyChanged(nameof(HeadZone2Temp));
- }
-
- /// <summary>
- /// Called when the HeadZone3Temp has changed.
- /// </summary>
- protected virtual void OnHeadZone3TempChanged(Double headzone3temp)
- {
- HeadZone3TempChanged?.Invoke(this, headzone3temp);
- RaisePropertyChanged(nameof(HeadZone3Temp));
- }
-
- /// <summary>
- /// Called when the HeadZone4Temp has changed.
- /// </summary>
- protected virtual void OnHeadZone4TempChanged(Double headzone4temp)
- {
- HeadZone4TempChanged?.Invoke(this, headzone4temp);
- RaisePropertyChanged(nameof(HeadZone4Temp));
- }
-
- /// <summary>
- /// Called when the HeadZone5Temp has changed.
- /// </summary>
- protected virtual void OnHeadZone5TempChanged(Double headzone5temp)
- {
- HeadZone5TempChanged?.Invoke(this, headzone5temp);
- RaisePropertyChanged(nameof(HeadZone5Temp));
- }
-
- /// <summary>
- /// Called when the HeadZone6Temp has changed.
- /// </summary>
- protected virtual void OnHeadZone6TempChanged(Double headzone6temp)
- {
- HeadZone6TempChanged?.Invoke(this, headzone6temp);
- RaisePropertyChanged(nameof(HeadZone6Temp));
- }
-
- /// <summary>
- /// Called when the DryerAirFlow has changed.
- /// </summary>
- protected virtual void OnDryerAirFlowChanged(Double dryerairflow)
- {
- DryerAirFlowChanged?.Invoke(this, dryerairflow);
- RaisePropertyChanged(nameof(DryerAirFlow));
- }
-
- /// <summary>
- /// Called when the DryerZone1Temp has changed.
- /// </summary>
- protected virtual void OnDryerZone1TempChanged(Double dryerzone1temp)
- {
- DryerZone1TempChanged?.Invoke(this, dryerzone1temp);
- RaisePropertyChanged(nameof(DryerZone1Temp));
- }
-
- /// <summary>
- /// Called when the DryerZone2Temp has changed.
- /// </summary>
- protected virtual void OnDryerZone2TempChanged(Double dryerzone2temp)
- {
- DryerZone2TempChanged?.Invoke(this, dryerzone2temp);
- RaisePropertyChanged(nameof(DryerZone2Temp));
- }
-
- /// <summary>
- /// Called when the DryerZone3Temp has changed.
- /// </summary>
- protected virtual void OnDryerZone3TempChanged(Double dryerzone3temp)
- {
- DryerZone3TempChanged?.Invoke(this, dryerzone3temp);
- RaisePropertyChanged(nameof(DryerZone3Temp));
- }
-
- /// <summary>
- /// Called when the DryerBufferLength has changed.
- /// </summary>
- protected virtual void OnDryerBufferLengthChanged(Double dryerbufferlength)
- {
- DryerBufferLengthChanged?.Invoke(this, dryerbufferlength);
- RaisePropertyChanged(nameof(DryerBufferLength));
- }
-
- /// <summary>
- /// Called when the HeadAirFlow has changed.
- /// </summary>
- protected virtual void OnHeadAirFlowChanged(Double headairflow)
- {
- HeadAirFlowChanged?.Invoke(this, headairflow);
- RaisePropertyChanged(nameof(HeadAirFlow));
- }
-
- /// <summary>
- /// Called when the TableIndex has changed.
- /// </summary>
- protected virtual void OnTableIndexChanged(Int32 tableindex)
- {
- TableIndexChanged?.Invoke(this, tableindex);
- RaisePropertyChanged(nameof(TableIndex));
- }
-
- /// <summary>
- /// Called when the ProcessParametersTablesGroup has changed.
- /// </summary>
- protected virtual void OnProcessParametersTablesGroupChanged(ProcessParametersTablesGroup processparameterstablesgroup)
- {
- ProcessParametersTablesGroupChanged?.Invoke(this, processparameterstablesgroup);
- RaisePropertyChanged(nameof(ProcessParametersTablesGroup));
+ DyeingSpeedMinInkUptakeChanged?.Invoke(this, new EventArgs());
}
/// <summary>
@@ -891,6 +30,7 @@ namespace Tango.BL.Entities
/// </summary>
public ProcessParametersTable() : base()
{
+
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/ProcessParametersTableBase.cs b/Software/Visual_Studio/Tango.BL/Entities/ProcessParametersTableBase.cs
new file mode 100644
index 000000000..09c79064d
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/ProcessParametersTableBase.cs
@@ -0,0 +1,896 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("PROCESS_PARAMETERS_TABLES")]
+ public abstract class ProcessParametersTableBase : ObservableEntity<ProcessParametersTable>
+ {
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<Double> DyeingSpeedChanged;
+
+ public event EventHandler<Double> MinInkUptakeChanged;
+
+ public event EventHandler<Double> MaxInkUptakeChanged;
+
+ public event EventHandler<Double> FeederTensionChanged;
+
+ public event EventHandler<Double> PullerTensionChanged;
+
+ public event EventHandler<Double> WinderTensionChanged;
+
+ public event EventHandler<Double> MixerTempChanged;
+
+ public event EventHandler<Double> HeadZone1TempChanged;
+
+ public event EventHandler<Double> HeadZone2TempChanged;
+
+ public event EventHandler<Double> HeadZone3TempChanged;
+
+ public event EventHandler<Double> HeadZone4TempChanged;
+
+ public event EventHandler<Double> HeadZone5TempChanged;
+
+ public event EventHandler<Double> HeadZone6TempChanged;
+
+ public event EventHandler<Double> DryerAirFlowChanged;
+
+ public event EventHandler<Double> DryerZone1TempChanged;
+
+ public event EventHandler<Double> DryerZone2TempChanged;
+
+ public event EventHandler<Double> DryerZone3TempChanged;
+
+ public event EventHandler<Double> DryerBufferLengthChanged;
+
+ public event EventHandler<Double> HeadAirFlowChanged;
+
+ public event EventHandler<Int32> TableIndexChanged;
+
+ public event EventHandler<ProcessParametersTablesGroup> ProcessParametersTablesGroupChanged;
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the processparameterstablebase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _dyeingspeed;
+
+ /// <summary>
+ /// Gets or sets the processparameterstablebase dyeing speed.
+ /// </summary>
+
+ [Column("DYEING_SPEED")]
+
+ public Double DyeingSpeed
+ {
+ get
+ {
+ return _dyeingspeed;
+ }
+
+ set
+ {
+ if (_dyeingspeed != value)
+ {
+ _dyeingspeed = value;
+
+ OnDyeingSpeedChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _mininkuptake;
+
+ /// <summary>
+ /// Gets or sets the processparameterstablebase min ink uptake.
+ /// </summary>
+
+ [Column("MIN_INK_UPTAKE")]
+
+ public Double MinInkUptake
+ {
+ get
+ {
+ return _mininkuptake;
+ }
+
+ set
+ {
+ if (_mininkuptake != value)
+ {
+ _mininkuptake = value;
+
+ OnMinInkUptakeChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _maxinkuptake;
+
+ /// <summary>
+ /// Gets or sets the processparameterstablebase max ink uptake.
+ /// </summary>
+
+ [Column("MAX_INK_UPTAKE")]
+
+ public Double MaxInkUptake
+ {
+ get
+ {
+ return _maxinkuptake;
+ }
+
+ set
+ {
+ if (_maxinkuptake != value)
+ {
+ _maxinkuptake = value;
+
+ OnMaxInkUptakeChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _feedertension;
+
+ /// <summary>
+ /// Gets or sets the processparameterstablebase feeder tension.
+ /// </summary>
+
+ [Column("FEEDER_TENSION")]
+
+ public Double FeederTension
+ {
+ get
+ {
+ return _feedertension;
+ }
+
+ set
+ {
+ if (_feedertension != value)
+ {
+ _feedertension = value;
+
+ OnFeederTensionChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _pullertension;
+
+ /// <summary>
+ /// Gets or sets the processparameterstablebase puller tension.
+ /// </summary>
+
+ [Column("PULLER_TENSION")]
+
+ public Double PullerTension
+ {
+ get
+ {
+ return _pullertension;
+ }
+
+ set
+ {
+ if (_pullertension != value)
+ {
+ _pullertension = value;
+
+ OnPullerTensionChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _windertension;
+
+ /// <summary>
+ /// Gets or sets the processparameterstablebase winder tension.
+ /// </summary>
+
+ [Column("WINDER_TENSION")]
+
+ public Double WinderTension
+ {
+ get
+ {
+ return _windertension;
+ }
+
+ set
+ {
+ if (_windertension != value)
+ {
+ _windertension = value;
+
+ OnWinderTensionChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _mixertemp;
+
+ /// <summary>
+ /// Gets or sets the processparameterstablebase mixer temp.
+ /// </summary>
+
+ [Column("MIXER_TEMP")]
+
+ public Double MixerTemp
+ {
+ get
+ {
+ return _mixertemp;
+ }
+
+ set
+ {
+ if (_mixertemp != value)
+ {
+ _mixertemp = value;
+
+ OnMixerTempChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _headzone1temp;
+
+ /// <summary>
+ /// Gets or sets the processparameterstablebase head zone1 temp.
+ /// </summary>
+
+ [Column("HEAD_ZONE1_TEMP")]
+
+ public Double HeadZone1Temp
+ {
+ get
+ {
+ return _headzone1temp;
+ }
+
+ set
+ {
+ if (_headzone1temp != value)
+ {
+ _headzone1temp = value;
+
+ OnHeadZone1TempChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _headzone2temp;
+
+ /// <summary>
+ /// Gets or sets the processparameterstablebase head zone2 temp.
+ /// </summary>
+
+ [Column("HEAD_ZONE2_TEMP")]
+
+ public Double HeadZone2Temp
+ {
+ get
+ {
+ return _headzone2temp;
+ }
+
+ set
+ {
+ if (_headzone2temp != value)
+ {
+ _headzone2temp = value;
+
+ OnHeadZone2TempChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _headzone3temp;
+
+ /// <summary>
+ /// Gets or sets the processparameterstablebase head zone3 temp.
+ /// </summary>
+
+ [Column("HEAD_ZONE3_TEMP")]
+
+ public Double HeadZone3Temp
+ {
+ get
+ {
+ return _headzone3temp;
+ }
+
+ set
+ {
+ if (_headzone3temp != value)
+ {
+ _headzone3temp = value;
+
+ OnHeadZone3TempChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _headzone4temp;
+
+ /// <summary>
+ /// Gets or sets the processparameterstablebase head zone4 temp.
+ /// </summary>
+
+ [Column("HEAD_ZONE4_TEMP")]
+
+ public Double HeadZone4Temp
+ {
+ get
+ {
+ return _headzone4temp;
+ }
+
+ set
+ {
+ if (_headzone4temp != value)
+ {
+ _headzone4temp = value;
+
+ OnHeadZone4TempChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _headzone5temp;
+
+ /// <summary>
+ /// Gets or sets the processparameterstablebase head zone5 temp.
+ /// </summary>
+
+ [Column("HEAD_ZONE5_TEMP")]
+
+ public Double HeadZone5Temp
+ {
+ get
+ {
+ return _headzone5temp;
+ }
+
+ set
+ {
+ if (_headzone5temp != value)
+ {
+ _headzone5temp = value;
+
+ OnHeadZone5TempChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _headzone6temp;
+
+ /// <summary>
+ /// Gets or sets the processparameterstablebase head zone6 temp.
+ /// </summary>
+
+ [Column("HEAD_ZONE6_TEMP")]
+
+ public Double HeadZone6Temp
+ {
+ get
+ {
+ return _headzone6temp;
+ }
+
+ set
+ {
+ if (_headzone6temp != value)
+ {
+ _headzone6temp = value;
+
+ OnHeadZone6TempChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _dryerairflow;
+
+ /// <summary>
+ /// Gets or sets the processparameterstablebase dryer air flow.
+ /// </summary>
+
+ [Column("DRYER_AIR_FLOW")]
+
+ public Double DryerAirFlow
+ {
+ get
+ {
+ return _dryerairflow;
+ }
+
+ set
+ {
+ if (_dryerairflow != value)
+ {
+ _dryerairflow = value;
+
+ OnDryerAirFlowChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _dryerzone1temp;
+
+ /// <summary>
+ /// Gets or sets the processparameterstablebase dryer zone1 temp.
+ /// </summary>
+
+ [Column("DRYER_ZONE1_TEMP")]
+
+ public Double DryerZone1Temp
+ {
+ get
+ {
+ return _dryerzone1temp;
+ }
+
+ set
+ {
+ if (_dryerzone1temp != value)
+ {
+ _dryerzone1temp = value;
+
+ OnDryerZone1TempChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _dryerzone2temp;
+
+ /// <summary>
+ /// Gets or sets the processparameterstablebase dryer zone2 temp.
+ /// </summary>
+
+ [Column("DRYER_ZONE2_TEMP")]
+
+ public Double DryerZone2Temp
+ {
+ get
+ {
+ return _dryerzone2temp;
+ }
+
+ set
+ {
+ if (_dryerzone2temp != value)
+ {
+ _dryerzone2temp = value;
+
+ OnDryerZone2TempChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _dryerzone3temp;
+
+ /// <summary>
+ /// Gets or sets the processparameterstablebase dryer zone3 temp.
+ /// </summary>
+
+ [Column("DRYER_ZONE3_TEMP")]
+
+ public Double DryerZone3Temp
+ {
+ get
+ {
+ return _dryerzone3temp;
+ }
+
+ set
+ {
+ if (_dryerzone3temp != value)
+ {
+ _dryerzone3temp = value;
+
+ OnDryerZone3TempChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _dryerbufferlength;
+
+ /// <summary>
+ /// Gets or sets the processparameterstablebase dryer buffer length.
+ /// </summary>
+
+ [Column("DRYER_BUFFER_LENGTH")]
+
+ public Double DryerBufferLength
+ {
+ get
+ {
+ return _dryerbufferlength;
+ }
+
+ set
+ {
+ if (_dryerbufferlength != value)
+ {
+ _dryerbufferlength = value;
+
+ OnDryerBufferLengthChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _headairflow;
+
+ /// <summary>
+ /// Gets or sets the processparameterstablebase head air flow.
+ /// </summary>
+
+ [Column("HEAD_AIR_FLOW")]
+
+ public Double HeadAirFlow
+ {
+ get
+ {
+ return _headairflow;
+ }
+
+ set
+ {
+ if (_headairflow != value)
+ {
+ _headairflow = value;
+
+ OnHeadAirFlowChanged(value);
+
+ }
+ }
+ }
+
+ protected String _processparameterstablesgroupguid;
+
+ /// <summary>
+ /// Gets or sets the processparameterstablebase process parameters tables group guid.
+ /// </summary>
+
+ [Column("PROCESS_PARAMETERS_TABLES_GROUP_GUID")]
+ [ForeignKey("ProcessParametersTablesGroup")]
+
+ public String ProcessParametersTablesGroupGuid
+ {
+ get
+ {
+ return _processparameterstablesgroupguid;
+ }
+
+ set
+ {
+ if (_processparameterstablesgroupguid != value)
+ {
+ _processparameterstablesgroupguid = value;
+ }
+ }
+ }
+
+ protected Int32 _tableindex;
+
+ /// <summary>
+ /// Gets or sets the processparameterstablebase table index.
+ /// </summary>
+
+ [Column("TABLE_INDEX")]
+
+ public Int32 TableIndex
+ {
+ get
+ {
+ return _tableindex;
+ }
+
+ set
+ {
+ if (_tableindex != value)
+ {
+ _tableindex = value;
+
+ OnTableIndexChanged(value);
+
+ }
+ }
+ }
+
+ protected ProcessParametersTablesGroup _processparameterstablesgroup;
+
+ /// <summary>
+ /// Gets or sets the processparameterstablebase process parameters tables groups.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual ProcessParametersTablesGroup ProcessParametersTablesGroup
+ {
+ get
+ {
+ return _processparameterstablesgroup;
+ }
+
+ set
+ {
+ if (_processparameterstablesgroup != value)
+ {
+ _processparameterstablesgroup = value;
+
+ OnProcessParametersTablesGroupChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the DyeingSpeed has changed.
+ /// </summary>
+ protected virtual void OnDyeingSpeedChanged(Double dyeingspeed)
+ {
+ DyeingSpeedChanged?.Invoke(this, dyeingspeed);
+ RaisePropertyChanged(nameof(DyeingSpeed));
+ }
+
+ /// <summary>
+ /// Called when the MinInkUptake has changed.
+ /// </summary>
+ protected virtual void OnMinInkUptakeChanged(Double mininkuptake)
+ {
+ MinInkUptakeChanged?.Invoke(this, mininkuptake);
+ RaisePropertyChanged(nameof(MinInkUptake));
+ }
+
+ /// <summary>
+ /// Called when the MaxInkUptake has changed.
+ /// </summary>
+ protected virtual void OnMaxInkUptakeChanged(Double maxinkuptake)
+ {
+ MaxInkUptakeChanged?.Invoke(this, maxinkuptake);
+ RaisePropertyChanged(nameof(MaxInkUptake));
+ }
+
+ /// <summary>
+ /// Called when the FeederTension has changed.
+ /// </summary>
+ protected virtual void OnFeederTensionChanged(Double feedertension)
+ {
+ FeederTensionChanged?.Invoke(this, feedertension);
+ RaisePropertyChanged(nameof(FeederTension));
+ }
+
+ /// <summary>
+ /// Called when the PullerTension has changed.
+ /// </summary>
+ protected virtual void OnPullerTensionChanged(Double pullertension)
+ {
+ PullerTensionChanged?.Invoke(this, pullertension);
+ RaisePropertyChanged(nameof(PullerTension));
+ }
+
+ /// <summary>
+ /// Called when the WinderTension has changed.
+ /// </summary>
+ protected virtual void OnWinderTensionChanged(Double windertension)
+ {
+ WinderTensionChanged?.Invoke(this, windertension);
+ RaisePropertyChanged(nameof(WinderTension));
+ }
+
+ /// <summary>
+ /// Called when the MixerTemp has changed.
+ /// </summary>
+ protected virtual void OnMixerTempChanged(Double mixertemp)
+ {
+ MixerTempChanged?.Invoke(this, mixertemp);
+ RaisePropertyChanged(nameof(MixerTemp));
+ }
+
+ /// <summary>
+ /// Called when the HeadZone1Temp has changed.
+ /// </summary>
+ protected virtual void OnHeadZone1TempChanged(Double headzone1temp)
+ {
+ HeadZone1TempChanged?.Invoke(this, headzone1temp);
+ RaisePropertyChanged(nameof(HeadZone1Temp));
+ }
+
+ /// <summary>
+ /// Called when the HeadZone2Temp has changed.
+ /// </summary>
+ protected virtual void OnHeadZone2TempChanged(Double headzone2temp)
+ {
+ HeadZone2TempChanged?.Invoke(this, headzone2temp);
+ RaisePropertyChanged(nameof(HeadZone2Temp));
+ }
+
+ /// <summary>
+ /// Called when the HeadZone3Temp has changed.
+ /// </summary>
+ protected virtual void OnHeadZone3TempChanged(Double headzone3temp)
+ {
+ HeadZone3TempChanged?.Invoke(this, headzone3temp);
+ RaisePropertyChanged(nameof(HeadZone3Temp));
+ }
+
+ /// <summary>
+ /// Called when the HeadZone4Temp has changed.
+ /// </summary>
+ protected virtual void OnHeadZone4TempChanged(Double headzone4temp)
+ {
+ HeadZone4TempChanged?.Invoke(this, headzone4temp);
+ RaisePropertyChanged(nameof(HeadZone4Temp));
+ }
+
+ /// <summary>
+ /// Called when the HeadZone5Temp has changed.
+ /// </summary>
+ protected virtual void OnHeadZone5TempChanged(Double headzone5temp)
+ {
+ HeadZone5TempChanged?.Invoke(this, headzone5temp);
+ RaisePropertyChanged(nameof(HeadZone5Temp));
+ }
+
+ /// <summary>
+ /// Called when the HeadZone6Temp has changed.
+ /// </summary>
+ protected virtual void OnHeadZone6TempChanged(Double headzone6temp)
+ {
+ HeadZone6TempChanged?.Invoke(this, headzone6temp);
+ RaisePropertyChanged(nameof(HeadZone6Temp));
+ }
+
+ /// <summary>
+ /// Called when the DryerAirFlow has changed.
+ /// </summary>
+ protected virtual void OnDryerAirFlowChanged(Double dryerairflow)
+ {
+ DryerAirFlowChanged?.Invoke(this, dryerairflow);
+ RaisePropertyChanged(nameof(DryerAirFlow));
+ }
+
+ /// <summary>
+ /// Called when the DryerZone1Temp has changed.
+ /// </summary>
+ protected virtual void OnDryerZone1TempChanged(Double dryerzone1temp)
+ {
+ DryerZone1TempChanged?.Invoke(this, dryerzone1temp);
+ RaisePropertyChanged(nameof(DryerZone1Temp));
+ }
+
+ /// <summary>
+ /// Called when the DryerZone2Temp has changed.
+ /// </summary>
+ protected virtual void OnDryerZone2TempChanged(Double dryerzone2temp)
+ {
+ DryerZone2TempChanged?.Invoke(this, dryerzone2temp);
+ RaisePropertyChanged(nameof(DryerZone2Temp));
+ }
+
+ /// <summary>
+ /// Called when the DryerZone3Temp has changed.
+ /// </summary>
+ protected virtual void OnDryerZone3TempChanged(Double dryerzone3temp)
+ {
+ DryerZone3TempChanged?.Invoke(this, dryerzone3temp);
+ RaisePropertyChanged(nameof(DryerZone3Temp));
+ }
+
+ /// <summary>
+ /// Called when the DryerBufferLength has changed.
+ /// </summary>
+ protected virtual void OnDryerBufferLengthChanged(Double dryerbufferlength)
+ {
+ DryerBufferLengthChanged?.Invoke(this, dryerbufferlength);
+ RaisePropertyChanged(nameof(DryerBufferLength));
+ }
+
+ /// <summary>
+ /// Called when the HeadAirFlow has changed.
+ /// </summary>
+ protected virtual void OnHeadAirFlowChanged(Double headairflow)
+ {
+ HeadAirFlowChanged?.Invoke(this, headairflow);
+ RaisePropertyChanged(nameof(HeadAirFlow));
+ }
+
+ /// <summary>
+ /// Called when the TableIndex has changed.
+ /// </summary>
+ protected virtual void OnTableIndexChanged(Int32 tableindex)
+ {
+ TableIndexChanged?.Invoke(this, tableindex);
+ RaisePropertyChanged(nameof(TableIndex));
+ }
+
+ /// <summary>
+ /// Called when the ProcessParametersTablesGroup has changed.
+ /// </summary>
+ protected virtual void OnProcessParametersTablesGroupChanged(ProcessParametersTablesGroup processparameterstablesgroup)
+ {
+ ProcessParametersTablesGroupChanged?.Invoke(this, processparameterstablesgroup);
+ RaisePropertyChanged(nameof(ProcessParametersTablesGroup));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ProcessParametersTableBase" /> class.
+ /// </summary>
+ public ProcessParametersTableBase() : base()
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/ProcessParametersTablesGroup.cs b/Software/Visual_Studio/Tango.BL/Entities/ProcessParametersTablesGroup.cs
index be4c0d7a6..91a8cdf5c 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/ProcessParametersTablesGroup.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/ProcessParametersTablesGroup.cs
@@ -1,241 +1,29 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("PROCESS_PARAMETERS_TABLES_GROUPS")]
- public partial class ProcessParametersTablesGroup : ObservableEntity<ProcessParametersTablesGroup>
+ public partial class ProcessParametersTablesGroup : ProcessParametersTablesGroupBase
{
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<Boolean> ActiveChanged;
-
- public event EventHandler<DateTime> SaveDateChanged;
-
- public event EventHandler<SynchronizedObservableCollection<ProcessParametersTable>> ProcessParametersTablesChanged;
-
- public event EventHandler<Rml> RmlChanged;
-
- protected String _rmlguid;
-
- /// <summary>
- /// Gets or sets the processparameterstablesgroup rml guid.
- /// </summary>
-
- [Column("RML_GUID")]
- [ForeignKey("Rml")]
-
- public String RmlGuid
- {
- get
- {
- return _rmlguid;
- }
-
- set
- {
- if (_rmlguid != value)
- {
- _rmlguid = value;
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the processparameterstablesgroup name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected Boolean _active;
-
- /// <summary>
- /// Gets or sets the processparameterstablesgroup active.
- /// </summary>
-
- [Column("ACTIVE")]
-
- public Boolean Active
- {
- get
- {
- return _active;
- }
-
- set
- {
- if (_active != value)
- {
- _active = value;
-
- OnActiveChanged(value);
-
- }
- }
- }
-
- protected DateTime _savedate;
-
- /// <summary>
- /// Gets or sets the processparameterstablesgroup save date.
- /// </summary>
-
- [Column("SAVE_DATE")]
-
- public DateTime SaveDate
+ public override ProcessParametersTablesGroup Clone()
{
- get
- {
- return _savedate;
- }
-
- set
- {
- if (_savedate != value)
- {
- _savedate = value;
-
- OnSaveDateChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<ProcessParametersTable> _processparameterstables;
+ ProcessParametersTablesGroup cloned = base.Clone();
- /// <summary>
- /// Gets or sets the processparameterstablesgroup process parameters tables.
- /// </summary>
+ List<ProcessParametersTable> tables = new List<ProcessParametersTable>();
- public virtual SynchronizedObservableCollection<ProcessParametersTable> ProcessParametersTables
- {
- get
+ foreach (var table in ProcessParametersTables)
{
- return _processparameterstables;
+ var newTable = table.Clone();
+ newTable.ProcessParametersTablesGroup = cloned;
+ tables.Add(newTable);
}
- set
- {
- if (_processparameterstables != value)
- {
- _processparameterstables = value;
-
- OnProcessParametersTablesChanged(value);
+ cloned.ProcessParametersTables = tables.ToSynchronizedObservableCollection();
- }
- }
- }
-
- protected Rml _rml;
-
- /// <summary>
- /// Gets or sets the processparameterstablesgroup rml.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual Rml Rml
- {
- get
- {
- return _rml;
- }
-
- set
- {
- if (_rml != value)
- {
- _rml = value;
-
- OnRmlChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Active has changed.
- /// </summary>
- protected virtual void OnActiveChanged(Boolean active)
- {
- ActiveChanged?.Invoke(this, active);
- RaisePropertyChanged(nameof(Active));
- }
-
- /// <summary>
- /// Called when the SaveDate has changed.
- /// </summary>
- protected virtual void OnSaveDateChanged(DateTime savedate)
- {
- SaveDateChanged?.Invoke(this, savedate);
- RaisePropertyChanged(nameof(SaveDate));
- }
-
- /// <summary>
- /// Called when the ProcessParametersTables has changed.
- /// </summary>
- protected virtual void OnProcessParametersTablesChanged(SynchronizedObservableCollection<ProcessParametersTable> processparameterstables)
- {
- ProcessParametersTablesChanged?.Invoke(this, processparameterstables);
- RaisePropertyChanged(nameof(ProcessParametersTables));
- }
-
- /// <summary>
- /// Called when the Rml has changed.
- /// </summary>
- protected virtual void OnRmlChanged(Rml rml)
- {
- RmlChanged?.Invoke(this, rml);
- RaisePropertyChanged(nameof(Rml));
+ return cloned;
}
/// <summary>
@@ -244,8 +32,6 @@ namespace Tango.BL.Entities
public ProcessParametersTablesGroup() : base()
{
- ProcessParametersTables = new SynchronizedObservableCollection<ProcessParametersTable>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/ProcessParametersTablesGroupBase.cs b/Software/Visual_Studio/Tango.BL/Entities/ProcessParametersTablesGroupBase.cs
new file mode 100644
index 000000000..586d4bcc7
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/ProcessParametersTablesGroupBase.cs
@@ -0,0 +1,251 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("PROCESS_PARAMETERS_TABLES_GROUPS")]
+ public abstract class ProcessParametersTablesGroupBase : ObservableEntity<ProcessParametersTablesGroup>
+ {
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<Boolean> ActiveChanged;
+
+ public event EventHandler<DateTime> SaveDateChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<ProcessParametersTable>> ProcessParametersTablesChanged;
+
+ public event EventHandler<Rml> RmlChanged;
+
+ protected String _rmlguid;
+
+ /// <summary>
+ /// Gets or sets the processparameterstablesgroupbase rml guid.
+ /// </summary>
+
+ [Column("RML_GUID")]
+ [ForeignKey("Rml")]
+
+ public String RmlGuid
+ {
+ get
+ {
+ return _rmlguid;
+ }
+
+ set
+ {
+ if (_rmlguid != value)
+ {
+ _rmlguid = value;
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the processparameterstablesgroupbase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _active;
+
+ /// <summary>
+ /// Gets or sets the processparameterstablesgroupbase active.
+ /// </summary>
+
+ [Column("ACTIVE")]
+
+ public Boolean Active
+ {
+ get
+ {
+ return _active;
+ }
+
+ set
+ {
+ if (_active != value)
+ {
+ _active = value;
+
+ OnActiveChanged(value);
+
+ }
+ }
+ }
+
+ protected DateTime _savedate;
+
+ /// <summary>
+ /// Gets or sets the processparameterstablesgroupbase save date.
+ /// </summary>
+
+ [Column("SAVE_DATE")]
+
+ public DateTime SaveDate
+ {
+ get
+ {
+ return _savedate;
+ }
+
+ set
+ {
+ if (_savedate != value)
+ {
+ _savedate = value;
+
+ OnSaveDateChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<ProcessParametersTable> _processparameterstables;
+
+ /// <summary>
+ /// Gets or sets the processparameterstablesgroupbase process parameters tables.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<ProcessParametersTable> ProcessParametersTables
+ {
+ get
+ {
+ return _processparameterstables;
+ }
+
+ set
+ {
+ if (_processparameterstables != value)
+ {
+ _processparameterstables = value;
+
+ OnProcessParametersTablesChanged(value);
+
+ }
+ }
+ }
+
+ protected Rml _rml;
+
+ /// <summary>
+ /// Gets or sets the processparameterstablesgroupbase rml.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual Rml Rml
+ {
+ get
+ {
+ return _rml;
+ }
+
+ set
+ {
+ if (_rml != value)
+ {
+ _rml = value;
+
+ OnRmlChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Active has changed.
+ /// </summary>
+ protected virtual void OnActiveChanged(Boolean active)
+ {
+ ActiveChanged?.Invoke(this, active);
+ RaisePropertyChanged(nameof(Active));
+ }
+
+ /// <summary>
+ /// Called when the SaveDate has changed.
+ /// </summary>
+ protected virtual void OnSaveDateChanged(DateTime savedate)
+ {
+ SaveDateChanged?.Invoke(this, savedate);
+ RaisePropertyChanged(nameof(SaveDate));
+ }
+
+ /// <summary>
+ /// Called when the ProcessParametersTables has changed.
+ /// </summary>
+ protected virtual void OnProcessParametersTablesChanged(SynchronizedObservableCollection<ProcessParametersTable> processparameterstables)
+ {
+ ProcessParametersTablesChanged?.Invoke(this, processparameterstables);
+ RaisePropertyChanged(nameof(ProcessParametersTables));
+ }
+
+ /// <summary>
+ /// Called when the Rml has changed.
+ /// </summary>
+ protected virtual void OnRmlChanged(Rml rml)
+ {
+ RmlChanged?.Invoke(this, rml);
+ RaisePropertyChanged(nameof(Rml));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ProcessParametersTablesGroupBase" /> class.
+ /// </summary>
+ public ProcessParametersTablesGroupBase() : base()
+ {
+
+ ProcessParametersTables = new SynchronizedObservableCollection<ProcessParametersTable>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/Rml.cs b/Software/Visual_Studio/Tango.BL/Entities/Rml.cs
index cd95815ad..c75c5bf99 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/Rml.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/Rml.cs
@@ -1,1275 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("RMLS")]
- public partial class Rml : ObservableEntity<Rml>
+ public partial class Rml : RmlBase
{
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<String> ManufacturerChanged;
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<Double> FiberSizeChanged;
-
- public event EventHandler<Int32> NumberOfFibersChanged;
-
- public event EventHandler<Int32> PliesPerFiberChanged;
-
- public event EventHandler<Int32> PliesPerThreadChanged;
-
- public event EventHandler<Boolean> TwistedChanged;
-
- public event EventHandler<Boolean> AirEntanglementChanged;
-
- public event EventHandler<Boolean> LubricantChanged;
-
- public event EventHandler<Double> TensileStrengthChanged;
-
- public event EventHandler<Double> ElongationAtBreakPercentageChanged;
-
- public event EventHandler<Double> EstimatedThreadDiameterChanged;
-
- public event EventHandler<Int32> RankChanged;
-
- public event EventHandler<Byte[]> ThumbnailChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Cat>> CatsChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Cct>> CctsChanged;
-
- public event EventHandler<FiberShape> FiberShapeChanged;
-
- public event EventHandler<FiberSynth> FiberSynthChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Job>> JobsChanged;
-
- public event EventHandler<LinearMassDensityUnit> LinearMassDensityUnitChanged;
-
- public event EventHandler<SynchronizedObservableCollection<LiquidTypesRml>> LiquidTypesRmlsChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Machine>> MachinesChanged;
-
- public event EventHandler<MediaColor> MediaColorChanged;
-
- public event EventHandler<MediaCondition> MediaConditionChanged;
-
- public event EventHandler<MediaMaterial> MediaMaterialChanged;
-
- public event EventHandler<MediaPurpos> MediaPurposeChanged;
-
- public event EventHandler<SynchronizedObservableCollection<ProcessParametersTablesGroup>> ProcessParametersTablesGroupsChanged;
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the rml name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected String _manufacturer;
-
- /// <summary>
- /// Gets or sets the rml manufacturer.
- /// </summary>
-
- [Column("MANUFACTURER")]
-
- public String Manufacturer
- {
- get
- {
- return _manufacturer;
- }
-
- set
- {
- if (_manufacturer != value)
- {
- _manufacturer = value;
-
- OnManufacturerChanged(value);
-
- }
- }
- }
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the rml code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected String _mediamaterialguid;
-
- /// <summary>
- /// Gets or sets the rml media material guid.
- /// </summary>
-
- [Column("MEDIA_MATERIAL_GUID")]
- [ForeignKey("MediaMaterial")]
-
- public String MediaMaterialGuid
- {
- get
- {
- return _mediamaterialguid;
- }
-
- set
- {
- if (_mediamaterialguid != value)
- {
- _mediamaterialguid = value;
- }
- }
- }
-
- protected String _mediacolorguid;
-
- /// <summary>
- /// Gets or sets the rml media color guid.
- /// </summary>
-
- [Column("MEDIA_COLOR_GUID")]
- [ForeignKey("MediaColor")]
-
- public String MediaColorGuid
- {
- get
- {
- return _mediacolorguid;
- }
-
- set
- {
- if (_mediacolorguid != value)
- {
- _mediacolorguid = value;
- }
- }
- }
-
- protected String _mediapurposeguid;
-
- /// <summary>
- /// Gets or sets the rml media purpose guid.
- /// </summary>
-
- [Column("MEDIA_PURPOSE_GUID")]
- [ForeignKey("MediaPurpose")]
-
- public String MediaPurposeGuid
- {
- get
- {
- return _mediapurposeguid;
- }
-
- set
- {
- if (_mediapurposeguid != value)
- {
- _mediapurposeguid = value;
- }
- }
- }
-
- protected String _mediaconditionguid;
-
- /// <summary>
- /// Gets or sets the rml media condition guid.
- /// </summary>
-
- [Column("MEDIA_CONDITION_GUID")]
- [ForeignKey("MediaCondition")]
-
- public String MediaConditionGuid
- {
- get
- {
- return _mediaconditionguid;
- }
-
- set
- {
- if (_mediaconditionguid != value)
- {
- _mediaconditionguid = value;
- }
- }
- }
-
- protected String _linearmassdensityunitguid;
-
- /// <summary>
- /// Gets or sets the rml linear mass density unit guid.
- /// </summary>
-
- [Column("LINEAR_MASS_DENSITY_UNIT_GUID")]
- [ForeignKey("LinearMassDensityUnit")]
-
- public String LinearMassDensityUnitGuid
- {
- get
- {
- return _linearmassdensityunitguid;
- }
-
- set
- {
- if (_linearmassdensityunitguid != value)
- {
- _linearmassdensityunitguid = value;
- }
- }
- }
-
- protected String _fibershapeguid;
-
- /// <summary>
- /// Gets or sets the rml fiber shape guid.
- /// </summary>
-
- [Column("FIBER_SHAPE_GUID")]
- [ForeignKey("FiberShape")]
-
- public String FiberShapeGuid
- {
- get
- {
- return _fibershapeguid;
- }
-
- set
- {
- if (_fibershapeguid != value)
- {
- _fibershapeguid = value;
- }
- }
- }
-
- protected String _fibersynthguid;
-
- /// <summary>
- /// Gets or sets the rml fiber synth guid.
- /// </summary>
-
- [Column("FIBER_SYNTH_GUID")]
- [ForeignKey("FiberSynth")]
-
- public String FiberSynthGuid
- {
- get
- {
- return _fibersynthguid;
- }
-
- set
- {
- if (_fibersynthguid != value)
- {
- _fibersynthguid = value;
- }
- }
- }
-
- protected Double _fibersize;
-
- /// <summary>
- /// Gets or sets the rml fiber size.
- /// </summary>
-
- [Column("FIBER_SIZE")]
-
- public Double FiberSize
- {
- get
- {
- return _fibersize;
- }
-
- set
- {
- if (_fibersize != value)
- {
- _fibersize = value;
-
- OnFiberSizeChanged(value);
-
- }
- }
- }
-
- protected Int32 _numberoffibers;
-
- /// <summary>
- /// Gets or sets the rml number of fibers.
- /// </summary>
-
- [Column("NUMBER_OF_FIBERS")]
-
- public Int32 NumberOfFibers
- {
- get
- {
- return _numberoffibers;
- }
-
- set
- {
- if (_numberoffibers != value)
- {
- _numberoffibers = value;
-
- OnNumberOfFibersChanged(value);
-
- }
- }
- }
-
- protected Int32 _pliesperfiber;
-
- /// <summary>
- /// Gets or sets the rml plies per fiber.
- /// </summary>
-
- [Column("PLIES_PER_FIBER")]
-
- public Int32 PliesPerFiber
- {
- get
- {
- return _pliesperfiber;
- }
-
- set
- {
- if (_pliesperfiber != value)
- {
- _pliesperfiber = value;
-
- OnPliesPerFiberChanged(value);
-
- }
- }
- }
-
- protected Int32 _pliesperthread;
-
- /// <summary>
- /// Gets or sets the rml plies per thread.
- /// </summary>
-
- [Column("PLIES_PER_THREAD")]
-
- public Int32 PliesPerThread
- {
- get
- {
- return _pliesperthread;
- }
-
- set
- {
- if (_pliesperthread != value)
- {
- _pliesperthread = value;
-
- OnPliesPerThreadChanged(value);
-
- }
- }
- }
-
- protected Boolean _twisted;
-
- /// <summary>
- /// Gets or sets the rml twisted.
- /// </summary>
-
- [Column("TWISTED")]
-
- public Boolean Twisted
- {
- get
- {
- return _twisted;
- }
-
- set
- {
- if (_twisted != value)
- {
- _twisted = value;
-
- OnTwistedChanged(value);
-
- }
- }
- }
-
- protected Boolean _airentanglement;
-
- /// <summary>
- /// Gets or sets the rml air entanglement.
- /// </summary>
-
- [Column("AIR_ENTANGLEMENT")]
-
- public Boolean AirEntanglement
- {
- get
- {
- return _airentanglement;
- }
-
- set
- {
- if (_airentanglement != value)
- {
- _airentanglement = value;
-
- OnAirEntanglementChanged(value);
-
- }
- }
- }
-
- protected Boolean _lubricant;
-
- /// <summary>
- /// Gets or sets the rml lubricant.
- /// </summary>
-
- [Column("LUBRICANT")]
-
- public Boolean Lubricant
- {
- get
- {
- return _lubricant;
- }
-
- set
- {
- if (_lubricant != value)
- {
- _lubricant = value;
-
- OnLubricantChanged(value);
-
- }
- }
- }
-
- protected Double _tensilestrength;
-
- /// <summary>
- /// Gets or sets the rml tensile strength.
- /// </summary>
-
- [Column("TENSILE_STRENGTH")]
-
- public Double TensileStrength
- {
- get
- {
- return _tensilestrength;
- }
-
- set
- {
- if (_tensilestrength != value)
- {
- _tensilestrength = value;
-
- OnTensileStrengthChanged(value);
-
- }
- }
- }
-
- protected Double _elongationatbreakpercentage;
-
- /// <summary>
- /// Gets or sets the rml elongation at break percentage.
- /// </summary>
-
- [Column("ELONGATION_AT_BREAK_PERCENTAGE")]
-
- public Double ElongationAtBreakPercentage
- {
- get
- {
- return _elongationatbreakpercentage;
- }
-
- set
- {
- if (_elongationatbreakpercentage != value)
- {
- _elongationatbreakpercentage = value;
-
- OnElongationAtBreakPercentageChanged(value);
-
- }
- }
- }
-
- protected Double _estimatedthreaddiameter;
-
- /// <summary>
- /// Gets or sets the rml estimated thread diameter.
- /// </summary>
-
- [Column("ESTIMATED_THREAD_DIAMETER")]
-
- public Double EstimatedThreadDiameter
- {
- get
- {
- return _estimatedthreaddiameter;
- }
-
- set
- {
- if (_estimatedthreaddiameter != value)
- {
- _estimatedthreaddiameter = value;
-
- OnEstimatedThreadDiameterChanged(value);
-
- }
- }
- }
-
- protected Int32 _rank;
-
- /// <summary>
- /// Gets or sets the rml rank.
- /// </summary>
-
- [Column("RANK")]
-
- public Int32 Rank
- {
- get
- {
- return _rank;
- }
-
- set
- {
- if (_rank != value)
- {
- _rank = value;
-
- OnRankChanged(value);
-
- }
- }
- }
-
- protected Byte[] _thumbnail;
-
- /// <summary>
- /// Gets or sets the rml thumbnail.
- /// </summary>
-
- [Column("THUMBNAIL")]
-
- public Byte[] Thumbnail
- {
- get
- {
- return _thumbnail;
- }
-
- set
- {
- if (_thumbnail != value)
- {
- _thumbnail = value;
-
- OnThumbnailChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<Cat> _cats;
-
- /// <summary>
- /// Gets or sets the rml cats.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Cat> Cats
- {
- get
- {
- return _cats;
- }
-
- set
- {
- if (_cats != value)
- {
- _cats = value;
-
- OnCatsChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<Cct> _ccts;
-
- /// <summary>
- /// Gets or sets the rml ccts.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Cct> Ccts
- {
- get
- {
- return _ccts;
- }
-
- set
- {
- if (_ccts != value)
- {
- _ccts = value;
-
- OnCctsChanged(value);
-
- }
- }
- }
-
- protected FiberShape _fibershape;
-
- /// <summary>
- /// Gets or sets the rml fiber shapes.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual FiberShape FiberShape
- {
- get
- {
- return _fibershape;
- }
-
- set
- {
- if (_fibershape != value)
- {
- _fibershape = value;
-
- OnFiberShapeChanged(value);
-
- }
- }
- }
-
- protected FiberSynth _fibersynth;
-
- /// <summary>
- /// Gets or sets the rml fiber synths.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual FiberSynth FiberSynth
- {
- get
- {
- return _fibersynth;
- }
-
- set
- {
- if (_fibersynth != value)
- {
- _fibersynth = value;
-
- OnFiberSynthChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<Job> _jobs;
-
- /// <summary>
- /// Gets or sets the rml jobs.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Job> Jobs
- {
- get
- {
- return _jobs;
- }
-
- set
- {
- if (_jobs != value)
- {
- _jobs = value;
-
- OnJobsChanged(value);
-
- }
- }
- }
-
- protected LinearMassDensityUnit _linearmassdensityunit;
-
- /// <summary>
- /// Gets or sets the rml linear mass density units.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual LinearMassDensityUnit LinearMassDensityUnit
- {
- get
- {
- return _linearmassdensityunit;
- }
-
- set
- {
- if (_linearmassdensityunit != value)
- {
- _linearmassdensityunit = value;
-
- OnLinearMassDensityUnitChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<LiquidTypesRml> _liquidtypesrmls;
-
- /// <summary>
- /// Gets or sets the rml liquid types rmls.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<LiquidTypesRml> LiquidTypesRmls
- {
- get
- {
- return _liquidtypesrmls;
- }
-
- set
- {
- if (_liquidtypesrmls != value)
- {
- _liquidtypesrmls = value;
-
- OnLiquidTypesRmlsChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<Machine> _machines;
-
- /// <summary>
- /// Gets or sets the rml machines.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Machine> Machines
- {
- get
- {
- return _machines;
- }
-
- set
- {
- if (_machines != value)
- {
- _machines = value;
-
- OnMachinesChanged(value);
-
- }
- }
- }
-
- protected MediaColor _mediacolor;
-
- /// <summary>
- /// Gets or sets the rml media colors.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual MediaColor MediaColor
- {
- get
- {
- return _mediacolor;
- }
-
- set
- {
- if (_mediacolor != value)
- {
- _mediacolor = value;
-
- OnMediaColorChanged(value);
-
- }
- }
- }
-
- protected MediaCondition _mediacondition;
-
- /// <summary>
- /// Gets or sets the rml media conditions.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual MediaCondition MediaCondition
- {
- get
- {
- return _mediacondition;
- }
-
- set
- {
- if (_mediacondition != value)
- {
- _mediacondition = value;
-
- OnMediaConditionChanged(value);
-
- }
- }
- }
-
- protected MediaMaterial _mediamaterial;
-
- /// <summary>
- /// Gets or sets the rml media materials.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual MediaMaterial MediaMaterial
- {
- get
- {
- return _mediamaterial;
- }
-
- set
- {
- if (_mediamaterial != value)
- {
- _mediamaterial = value;
-
- OnMediaMaterialChanged(value);
-
- }
- }
- }
-
- protected MediaPurpos _mediapurpose;
-
- /// <summary>
- /// Gets or sets the rml media purposes.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual MediaPurpos MediaPurpose
- {
- get
- {
- return _mediapurpose;
- }
-
- set
- {
- if (_mediapurpose != value)
- {
- _mediapurpose = value;
-
- OnMediaPurposeChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<ProcessParametersTablesGroup> _processparameterstablesgroups;
-
- /// <summary>
- /// Gets or sets the rml process parameters tables groups.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<ProcessParametersTablesGroup> ProcessParametersTablesGroups
- {
- get
- {
- return _processparameterstablesgroups;
- }
-
- set
- {
- if (_processparameterstablesgroups != value)
- {
- _processparameterstablesgroups = value;
-
- OnProcessParametersTablesGroupsChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Manufacturer has changed.
- /// </summary>
- protected virtual void OnManufacturerChanged(String manufacturer)
- {
- ManufacturerChanged?.Invoke(this, manufacturer);
- RaisePropertyChanged(nameof(Manufacturer));
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the FiberSize has changed.
- /// </summary>
- protected virtual void OnFiberSizeChanged(Double fibersize)
- {
- FiberSizeChanged?.Invoke(this, fibersize);
- RaisePropertyChanged(nameof(FiberSize));
- }
-
- /// <summary>
- /// Called when the NumberOfFibers has changed.
- /// </summary>
- protected virtual void OnNumberOfFibersChanged(Int32 numberoffibers)
- {
- NumberOfFibersChanged?.Invoke(this, numberoffibers);
- RaisePropertyChanged(nameof(NumberOfFibers));
- }
-
- /// <summary>
- /// Called when the PliesPerFiber has changed.
- /// </summary>
- protected virtual void OnPliesPerFiberChanged(Int32 pliesperfiber)
- {
- PliesPerFiberChanged?.Invoke(this, pliesperfiber);
- RaisePropertyChanged(nameof(PliesPerFiber));
- }
-
- /// <summary>
- /// Called when the PliesPerThread has changed.
- /// </summary>
- protected virtual void OnPliesPerThreadChanged(Int32 pliesperthread)
- {
- PliesPerThreadChanged?.Invoke(this, pliesperthread);
- RaisePropertyChanged(nameof(PliesPerThread));
- }
-
- /// <summary>
- /// Called when the Twisted has changed.
- /// </summary>
- protected virtual void OnTwistedChanged(Boolean twisted)
- {
- TwistedChanged?.Invoke(this, twisted);
- RaisePropertyChanged(nameof(Twisted));
- }
-
- /// <summary>
- /// Called when the AirEntanglement has changed.
- /// </summary>
- protected virtual void OnAirEntanglementChanged(Boolean airentanglement)
- {
- AirEntanglementChanged?.Invoke(this, airentanglement);
- RaisePropertyChanged(nameof(AirEntanglement));
- }
-
- /// <summary>
- /// Called when the Lubricant has changed.
- /// </summary>
- protected virtual void OnLubricantChanged(Boolean lubricant)
- {
- LubricantChanged?.Invoke(this, lubricant);
- RaisePropertyChanged(nameof(Lubricant));
- }
-
- /// <summary>
- /// Called when the TensileStrength has changed.
- /// </summary>
- protected virtual void OnTensileStrengthChanged(Double tensilestrength)
- {
- TensileStrengthChanged?.Invoke(this, tensilestrength);
- RaisePropertyChanged(nameof(TensileStrength));
- }
-
- /// <summary>
- /// Called when the ElongationAtBreakPercentage has changed.
- /// </summary>
- protected virtual void OnElongationAtBreakPercentageChanged(Double elongationatbreakpercentage)
- {
- ElongationAtBreakPercentageChanged?.Invoke(this, elongationatbreakpercentage);
- RaisePropertyChanged(nameof(ElongationAtBreakPercentage));
- }
-
- /// <summary>
- /// Called when the EstimatedThreadDiameter has changed.
- /// </summary>
- protected virtual void OnEstimatedThreadDiameterChanged(Double estimatedthreaddiameter)
- {
- EstimatedThreadDiameterChanged?.Invoke(this, estimatedthreaddiameter);
- RaisePropertyChanged(nameof(EstimatedThreadDiameter));
- }
-
- /// <summary>
- /// Called when the Rank has changed.
- /// </summary>
- protected virtual void OnRankChanged(Int32 rank)
- {
- RankChanged?.Invoke(this, rank);
- RaisePropertyChanged(nameof(Rank));
- }
-
- /// <summary>
- /// Called when the Thumbnail has changed.
- /// </summary>
- protected virtual void OnThumbnailChanged(Byte[] thumbnail)
- {
- ThumbnailChanged?.Invoke(this, thumbnail);
- RaisePropertyChanged(nameof(Thumbnail));
- }
-
- /// <summary>
- /// Called when the Cats has changed.
- /// </summary>
- protected virtual void OnCatsChanged(SynchronizedObservableCollection<Cat> cats)
- {
- CatsChanged?.Invoke(this, cats);
- RaisePropertyChanged(nameof(Cats));
- }
-
- /// <summary>
- /// Called when the Ccts has changed.
- /// </summary>
- protected virtual void OnCctsChanged(SynchronizedObservableCollection<Cct> ccts)
- {
- CctsChanged?.Invoke(this, ccts);
- RaisePropertyChanged(nameof(Ccts));
- }
-
- /// <summary>
- /// Called when the FiberShape has changed.
- /// </summary>
- protected virtual void OnFiberShapeChanged(FiberShape fibershape)
- {
- FiberShapeChanged?.Invoke(this, fibershape);
- RaisePropertyChanged(nameof(FiberShape));
- }
-
- /// <summary>
- /// Called when the FiberSynth has changed.
- /// </summary>
- protected virtual void OnFiberSynthChanged(FiberSynth fibersynth)
- {
- FiberSynthChanged?.Invoke(this, fibersynth);
- RaisePropertyChanged(nameof(FiberSynth));
- }
-
- /// <summary>
- /// Called when the Jobs has changed.
- /// </summary>
- protected virtual void OnJobsChanged(SynchronizedObservableCollection<Job> jobs)
- {
- JobsChanged?.Invoke(this, jobs);
- RaisePropertyChanged(nameof(Jobs));
- }
-
- /// <summary>
- /// Called when the LinearMassDensityUnit has changed.
- /// </summary>
- protected virtual void OnLinearMassDensityUnitChanged(LinearMassDensityUnit linearmassdensityunit)
- {
- LinearMassDensityUnitChanged?.Invoke(this, linearmassdensityunit);
- RaisePropertyChanged(nameof(LinearMassDensityUnit));
- }
-
- /// <summary>
- /// Called when the LiquidTypesRmls has changed.
- /// </summary>
- protected virtual void OnLiquidTypesRmlsChanged(SynchronizedObservableCollection<LiquidTypesRml> liquidtypesrmls)
- {
- LiquidTypesRmlsChanged?.Invoke(this, liquidtypesrmls);
- RaisePropertyChanged(nameof(LiquidTypesRmls));
- }
-
- /// <summary>
- /// Called when the Machines has changed.
- /// </summary>
- protected virtual void OnMachinesChanged(SynchronizedObservableCollection<Machine> machines)
- {
- MachinesChanged?.Invoke(this, machines);
- RaisePropertyChanged(nameof(Machines));
- }
-
- /// <summary>
- /// Called when the MediaColor has changed.
- /// </summary>
- protected virtual void OnMediaColorChanged(MediaColor mediacolor)
- {
- MediaColorChanged?.Invoke(this, mediacolor);
- RaisePropertyChanged(nameof(MediaColor));
- }
-
- /// <summary>
- /// Called when the MediaCondition has changed.
- /// </summary>
- protected virtual void OnMediaConditionChanged(MediaCondition mediacondition)
- {
- MediaConditionChanged?.Invoke(this, mediacondition);
- RaisePropertyChanged(nameof(MediaCondition));
- }
-
- /// <summary>
- /// Called when the MediaMaterial has changed.
- /// </summary>
- protected virtual void OnMediaMaterialChanged(MediaMaterial mediamaterial)
- {
- MediaMaterialChanged?.Invoke(this, mediamaterial);
- RaisePropertyChanged(nameof(MediaMaterial));
- }
-
- /// <summary>
- /// Called when the MediaPurpose has changed.
- /// </summary>
- protected virtual void OnMediaPurposeChanged(MediaPurpos mediapurpose)
- {
- MediaPurposeChanged?.Invoke(this, mediapurpose);
- RaisePropertyChanged(nameof(MediaPurpose));
- }
-
- /// <summary>
- /// Called when the ProcessParametersTablesGroups has changed.
- /// </summary>
- protected virtual void OnProcessParametersTablesGroupsChanged(SynchronizedObservableCollection<ProcessParametersTablesGroup> processparameterstablesgroups)
- {
- ProcessParametersTablesGroupsChanged?.Invoke(this, processparameterstablesgroups);
- RaisePropertyChanged(nameof(ProcessParametersTablesGroups));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="Rml" /> class.
/// </summary>
public Rml() : base()
{
- Cats = new SynchronizedObservableCollection<Cat>();
-
- Ccts = new SynchronizedObservableCollection<Cct>();
-
- Jobs = new SynchronizedObservableCollection<Job>();
-
- LiquidTypesRmls = new SynchronizedObservableCollection<LiquidTypesRml>();
-
- Machines = new SynchronizedObservableCollection<Machine>();
-
- ProcessParametersTablesGroups = new SynchronizedObservableCollection<ProcessParametersTablesGroup>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlBase.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlBase.cs
new file mode 100644
index 000000000..2b85ca767
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/RmlBase.cs
@@ -0,0 +1,1275 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("RMLS")]
+ public abstract class RmlBase : ObservableEntity<Rml>
+ {
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<String> ManufacturerChanged;
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<Double> FiberSizeChanged;
+
+ public event EventHandler<Int32> NumberOfFibersChanged;
+
+ public event EventHandler<Int32> PliesPerFiberChanged;
+
+ public event EventHandler<Int32> PliesPerThreadChanged;
+
+ public event EventHandler<Boolean> TwistedChanged;
+
+ public event EventHandler<Boolean> AirEntanglementChanged;
+
+ public event EventHandler<Boolean> LubricantChanged;
+
+ public event EventHandler<Double> TensileStrengthChanged;
+
+ public event EventHandler<Double> ElongationAtBreakPercentageChanged;
+
+ public event EventHandler<Double> EstimatedThreadDiameterChanged;
+
+ public event EventHandler<Int32> RankChanged;
+
+ public event EventHandler<Byte[]> ThumbnailChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Cat>> CatsChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Cct>> CctsChanged;
+
+ public event EventHandler<FiberShape> FiberShapeChanged;
+
+ public event EventHandler<FiberSynth> FiberSynthChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Job>> JobsChanged;
+
+ public event EventHandler<LinearMassDensityUnit> LinearMassDensityUnitChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<LiquidTypesRml>> LiquidTypesRmlsChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Machine>> MachinesChanged;
+
+ public event EventHandler<MediaColor> MediaColorChanged;
+
+ public event EventHandler<MediaCondition> MediaConditionChanged;
+
+ public event EventHandler<MediaMaterial> MediaMaterialChanged;
+
+ public event EventHandler<MediaPurpos> MediaPurposeChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<ProcessParametersTablesGroup>> ProcessParametersTablesGroupsChanged;
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the rmlbase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _manufacturer;
+
+ /// <summary>
+ /// Gets or sets the rmlbase manufacturer.
+ /// </summary>
+
+ [Column("MANUFACTURER")]
+
+ public String Manufacturer
+ {
+ get
+ {
+ return _manufacturer;
+ }
+
+ set
+ {
+ if (_manufacturer != value)
+ {
+ _manufacturer = value;
+
+ OnManufacturerChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the rmlbase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _mediamaterialguid;
+
+ /// <summary>
+ /// Gets or sets the rmlbase media material guid.
+ /// </summary>
+
+ [Column("MEDIA_MATERIAL_GUID")]
+ [ForeignKey("MediaMaterial")]
+
+ public String MediaMaterialGuid
+ {
+ get
+ {
+ return _mediamaterialguid;
+ }
+
+ set
+ {
+ if (_mediamaterialguid != value)
+ {
+ _mediamaterialguid = value;
+ }
+ }
+ }
+
+ protected String _mediacolorguid;
+
+ /// <summary>
+ /// Gets or sets the rmlbase media color guid.
+ /// </summary>
+
+ [Column("MEDIA_COLOR_GUID")]
+ [ForeignKey("MediaColor")]
+
+ public String MediaColorGuid
+ {
+ get
+ {
+ return _mediacolorguid;
+ }
+
+ set
+ {
+ if (_mediacolorguid != value)
+ {
+ _mediacolorguid = value;
+ }
+ }
+ }
+
+ protected String _mediapurposeguid;
+
+ /// <summary>
+ /// Gets or sets the rmlbase media purpose guid.
+ /// </summary>
+
+ [Column("MEDIA_PURPOSE_GUID")]
+ [ForeignKey("MediaPurpose")]
+
+ public String MediaPurposeGuid
+ {
+ get
+ {
+ return _mediapurposeguid;
+ }
+
+ set
+ {
+ if (_mediapurposeguid != value)
+ {
+ _mediapurposeguid = value;
+ }
+ }
+ }
+
+ protected String _mediaconditionguid;
+
+ /// <summary>
+ /// Gets or sets the rmlbase media condition guid.
+ /// </summary>
+
+ [Column("MEDIA_CONDITION_GUID")]
+ [ForeignKey("MediaCondition")]
+
+ public String MediaConditionGuid
+ {
+ get
+ {
+ return _mediaconditionguid;
+ }
+
+ set
+ {
+ if (_mediaconditionguid != value)
+ {
+ _mediaconditionguid = value;
+ }
+ }
+ }
+
+ protected String _linearmassdensityunitguid;
+
+ /// <summary>
+ /// Gets or sets the rmlbase linear mass density unit guid.
+ /// </summary>
+
+ [Column("LINEAR_MASS_DENSITY_UNIT_GUID")]
+ [ForeignKey("LinearMassDensityUnit")]
+
+ public String LinearMassDensityUnitGuid
+ {
+ get
+ {
+ return _linearmassdensityunitguid;
+ }
+
+ set
+ {
+ if (_linearmassdensityunitguid != value)
+ {
+ _linearmassdensityunitguid = value;
+ }
+ }
+ }
+
+ protected String _fibershapeguid;
+
+ /// <summary>
+ /// Gets or sets the rmlbase fiber shape guid.
+ /// </summary>
+
+ [Column("FIBER_SHAPE_GUID")]
+ [ForeignKey("FiberShape")]
+
+ public String FiberShapeGuid
+ {
+ get
+ {
+ return _fibershapeguid;
+ }
+
+ set
+ {
+ if (_fibershapeguid != value)
+ {
+ _fibershapeguid = value;
+ }
+ }
+ }
+
+ protected String _fibersynthguid;
+
+ /// <summary>
+ /// Gets or sets the rmlbase fiber synth guid.
+ /// </summary>
+
+ [Column("FIBER_SYNTH_GUID")]
+ [ForeignKey("FiberSynth")]
+
+ public String FiberSynthGuid
+ {
+ get
+ {
+ return _fibersynthguid;
+ }
+
+ set
+ {
+ if (_fibersynthguid != value)
+ {
+ _fibersynthguid = value;
+ }
+ }
+ }
+
+ protected Double _fibersize;
+
+ /// <summary>
+ /// Gets or sets the rmlbase fiber size.
+ /// </summary>
+
+ [Column("FIBER_SIZE")]
+
+ public Double FiberSize
+ {
+ get
+ {
+ return _fibersize;
+ }
+
+ set
+ {
+ if (_fibersize != value)
+ {
+ _fibersize = value;
+
+ OnFiberSizeChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _numberoffibers;
+
+ /// <summary>
+ /// Gets or sets the rmlbase number of fibers.
+ /// </summary>
+
+ [Column("NUMBER_OF_FIBERS")]
+
+ public Int32 NumberOfFibers
+ {
+ get
+ {
+ return _numberoffibers;
+ }
+
+ set
+ {
+ if (_numberoffibers != value)
+ {
+ _numberoffibers = value;
+
+ OnNumberOfFibersChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _pliesperfiber;
+
+ /// <summary>
+ /// Gets or sets the rmlbase plies per fiber.
+ /// </summary>
+
+ [Column("PLIES_PER_FIBER")]
+
+ public Int32 PliesPerFiber
+ {
+ get
+ {
+ return _pliesperfiber;
+ }
+
+ set
+ {
+ if (_pliesperfiber != value)
+ {
+ _pliesperfiber = value;
+
+ OnPliesPerFiberChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _pliesperthread;
+
+ /// <summary>
+ /// Gets or sets the rmlbase plies per thread.
+ /// </summary>
+
+ [Column("PLIES_PER_THREAD")]
+
+ public Int32 PliesPerThread
+ {
+ get
+ {
+ return _pliesperthread;
+ }
+
+ set
+ {
+ if (_pliesperthread != value)
+ {
+ _pliesperthread = value;
+
+ OnPliesPerThreadChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _twisted;
+
+ /// <summary>
+ /// Gets or sets the rmlbase twisted.
+ /// </summary>
+
+ [Column("TWISTED")]
+
+ public Boolean Twisted
+ {
+ get
+ {
+ return _twisted;
+ }
+
+ set
+ {
+ if (_twisted != value)
+ {
+ _twisted = value;
+
+ OnTwistedChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _airentanglement;
+
+ /// <summary>
+ /// Gets or sets the rmlbase air entanglement.
+ /// </summary>
+
+ [Column("AIR_ENTANGLEMENT")]
+
+ public Boolean AirEntanglement
+ {
+ get
+ {
+ return _airentanglement;
+ }
+
+ set
+ {
+ if (_airentanglement != value)
+ {
+ _airentanglement = value;
+
+ OnAirEntanglementChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _lubricant;
+
+ /// <summary>
+ /// Gets or sets the rmlbase lubricant.
+ /// </summary>
+
+ [Column("LUBRICANT")]
+
+ public Boolean Lubricant
+ {
+ get
+ {
+ return _lubricant;
+ }
+
+ set
+ {
+ if (_lubricant != value)
+ {
+ _lubricant = value;
+
+ OnLubricantChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _tensilestrength;
+
+ /// <summary>
+ /// Gets or sets the rmlbase tensile strength.
+ /// </summary>
+
+ [Column("TENSILE_STRENGTH")]
+
+ public Double TensileStrength
+ {
+ get
+ {
+ return _tensilestrength;
+ }
+
+ set
+ {
+ if (_tensilestrength != value)
+ {
+ _tensilestrength = value;
+
+ OnTensileStrengthChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _elongationatbreakpercentage;
+
+ /// <summary>
+ /// Gets or sets the rmlbase elongation at break percentage.
+ /// </summary>
+
+ [Column("ELONGATION_AT_BREAK_PERCENTAGE")]
+
+ public Double ElongationAtBreakPercentage
+ {
+ get
+ {
+ return _elongationatbreakpercentage;
+ }
+
+ set
+ {
+ if (_elongationatbreakpercentage != value)
+ {
+ _elongationatbreakpercentage = value;
+
+ OnElongationAtBreakPercentageChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _estimatedthreaddiameter;
+
+ /// <summary>
+ /// Gets or sets the rmlbase estimated thread diameter.
+ /// </summary>
+
+ [Column("ESTIMATED_THREAD_DIAMETER")]
+
+ public Double EstimatedThreadDiameter
+ {
+ get
+ {
+ return _estimatedthreaddiameter;
+ }
+
+ set
+ {
+ if (_estimatedthreaddiameter != value)
+ {
+ _estimatedthreaddiameter = value;
+
+ OnEstimatedThreadDiameterChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _rank;
+
+ /// <summary>
+ /// Gets or sets the rmlbase rank.
+ /// </summary>
+
+ [Column("RANK")]
+
+ public Int32 Rank
+ {
+ get
+ {
+ return _rank;
+ }
+
+ set
+ {
+ if (_rank != value)
+ {
+ _rank = value;
+
+ OnRankChanged(value);
+
+ }
+ }
+ }
+
+ protected Byte[] _thumbnail;
+
+ /// <summary>
+ /// Gets or sets the rmlbase thumbnail.
+ /// </summary>
+
+ [Column("THUMBNAIL")]
+
+ public Byte[] Thumbnail
+ {
+ get
+ {
+ return _thumbnail;
+ }
+
+ set
+ {
+ if (_thumbnail != value)
+ {
+ _thumbnail = value;
+
+ OnThumbnailChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Cat> _cats;
+
+ /// <summary>
+ /// Gets or sets the rmlbase cats.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Cat> Cats
+ {
+ get
+ {
+ return _cats;
+ }
+
+ set
+ {
+ if (_cats != value)
+ {
+ _cats = value;
+
+ OnCatsChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Cct> _ccts;
+
+ /// <summary>
+ /// Gets or sets the rmlbase ccts.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Cct> Ccts
+ {
+ get
+ {
+ return _ccts;
+ }
+
+ set
+ {
+ if (_ccts != value)
+ {
+ _ccts = value;
+
+ OnCctsChanged(value);
+
+ }
+ }
+ }
+
+ protected FiberShape _fibershape;
+
+ /// <summary>
+ /// Gets or sets the rmlbase fiber shapes.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual FiberShape FiberShape
+ {
+ get
+ {
+ return _fibershape;
+ }
+
+ set
+ {
+ if (_fibershape != value)
+ {
+ _fibershape = value;
+
+ OnFiberShapeChanged(value);
+
+ }
+ }
+ }
+
+ protected FiberSynth _fibersynth;
+
+ /// <summary>
+ /// Gets or sets the rmlbase fiber synths.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual FiberSynth FiberSynth
+ {
+ get
+ {
+ return _fibersynth;
+ }
+
+ set
+ {
+ if (_fibersynth != value)
+ {
+ _fibersynth = value;
+
+ OnFiberSynthChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Job> _jobs;
+
+ /// <summary>
+ /// Gets or sets the rmlbase jobs.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Job> Jobs
+ {
+ get
+ {
+ return _jobs;
+ }
+
+ set
+ {
+ if (_jobs != value)
+ {
+ _jobs = value;
+
+ OnJobsChanged(value);
+
+ }
+ }
+ }
+
+ protected LinearMassDensityUnit _linearmassdensityunit;
+
+ /// <summary>
+ /// Gets or sets the rmlbase linear mass density units.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual LinearMassDensityUnit LinearMassDensityUnit
+ {
+ get
+ {
+ return _linearmassdensityunit;
+ }
+
+ set
+ {
+ if (_linearmassdensityunit != value)
+ {
+ _linearmassdensityunit = value;
+
+ OnLinearMassDensityUnitChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<LiquidTypesRml> _liquidtypesrmls;
+
+ /// <summary>
+ /// Gets or sets the rmlbase liquid types rmls.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<LiquidTypesRml> LiquidTypesRmls
+ {
+ get
+ {
+ return _liquidtypesrmls;
+ }
+
+ set
+ {
+ if (_liquidtypesrmls != value)
+ {
+ _liquidtypesrmls = value;
+
+ OnLiquidTypesRmlsChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Machine> _machines;
+
+ /// <summary>
+ /// Gets or sets the rmlbase machines.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Machine> Machines
+ {
+ get
+ {
+ return _machines;
+ }
+
+ set
+ {
+ if (_machines != value)
+ {
+ _machines = value;
+
+ OnMachinesChanged(value);
+
+ }
+ }
+ }
+
+ protected MediaColor _mediacolor;
+
+ /// <summary>
+ /// Gets or sets the rmlbase media colors.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual MediaColor MediaColor
+ {
+ get
+ {
+ return _mediacolor;
+ }
+
+ set
+ {
+ if (_mediacolor != value)
+ {
+ _mediacolor = value;
+
+ OnMediaColorChanged(value);
+
+ }
+ }
+ }
+
+ protected MediaCondition _mediacondition;
+
+ /// <summary>
+ /// Gets or sets the rmlbase media conditions.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual MediaCondition MediaCondition
+ {
+ get
+ {
+ return _mediacondition;
+ }
+
+ set
+ {
+ if (_mediacondition != value)
+ {
+ _mediacondition = value;
+
+ OnMediaConditionChanged(value);
+
+ }
+ }
+ }
+
+ protected MediaMaterial _mediamaterial;
+
+ /// <summary>
+ /// Gets or sets the rmlbase media materials.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual MediaMaterial MediaMaterial
+ {
+ get
+ {
+ return _mediamaterial;
+ }
+
+ set
+ {
+ if (_mediamaterial != value)
+ {
+ _mediamaterial = value;
+
+ OnMediaMaterialChanged(value);
+
+ }
+ }
+ }
+
+ protected MediaPurpos _mediapurpose;
+
+ /// <summary>
+ /// Gets or sets the rmlbase media purposes.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual MediaPurpos MediaPurpose
+ {
+ get
+ {
+ return _mediapurpose;
+ }
+
+ set
+ {
+ if (_mediapurpose != value)
+ {
+ _mediapurpose = value;
+
+ OnMediaPurposeChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<ProcessParametersTablesGroup> _processparameterstablesgroups;
+
+ /// <summary>
+ /// Gets or sets the rmlbase process parameters tables groups.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<ProcessParametersTablesGroup> ProcessParametersTablesGroups
+ {
+ get
+ {
+ return _processparameterstablesgroups;
+ }
+
+ set
+ {
+ if (_processparameterstablesgroups != value)
+ {
+ _processparameterstablesgroups = value;
+
+ OnProcessParametersTablesGroupsChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Manufacturer has changed.
+ /// </summary>
+ protected virtual void OnManufacturerChanged(String manufacturer)
+ {
+ ManufacturerChanged?.Invoke(this, manufacturer);
+ RaisePropertyChanged(nameof(Manufacturer));
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the FiberSize has changed.
+ /// </summary>
+ protected virtual void OnFiberSizeChanged(Double fibersize)
+ {
+ FiberSizeChanged?.Invoke(this, fibersize);
+ RaisePropertyChanged(nameof(FiberSize));
+ }
+
+ /// <summary>
+ /// Called when the NumberOfFibers has changed.
+ /// </summary>
+ protected virtual void OnNumberOfFibersChanged(Int32 numberoffibers)
+ {
+ NumberOfFibersChanged?.Invoke(this, numberoffibers);
+ RaisePropertyChanged(nameof(NumberOfFibers));
+ }
+
+ /// <summary>
+ /// Called when the PliesPerFiber has changed.
+ /// </summary>
+ protected virtual void OnPliesPerFiberChanged(Int32 pliesperfiber)
+ {
+ PliesPerFiberChanged?.Invoke(this, pliesperfiber);
+ RaisePropertyChanged(nameof(PliesPerFiber));
+ }
+
+ /// <summary>
+ /// Called when the PliesPerThread has changed.
+ /// </summary>
+ protected virtual void OnPliesPerThreadChanged(Int32 pliesperthread)
+ {
+ PliesPerThreadChanged?.Invoke(this, pliesperthread);
+ RaisePropertyChanged(nameof(PliesPerThread));
+ }
+
+ /// <summary>
+ /// Called when the Twisted has changed.
+ /// </summary>
+ protected virtual void OnTwistedChanged(Boolean twisted)
+ {
+ TwistedChanged?.Invoke(this, twisted);
+ RaisePropertyChanged(nameof(Twisted));
+ }
+
+ /// <summary>
+ /// Called when the AirEntanglement has changed.
+ /// </summary>
+ protected virtual void OnAirEntanglementChanged(Boolean airentanglement)
+ {
+ AirEntanglementChanged?.Invoke(this, airentanglement);
+ RaisePropertyChanged(nameof(AirEntanglement));
+ }
+
+ /// <summary>
+ /// Called when the Lubricant has changed.
+ /// </summary>
+ protected virtual void OnLubricantChanged(Boolean lubricant)
+ {
+ LubricantChanged?.Invoke(this, lubricant);
+ RaisePropertyChanged(nameof(Lubricant));
+ }
+
+ /// <summary>
+ /// Called when the TensileStrength has changed.
+ /// </summary>
+ protected virtual void OnTensileStrengthChanged(Double tensilestrength)
+ {
+ TensileStrengthChanged?.Invoke(this, tensilestrength);
+ RaisePropertyChanged(nameof(TensileStrength));
+ }
+
+ /// <summary>
+ /// Called when the ElongationAtBreakPercentage has changed.
+ /// </summary>
+ protected virtual void OnElongationAtBreakPercentageChanged(Double elongationatbreakpercentage)
+ {
+ ElongationAtBreakPercentageChanged?.Invoke(this, elongationatbreakpercentage);
+ RaisePropertyChanged(nameof(ElongationAtBreakPercentage));
+ }
+
+ /// <summary>
+ /// Called when the EstimatedThreadDiameter has changed.
+ /// </summary>
+ protected virtual void OnEstimatedThreadDiameterChanged(Double estimatedthreaddiameter)
+ {
+ EstimatedThreadDiameterChanged?.Invoke(this, estimatedthreaddiameter);
+ RaisePropertyChanged(nameof(EstimatedThreadDiameter));
+ }
+
+ /// <summary>
+ /// Called when the Rank has changed.
+ /// </summary>
+ protected virtual void OnRankChanged(Int32 rank)
+ {
+ RankChanged?.Invoke(this, rank);
+ RaisePropertyChanged(nameof(Rank));
+ }
+
+ /// <summary>
+ /// Called when the Thumbnail has changed.
+ /// </summary>
+ protected virtual void OnThumbnailChanged(Byte[] thumbnail)
+ {
+ ThumbnailChanged?.Invoke(this, thumbnail);
+ RaisePropertyChanged(nameof(Thumbnail));
+ }
+
+ /// <summary>
+ /// Called when the Cats has changed.
+ /// </summary>
+ protected virtual void OnCatsChanged(SynchronizedObservableCollection<Cat> cats)
+ {
+ CatsChanged?.Invoke(this, cats);
+ RaisePropertyChanged(nameof(Cats));
+ }
+
+ /// <summary>
+ /// Called when the Ccts has changed.
+ /// </summary>
+ protected virtual void OnCctsChanged(SynchronizedObservableCollection<Cct> ccts)
+ {
+ CctsChanged?.Invoke(this, ccts);
+ RaisePropertyChanged(nameof(Ccts));
+ }
+
+ /// <summary>
+ /// Called when the FiberShape has changed.
+ /// </summary>
+ protected virtual void OnFiberShapeChanged(FiberShape fibershape)
+ {
+ FiberShapeChanged?.Invoke(this, fibershape);
+ RaisePropertyChanged(nameof(FiberShape));
+ }
+
+ /// <summary>
+ /// Called when the FiberSynth has changed.
+ /// </summary>
+ protected virtual void OnFiberSynthChanged(FiberSynth fibersynth)
+ {
+ FiberSynthChanged?.Invoke(this, fibersynth);
+ RaisePropertyChanged(nameof(FiberSynth));
+ }
+
+ /// <summary>
+ /// Called when the Jobs has changed.
+ /// </summary>
+ protected virtual void OnJobsChanged(SynchronizedObservableCollection<Job> jobs)
+ {
+ JobsChanged?.Invoke(this, jobs);
+ RaisePropertyChanged(nameof(Jobs));
+ }
+
+ /// <summary>
+ /// Called when the LinearMassDensityUnit has changed.
+ /// </summary>
+ protected virtual void OnLinearMassDensityUnitChanged(LinearMassDensityUnit linearmassdensityunit)
+ {
+ LinearMassDensityUnitChanged?.Invoke(this, linearmassdensityunit);
+ RaisePropertyChanged(nameof(LinearMassDensityUnit));
+ }
+
+ /// <summary>
+ /// Called when the LiquidTypesRmls has changed.
+ /// </summary>
+ protected virtual void OnLiquidTypesRmlsChanged(SynchronizedObservableCollection<LiquidTypesRml> liquidtypesrmls)
+ {
+ LiquidTypesRmlsChanged?.Invoke(this, liquidtypesrmls);
+ RaisePropertyChanged(nameof(LiquidTypesRmls));
+ }
+
+ /// <summary>
+ /// Called when the Machines has changed.
+ /// </summary>
+ protected virtual void OnMachinesChanged(SynchronizedObservableCollection<Machine> machines)
+ {
+ MachinesChanged?.Invoke(this, machines);
+ RaisePropertyChanged(nameof(Machines));
+ }
+
+ /// <summary>
+ /// Called when the MediaColor has changed.
+ /// </summary>
+ protected virtual void OnMediaColorChanged(MediaColor mediacolor)
+ {
+ MediaColorChanged?.Invoke(this, mediacolor);
+ RaisePropertyChanged(nameof(MediaColor));
+ }
+
+ /// <summary>
+ /// Called when the MediaCondition has changed.
+ /// </summary>
+ protected virtual void OnMediaConditionChanged(MediaCondition mediacondition)
+ {
+ MediaConditionChanged?.Invoke(this, mediacondition);
+ RaisePropertyChanged(nameof(MediaCondition));
+ }
+
+ /// <summary>
+ /// Called when the MediaMaterial has changed.
+ /// </summary>
+ protected virtual void OnMediaMaterialChanged(MediaMaterial mediamaterial)
+ {
+ MediaMaterialChanged?.Invoke(this, mediamaterial);
+ RaisePropertyChanged(nameof(MediaMaterial));
+ }
+
+ /// <summary>
+ /// Called when the MediaPurpose has changed.
+ /// </summary>
+ protected virtual void OnMediaPurposeChanged(MediaPurpos mediapurpose)
+ {
+ MediaPurposeChanged?.Invoke(this, mediapurpose);
+ RaisePropertyChanged(nameof(MediaPurpose));
+ }
+
+ /// <summary>
+ /// Called when the ProcessParametersTablesGroups has changed.
+ /// </summary>
+ protected virtual void OnProcessParametersTablesGroupsChanged(SynchronizedObservableCollection<ProcessParametersTablesGroup> processparameterstablesgroups)
+ {
+ ProcessParametersTablesGroupsChanged?.Invoke(this, processparameterstablesgroups);
+ RaisePropertyChanged(nameof(ProcessParametersTablesGroups));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="RmlBase" /> class.
+ /// </summary>
+ public RmlBase() : base()
+ {
+
+ Cats = new SynchronizedObservableCollection<Cat>();
+
+ Ccts = new SynchronizedObservableCollection<Cct>();
+
+ Jobs = new SynchronizedObservableCollection<Job>();
+
+ LiquidTypesRmls = new SynchronizedObservableCollection<LiquidTypesRml>();
+
+ Machines = new SynchronizedObservableCollection<Machine>();
+
+ ProcessParametersTablesGroups = new SynchronizedObservableCollection<ProcessParametersTablesGroup>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/Role.cs b/Software/Visual_Studio/Tango.BL/Entities/Role.cs
index 18516e623..1108d6de3 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/Role.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/Role.cs
@@ -1,226 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("ROLES")]
- public partial class Role : ObservableEntity<Role>
+ public partial class Role : RoleBase
{
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<String> DescriptionChanged;
-
- public event EventHandler<SynchronizedObservableCollection<RolesPermission>> RolesPermissionsChanged;
-
- public event EventHandler<SynchronizedObservableCollection<UsersRole>> UsersRolesChanged;
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the role code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the role name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected String _description;
-
- /// <summary>
- /// Gets or sets the role description.
- /// </summary>
-
- [Column("DESCRIPTION")]
-
- public String Description
- {
- get
- {
- return _description;
- }
-
- set
- {
- if (_description != value)
- {
- _description = value;
-
- OnDescriptionChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<RolesPermission> _rolespermissions;
-
- /// <summary>
- /// Gets or sets the role roles permissions.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<RolesPermission> RolesPermissions
- {
- get
- {
- return _rolespermissions;
- }
-
- set
- {
- if (_rolespermissions != value)
- {
- _rolespermissions = value;
-
- OnRolesPermissionsChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<UsersRole> _usersroles;
-
- /// <summary>
- /// Gets or sets the role users roles.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<UsersRole> UsersRoles
- {
- get
- {
- return _usersroles;
- }
-
- set
- {
- if (_usersroles != value)
- {
- _usersroles = value;
-
- OnUsersRolesChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Description has changed.
- /// </summary>
- protected virtual void OnDescriptionChanged(String description)
- {
- DescriptionChanged?.Invoke(this, description);
- RaisePropertyChanged(nameof(Description));
- }
-
- /// <summary>
- /// Called when the RolesPermissions has changed.
- /// </summary>
- protected virtual void OnRolesPermissionsChanged(SynchronizedObservableCollection<RolesPermission> rolespermissions)
- {
- RolesPermissionsChanged?.Invoke(this, rolespermissions);
- RaisePropertyChanged(nameof(RolesPermissions));
- }
-
- /// <summary>
- /// Called when the UsersRoles has changed.
- /// </summary>
- protected virtual void OnUsersRolesChanged(SynchronizedObservableCollection<UsersRole> usersroles)
- {
- UsersRolesChanged?.Invoke(this, usersroles);
- RaisePropertyChanged(nameof(UsersRoles));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="Role" /> class.
/// </summary>
public Role() : base()
{
- RolesPermissions = new SynchronizedObservableCollection<RolesPermission>();
-
- UsersRoles = new SynchronizedObservableCollection<UsersRole>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/RoleBase.cs b/Software/Visual_Studio/Tango.BL/Entities/RoleBase.cs
new file mode 100644
index 000000000..4bd76f3a3
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/RoleBase.cs
@@ -0,0 +1,226 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("ROLES")]
+ public abstract class RoleBase : ObservableEntity<Role>
+ {
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<String> DescriptionChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<RolesPermission>> RolesPermissionsChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<UsersRole>> UsersRolesChanged;
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the rolebase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the rolebase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _description;
+
+ /// <summary>
+ /// Gets or sets the rolebase description.
+ /// </summary>
+
+ [Column("DESCRIPTION")]
+
+ public String Description
+ {
+ get
+ {
+ return _description;
+ }
+
+ set
+ {
+ if (_description != value)
+ {
+ _description = value;
+
+ OnDescriptionChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<RolesPermission> _rolespermissions;
+
+ /// <summary>
+ /// Gets or sets the rolebase roles permissions.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<RolesPermission> RolesPermissions
+ {
+ get
+ {
+ return _rolespermissions;
+ }
+
+ set
+ {
+ if (_rolespermissions != value)
+ {
+ _rolespermissions = value;
+
+ OnRolesPermissionsChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<UsersRole> _usersroles;
+
+ /// <summary>
+ /// Gets or sets the rolebase users roles.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<UsersRole> UsersRoles
+ {
+ get
+ {
+ return _usersroles;
+ }
+
+ set
+ {
+ if (_usersroles != value)
+ {
+ _usersroles = value;
+
+ OnUsersRolesChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Description has changed.
+ /// </summary>
+ protected virtual void OnDescriptionChanged(String description)
+ {
+ DescriptionChanged?.Invoke(this, description);
+ RaisePropertyChanged(nameof(Description));
+ }
+
+ /// <summary>
+ /// Called when the RolesPermissions has changed.
+ /// </summary>
+ protected virtual void OnRolesPermissionsChanged(SynchronizedObservableCollection<RolesPermission> rolespermissions)
+ {
+ RolesPermissionsChanged?.Invoke(this, rolespermissions);
+ RaisePropertyChanged(nameof(RolesPermissions));
+ }
+
+ /// <summary>
+ /// Called when the UsersRoles has changed.
+ /// </summary>
+ protected virtual void OnUsersRolesChanged(SynchronizedObservableCollection<UsersRole> usersroles)
+ {
+ UsersRolesChanged?.Invoke(this, usersroles);
+ RaisePropertyChanged(nameof(UsersRoles));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="RoleBase" /> class.
+ /// </summary>
+ public RoleBase() : base()
+ {
+
+ RolesPermissions = new SynchronizedObservableCollection<RolesPermission>();
+
+ UsersRoles = new SynchronizedObservableCollection<UsersRole>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/RolesPermission.cs b/Software/Visual_Studio/Tango.BL/Entities/RolesPermission.cs
index add86faa3..6f90ebee9 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/RolesPermission.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/RolesPermission.cs
@@ -1,161 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("ROLES_PERMISSIONS")]
- public partial class RolesPermission : ObservableEntity<RolesPermission>
+ public partial class RolesPermission : RolesPermissionBase
{
-
- public event EventHandler<Permission> PermissionChanged;
-
- public event EventHandler<Role> RoleChanged;
-
- protected String _roleguid;
-
- /// <summary>
- /// Gets or sets the rolespermission role guid.
- /// </summary>
-
- [Column("ROLE_GUID")]
- [ForeignKey("Role")]
-
- public String RoleGuid
- {
- get
- {
- return _roleguid;
- }
-
- set
- {
- if (_roleguid != value)
- {
- _roleguid = value;
- }
- }
- }
-
- protected String _permissionguid;
-
- /// <summary>
- /// Gets or sets the rolespermission permission guid.
- /// </summary>
-
- [Column("PERMISSION_GUID")]
- [ForeignKey("Permission")]
-
- public String PermissionGuid
- {
- get
- {
- return _permissionguid;
- }
-
- set
- {
- if (_permissionguid != value)
- {
- _permissionguid = value;
- }
- }
- }
-
- protected Permission _permission;
-
- /// <summary>
- /// Gets or sets the rolespermission permission.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual Permission Permission
- {
- get
- {
- return _permission;
- }
-
- set
- {
- if (_permission != value)
- {
- _permission = value;
-
- OnPermissionChanged(value);
-
- }
- }
- }
-
- protected Role _role;
-
- /// <summary>
- /// Gets or sets the rolespermission role.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual Role Role
- {
- get
- {
- return _role;
- }
-
- set
- {
- if (_role != value)
- {
- _role = value;
-
- OnRoleChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Permission has changed.
- /// </summary>
- protected virtual void OnPermissionChanged(Permission permission)
- {
- PermissionChanged?.Invoke(this, permission);
- RaisePropertyChanged(nameof(Permission));
- }
-
- /// <summary>
- /// Called when the Role has changed.
- /// </summary>
- protected virtual void OnRoleChanged(Role role)
- {
- RoleChanged?.Invoke(this, role);
- RaisePropertyChanged(nameof(Role));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="RolesPermission" /> class.
/// </summary>
public RolesPermission() : base()
{
+
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/RolesPermissionBase.cs b/Software/Visual_Studio/Tango.BL/Entities/RolesPermissionBase.cs
new file mode 100644
index 000000000..5c6c605a2
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/RolesPermissionBase.cs
@@ -0,0 +1,161 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("ROLES_PERMISSIONS")]
+ public abstract class RolesPermissionBase : ObservableEntity<RolesPermission>
+ {
+
+ public event EventHandler<Permission> PermissionChanged;
+
+ public event EventHandler<Role> RoleChanged;
+
+ protected String _roleguid;
+
+ /// <summary>
+ /// Gets or sets the rolespermissionbase role guid.
+ /// </summary>
+
+ [Column("ROLE_GUID")]
+ [ForeignKey("Role")]
+
+ public String RoleGuid
+ {
+ get
+ {
+ return _roleguid;
+ }
+
+ set
+ {
+ if (_roleguid != value)
+ {
+ _roleguid = value;
+ }
+ }
+ }
+
+ protected String _permissionguid;
+
+ /// <summary>
+ /// Gets or sets the rolespermissionbase permission guid.
+ /// </summary>
+
+ [Column("PERMISSION_GUID")]
+ [ForeignKey("Permission")]
+
+ public String PermissionGuid
+ {
+ get
+ {
+ return _permissionguid;
+ }
+
+ set
+ {
+ if (_permissionguid != value)
+ {
+ _permissionguid = value;
+ }
+ }
+ }
+
+ protected Permission _permission;
+
+ /// <summary>
+ /// Gets or sets the rolespermissionbase permission.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual Permission Permission
+ {
+ get
+ {
+ return _permission;
+ }
+
+ set
+ {
+ if (_permission != value)
+ {
+ _permission = value;
+
+ OnPermissionChanged(value);
+
+ }
+ }
+ }
+
+ protected Role _role;
+
+ /// <summary>
+ /// Gets or sets the rolespermissionbase role.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual Role Role
+ {
+ get
+ {
+ return _role;
+ }
+
+ set
+ {
+ if (_role != value)
+ {
+ _role = value;
+
+ OnRoleChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Permission has changed.
+ /// </summary>
+ protected virtual void OnPermissionChanged(Permission permission)
+ {
+ PermissionChanged?.Invoke(this, permission);
+ RaisePropertyChanged(nameof(Permission));
+ }
+
+ /// <summary>
+ /// Called when the Role has changed.
+ /// </summary>
+ protected virtual void OnRoleChanged(Role role)
+ {
+ RoleChanged?.Invoke(this, role);
+ RaisePropertyChanged(nameof(Role));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="RolesPermissionBase" /> class.
+ /// </summary>
+ public RolesPermissionBase() : base()
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/Segment.cs b/Software/Visual_Studio/Tango.BL/Entities/Segment.cs
index f214e73b9..4e740f312 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/Segment.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/Segment.cs
@@ -1,241 +1,324 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
+using Newtonsoft.Json;
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
+using System.Collections.Specialized;
+using System.ComponentModel;
using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Media;
namespace Tango.BL.Entities
{
- [Table("SEGMENTS")]
- public partial class Segment : ObservableEntity<Segment>
+ public partial class Segment : SegmentBase
{
+ private double _lastLength;
+ private LinearGradientBrush _brush;
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<Double> LengthChanged;
-
- public event EventHandler<Int32> SegmentIndexChanged;
-
- public event EventHandler<SynchronizedObservableCollection<BrushStop>> BrushStopsChanged;
-
- public event EventHandler<Job> JobChanged;
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the segment name.
- /// </summary>
+ public override void Save(ObservablesContext context)
+ {
+ for (int i = 0; i < BrushStops.Count; i++)
+ {
+ BrushStops[i].StopIndex = i;
+ }
- [Column("NAME")]
+ base.Save(context);
+ }
- public String Name
+ protected override void RaisePropertyChanged(string propName)
{
- get
+ base.RaisePropertyChanged(propName);
+
+ if (propName == nameof(Length) && _lastLength != Length)
{
- return _name;
+ BrushStops.ToList().ForEach(x => x.RaiseOffsetChanged());
+ _lastLength = Length;
+ RaisePropertyChanged(nameof(LengthWithFactor));
}
- set
+ if (propName == nameof(BrushStops))
{
- if (_name != value)
+ if (BrushStops != null)
{
- _name = value;
+ BrushStops.CollectionChanged -= BrushStops_CollectionChanged;
+ BrushStops.CollectionChanged += BrushStops_CollectionChanged;
- OnNameChanged(value);
+ foreach (var stop in BrushStops.ToList())
+ {
+ stop.RaiseOffsetChanged();
+ }
+ RaiseSegmentBrushChanged();
}
}
}
- protected String _jobguid;
-
- /// <summary>
- /// Gets or sets the segment job guid.
- /// </summary>
-
- [Column("JOB_GUID")]
- [ForeignKey("Job")]
-
- public String JobGuid
+ private void BrushStops_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
{
- get
+ foreach (var stop in BrushStops.ToList())
{
- return _jobguid;
+ stop.RaiseOffsetChanged();
}
- set
+ if (BrushStops.Count > 0)
{
- if (_jobguid != value)
- {
- _jobguid = value;
- }
+ BrushStops.First().OffsetPercent = 0;
+ }
+ if (BrushStops.Count > 1)
+ {
+ BrushStops.Last().OffsetPercent = 100;
}
+
+ RaiseSegmentBrushChanged();
}
- protected Double _length;
+ private TimeSpan _remainingTime;
+ [NotMapped]
+ [JsonIgnore]
+ public TimeSpan RemainingTime
+ {
+ get { return _remainingTime; }
+ set { _remainingTime = value; RaisePropertyChangedAuto(); }
+ }
- /// <summary>
- /// Gets or sets the segment length.
- /// </summary>
+ private TimeSpan _estimatedDuration;
+ [NotMapped]
+ [JsonIgnore]
+ public TimeSpan EstimatedDuration
+ {
+ get { return _estimatedDuration; }
+ set { _estimatedDuration = value; }
+ }
+
+ private double _progress;
+ [NotMapped]
+ [JsonIgnore]
+ public double Progress
+ {
+ get { return _progress; }
+ set { _progress = value; RaisePropertyChangedAuto(); }
+ }
+
+ private bool _started;
+ [NotMapped]
+ [JsonIgnore]
+ public bool Started
+ {
+ get { return _started; }
+ set { _started = value; RaisePropertyChangedAuto(); }
+ }
- [Column("LENGTH")]
+ private bool _completed;
+ [NotMapped]
+ [JsonIgnore]
+ public bool Completed
+ {
+ get { return _completed; }
+ set { _completed = value; RaisePropertyChangedAuto(); }
+ }
- public Double Length
+ [NotMapped]
+ [JsonIgnore]
+ public Brush SegmentBrush
{
- get
+ get
{
- return _length;
+ return GetSegmentBrush();
}
+ }
- set
- {
- if (_length != value)
- {
- _length = value;
+ private bool _isInterSegment;
+ [NotMapped]
+ [JsonIgnore]
+ public bool IsInterSegment
+ {
+ get { return _isInterSegment; }
+ set { _isInterSegment = value; RaisePropertyChangedAuto(); }
+ }
- OnLengthChanged(value);
+ [NotMapped]
+ public bool HasOutOfGamutBrushStop
+ {
+ get { return BrushStops.Any(x => x.IsOutOfGamut); }
+ }
- }
- }
+ [NotMapped]
+ [JsonIgnore]
+ public double LengthWithFactor
+ {
+ get { return Job != null && !IsInterSegment ? (Length + Length * (Job.LengthPercentageFactor / 100)) : Length; }
}
- protected Int32 _segmentindex;
+ internal void RaiseHasOutOfGamutBrushStop()
+ {
+ RaisePropertyChanged(nameof(HasOutOfGamutBrushStop));
+ }
- /// <summary>
- /// Gets or sets the segment segment index.
- /// </summary>
+ public override Segment Clone()
+ {
+ Segment cloned = base.Clone();
- [Column("SEGMENT_INDEX")]
+ cloned.BrushStops = BrushStops.Select(x => x.Clone()).ToSynchronizedObservableCollection();
- public Int32 SegmentIndex
- {
- get
+ foreach (var stop in cloned.BrushStops)
{
- return _segmentindex;
+ stop.SegmentGuid = cloned.Guid;
+ stop.Segment = cloned;
}
- set
- {
- if (_segmentindex != value)
- {
- _segmentindex = value;
+ return cloned;
+ }
- OnSegmentIndexChanged(value);
+ public Segment Clone(Job job)
+ {
+ Segment cloned = base.Clone();
- }
- }
- }
+ cloned.BrushStops = BrushStops.Select(x => x.Clone(cloned)).ToSynchronizedObservableCollection();
- protected SynchronizedObservableCollection<BrushStop> _brushstops;
+ cloned.Job = job;
+ cloned.JobGuid = job.Guid;
- /// <summary>
- /// Gets or sets the segment brush stops.
- /// </summary>
+ return cloned;
+ }
- public virtual SynchronizedObservableCollection<BrushStop> BrushStops
+ public override void DefferedDelete(ObservablesContext context)
{
- get
- {
- return _brushstops;
- }
+ BrushStops.ToList().ForEach(x => x.DefferedDelete(context));
+ BrushStops.Clear();
+ base.DefferedDelete(context);
+ }
- set
+ public LinearGradientBrush GetSegmentBrush()
+ {
+ if (_brush == null || _brush.GradientStops.Count != BrushStops.Count)
{
- if (_brushstops != value)
+ GradientStopCollection stops = new GradientStopCollection();
+
+ foreach (var stop in BrushStops.ToList().OrderBy(x => x.StopIndex).ToList())
{
- _brushstops = value;
+ stops.Add(new GradientStop(stop.Color, stop.OffsetPercent / 100d));
+ }
- OnBrushStopsChanged(value);
+ LinearGradientBrush brush = new LinearGradientBrush();
+ brush.StartPoint = new Point(0, 0);
+ brush.EndPoint = new Point(1, 0);
+ brush.GradientStops = stops;
+
+ _brush = brush;
+ return brush;
+ }
+ else
+ {
+ for (int i = 0; i < BrushStops.Count; i++)
+ {
+ _brush.GradientStops[i].Color = BrushStops[i].Color;
+ _brush.GradientStops[i].Offset = BrushStops[i].OffsetPercent / 100d;
}
+
+ return _brush;
}
}
- protected Job _job;
-
- /// <summary>
- /// Gets or sets the segment job.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual Job Job
+ public System.Drawing.Brush CreateGdiBrush(int width, int height)
{
- get
+ if (BrushStops.Count > 1)
{
- return _job;
- }
+ System.Drawing.Drawing2D.LinearGradientBrush brush = new System.Drawing.Drawing2D.LinearGradientBrush(new System.Drawing.PointF(0, 0), new System.Drawing.Point(width, height), System.Drawing.Color.Black, System.Drawing.Color.Black);
- set
- {
- if (_job != value)
- {
- _job = value;
+ System.Drawing.Drawing2D.ColorBlend blend = new System.Drawing.Drawing2D.ColorBlend();
- OnJobChanged(value);
+ List<System.Drawing.Color> colors = new List<System.Drawing.Color>();
+ List<float> offsets = new List<float>();
+ foreach (var stop in BrushStops.ToList().OrderBy(x => x.OffsetPercent))
+ {
+ colors.Add(stop.Color.ToGdiColor());
+ offsets.Add((float)stop.OffsetPercent / 100f);
}
+
+ blend.Colors = colors.ToArray();
+ blend.Positions = offsets.ToArray();
+
+ brush.InterpolationColors = blend;
+
+ return brush;
+ }
+ else if (BrushStops.Count == 1)
+ {
+ return new System.Drawing.SolidBrush(BrushStops.First().Color.ToGdiColor());
+ }
+ else
+ {
+ return System.Drawing.Brushes.Black;
}
}
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
+ public void RaiseSegmentBrushChanged()
{
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
+ RaisePropertyChanged(nameof(SegmentBrush));
}
- /// <summary>
- /// Called when the Length has changed.
- /// </summary>
- protected virtual void OnLengthChanged(Double length)
+ public void RaiseLengthWithFactorChanged()
{
- LengthChanged?.Invoke(this, length);
- RaisePropertyChanged(nameof(Length));
+ RaisePropertyChanged(nameof(LengthWithFactor));
}
- /// <summary>
- /// Called when the SegmentIndex has changed.
- /// </summary>
- protected virtual void OnSegmentIndexChanged(Int32 segmentindex)
+ public BrushStop AddBrushStop()
+ {
+ BrushStop stop = new BrushStop();
+
+ if (Job.ColorSpace != null)
+ {
+ stop.ColorSpace = Job.ColorSpace;
+ }
+ else
+ {
+ stop.ColorSpaceGuid = Job.ColorSpaceGuid;
+ }
+
+ if (BrushStops.Count > 0)
+ {
+ stop.StopIndex = BrushStops.Max(x => x.StopIndex) + 1;
+ stop.OffsetPercent = 100;
+ }
+ else
+ {
+ stop.StopIndex = 1;
+ }
+
+ stop.Segment = this;
+ stop.Color = Colors.Black;
+
+ BrushStops.Add(stop);
+
+ return stop;
+ }
+
+ public Segment GetNextSegment()
{
- SegmentIndexChanged?.Invoke(this, segmentindex);
- RaisePropertyChanged(nameof(SegmentIndex));
+ return Job.OrderedSegments.FirstOrDefault(x => x.SegmentIndex > SegmentIndex);
}
- /// <summary>
- /// Called when the BrushStops has changed.
- /// </summary>
- protected virtual void OnBrushStopsChanged(SynchronizedObservableCollection<BrushStop> brushstops)
+ public Segment GetPreviousSegment()
{
- BrushStopsChanged?.Invoke(this, brushstops);
- RaisePropertyChanged(nameof(BrushStops));
+ return Job.OrderedSegments.LastOrDefault(x => x.SegmentIndex < SegmentIndex);
}
/// <summary>
- /// Called when the Job has changed.
+ /// Gets the duration estimation for this job.
/// </summary>
- protected virtual void OnJobChanged(Job job)
+ /// <param name="processParameters">The process parameters.</param>
+ /// <returns></returns>
+ public TimeSpan GetEstimatedDuration(ProcessParametersTable processParameters)
{
- JobChanged?.Invoke(this, job);
- RaisePropertyChanged(nameof(Job));
+ if (processParameters.DyeingSpeed == 0)
+ {
+ throw new ArgumentException("Process parameters dying speed cannot be zero.");
+ }
+ return TimeSpan.FromSeconds(Length / (processParameters.DyeingSpeed / 100d));
}
/// <summary>
@@ -244,8 +327,6 @@ namespace Tango.BL.Entities
public Segment() : base()
{
- BrushStops = new SynchronizedObservableCollection<BrushStop>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/SegmentBase.cs b/Software/Visual_Studio/Tango.BL/Entities/SegmentBase.cs
new file mode 100644
index 000000000..d6d16a580
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/SegmentBase.cs
@@ -0,0 +1,251 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("SEGMENTS")]
+ public abstract class SegmentBase : ObservableEntity<Segment>
+ {
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<Double> LengthChanged;
+
+ public event EventHandler<Int32> SegmentIndexChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<BrushStop>> BrushStopsChanged;
+
+ public event EventHandler<Job> JobChanged;
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the segmentbase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _jobguid;
+
+ /// <summary>
+ /// Gets or sets the segmentbase job guid.
+ /// </summary>
+
+ [Column("JOB_GUID")]
+ [ForeignKey("Job")]
+
+ public String JobGuid
+ {
+ get
+ {
+ return _jobguid;
+ }
+
+ set
+ {
+ if (_jobguid != value)
+ {
+ _jobguid = value;
+ }
+ }
+ }
+
+ protected Double _length;
+
+ /// <summary>
+ /// Gets or sets the segmentbase length.
+ /// </summary>
+
+ [Column("LENGTH")]
+
+ public Double Length
+ {
+ get
+ {
+ return _length;
+ }
+
+ set
+ {
+ if (_length != value)
+ {
+ _length = value;
+
+ OnLengthChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _segmentindex;
+
+ /// <summary>
+ /// Gets or sets the segmentbase segment index.
+ /// </summary>
+
+ [Column("SEGMENT_INDEX")]
+
+ public Int32 SegmentIndex
+ {
+ get
+ {
+ return _segmentindex;
+ }
+
+ set
+ {
+ if (_segmentindex != value)
+ {
+ _segmentindex = value;
+
+ OnSegmentIndexChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<BrushStop> _brushstops;
+
+ /// <summary>
+ /// Gets or sets the segmentbase brush stops.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<BrushStop> BrushStops
+ {
+ get
+ {
+ return _brushstops;
+ }
+
+ set
+ {
+ if (_brushstops != value)
+ {
+ _brushstops = value;
+
+ OnBrushStopsChanged(value);
+
+ }
+ }
+ }
+
+ protected Job _job;
+
+ /// <summary>
+ /// Gets or sets the segmentbase job.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual Job Job
+ {
+ get
+ {
+ return _job;
+ }
+
+ set
+ {
+ if (_job != value)
+ {
+ _job = value;
+
+ OnJobChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Length has changed.
+ /// </summary>
+ protected virtual void OnLengthChanged(Double length)
+ {
+ LengthChanged?.Invoke(this, length);
+ RaisePropertyChanged(nameof(Length));
+ }
+
+ /// <summary>
+ /// Called when the SegmentIndex has changed.
+ /// </summary>
+ protected virtual void OnSegmentIndexChanged(Int32 segmentindex)
+ {
+ SegmentIndexChanged?.Invoke(this, segmentindex);
+ RaisePropertyChanged(nameof(SegmentIndex));
+ }
+
+ /// <summary>
+ /// Called when the BrushStops has changed.
+ /// </summary>
+ protected virtual void OnBrushStopsChanged(SynchronizedObservableCollection<BrushStop> brushstops)
+ {
+ BrushStopsChanged?.Invoke(this, brushstops);
+ RaisePropertyChanged(nameof(BrushStops));
+ }
+
+ /// <summary>
+ /// Called when the Job has changed.
+ /// </summary>
+ protected virtual void OnJobChanged(Job job)
+ {
+ JobChanged?.Invoke(this, job);
+ RaisePropertyChanged(nameof(Job));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="SegmentBase" /> class.
+ /// </summary>
+ public SegmentBase() : base()
+ {
+
+ BrushStops = new SynchronizedObservableCollection<BrushStop>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/Spool.cs b/Software/Visual_Studio/Tango.BL/Entities/Spool.cs
index fa8816ec5..d8557763c 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/Spool.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/Spool.cs
@@ -1,306 +1,28 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
+
namespace Tango.BL.Entities
{
- [Table("SPOOLS")]
- public partial class Spool : ObservableEntity<Spool>
+ public partial class Spool : SpoolBase
{
-
- public event EventHandler<Int32> StartOffsetPulsesChanged;
-
- public event EventHandler<Int32> BackingRateChanged;
-
- public event EventHandler<Int32> SegmentOffsetPulsesChanged;
-
- public event EventHandler<Int32> BottomBackingRateChanged;
-
- public event EventHandler<Machine> MachineChanged;
-
- public event EventHandler<SpoolType> SpoolTypeChanged;
-
- protected String _spooltypeguid;
-
- /// <summary>
- /// Gets or sets the spool spool type guid.
- /// </summary>
-
- [Column("SPOOL_TYPE_GUID")]
- [ForeignKey("SpoolType")]
-
- public String SpoolTypeGuid
- {
- get
- {
- return _spooltypeguid;
- }
-
- set
- {
- if (_spooltypeguid != value)
- {
- _spooltypeguid = value;
- }
- }
- }
-
- protected String _machineguid;
-
- /// <summary>
- /// Gets or sets the spool machine guid.
- /// </summary>
-
- [Column("MACHINE_GUID")]
- [ForeignKey("Machine")]
-
- public String MachineGuid
- {
- get
- {
- return _machineguid;
- }
-
- set
- {
- if (_machineguid != value)
- {
- _machineguid = value;
- }
- }
- }
-
- protected Int32 _startoffsetpulses;
-
- /// <summary>
- /// Gets or sets the spool start offset pulses.
- /// </summary>
-
- [Column("START_OFFSET_PULSES")]
-
- public Int32 StartOffsetPulses
+ public Spool Clone(Machine machine)
{
- get
- {
- return _startoffsetpulses;
- }
-
- set
- {
- if (_startoffsetpulses != value)
- {
- _startoffsetpulses = value;
-
- OnStartOffsetPulsesChanged(value);
-
- }
- }
+ var cloned = base.Clone();
+ cloned.Machine = machine;
+ return cloned;
}
- protected Int32 _backingrate;
-
- /// <summary>
- /// Gets or sets the spool backing rate.
- /// </summary>
-
- [Column("BACKING_RATE")]
-
- public Int32 BackingRate
+ public override List<string> GetIgnoreProperties()
{
- get
+ return base.GetIgnoreProperties().Concat(new List<String>()
{
- return _backingrate;
- }
-
- set
- {
- if (_backingrate != value)
- {
- _backingrate = value;
-
- OnBackingRateChanged(value);
-
- }
- }
- }
-
- protected Int32 _segmentoffsetpulses;
-
- /// <summary>
- /// Gets or sets the spool segment offset pulses.
- /// </summary>
-
- [Column("SEGMENT_OFFSET_PULSES")]
-
- public Int32 SegmentOffsetPulses
- {
- get
- {
- return _segmentoffsetpulses;
- }
-
- set
- {
- if (_segmentoffsetpulses != value)
- {
- _segmentoffsetpulses = value;
-
- OnSegmentOffsetPulsesChanged(value);
-
- }
- }
- }
-
- protected Int32 _bottombackingrate;
-
- /// <summary>
- /// Gets or sets the spool bottom backing rate.
- /// </summary>
-
- [Column("BOTTOM_BACKING_RATE")]
-
- public Int32 BottomBackingRate
- {
- get
- {
- return _bottombackingrate;
- }
-
- set
- {
- if (_bottombackingrate != value)
- {
- _bottombackingrate = value;
-
- OnBottomBackingRateChanged(value);
-
- }
- }
- }
-
- protected Machine _machine;
-
- /// <summary>
- /// Gets or sets the spool machine.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual Machine Machine
- {
- get
- {
- return _machine;
- }
-
- set
- {
- if (_machine != value)
- {
- _machine = value;
-
- OnMachineChanged(value);
-
- }
- }
- }
-
- protected SpoolType _spooltype;
-
- /// <summary>
- /// Gets or sets the spool spool types.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual SpoolType SpoolType
- {
- get
- {
- return _spooltype;
- }
-
- set
- {
- if (_spooltype != value)
- {
- _spooltype = value;
-
- OnSpoolTypeChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the StartOffsetPulses has changed.
- /// </summary>
- protected virtual void OnStartOffsetPulsesChanged(Int32 startoffsetpulses)
- {
- StartOffsetPulsesChanged?.Invoke(this, startoffsetpulses);
- RaisePropertyChanged(nameof(StartOffsetPulses));
- }
-
- /// <summary>
- /// Called when the BackingRate has changed.
- /// </summary>
- protected virtual void OnBackingRateChanged(Int32 backingrate)
- {
- BackingRateChanged?.Invoke(this, backingrate);
- RaisePropertyChanged(nameof(BackingRate));
- }
-
- /// <summary>
- /// Called when the SegmentOffsetPulses has changed.
- /// </summary>
- protected virtual void OnSegmentOffsetPulsesChanged(Int32 segmentoffsetpulses)
- {
- SegmentOffsetPulsesChanged?.Invoke(this, segmentoffsetpulses);
- RaisePropertyChanged(nameof(SegmentOffsetPulses));
- }
-
- /// <summary>
- /// Called when the BottomBackingRate has changed.
- /// </summary>
- protected virtual void OnBottomBackingRateChanged(Int32 bottombackingrate)
- {
- BottomBackingRateChanged?.Invoke(this, bottombackingrate);
- RaisePropertyChanged(nameof(BottomBackingRate));
- }
-
- /// <summary>
- /// Called when the Machine has changed.
- /// </summary>
- protected virtual void OnMachineChanged(Machine machine)
- {
- MachineChanged?.Invoke(this, machine);
- RaisePropertyChanged(nameof(Machine));
- }
-
- /// <summary>
- /// Called when the SpoolType has changed.
- /// </summary>
- protected virtual void OnSpoolTypeChanged(SpoolType spooltype)
- {
- SpoolTypeChanged?.Invoke(this, spooltype);
- RaisePropertyChanged(nameof(SpoolType));
+ nameof(this.Machine),
+ nameof(this.SpoolType),
+ }).ToList();
}
/// <summary>
@@ -308,6 +30,7 @@ namespace Tango.BL.Entities
/// </summary>
public Spool() : base()
{
+
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/SpoolBase.cs b/Software/Visual_Studio/Tango.BL/Entities/SpoolBase.cs
new file mode 100644
index 000000000..1f9eae25f
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/SpoolBase.cs
@@ -0,0 +1,313 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("SPOOLS")]
+ public abstract class SpoolBase : ObservableEntity<Spool>
+ {
+
+ public event EventHandler<Int32> StartOffsetPulsesChanged;
+
+ public event EventHandler<Int32> BackingRateChanged;
+
+ public event EventHandler<Int32> SegmentOffsetPulsesChanged;
+
+ public event EventHandler<Int32> BottomBackingRateChanged;
+
+ public event EventHandler<Machine> MachineChanged;
+
+ public event EventHandler<SpoolType> SpoolTypeChanged;
+
+ protected String _spooltypeguid;
+
+ /// <summary>
+ /// Gets or sets the spoolbase spool type guid.
+ /// </summary>
+
+ [Column("SPOOL_TYPE_GUID")]
+ [ForeignKey("SpoolType")]
+
+ public String SpoolTypeGuid
+ {
+ get
+ {
+ return _spooltypeguid;
+ }
+
+ set
+ {
+ if (_spooltypeguid != value)
+ {
+ _spooltypeguid = value;
+ }
+ }
+ }
+
+ protected String _machineguid;
+
+ /// <summary>
+ /// Gets or sets the spoolbase machine guid.
+ /// </summary>
+
+ [Column("MACHINE_GUID")]
+ [ForeignKey("Machine")]
+
+ public String MachineGuid
+ {
+ get
+ {
+ return _machineguid;
+ }
+
+ set
+ {
+ if (_machineguid != value)
+ {
+ _machineguid = value;
+ }
+ }
+ }
+
+ protected Int32 _startoffsetpulses;
+
+ /// <summary>
+ /// Gets or sets the spoolbase start offset pulses.
+ /// </summary>
+
+ [Column("START_OFFSET_PULSES")]
+
+ public Int32 StartOffsetPulses
+ {
+ get
+ {
+ return _startoffsetpulses;
+ }
+
+ set
+ {
+ if (_startoffsetpulses != value)
+ {
+ _startoffsetpulses = value;
+
+ OnStartOffsetPulsesChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _backingrate;
+
+ /// <summary>
+ /// Gets or sets the spoolbase backing rate.
+ /// </summary>
+
+ [Column("BACKING_RATE")]
+
+ public Int32 BackingRate
+ {
+ get
+ {
+ return _backingrate;
+ }
+
+ set
+ {
+ if (_backingrate != value)
+ {
+ _backingrate = value;
+
+ OnBackingRateChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _segmentoffsetpulses;
+
+ /// <summary>
+ /// Gets or sets the spoolbase segment offset pulses.
+ /// </summary>
+
+ [Column("SEGMENT_OFFSET_PULSES")]
+
+ public Int32 SegmentOffsetPulses
+ {
+ get
+ {
+ return _segmentoffsetpulses;
+ }
+
+ set
+ {
+ if (_segmentoffsetpulses != value)
+ {
+ _segmentoffsetpulses = value;
+
+ OnSegmentOffsetPulsesChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _bottombackingrate;
+
+ /// <summary>
+ /// Gets or sets the spoolbase bottom backing rate.
+ /// </summary>
+
+ [Column("BOTTOM_BACKING_RATE")]
+
+ public Int32 BottomBackingRate
+ {
+ get
+ {
+ return _bottombackingrate;
+ }
+
+ set
+ {
+ if (_bottombackingrate != value)
+ {
+ _bottombackingrate = value;
+
+ OnBottomBackingRateChanged(value);
+
+ }
+ }
+ }
+
+ protected Machine _machine;
+
+ /// <summary>
+ /// Gets or sets the spoolbase machine.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual Machine Machine
+ {
+ get
+ {
+ return _machine;
+ }
+
+ set
+ {
+ if (_machine != value)
+ {
+ _machine = value;
+
+ OnMachineChanged(value);
+
+ }
+ }
+ }
+
+ protected SpoolType _spooltype;
+
+ /// <summary>
+ /// Gets or sets the spoolbase spool types.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual SpoolType SpoolType
+ {
+ get
+ {
+ return _spooltype;
+ }
+
+ set
+ {
+ if (_spooltype != value)
+ {
+ _spooltype = value;
+
+ OnSpoolTypeChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the StartOffsetPulses has changed.
+ /// </summary>
+ protected virtual void OnStartOffsetPulsesChanged(Int32 startoffsetpulses)
+ {
+ StartOffsetPulsesChanged?.Invoke(this, startoffsetpulses);
+ RaisePropertyChanged(nameof(StartOffsetPulses));
+ }
+
+ /// <summary>
+ /// Called when the BackingRate has changed.
+ /// </summary>
+ protected virtual void OnBackingRateChanged(Int32 backingrate)
+ {
+ BackingRateChanged?.Invoke(this, backingrate);
+ RaisePropertyChanged(nameof(BackingRate));
+ }
+
+ /// <summary>
+ /// Called when the SegmentOffsetPulses has changed.
+ /// </summary>
+ protected virtual void OnSegmentOffsetPulsesChanged(Int32 segmentoffsetpulses)
+ {
+ SegmentOffsetPulsesChanged?.Invoke(this, segmentoffsetpulses);
+ RaisePropertyChanged(nameof(SegmentOffsetPulses));
+ }
+
+ /// <summary>
+ /// Called when the BottomBackingRate has changed.
+ /// </summary>
+ protected virtual void OnBottomBackingRateChanged(Int32 bottombackingrate)
+ {
+ BottomBackingRateChanged?.Invoke(this, bottombackingrate);
+ RaisePropertyChanged(nameof(BottomBackingRate));
+ }
+
+ /// <summary>
+ /// Called when the Machine has changed.
+ /// </summary>
+ protected virtual void OnMachineChanged(Machine machine)
+ {
+ MachineChanged?.Invoke(this, machine);
+ RaisePropertyChanged(nameof(Machine));
+ }
+
+ /// <summary>
+ /// Called when the SpoolType has changed.
+ /// </summary>
+ protected virtual void OnSpoolTypeChanged(SpoolType spooltype)
+ {
+ SpoolTypeChanged?.Invoke(this, spooltype);
+ RaisePropertyChanged(nameof(SpoolType));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="SpoolBase" /> class.
+ /// </summary>
+ public SpoolBase() : base()
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/SpoolType.cs b/Software/Visual_Studio/Tango.BL/Entities/SpoolType.cs
index a469220c5..75f9c785e 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/SpoolType.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/SpoolType.cs
@@ -1,378 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("SPOOL_TYPES")]
- public partial class SpoolType : ObservableEntity<SpoolType>
+ public partial class SpoolType : SpoolTypeBase
{
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<Double> LengthChanged;
-
- public event EventHandler<Double> WeightChanged;
-
- public event EventHandler<Double> DiameterChanged;
-
- public event EventHandler<Double> RotationsPerPassageChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Job>> JobsChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Machine>> MachinesChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Spool>> SpoolsChanged;
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the spooltype code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the spooltype name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected Double _length;
-
- /// <summary>
- /// Gets or sets the spooltype length.
- /// </summary>
-
- [Column("LENGTH")]
-
- public Double Length
- {
- get
- {
- return _length;
- }
-
- set
- {
- if (_length != value)
- {
- _length = value;
-
- OnLengthChanged(value);
-
- }
- }
- }
-
- protected Double _weight;
-
- /// <summary>
- /// Gets or sets the spooltype weight.
- /// </summary>
-
- [Column("WEIGHT")]
-
- public Double Weight
- {
- get
- {
- return _weight;
- }
-
- set
- {
- if (_weight != value)
- {
- _weight = value;
-
- OnWeightChanged(value);
-
- }
- }
- }
-
- protected Double _diameter;
-
- /// <summary>
- /// Gets or sets the spooltype diameter.
- /// </summary>
-
- [Column("DIAMETER")]
-
- public Double Diameter
- {
- get
- {
- return _diameter;
- }
-
- set
- {
- if (_diameter != value)
- {
- _diameter = value;
-
- OnDiameterChanged(value);
-
- }
- }
- }
-
- protected Double _rotationsperpassage;
-
- /// <summary>
- /// Gets or sets the spooltype rotations per passage.
- /// </summary>
-
- [Column("ROTATIONS_PER_PASSAGE")]
-
- public Double RotationsPerPassage
- {
- get
- {
- return _rotationsperpassage;
- }
-
- set
- {
- if (_rotationsperpassage != value)
- {
- _rotationsperpassage = value;
-
- OnRotationsPerPassageChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<Job> _jobs;
-
- /// <summary>
- /// Gets or sets the spooltype jobs.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Job> Jobs
- {
- get
- {
- return _jobs;
- }
-
- set
- {
- if (_jobs != value)
- {
- _jobs = value;
-
- OnJobsChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<Machine> _machines;
-
- /// <summary>
- /// Gets or sets the spooltype machines.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Machine> Machines
- {
- get
- {
- return _machines;
- }
-
- set
- {
- if (_machines != value)
- {
- _machines = value;
-
- OnMachinesChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<Spool> _spools;
-
- /// <summary>
- /// Gets or sets the spooltype spools.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Spool> Spools
- {
- get
- {
- return _spools;
- }
-
- set
- {
- if (_spools != value)
- {
- _spools = value;
-
- OnSpoolsChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Length has changed.
- /// </summary>
- protected virtual void OnLengthChanged(Double length)
- {
- LengthChanged?.Invoke(this, length);
- RaisePropertyChanged(nameof(Length));
- }
-
- /// <summary>
- /// Called when the Weight has changed.
- /// </summary>
- protected virtual void OnWeightChanged(Double weight)
- {
- WeightChanged?.Invoke(this, weight);
- RaisePropertyChanged(nameof(Weight));
- }
-
- /// <summary>
- /// Called when the Diameter has changed.
- /// </summary>
- protected virtual void OnDiameterChanged(Double diameter)
- {
- DiameterChanged?.Invoke(this, diameter);
- RaisePropertyChanged(nameof(Diameter));
- }
-
- /// <summary>
- /// Called when the RotationsPerPassage has changed.
- /// </summary>
- protected virtual void OnRotationsPerPassageChanged(Double rotationsperpassage)
- {
- RotationsPerPassageChanged?.Invoke(this, rotationsperpassage);
- RaisePropertyChanged(nameof(RotationsPerPassage));
- }
-
- /// <summary>
- /// Called when the Jobs has changed.
- /// </summary>
- protected virtual void OnJobsChanged(SynchronizedObservableCollection<Job> jobs)
- {
- JobsChanged?.Invoke(this, jobs);
- RaisePropertyChanged(nameof(Jobs));
- }
-
- /// <summary>
- /// Called when the Machines has changed.
- /// </summary>
- protected virtual void OnMachinesChanged(SynchronizedObservableCollection<Machine> machines)
- {
- MachinesChanged?.Invoke(this, machines);
- RaisePropertyChanged(nameof(Machines));
- }
-
- /// <summary>
- /// Called when the Spools has changed.
- /// </summary>
- protected virtual void OnSpoolsChanged(SynchronizedObservableCollection<Spool> spools)
- {
- SpoolsChanged?.Invoke(this, spools);
- RaisePropertyChanged(nameof(Spools));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="SpoolType" /> class.
/// </summary>
public SpoolType() : base()
{
- Jobs = new SynchronizedObservableCollection<Job>();
-
- Machines = new SynchronizedObservableCollection<Machine>();
-
- Spools = new SynchronizedObservableCollection<Spool>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/SpoolTypeBase.cs b/Software/Visual_Studio/Tango.BL/Entities/SpoolTypeBase.cs
new file mode 100644
index 000000000..c2115daf4
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/SpoolTypeBase.cs
@@ -0,0 +1,378 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("SPOOL_TYPES")]
+ public abstract class SpoolTypeBase : ObservableEntity<SpoolType>
+ {
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<Double> LengthChanged;
+
+ public event EventHandler<Double> WeightChanged;
+
+ public event EventHandler<Double> DiameterChanged;
+
+ public event EventHandler<Double> RotationsPerPassageChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Job>> JobsChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Machine>> MachinesChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Spool>> SpoolsChanged;
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the spooltypebase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the spooltypebase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _length;
+
+ /// <summary>
+ /// Gets or sets the spooltypebase length.
+ /// </summary>
+
+ [Column("LENGTH")]
+
+ public Double Length
+ {
+ get
+ {
+ return _length;
+ }
+
+ set
+ {
+ if (_length != value)
+ {
+ _length = value;
+
+ OnLengthChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _weight;
+
+ /// <summary>
+ /// Gets or sets the spooltypebase weight.
+ /// </summary>
+
+ [Column("WEIGHT")]
+
+ public Double Weight
+ {
+ get
+ {
+ return _weight;
+ }
+
+ set
+ {
+ if (_weight != value)
+ {
+ _weight = value;
+
+ OnWeightChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _diameter;
+
+ /// <summary>
+ /// Gets or sets the spooltypebase diameter.
+ /// </summary>
+
+ [Column("DIAMETER")]
+
+ public Double Diameter
+ {
+ get
+ {
+ return _diameter;
+ }
+
+ set
+ {
+ if (_diameter != value)
+ {
+ _diameter = value;
+
+ OnDiameterChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _rotationsperpassage;
+
+ /// <summary>
+ /// Gets or sets the spooltypebase rotations per passage.
+ /// </summary>
+
+ [Column("ROTATIONS_PER_PASSAGE")]
+
+ public Double RotationsPerPassage
+ {
+ get
+ {
+ return _rotationsperpassage;
+ }
+
+ set
+ {
+ if (_rotationsperpassage != value)
+ {
+ _rotationsperpassage = value;
+
+ OnRotationsPerPassageChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Job> _jobs;
+
+ /// <summary>
+ /// Gets or sets the spooltypebase jobs.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Job> Jobs
+ {
+ get
+ {
+ return _jobs;
+ }
+
+ set
+ {
+ if (_jobs != value)
+ {
+ _jobs = value;
+
+ OnJobsChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Machine> _machines;
+
+ /// <summary>
+ /// Gets or sets the spooltypebase machines.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Machine> Machines
+ {
+ get
+ {
+ return _machines;
+ }
+
+ set
+ {
+ if (_machines != value)
+ {
+ _machines = value;
+
+ OnMachinesChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Spool> _spools;
+
+ /// <summary>
+ /// Gets or sets the spooltypebase spools.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Spool> Spools
+ {
+ get
+ {
+ return _spools;
+ }
+
+ set
+ {
+ if (_spools != value)
+ {
+ _spools = value;
+
+ OnSpoolsChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Length has changed.
+ /// </summary>
+ protected virtual void OnLengthChanged(Double length)
+ {
+ LengthChanged?.Invoke(this, length);
+ RaisePropertyChanged(nameof(Length));
+ }
+
+ /// <summary>
+ /// Called when the Weight has changed.
+ /// </summary>
+ protected virtual void OnWeightChanged(Double weight)
+ {
+ WeightChanged?.Invoke(this, weight);
+ RaisePropertyChanged(nameof(Weight));
+ }
+
+ /// <summary>
+ /// Called when the Diameter has changed.
+ /// </summary>
+ protected virtual void OnDiameterChanged(Double diameter)
+ {
+ DiameterChanged?.Invoke(this, diameter);
+ RaisePropertyChanged(nameof(Diameter));
+ }
+
+ /// <summary>
+ /// Called when the RotationsPerPassage has changed.
+ /// </summary>
+ protected virtual void OnRotationsPerPassageChanged(Double rotationsperpassage)
+ {
+ RotationsPerPassageChanged?.Invoke(this, rotationsperpassage);
+ RaisePropertyChanged(nameof(RotationsPerPassage));
+ }
+
+ /// <summary>
+ /// Called when the Jobs has changed.
+ /// </summary>
+ protected virtual void OnJobsChanged(SynchronizedObservableCollection<Job> jobs)
+ {
+ JobsChanged?.Invoke(this, jobs);
+ RaisePropertyChanged(nameof(Jobs));
+ }
+
+ /// <summary>
+ /// Called when the Machines has changed.
+ /// </summary>
+ protected virtual void OnMachinesChanged(SynchronizedObservableCollection<Machine> machines)
+ {
+ MachinesChanged?.Invoke(this, machines);
+ RaisePropertyChanged(nameof(Machines));
+ }
+
+ /// <summary>
+ /// Called when the Spools has changed.
+ /// </summary>
+ protected virtual void OnSpoolsChanged(SynchronizedObservableCollection<Spool> spools)
+ {
+ SpoolsChanged?.Invoke(this, spools);
+ RaisePropertyChanged(nameof(Spools));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="SpoolTypeBase" /> class.
+ /// </summary>
+ public SpoolTypeBase() : base()
+ {
+
+ Jobs = new SynchronizedObservableCollection<Job>();
+
+ Machines = new SynchronizedObservableCollection<Machine>();
+
+ Spools = new SynchronizedObservableCollection<Spool>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/SyncConfiguration.cs b/Software/Visual_Studio/Tango.BL/Entities/SyncConfiguration.cs
index cf29cf1df..2ac666cd2 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/SyncConfiguration.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/SyncConfiguration.cs
@@ -1,35 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("SYNC_CONFIGURATIONS")]
- public partial class SyncConfiguration : ObservableEntity<SyncConfiguration>
+ public partial class SyncConfiguration : SyncConfigurationBase
{
-
/// <summary>
/// Initializes a new instance of the <see cref="SyncConfiguration" /> class.
/// </summary>
public SyncConfiguration() : base()
{
+
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/SyncConfigurationBase.cs b/Software/Visual_Studio/Tango.BL/Entities/SyncConfigurationBase.cs
new file mode 100644
index 000000000..b71c0bc2f
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/SyncConfigurationBase.cs
@@ -0,0 +1,35 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("SYNC_CONFIGURATIONS")]
+ public abstract class SyncConfigurationBase : ObservableEntity<SyncConfiguration>
+ {
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="SyncConfigurationBase" /> class.
+ /// </summary>
+ public SyncConfigurationBase() : base()
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/Sysdiagram.cs b/Software/Visual_Studio/Tango.BL/Entities/Sysdiagram.cs
index 4ff0afb6d..65a298823 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/Sysdiagram.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/Sysdiagram.cs
@@ -1,112 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("sysdiagrams")]
- public partial class Sysdiagram : ObservableEntity<Sysdiagram>
+ public partial class Sysdiagram : SysdiagramBase
{
-
- public event EventHandler<SynchronizedObservableCollection<Int32>> VersionChanged;
-
- public event EventHandler<Byte[]> DefinitionChanged;
-
- protected SynchronizedObservableCollection<Int32> _version;
-
- /// <summary>
- /// Gets or sets the sysdiagram version.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Int32> Version
- {
- get
- {
- return _version;
- }
-
- set
- {
- if (_version != value)
- {
- _version = value;
-
- OnVersionChanged(value);
-
- }
- }
- }
-
- protected Byte[] _definition;
-
- /// <summary>
- /// Gets or sets the sysdiagram definition.
- /// </summary>
-
- [Column("definition")]
-
- public Byte[] Definition
- {
- get
- {
- return _definition;
- }
-
- set
- {
- if (_definition != value)
- {
- _definition = value;
-
- OnDefinitionChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Version has changed.
- /// </summary>
- protected virtual void OnVersionChanged(SynchronizedObservableCollection<Int32> version)
- {
- VersionChanged?.Invoke(this, version);
- RaisePropertyChanged(nameof(Version));
- }
-
- /// <summary>
- /// Called when the Definition has changed.
- /// </summary>
- protected virtual void OnDefinitionChanged(Byte[] definition)
- {
- DefinitionChanged?.Invoke(this, definition);
- RaisePropertyChanged(nameof(Definition));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="Sysdiagram" /> class.
/// </summary>
public Sysdiagram() : base()
{
- Version = new SynchronizedObservableCollection<Int32>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/SysdiagramBase.cs b/Software/Visual_Studio/Tango.BL/Entities/SysdiagramBase.cs
new file mode 100644
index 000000000..db323c29a
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/SysdiagramBase.cs
@@ -0,0 +1,112 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("sysdiagrams")]
+ public abstract class SysdiagramBase : ObservableEntity<Sysdiagram>
+ {
+
+ public event EventHandler<SynchronizedObservableCollection<Int32>> VersionChanged;
+
+ public event EventHandler<Byte[]> DefinitionChanged;
+
+ protected SynchronizedObservableCollection<Int32> _version;
+
+ /// <summary>
+ /// Gets or sets the sysdiagrambase version.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Int32> Version
+ {
+ get
+ {
+ return _version;
+ }
+
+ set
+ {
+ if (_version != value)
+ {
+ _version = value;
+
+ OnVersionChanged(value);
+
+ }
+ }
+ }
+
+ protected Byte[] _definition;
+
+ /// <summary>
+ /// Gets or sets the sysdiagrambase definition.
+ /// </summary>
+
+ [Column("definition")]
+
+ public Byte[] Definition
+ {
+ get
+ {
+ return _definition;
+ }
+
+ set
+ {
+ if (_definition != value)
+ {
+ _definition = value;
+
+ OnDefinitionChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Version has changed.
+ /// </summary>
+ protected virtual void OnVersionChanged(SynchronizedObservableCollection<Int32> version)
+ {
+ VersionChanged?.Invoke(this, version);
+ RaisePropertyChanged(nameof(Version));
+ }
+
+ /// <summary>
+ /// Called when the Definition has changed.
+ /// </summary>
+ protected virtual void OnDefinitionChanged(Byte[] definition)
+ {
+ DefinitionChanged?.Invoke(this, definition);
+ RaisePropertyChanged(nameof(Definition));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="SysdiagramBase" /> class.
+ /// </summary>
+ public SysdiagramBase() : base()
+ {
+
+ Version = new SynchronizedObservableCollection<Int32>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/TangoVersion.cs b/Software/Visual_Studio/Tango.BL/Entities/TangoVersion.cs
index d89d5fa59..d8c0625a5 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/TangoVersion.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/TangoVersion.cs
@@ -1,275 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("TANGO_VERSIONS")]
- public partial class TangoVersion : ObservableEntity<TangoVersion>
+ public partial class TangoVersion : TangoVersionBase
{
-
- public event EventHandler<String> VersionChanged;
-
- public event EventHandler<String> BlobNameChanged;
-
- public event EventHandler<String> CommentsChanged;
-
- public event EventHandler<MachineVersion> MachineVersionChanged;
-
- public event EventHandler<User> UserChanged;
-
- protected String _version;
-
- /// <summary>
- /// Gets or sets the tangoversion version.
- /// </summary>
-
- [Column("VERSION")]
-
- public String Version
- {
- get
- {
- return _version;
- }
-
- set
- {
- if (_version != value)
- {
- _version = value;
-
- OnVersionChanged(value);
-
- }
- }
- }
-
- protected String _blobname;
-
- /// <summary>
- /// Gets or sets the tangoversion blob name.
- /// </summary>
-
- [Column("BLOB_NAME")]
-
- public String BlobName
- {
- get
- {
- return _blobname;
- }
-
- set
- {
- if (_blobname != value)
- {
- _blobname = value;
-
- OnBlobNameChanged(value);
-
- }
- }
- }
-
- protected String _comments;
-
- /// <summary>
- /// Gets or sets the tangoversion comments.
- /// </summary>
-
- [Column("COMMENTS")]
-
- public String Comments
- {
- get
- {
- return _comments;
- }
-
- set
- {
- if (_comments != value)
- {
- _comments = value;
-
- OnCommentsChanged(value);
-
- }
- }
- }
-
- protected String _userguid;
-
- /// <summary>
- /// Gets or sets the tangoversion user guid.
- /// </summary>
-
- [Column("USER_GUID")]
- [ForeignKey("User")]
-
- public String UserGuid
- {
- get
- {
- return _userguid;
- }
-
- set
- {
- if (_userguid != value)
- {
- _userguid = value;
- }
- }
- }
-
- protected String _machineversionguid;
-
- /// <summary>
- /// Gets or sets the tangoversion machine version guid.
- /// </summary>
-
- [Column("MACHINE_VERSION_GUID")]
- [ForeignKey("MachineVersion")]
-
- public String MachineVersionGuid
- {
- get
- {
- return _machineversionguid;
- }
-
- set
- {
- if (_machineversionguid != value)
- {
- _machineversionguid = value;
- }
- }
- }
-
- protected MachineVersion _machineversion;
-
- /// <summary>
- /// Gets or sets the tangoversion machine versions.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual MachineVersion MachineVersion
- {
- get
- {
- return _machineversion;
- }
-
- set
- {
- if (_machineversion != value)
- {
- _machineversion = value;
-
- OnMachineVersionChanged(value);
-
- }
- }
- }
-
- protected User _user;
-
- /// <summary>
- /// Gets or sets the tangoversion user.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual User User
- {
- get
- {
- return _user;
- }
-
- set
- {
- if (_user != value)
- {
- _user = value;
-
- OnUserChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Version has changed.
- /// </summary>
- protected virtual void OnVersionChanged(String version)
- {
- VersionChanged?.Invoke(this, version);
- RaisePropertyChanged(nameof(Version));
- }
-
- /// <summary>
- /// Called when the BlobName has changed.
- /// </summary>
- protected virtual void OnBlobNameChanged(String blobname)
- {
- BlobNameChanged?.Invoke(this, blobname);
- RaisePropertyChanged(nameof(BlobName));
- }
-
- /// <summary>
- /// Called when the Comments has changed.
- /// </summary>
- protected virtual void OnCommentsChanged(String comments)
- {
- CommentsChanged?.Invoke(this, comments);
- RaisePropertyChanged(nameof(Comments));
- }
-
- /// <summary>
- /// Called when the MachineVersion has changed.
- /// </summary>
- protected virtual void OnMachineVersionChanged(MachineVersion machineversion)
- {
- MachineVersionChanged?.Invoke(this, machineversion);
- RaisePropertyChanged(nameof(MachineVersion));
- }
-
- /// <summary>
- /// Called when the User has changed.
- /// </summary>
- protected virtual void OnUserChanged(User user)
- {
- UserChanged?.Invoke(this, user);
- RaisePropertyChanged(nameof(User));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="TangoVersion" /> class.
/// </summary>
public TangoVersion() : base()
{
+
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/TangoVersionBase.cs b/Software/Visual_Studio/Tango.BL/Entities/TangoVersionBase.cs
new file mode 100644
index 000000000..bbb4d6c44
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/TangoVersionBase.cs
@@ -0,0 +1,275 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("TANGO_VERSIONS")]
+ public abstract class TangoVersionBase : ObservableEntity<TangoVersion>
+ {
+
+ public event EventHandler<String> VersionChanged;
+
+ public event EventHandler<String> BlobNameChanged;
+
+ public event EventHandler<String> CommentsChanged;
+
+ public event EventHandler<MachineVersion> MachineVersionChanged;
+
+ public event EventHandler<User> UserChanged;
+
+ protected String _version;
+
+ /// <summary>
+ /// Gets or sets the tangoversionbase version.
+ /// </summary>
+
+ [Column("VERSION")]
+
+ public String Version
+ {
+ get
+ {
+ return _version;
+ }
+
+ set
+ {
+ if (_version != value)
+ {
+ _version = value;
+
+ OnVersionChanged(value);
+
+ }
+ }
+ }
+
+ protected String _blobname;
+
+ /// <summary>
+ /// Gets or sets the tangoversionbase blob name.
+ /// </summary>
+
+ [Column("BLOB_NAME")]
+
+ public String BlobName
+ {
+ get
+ {
+ return _blobname;
+ }
+
+ set
+ {
+ if (_blobname != value)
+ {
+ _blobname = value;
+
+ OnBlobNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _comments;
+
+ /// <summary>
+ /// Gets or sets the tangoversionbase comments.
+ /// </summary>
+
+ [Column("COMMENTS")]
+
+ public String Comments
+ {
+ get
+ {
+ return _comments;
+ }
+
+ set
+ {
+ if (_comments != value)
+ {
+ _comments = value;
+
+ OnCommentsChanged(value);
+
+ }
+ }
+ }
+
+ protected String _userguid;
+
+ /// <summary>
+ /// Gets or sets the tangoversionbase user guid.
+ /// </summary>
+
+ [Column("USER_GUID")]
+ [ForeignKey("User")]
+
+ public String UserGuid
+ {
+ get
+ {
+ return _userguid;
+ }
+
+ set
+ {
+ if (_userguid != value)
+ {
+ _userguid = value;
+ }
+ }
+ }
+
+ protected String _machineversionguid;
+
+ /// <summary>
+ /// Gets or sets the tangoversionbase machine version guid.
+ /// </summary>
+
+ [Column("MACHINE_VERSION_GUID")]
+ [ForeignKey("MachineVersion")]
+
+ public String MachineVersionGuid
+ {
+ get
+ {
+ return _machineversionguid;
+ }
+
+ set
+ {
+ if (_machineversionguid != value)
+ {
+ _machineversionguid = value;
+ }
+ }
+ }
+
+ protected MachineVersion _machineversion;
+
+ /// <summary>
+ /// Gets or sets the tangoversionbase machine versions.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual MachineVersion MachineVersion
+ {
+ get
+ {
+ return _machineversion;
+ }
+
+ set
+ {
+ if (_machineversion != value)
+ {
+ _machineversion = value;
+
+ OnMachineVersionChanged(value);
+
+ }
+ }
+ }
+
+ protected User _user;
+
+ /// <summary>
+ /// Gets or sets the tangoversionbase user.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual User User
+ {
+ get
+ {
+ return _user;
+ }
+
+ set
+ {
+ if (_user != value)
+ {
+ _user = value;
+
+ OnUserChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Version has changed.
+ /// </summary>
+ protected virtual void OnVersionChanged(String version)
+ {
+ VersionChanged?.Invoke(this, version);
+ RaisePropertyChanged(nameof(Version));
+ }
+
+ /// <summary>
+ /// Called when the BlobName has changed.
+ /// </summary>
+ protected virtual void OnBlobNameChanged(String blobname)
+ {
+ BlobNameChanged?.Invoke(this, blobname);
+ RaisePropertyChanged(nameof(BlobName));
+ }
+
+ /// <summary>
+ /// Called when the Comments has changed.
+ /// </summary>
+ protected virtual void OnCommentsChanged(String comments)
+ {
+ CommentsChanged?.Invoke(this, comments);
+ RaisePropertyChanged(nameof(Comments));
+ }
+
+ /// <summary>
+ /// Called when the MachineVersion has changed.
+ /// </summary>
+ protected virtual void OnMachineVersionChanged(MachineVersion machineversion)
+ {
+ MachineVersionChanged?.Invoke(this, machineversion);
+ RaisePropertyChanged(nameof(MachineVersion));
+ }
+
+ /// <summary>
+ /// Called when the User has changed.
+ /// </summary>
+ protected virtual void OnUserChanged(User user)
+ {
+ UserChanged?.Invoke(this, user);
+ RaisePropertyChanged(nameof(User));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="TangoVersionBase" /> class.
+ /// </summary>
+ public TangoVersionBase() : base()
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/TechController.cs b/Software/Visual_Studio/Tango.BL/Entities/TechController.cs
index b87cdadca..9b9f84bcc 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/TechController.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/TechController.cs
@@ -1,263 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("TECH_CONTROLLERS")]
- public partial class TechController : ObservableEntity<TechController>
+ public partial class TechController : TechControllerBase
{
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<String> DescriptionChanged;
-
- public event EventHandler<Double> MinChanged;
-
- public event EventHandler<Double> MaxChanged;
-
- public event EventHandler<String> UnitsChanged;
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the techcontroller code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the techcontroller name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected String _description;
-
- /// <summary>
- /// Gets or sets the techcontroller description.
- /// </summary>
-
- [Column("DESCRIPTION")]
-
- public String Description
- {
- get
- {
- return _description;
- }
-
- set
- {
- if (_description != value)
- {
- _description = value;
-
- OnDescriptionChanged(value);
-
- }
- }
- }
-
- protected Double _min;
-
- /// <summary>
- /// Gets or sets the techcontroller min.
- /// </summary>
-
- [Column("MIN")]
-
- public Double Min
- {
- get
- {
- return _min;
- }
-
- set
- {
- if (_min != value)
- {
- _min = value;
-
- OnMinChanged(value);
-
- }
- }
- }
-
- protected Double _max;
-
- /// <summary>
- /// Gets or sets the techcontroller max.
- /// </summary>
-
- [Column("MAX")]
-
- public Double Max
- {
- get
- {
- return _max;
- }
-
- set
- {
- if (_max != value)
- {
- _max = value;
-
- OnMaxChanged(value);
-
- }
- }
- }
-
- protected String _units;
-
- /// <summary>
- /// Gets or sets the techcontroller units.
- /// </summary>
-
- [Column("UNITS")]
-
- public String Units
- {
- get
- {
- return _units;
- }
-
- set
- {
- if (_units != value)
- {
- _units = value;
-
- OnUnitsChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Description has changed.
- /// </summary>
- protected virtual void OnDescriptionChanged(String description)
- {
- DescriptionChanged?.Invoke(this, description);
- RaisePropertyChanged(nameof(Description));
- }
-
- /// <summary>
- /// Called when the Min has changed.
- /// </summary>
- protected virtual void OnMinChanged(Double min)
- {
- MinChanged?.Invoke(this, min);
- RaisePropertyChanged(nameof(Min));
- }
-
- /// <summary>
- /// Called when the Max has changed.
- /// </summary>
- protected virtual void OnMaxChanged(Double max)
- {
- MaxChanged?.Invoke(this, max);
- RaisePropertyChanged(nameof(Max));
- }
-
- /// <summary>
- /// Called when the Units has changed.
- /// </summary>
- protected virtual void OnUnitsChanged(String units)
- {
- UnitsChanged?.Invoke(this, units);
- RaisePropertyChanged(nameof(Units));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="TechController" /> class.
/// </summary>
public TechController() : base()
{
+
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/TechControllerBase.cs b/Software/Visual_Studio/Tango.BL/Entities/TechControllerBase.cs
new file mode 100644
index 000000000..75941dfe2
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/TechControllerBase.cs
@@ -0,0 +1,263 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("TECH_CONTROLLERS")]
+ public abstract class TechControllerBase : ObservableEntity<TechController>
+ {
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<String> DescriptionChanged;
+
+ public event EventHandler<Double> MinChanged;
+
+ public event EventHandler<Double> MaxChanged;
+
+ public event EventHandler<String> UnitsChanged;
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the techcontrollerbase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the techcontrollerbase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _description;
+
+ /// <summary>
+ /// Gets or sets the techcontrollerbase description.
+ /// </summary>
+
+ [Column("DESCRIPTION")]
+
+ public String Description
+ {
+ get
+ {
+ return _description;
+ }
+
+ set
+ {
+ if (_description != value)
+ {
+ _description = value;
+
+ OnDescriptionChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _min;
+
+ /// <summary>
+ /// Gets or sets the techcontrollerbase min.
+ /// </summary>
+
+ [Column("MIN")]
+
+ public Double Min
+ {
+ get
+ {
+ return _min;
+ }
+
+ set
+ {
+ if (_min != value)
+ {
+ _min = value;
+
+ OnMinChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _max;
+
+ /// <summary>
+ /// Gets or sets the techcontrollerbase max.
+ /// </summary>
+
+ [Column("MAX")]
+
+ public Double Max
+ {
+ get
+ {
+ return _max;
+ }
+
+ set
+ {
+ if (_max != value)
+ {
+ _max = value;
+
+ OnMaxChanged(value);
+
+ }
+ }
+ }
+
+ protected String _units;
+
+ /// <summary>
+ /// Gets or sets the techcontrollerbase units.
+ /// </summary>
+
+ [Column("UNITS")]
+
+ public String Units
+ {
+ get
+ {
+ return _units;
+ }
+
+ set
+ {
+ if (_units != value)
+ {
+ _units = value;
+
+ OnUnitsChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Description has changed.
+ /// </summary>
+ protected virtual void OnDescriptionChanged(String description)
+ {
+ DescriptionChanged?.Invoke(this, description);
+ RaisePropertyChanged(nameof(Description));
+ }
+
+ /// <summary>
+ /// Called when the Min has changed.
+ /// </summary>
+ protected virtual void OnMinChanged(Double min)
+ {
+ MinChanged?.Invoke(this, min);
+ RaisePropertyChanged(nameof(Min));
+ }
+
+ /// <summary>
+ /// Called when the Max has changed.
+ /// </summary>
+ protected virtual void OnMaxChanged(Double max)
+ {
+ MaxChanged?.Invoke(this, max);
+ RaisePropertyChanged(nameof(Max));
+ }
+
+ /// <summary>
+ /// Called when the Units has changed.
+ /// </summary>
+ protected virtual void OnUnitsChanged(String units)
+ {
+ UnitsChanged?.Invoke(this, units);
+ RaisePropertyChanged(nameof(Units));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="TechControllerBase" /> class.
+ /// </summary>
+ public TechControllerBase() : base()
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/TechDispenser.cs b/Software/Visual_Studio/Tango.BL/Entities/TechDispenser.cs
index f83f2dc65..365895c1b 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/TechDispenser.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/TechDispenser.cs
@@ -1,149 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("TECH_DISPENSERS")]
- public partial class TechDispenser : ObservableEntity<TechDispenser>
+ public partial class TechDispenser : TechDispenserBase
{
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<String> DescriptionChanged;
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the techdispenser code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the techdispenser name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected String _description;
-
- /// <summary>
- /// Gets or sets the techdispenser description.
- /// </summary>
-
- [Column("DESCRIPTION")]
-
- public String Description
- {
- get
- {
- return _description;
- }
-
- set
- {
- if (_description != value)
- {
- _description = value;
-
- OnDescriptionChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Description has changed.
- /// </summary>
- protected virtual void OnDescriptionChanged(String description)
- {
- DescriptionChanged?.Invoke(this, description);
- RaisePropertyChanged(nameof(Description));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="TechDispenser" /> class.
/// </summary>
public TechDispenser() : base()
{
+
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/TechDispenserBase.cs b/Software/Visual_Studio/Tango.BL/Entities/TechDispenserBase.cs
new file mode 100644
index 000000000..a050c8202
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/TechDispenserBase.cs
@@ -0,0 +1,149 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("TECH_DISPENSERS")]
+ public abstract class TechDispenserBase : ObservableEntity<TechDispenser>
+ {
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<String> DescriptionChanged;
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the techdispenserbase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the techdispenserbase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _description;
+
+ /// <summary>
+ /// Gets or sets the techdispenserbase description.
+ /// </summary>
+
+ [Column("DESCRIPTION")]
+
+ public String Description
+ {
+ get
+ {
+ return _description;
+ }
+
+ set
+ {
+ if (_description != value)
+ {
+ _description = value;
+
+ OnDescriptionChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Description has changed.
+ /// </summary>
+ protected virtual void OnDescriptionChanged(String description)
+ {
+ DescriptionChanged?.Invoke(this, description);
+ RaisePropertyChanged(nameof(Description));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="TechDispenserBase" /> class.
+ /// </summary>
+ public TechDispenserBase() : base()
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/TechHeater.cs b/Software/Visual_Studio/Tango.BL/Entities/TechHeater.cs
index 2912868de..afdcb3d56 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/TechHeater.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/TechHeater.cs
@@ -1,149 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("TECH_HEATERS")]
- public partial class TechHeater : ObservableEntity<TechHeater>
+ public partial class TechHeater : TechHeaterBase
{
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<String> DescriptionChanged;
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the techheater code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the techheater name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected String _description;
-
- /// <summary>
- /// Gets or sets the techheater description.
- /// </summary>
-
- [Column("DESCRIPTION")]
-
- public String Description
- {
- get
- {
- return _description;
- }
-
- set
- {
- if (_description != value)
- {
- _description = value;
-
- OnDescriptionChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Description has changed.
- /// </summary>
- protected virtual void OnDescriptionChanged(String description)
- {
- DescriptionChanged?.Invoke(this, description);
- RaisePropertyChanged(nameof(Description));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="TechHeater" /> class.
/// </summary>
public TechHeater() : base()
{
+
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/TechHeaterBase.cs b/Software/Visual_Studio/Tango.BL/Entities/TechHeaterBase.cs
new file mode 100644
index 000000000..3323017a3
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/TechHeaterBase.cs
@@ -0,0 +1,149 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("TECH_HEATERS")]
+ public abstract class TechHeaterBase : ObservableEntity<TechHeater>
+ {
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<String> DescriptionChanged;
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the techheaterbase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the techheaterbase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _description;
+
+ /// <summary>
+ /// Gets or sets the techheaterbase description.
+ /// </summary>
+
+ [Column("DESCRIPTION")]
+
+ public String Description
+ {
+ get
+ {
+ return _description;
+ }
+
+ set
+ {
+ if (_description != value)
+ {
+ _description = value;
+
+ OnDescriptionChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Description has changed.
+ /// </summary>
+ protected virtual void OnDescriptionChanged(String description)
+ {
+ DescriptionChanged?.Invoke(this, description);
+ RaisePropertyChanged(nameof(Description));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="TechHeaterBase" /> class.
+ /// </summary>
+ public TechHeaterBase() : base()
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/TechIo.cs b/Software/Visual_Studio/Tango.BL/Entities/TechIo.cs
index bca52d5f0..fb22505b0 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/TechIo.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/TechIo.cs
@@ -1,453 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("TECH_IOS")]
- public partial class TechIo : ObservableEntity<TechIo>
+ public partial class TechIo : TechIoBase
{
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<Int32> TypeChanged;
-
- public event EventHandler<String> DesignatorChanged;
-
- public event EventHandler<String> AsmChanged;
-
- public event EventHandler<String> InterfaceNameChanged;
-
- public event EventHandler<String> SensorChanged;
-
- public event EventHandler<Double> InitValueChanged;
-
- public event EventHandler<Int32> AveragingChanged;
-
- public event EventHandler<Double> MinChanged;
-
- public event EventHandler<Double> MaxChanged;
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the techio code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the techio name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected Int32 _type;
-
- /// <summary>
- /// Gets or sets the techio type.
- /// </summary>
-
- [Column("TYPE")]
-
- public Int32 Type
- {
- get
- {
- return _type;
- }
-
- set
- {
- if (_type != value)
- {
- _type = value;
-
- OnTypeChanged(value);
-
- }
- }
- }
-
- protected String _designator;
-
- /// <summary>
- /// Gets or sets the techio designator.
- /// </summary>
-
- [Column("DESIGNATOR")]
-
- public String Designator
- {
- get
- {
- return _designator;
- }
-
- set
- {
- if (_designator != value)
- {
- _designator = value;
-
- OnDesignatorChanged(value);
-
- }
- }
- }
-
- protected String _asm;
-
- /// <summary>
- /// Gets or sets the techio asm.
- /// </summary>
-
- [Column("ASM")]
-
- public String Asm
- {
- get
- {
- return _asm;
- }
-
- set
- {
- if (_asm != value)
- {
- _asm = value;
-
- OnAsmChanged(value);
-
- }
- }
- }
-
- protected String _interfacename;
-
- /// <summary>
- /// Gets or sets the techio interface name.
- /// </summary>
-
- [Column("INTERFACE_NAME")]
-
- public String InterfaceName
- {
- get
- {
- return _interfacename;
- }
-
- set
- {
- if (_interfacename != value)
- {
- _interfacename = value;
-
- OnInterfaceNameChanged(value);
-
- }
- }
- }
-
- protected String _sensor;
-
- /// <summary>
- /// Gets or sets the techio sensor.
- /// </summary>
-
- [Column("SENSOR")]
-
- public String Sensor
- {
- get
- {
- return _sensor;
- }
-
- set
- {
- if (_sensor != value)
- {
- _sensor = value;
-
- OnSensorChanged(value);
-
- }
- }
- }
-
- protected Double _initvalue;
-
- /// <summary>
- /// Gets or sets the techio init value.
- /// </summary>
-
- [Column("INIT_VALUE")]
-
- public Double InitValue
- {
- get
- {
- return _initvalue;
- }
-
- set
- {
- if (_initvalue != value)
- {
- _initvalue = value;
-
- OnInitValueChanged(value);
-
- }
- }
- }
-
- protected Int32 _averaging;
-
- /// <summary>
- /// Gets or sets the techio averaging.
- /// </summary>
-
- [Column("AVERAGING")]
-
- public Int32 Averaging
- {
- get
- {
- return _averaging;
- }
-
- set
- {
- if (_averaging != value)
- {
- _averaging = value;
-
- OnAveragingChanged(value);
-
- }
- }
- }
-
- protected Double _min;
-
- /// <summary>
- /// Gets or sets the techio min.
- /// </summary>
-
- [Column("MIN")]
-
- public Double Min
- {
- get
- {
- return _min;
- }
-
- set
- {
- if (_min != value)
- {
- _min = value;
-
- OnMinChanged(value);
-
- }
- }
- }
-
- protected Double _max;
-
- /// <summary>
- /// Gets or sets the techio max.
- /// </summary>
-
- [Column("MAX")]
-
- public Double Max
- {
- get
- {
- return _max;
- }
-
- set
- {
- if (_max != value)
- {
- _max = value;
-
- OnMaxChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Type has changed.
- /// </summary>
- protected virtual void OnTypeChanged(Int32 type)
- {
- TypeChanged?.Invoke(this, type);
- RaisePropertyChanged(nameof(Type));
- }
-
- /// <summary>
- /// Called when the Designator has changed.
- /// </summary>
- protected virtual void OnDesignatorChanged(String designator)
- {
- DesignatorChanged?.Invoke(this, designator);
- RaisePropertyChanged(nameof(Designator));
- }
-
- /// <summary>
- /// Called when the Asm has changed.
- /// </summary>
- protected virtual void OnAsmChanged(String asm)
- {
- AsmChanged?.Invoke(this, asm);
- RaisePropertyChanged(nameof(Asm));
- }
-
- /// <summary>
- /// Called when the InterfaceName has changed.
- /// </summary>
- protected virtual void OnInterfaceNameChanged(String interfacename)
- {
- InterfaceNameChanged?.Invoke(this, interfacename);
- RaisePropertyChanged(nameof(InterfaceName));
- }
-
- /// <summary>
- /// Called when the Sensor has changed.
- /// </summary>
- protected virtual void OnSensorChanged(String sensor)
- {
- SensorChanged?.Invoke(this, sensor);
- RaisePropertyChanged(nameof(Sensor));
- }
-
- /// <summary>
- /// Called when the InitValue has changed.
- /// </summary>
- protected virtual void OnInitValueChanged(Double initvalue)
- {
- InitValueChanged?.Invoke(this, initvalue);
- RaisePropertyChanged(nameof(InitValue));
- }
-
- /// <summary>
- /// Called when the Averaging has changed.
- /// </summary>
- protected virtual void OnAveragingChanged(Int32 averaging)
- {
- AveragingChanged?.Invoke(this, averaging);
- RaisePropertyChanged(nameof(Averaging));
- }
-
- /// <summary>
- /// Called when the Min has changed.
- /// </summary>
- protected virtual void OnMinChanged(Double min)
- {
- MinChanged?.Invoke(this, min);
- RaisePropertyChanged(nameof(Min));
- }
-
- /// <summary>
- /// Called when the Max has changed.
- /// </summary>
- protected virtual void OnMaxChanged(Double max)
- {
- MaxChanged?.Invoke(this, max);
- RaisePropertyChanged(nameof(Max));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="TechIo" /> class.
/// </summary>
public TechIo() : base()
{
+
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/TechIoBase.cs b/Software/Visual_Studio/Tango.BL/Entities/TechIoBase.cs
new file mode 100644
index 000000000..72d50b713
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/TechIoBase.cs
@@ -0,0 +1,453 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("TECH_IOS")]
+ public abstract class TechIoBase : ObservableEntity<TechIo>
+ {
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<Int32> TypeChanged;
+
+ public event EventHandler<String> DesignatorChanged;
+
+ public event EventHandler<String> AsmChanged;
+
+ public event EventHandler<String> InterfaceNameChanged;
+
+ public event EventHandler<String> SensorChanged;
+
+ public event EventHandler<Double> InitValueChanged;
+
+ public event EventHandler<Int32> AveragingChanged;
+
+ public event EventHandler<Double> MinChanged;
+
+ public event EventHandler<Double> MaxChanged;
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the techiobase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the techiobase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _type;
+
+ /// <summary>
+ /// Gets or sets the techiobase type.
+ /// </summary>
+
+ [Column("TYPE")]
+
+ public Int32 Type
+ {
+ get
+ {
+ return _type;
+ }
+
+ set
+ {
+ if (_type != value)
+ {
+ _type = value;
+
+ OnTypeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _designator;
+
+ /// <summary>
+ /// Gets or sets the techiobase designator.
+ /// </summary>
+
+ [Column("DESIGNATOR")]
+
+ public String Designator
+ {
+ get
+ {
+ return _designator;
+ }
+
+ set
+ {
+ if (_designator != value)
+ {
+ _designator = value;
+
+ OnDesignatorChanged(value);
+
+ }
+ }
+ }
+
+ protected String _asm;
+
+ /// <summary>
+ /// Gets or sets the techiobase asm.
+ /// </summary>
+
+ [Column("ASM")]
+
+ public String Asm
+ {
+ get
+ {
+ return _asm;
+ }
+
+ set
+ {
+ if (_asm != value)
+ {
+ _asm = value;
+
+ OnAsmChanged(value);
+
+ }
+ }
+ }
+
+ protected String _interfacename;
+
+ /// <summary>
+ /// Gets or sets the techiobase interface name.
+ /// </summary>
+
+ [Column("INTERFACE_NAME")]
+
+ public String InterfaceName
+ {
+ get
+ {
+ return _interfacename;
+ }
+
+ set
+ {
+ if (_interfacename != value)
+ {
+ _interfacename = value;
+
+ OnInterfaceNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _sensor;
+
+ /// <summary>
+ /// Gets or sets the techiobase sensor.
+ /// </summary>
+
+ [Column("SENSOR")]
+
+ public String Sensor
+ {
+ get
+ {
+ return _sensor;
+ }
+
+ set
+ {
+ if (_sensor != value)
+ {
+ _sensor = value;
+
+ OnSensorChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _initvalue;
+
+ /// <summary>
+ /// Gets or sets the techiobase init value.
+ /// </summary>
+
+ [Column("INIT_VALUE")]
+
+ public Double InitValue
+ {
+ get
+ {
+ return _initvalue;
+ }
+
+ set
+ {
+ if (_initvalue != value)
+ {
+ _initvalue = value;
+
+ OnInitValueChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _averaging;
+
+ /// <summary>
+ /// Gets or sets the techiobase averaging.
+ /// </summary>
+
+ [Column("AVERAGING")]
+
+ public Int32 Averaging
+ {
+ get
+ {
+ return _averaging;
+ }
+
+ set
+ {
+ if (_averaging != value)
+ {
+ _averaging = value;
+
+ OnAveragingChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _min;
+
+ /// <summary>
+ /// Gets or sets the techiobase min.
+ /// </summary>
+
+ [Column("MIN")]
+
+ public Double Min
+ {
+ get
+ {
+ return _min;
+ }
+
+ set
+ {
+ if (_min != value)
+ {
+ _min = value;
+
+ OnMinChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _max;
+
+ /// <summary>
+ /// Gets or sets the techiobase max.
+ /// </summary>
+
+ [Column("MAX")]
+
+ public Double Max
+ {
+ get
+ {
+ return _max;
+ }
+
+ set
+ {
+ if (_max != value)
+ {
+ _max = value;
+
+ OnMaxChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Type has changed.
+ /// </summary>
+ protected virtual void OnTypeChanged(Int32 type)
+ {
+ TypeChanged?.Invoke(this, type);
+ RaisePropertyChanged(nameof(Type));
+ }
+
+ /// <summary>
+ /// Called when the Designator has changed.
+ /// </summary>
+ protected virtual void OnDesignatorChanged(String designator)
+ {
+ DesignatorChanged?.Invoke(this, designator);
+ RaisePropertyChanged(nameof(Designator));
+ }
+
+ /// <summary>
+ /// Called when the Asm has changed.
+ /// </summary>
+ protected virtual void OnAsmChanged(String asm)
+ {
+ AsmChanged?.Invoke(this, asm);
+ RaisePropertyChanged(nameof(Asm));
+ }
+
+ /// <summary>
+ /// Called when the InterfaceName has changed.
+ /// </summary>
+ protected virtual void OnInterfaceNameChanged(String interfacename)
+ {
+ InterfaceNameChanged?.Invoke(this, interfacename);
+ RaisePropertyChanged(nameof(InterfaceName));
+ }
+
+ /// <summary>
+ /// Called when the Sensor has changed.
+ /// </summary>
+ protected virtual void OnSensorChanged(String sensor)
+ {
+ SensorChanged?.Invoke(this, sensor);
+ RaisePropertyChanged(nameof(Sensor));
+ }
+
+ /// <summary>
+ /// Called when the InitValue has changed.
+ /// </summary>
+ protected virtual void OnInitValueChanged(Double initvalue)
+ {
+ InitValueChanged?.Invoke(this, initvalue);
+ RaisePropertyChanged(nameof(InitValue));
+ }
+
+ /// <summary>
+ /// Called when the Averaging has changed.
+ /// </summary>
+ protected virtual void OnAveragingChanged(Int32 averaging)
+ {
+ AveragingChanged?.Invoke(this, averaging);
+ RaisePropertyChanged(nameof(Averaging));
+ }
+
+ /// <summary>
+ /// Called when the Min has changed.
+ /// </summary>
+ protected virtual void OnMinChanged(Double min)
+ {
+ MinChanged?.Invoke(this, min);
+ RaisePropertyChanged(nameof(Min));
+ }
+
+ /// <summary>
+ /// Called when the Max has changed.
+ /// </summary>
+ protected virtual void OnMaxChanged(Double max)
+ {
+ MaxChanged?.Invoke(this, max);
+ RaisePropertyChanged(nameof(Max));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="TechIoBase" /> class.
+ /// </summary>
+ public TechIoBase() : base()
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/TechMonitor.cs b/Software/Visual_Studio/Tango.BL/Entities/TechMonitor.cs
index 4a36e4360..1eb8f04d4 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/TechMonitor.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/TechMonitor.cs
@@ -1,377 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("TECH_MONITORS")]
- public partial class TechMonitor : ObservableEntity<TechMonitor>
+ public partial class TechMonitor : TechMonitorBase
{
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<String> DescriptionChanged;
-
- public event EventHandler<Double> MinChanged;
-
- public event EventHandler<Double> MaxChanged;
-
- public event EventHandler<String> UnitsChanged;
-
- public event EventHandler<Int32> PointsPerFrameChanged;
-
- public event EventHandler<Boolean> MultiChannelChanged;
-
- public event EventHandler<Int32> ChannelCountChanged;
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the techmonitor code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the techmonitor name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected String _description;
-
- /// <summary>
- /// Gets or sets the techmonitor description.
- /// </summary>
-
- [Column("DESCRIPTION")]
-
- public String Description
- {
- get
- {
- return _description;
- }
-
- set
- {
- if (_description != value)
- {
- _description = value;
-
- OnDescriptionChanged(value);
-
- }
- }
- }
-
- protected Double _min;
-
- /// <summary>
- /// Gets or sets the techmonitor min.
- /// </summary>
-
- [Column("MIN")]
-
- public Double Min
- {
- get
- {
- return _min;
- }
-
- set
- {
- if (_min != value)
- {
- _min = value;
-
- OnMinChanged(value);
-
- }
- }
- }
-
- protected Double _max;
-
- /// <summary>
- /// Gets or sets the techmonitor max.
- /// </summary>
-
- [Column("MAX")]
-
- public Double Max
- {
- get
- {
- return _max;
- }
-
- set
- {
- if (_max != value)
- {
- _max = value;
-
- OnMaxChanged(value);
-
- }
- }
- }
-
- protected String _units;
-
- /// <summary>
- /// Gets or sets the techmonitor units.
- /// </summary>
-
- [Column("UNITS")]
-
- public String Units
- {
- get
- {
- return _units;
- }
-
- set
- {
- if (_units != value)
- {
- _units = value;
-
- OnUnitsChanged(value);
-
- }
- }
- }
-
- protected Int32 _pointsperframe;
-
- /// <summary>
- /// Gets or sets the techmonitor points per frame.
- /// </summary>
-
- [Column("POINTS_PER_FRAME")]
-
- public Int32 PointsPerFrame
- {
- get
- {
- return _pointsperframe;
- }
-
- set
- {
- if (_pointsperframe != value)
- {
- _pointsperframe = value;
-
- OnPointsPerFrameChanged(value);
-
- }
- }
- }
-
- protected Boolean _multichannel;
-
- /// <summary>
- /// Gets or sets the techmonitor multi channel.
- /// </summary>
-
- [Column("MULTI_CHANNEL")]
-
- public Boolean MultiChannel
- {
- get
- {
- return _multichannel;
- }
-
- set
- {
- if (_multichannel != value)
- {
- _multichannel = value;
-
- OnMultiChannelChanged(value);
-
- }
- }
- }
-
- protected Int32 _channelcount;
-
- /// <summary>
- /// Gets or sets the techmonitor channel count.
- /// </summary>
-
- [Column("CHANNEL_COUNT")]
-
- public Int32 ChannelCount
- {
- get
- {
- return _channelcount;
- }
-
- set
- {
- if (_channelcount != value)
- {
- _channelcount = value;
-
- OnChannelCountChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Description has changed.
- /// </summary>
- protected virtual void OnDescriptionChanged(String description)
- {
- DescriptionChanged?.Invoke(this, description);
- RaisePropertyChanged(nameof(Description));
- }
-
- /// <summary>
- /// Called when the Min has changed.
- /// </summary>
- protected virtual void OnMinChanged(Double min)
- {
- MinChanged?.Invoke(this, min);
- RaisePropertyChanged(nameof(Min));
- }
-
- /// <summary>
- /// Called when the Max has changed.
- /// </summary>
- protected virtual void OnMaxChanged(Double max)
- {
- MaxChanged?.Invoke(this, max);
- RaisePropertyChanged(nameof(Max));
- }
-
- /// <summary>
- /// Called when the Units has changed.
- /// </summary>
- protected virtual void OnUnitsChanged(String units)
- {
- UnitsChanged?.Invoke(this, units);
- RaisePropertyChanged(nameof(Units));
- }
-
- /// <summary>
- /// Called when the PointsPerFrame has changed.
- /// </summary>
- protected virtual void OnPointsPerFrameChanged(Int32 pointsperframe)
- {
- PointsPerFrameChanged?.Invoke(this, pointsperframe);
- RaisePropertyChanged(nameof(PointsPerFrame));
- }
-
- /// <summary>
- /// Called when the MultiChannel has changed.
- /// </summary>
- protected virtual void OnMultiChannelChanged(Boolean multichannel)
- {
- MultiChannelChanged?.Invoke(this, multichannel);
- RaisePropertyChanged(nameof(MultiChannel));
- }
-
- /// <summary>
- /// Called when the ChannelCount has changed.
- /// </summary>
- protected virtual void OnChannelCountChanged(Int32 channelcount)
- {
- ChannelCountChanged?.Invoke(this, channelcount);
- RaisePropertyChanged(nameof(ChannelCount));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="TechMonitor" /> class.
/// </summary>
public TechMonitor() : base()
{
+
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/TechMonitorBase.cs b/Software/Visual_Studio/Tango.BL/Entities/TechMonitorBase.cs
new file mode 100644
index 000000000..7c153aa5f
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/TechMonitorBase.cs
@@ -0,0 +1,377 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("TECH_MONITORS")]
+ public abstract class TechMonitorBase : ObservableEntity<TechMonitor>
+ {
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<String> DescriptionChanged;
+
+ public event EventHandler<Double> MinChanged;
+
+ public event EventHandler<Double> MaxChanged;
+
+ public event EventHandler<String> UnitsChanged;
+
+ public event EventHandler<Int32> PointsPerFrameChanged;
+
+ public event EventHandler<Boolean> MultiChannelChanged;
+
+ public event EventHandler<Int32> ChannelCountChanged;
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the techmonitorbase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the techmonitorbase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _description;
+
+ /// <summary>
+ /// Gets or sets the techmonitorbase description.
+ /// </summary>
+
+ [Column("DESCRIPTION")]
+
+ public String Description
+ {
+ get
+ {
+ return _description;
+ }
+
+ set
+ {
+ if (_description != value)
+ {
+ _description = value;
+
+ OnDescriptionChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _min;
+
+ /// <summary>
+ /// Gets or sets the techmonitorbase min.
+ /// </summary>
+
+ [Column("MIN")]
+
+ public Double Min
+ {
+ get
+ {
+ return _min;
+ }
+
+ set
+ {
+ if (_min != value)
+ {
+ _min = value;
+
+ OnMinChanged(value);
+
+ }
+ }
+ }
+
+ protected Double _max;
+
+ /// <summary>
+ /// Gets or sets the techmonitorbase max.
+ /// </summary>
+
+ [Column("MAX")]
+
+ public Double Max
+ {
+ get
+ {
+ return _max;
+ }
+
+ set
+ {
+ if (_max != value)
+ {
+ _max = value;
+
+ OnMaxChanged(value);
+
+ }
+ }
+ }
+
+ protected String _units;
+
+ /// <summary>
+ /// Gets or sets the techmonitorbase units.
+ /// </summary>
+
+ [Column("UNITS")]
+
+ public String Units
+ {
+ get
+ {
+ return _units;
+ }
+
+ set
+ {
+ if (_units != value)
+ {
+ _units = value;
+
+ OnUnitsChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _pointsperframe;
+
+ /// <summary>
+ /// Gets or sets the techmonitorbase points per frame.
+ /// </summary>
+
+ [Column("POINTS_PER_FRAME")]
+
+ public Int32 PointsPerFrame
+ {
+ get
+ {
+ return _pointsperframe;
+ }
+
+ set
+ {
+ if (_pointsperframe != value)
+ {
+ _pointsperframe = value;
+
+ OnPointsPerFrameChanged(value);
+
+ }
+ }
+ }
+
+ protected Boolean _multichannel;
+
+ /// <summary>
+ /// Gets or sets the techmonitorbase multi channel.
+ /// </summary>
+
+ [Column("MULTI_CHANNEL")]
+
+ public Boolean MultiChannel
+ {
+ get
+ {
+ return _multichannel;
+ }
+
+ set
+ {
+ if (_multichannel != value)
+ {
+ _multichannel = value;
+
+ OnMultiChannelChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _channelcount;
+
+ /// <summary>
+ /// Gets or sets the techmonitorbase channel count.
+ /// </summary>
+
+ [Column("CHANNEL_COUNT")]
+
+ public Int32 ChannelCount
+ {
+ get
+ {
+ return _channelcount;
+ }
+
+ set
+ {
+ if (_channelcount != value)
+ {
+ _channelcount = value;
+
+ OnChannelCountChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Description has changed.
+ /// </summary>
+ protected virtual void OnDescriptionChanged(String description)
+ {
+ DescriptionChanged?.Invoke(this, description);
+ RaisePropertyChanged(nameof(Description));
+ }
+
+ /// <summary>
+ /// Called when the Min has changed.
+ /// </summary>
+ protected virtual void OnMinChanged(Double min)
+ {
+ MinChanged?.Invoke(this, min);
+ RaisePropertyChanged(nameof(Min));
+ }
+
+ /// <summary>
+ /// Called when the Max has changed.
+ /// </summary>
+ protected virtual void OnMaxChanged(Double max)
+ {
+ MaxChanged?.Invoke(this, max);
+ RaisePropertyChanged(nameof(Max));
+ }
+
+ /// <summary>
+ /// Called when the Units has changed.
+ /// </summary>
+ protected virtual void OnUnitsChanged(String units)
+ {
+ UnitsChanged?.Invoke(this, units);
+ RaisePropertyChanged(nameof(Units));
+ }
+
+ /// <summary>
+ /// Called when the PointsPerFrame has changed.
+ /// </summary>
+ protected virtual void OnPointsPerFrameChanged(Int32 pointsperframe)
+ {
+ PointsPerFrameChanged?.Invoke(this, pointsperframe);
+ RaisePropertyChanged(nameof(PointsPerFrame));
+ }
+
+ /// <summary>
+ /// Called when the MultiChannel has changed.
+ /// </summary>
+ protected virtual void OnMultiChannelChanged(Boolean multichannel)
+ {
+ MultiChannelChanged?.Invoke(this, multichannel);
+ RaisePropertyChanged(nameof(MultiChannel));
+ }
+
+ /// <summary>
+ /// Called when the ChannelCount has changed.
+ /// </summary>
+ protected virtual void OnChannelCountChanged(Int32 channelcount)
+ {
+ ChannelCountChanged?.Invoke(this, channelcount);
+ RaisePropertyChanged(nameof(ChannelCount));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="TechMonitorBase" /> class.
+ /// </summary>
+ public TechMonitorBase() : base()
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/TechValve.cs b/Software/Visual_Studio/Tango.BL/Entities/TechValve.cs
index a357853d7..96b53c06b 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/TechValve.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/TechValve.cs
@@ -1,269 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
-
- /// <summary>
- ///
- /// </summary>
-
- [Table("TECH_VALVES")]
- public partial class TechValve : ObservableEntity<TechValve>
+ public partial class TechValve : TechValveBase
{
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<String> DescriptionChanged;
-
- public event EventHandler<Int32> TypeChanged;
-
- public event EventHandler<String> State1Changed;
-
- public event EventHandler<String> State2Changed;
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the techvalve code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the techvalve name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected String _description;
-
- /// <summary>
- /// Gets or sets the techvalve description.
- /// </summary>
-
- [Column("DESCRIPTION")]
-
- public String Description
- {
- get
- {
- return _description;
- }
-
- set
- {
- if (_description != value)
- {
- _description = value;
-
- OnDescriptionChanged(value);
-
- }
- }
- }
-
- protected Int32 _type;
-
- /// <summary>
- /// 0 = 2-Way
- /// 1 = 3-Way
- /// </summary>
-
- [Column("TYPE")]
-
- public Int32 Type
- {
- get
- {
- return _type;
- }
-
- set
- {
- if (_type != value)
- {
- _type = value;
-
- OnTypeChanged(value);
-
- }
- }
- }
-
- protected String _state1;
-
- /// <summary>
- /// Gets or sets the techvalve state1.
- /// </summary>
-
- [Column("STATE1")]
-
- public String State1
- {
- get
- {
- return _state1;
- }
-
- set
- {
- if (_state1 != value)
- {
- _state1 = value;
-
- OnState1Changed(value);
-
- }
- }
- }
-
- protected String _state2;
-
- /// <summary>
- /// Gets or sets the techvalve state2.
- /// </summary>
-
- [Column("STATE2")]
-
- public String State2
- {
- get
- {
- return _state2;
- }
-
- set
- {
- if (_state2 != value)
- {
- _state2 = value;
-
- OnState2Changed(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Description has changed.
- /// </summary>
- protected virtual void OnDescriptionChanged(String description)
- {
- DescriptionChanged?.Invoke(this, description);
- RaisePropertyChanged(nameof(Description));
- }
-
- /// <summary>
- /// Called when the Type has changed.
- /// </summary>
- protected virtual void OnTypeChanged(Int32 type)
- {
- TypeChanged?.Invoke(this, type);
- RaisePropertyChanged(nameof(Type));
- }
-
- /// <summary>
- /// Called when the State1 has changed.
- /// </summary>
- protected virtual void OnState1Changed(String state1)
- {
- State1Changed?.Invoke(this, state1);
- RaisePropertyChanged(nameof(State1));
- }
-
- /// <summary>
- /// Called when the State2 has changed.
- /// </summary>
- protected virtual void OnState2Changed(String state2)
- {
- State2Changed?.Invoke(this, state2);
- RaisePropertyChanged(nameof(State2));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="TechValve" /> class.
/// </summary>
public TechValve() : base()
{
+
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/TechValveBase.cs b/Software/Visual_Studio/Tango.BL/Entities/TechValveBase.cs
new file mode 100644
index 000000000..cf0140a35
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/TechValveBase.cs
@@ -0,0 +1,269 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+
+ /// <summary>
+ ///
+ /// </summary>
+
+ [Table("TECH_VALVES")]
+ public abstract class TechValveBase : ObservableEntity<TechValve>
+ {
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<String> DescriptionChanged;
+
+ public event EventHandler<Int32> TypeChanged;
+
+ public event EventHandler<String> State1Changed;
+
+ public event EventHandler<String> State2Changed;
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the techvalvebase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the techvalvebase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _description;
+
+ /// <summary>
+ /// Gets or sets the techvalvebase description.
+ /// </summary>
+
+ [Column("DESCRIPTION")]
+
+ public String Description
+ {
+ get
+ {
+ return _description;
+ }
+
+ set
+ {
+ if (_description != value)
+ {
+ _description = value;
+
+ OnDescriptionChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _type;
+
+ /// <summary>
+ /// 0 = 2-Way
+ /// 1 = 3-Way
+ /// </summary>
+
+ [Column("TYPE")]
+
+ public Int32 Type
+ {
+ get
+ {
+ return _type;
+ }
+
+ set
+ {
+ if (_type != value)
+ {
+ _type = value;
+
+ OnTypeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _state1;
+
+ /// <summary>
+ /// Gets or sets the techvalvebase state1.
+ /// </summary>
+
+ [Column("STATE1")]
+
+ public String State1
+ {
+ get
+ {
+ return _state1;
+ }
+
+ set
+ {
+ if (_state1 != value)
+ {
+ _state1 = value;
+
+ OnState1Changed(value);
+
+ }
+ }
+ }
+
+ protected String _state2;
+
+ /// <summary>
+ /// Gets or sets the techvalvebase state2.
+ /// </summary>
+
+ [Column("STATE2")]
+
+ public String State2
+ {
+ get
+ {
+ return _state2;
+ }
+
+ set
+ {
+ if (_state2 != value)
+ {
+ _state2 = value;
+
+ OnState2Changed(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Description has changed.
+ /// </summary>
+ protected virtual void OnDescriptionChanged(String description)
+ {
+ DescriptionChanged?.Invoke(this, description);
+ RaisePropertyChanged(nameof(Description));
+ }
+
+ /// <summary>
+ /// Called when the Type has changed.
+ /// </summary>
+ protected virtual void OnTypeChanged(Int32 type)
+ {
+ TypeChanged?.Invoke(this, type);
+ RaisePropertyChanged(nameof(Type));
+ }
+
+ /// <summary>
+ /// Called when the State1 has changed.
+ /// </summary>
+ protected virtual void OnState1Changed(String state1)
+ {
+ State1Changed?.Invoke(this, state1);
+ RaisePropertyChanged(nameof(State1));
+ }
+
+ /// <summary>
+ /// Called when the State2 has changed.
+ /// </summary>
+ protected virtual void OnState2Changed(String state2)
+ {
+ State2Changed?.Invoke(this, state2);
+ RaisePropertyChanged(nameof(State2));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="TechValveBase" /> class.
+ /// </summary>
+ public TechValveBase() : base()
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/User.cs b/Software/Visual_Studio/Tango.BL/Entities/User.cs
index c85dc2bf6..76a283d68 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/User.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/User.cs
@@ -1,549 +1,138 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.BL.Enumerations;
+using SimpleValidator.Extensions;
+using Newtonsoft.Json;
+using System.Xml.Serialization;
+using Tango.Core.Cryptography;
namespace Tango.BL.Entities
{
- [Table("USERS")]
- public partial class User : ObservableEntity<User>
+ public partial class User : UserBase
{
+ private static IHashGenerator _hashGenerator;
- public event EventHandler<Boolean> DeletedChanged;
-
- public event EventHandler<String> EmailChanged;
-
- public event EventHandler<String> PasswordChanged;
-
- public event EventHandler<Nullable<DateTime>> LastLoginChanged;
-
- public event EventHandler<Address> AddressChanged;
-
- public event EventHandler<Contact> ContactChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Job>> JobsChanged;
-
- public event EventHandler<SynchronizedObservableCollection<MachineStudioVersion>> MachineStudioVersionsChanged;
-
- public event EventHandler<SynchronizedObservableCollection<MachinesEvent>> MachinesEventsChanged;
-
- public event EventHandler<Organization> OrganizationChanged;
-
- public event EventHandler<SynchronizedObservableCollection<TangoVersion>> TangoVersionsChanged;
-
- public event EventHandler<SynchronizedObservableCollection<UsersRole>> UsersRolesChanged;
-
- protected Boolean _deleted;
+ private bool _passwordGatewayModified = false;
/// <summary>
- /// Gets or sets the user deleted.
+ /// Determines whether the user has the specified permission.
/// </summary>
-
- [Column("DELETED")]
-
- public Boolean Deleted
+ /// <param name="permission">The permission.</param>
+ /// <returns>
+ /// <c>true</c> if the user has permission; otherwise, <c>false</c>.
+ /// </returns>
+ public bool HasPermission(Permissions permission)
{
- get
- {
- return _deleted;
- }
-
- set
- {
- if (_deleted != value)
- {
- _deleted = value;
-
- OnDeletedChanged(value);
-
- }
- }
+ return UsersRoles.Select(x => x.Role).ToList().SelectMany(x => x.RolesPermissions).ToList().Exists(x => x.Permission.Code == permission.ToInt32());
}
- protected String _email;
-
/// <summary>
- /// Gets or sets the user email.
+ /// Gets the aggregated user roles as enumerations.
/// </summary>
-
- [Column("EMAIL")]
-
- public String Email
+ [NotMapped]
+ public List<Role> Roles
{
- get
- {
- return _email;
- }
-
- set
- {
- if (_email != value)
- {
- _email = value;
-
- OnEmailChanged(value);
-
- }
- }
+ get { return UsersRoles.Select(x => x.Role).ToList(); }
}
- protected String _password;
-
/// <summary>
- /// Gets or sets the user password.
+ /// Gets the aggregated user permissions as enumerations.
/// </summary>
-
- [Column("PASSWORD")]
-
- public String Password
+ [NotMapped]
+ public List<Permission> Permissions
{
- get
+ get
{
- return _password;
- }
-
- set
- {
- if (_password != value)
- {
- _password = value;
-
- OnPasswordChanged(value);
-
- }
+ return UsersRoles.Select(x => x.Role).ToList().SelectMany(x => x.RolesPermissions).Select(x => x.Permission).ToList();
}
}
- protected String _organizationguid;
+ private String _passwordGateway;
/// <summary>
- /// Gets or sets the user organization guid.
+ /// Gets or sets the password gate way.
/// </summary>
-
- [Column("ORGANIZATION_GUID")]
- [ForeignKey("Organization")]
-
- public String OrganizationGuid
- {
- get
- {
- return _organizationguid;
- }
-
- set
- {
- if (_organizationguid != value)
- {
- _organizationguid = value;
- }
- }
- }
-
- protected String _contactguid;
-
- /// <summary>
- /// Gets or sets the user contact guid.
- /// </summary>
-
- [Column("CONTACT_GUID")]
- [ForeignKey("Contact")]
-
- public String ContactGuid
- {
- get
- {
- return _contactguid;
- }
-
- set
- {
- if (_contactguid != value)
- {
- _contactguid = value;
- }
- }
- }
-
- protected String _addressguid;
-
- /// <summary>
- /// Gets or sets the user address guid.
- /// </summary>
-
- [Column("ADDRESS_GUID")]
- [ForeignKey("Address")]
-
- public String AddressGuid
- {
- get
- {
- return _addressguid;
- }
-
- set
- {
- if (_addressguid != value)
- {
- _addressguid = value;
- }
- }
- }
-
- protected Nullable<DateTime> _lastlogin;
-
- /// <summary>
- /// Gets or sets the user last login.
- /// </summary>
-
- [Column("LAST_LOGIN")]
-
- public Nullable<DateTime> LastLogin
- {
- get
- {
- return _lastlogin;
- }
-
- set
- {
- if (_lastlogin != value)
- {
- _lastlogin = value;
-
- OnLastLoginChanged(value);
-
- }
- }
- }
-
- protected Address _address;
-
- /// <summary>
- /// Gets or sets the user address.
- /// </summary>
-
- [XmlIgnore]
+ [NotMapped]
[JsonIgnore]
- public virtual Address Address
- {
- get
- {
- return _address;
- }
-
- set
- {
- if (_address != value)
- {
- _address = value;
-
- OnAddressChanged(value);
-
- }
- }
- }
-
- protected Contact _contact;
-
- /// <summary>
- /// Gets or sets the user contact.
- /// </summary>
-
[XmlIgnore]
- [JsonIgnore]
- public virtual Contact Contact
+ public String PasswordGateWay
{
- get
+ get
{
- return _contact;
+ return _passwordGateway;
}
-
- set
+ set
{
- if (_contact != value)
- {
- _contact = value;
+ _passwordGateway = value;
+ Password = GetHashGenerator().Encrypt(_passwordGateway);
+ RaisePropertyChangedAuto();
- OnContactChanged(value);
-
- }
+ _passwordGatewayModified = true;
}
}
- protected SynchronizedObservableCollection<Job> _jobs;
-
- /// <summary>
- /// Gets or sets the user jobs.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Job> Jobs
+ protected override void RaisePropertyChanged(string propName)
{
- get
- {
- return _jobs;
- }
+ base.RaisePropertyChanged(propName);
- set
+ if (propName == nameof(Password))
{
- if (_jobs != value)
- {
- _jobs = value;
-
- OnJobsChanged(value);
-
- }
+ RaisePropertyChanged(nameof(PasswordGateWay));
}
}
- protected SynchronizedObservableCollection<MachineStudioVersion> _machinestudioversions;
-
- /// <summary>
- /// Gets or sets the user machine studio versions.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<MachineStudioVersion> MachineStudioVersions
+ public override bool Validate(ObservablesContext context)
{
- get
- {
- return _machinestudioversions;
- }
-
- set
- {
- if (_machinestudioversions != value)
- {
- _machinestudioversions = value;
-
- OnMachineStudioVersionsChanged(value);
-
- }
- }
+ return base.Validate(context) && Contact.Validate(context) && Address.Validate(context);
}
- protected SynchronizedObservableCollection<MachinesEvent> _machinesevents;
-
- /// <summary>
- /// Gets or sets the user machines events.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<MachinesEvent> MachinesEvents
+ protected override void OnValidating(ObservablesContext context)
{
- get
- {
- return _machinesevents;
- }
-
- set
- {
- if (_machinesevents != value)
- {
- _machinesevents = value;
+ base.OnValidating(context);
- OnMachinesEventsChanged(value);
+ var users = context.Users.ToList();
- }
+ if (users.Exists(x => x.Guid != Guid && x.Email.ToLower() == Email.ToLower()))
+ {
+ InsertError(nameof(Email), "The specified email is already taken by another account.");
}
- }
-
- protected Organization _organization;
- /// <summary>
- /// Gets or sets the user organization.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual Organization Organization
- {
- get
+ if (!Email.IsEmail())
{
- return _organization;
+ InsertError(nameof(Email), "The specified email address is invalid.");
}
- set
+ if (_passwordGatewayModified)
{
- if (_organization != value)
+ if (!PasswordGateWay.IsBetweenLength(4, 30))
{
- _organization = value;
-
- OnOrganizationChanged(value);
-
+ InsertError(nameof(PasswordGateWay), "A user password must be at least 4 characters long and maximum 30.");
}
}
}
- protected SynchronizedObservableCollection<TangoVersion> _tangoversions;
-
/// <summary>
- /// Gets or sets the user tango versions.
+ /// Gets the specified password hash.
/// </summary>
-
- public virtual SynchronizedObservableCollection<TangoVersion> TangoVersions
+ /// <param name="password">The password.</param>
+ /// <returns></returns>
+ public static String GetPasswordHash(String password)
{
- get
- {
- return _tangoversions;
- }
-
- set
- {
- if (_tangoversions != value)
- {
- _tangoversions = value;
-
- OnTangoVersionsChanged(value);
-
- }
- }
+ return GetHashGenerator().Encrypt(password);
}
- protected SynchronizedObservableCollection<UsersRole> _usersroles;
-
- /// <summary>
- /// Gets or sets the user users roles.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<UsersRole> UsersRoles
+ private static IHashGenerator GetHashGenerator()
{
- get
- {
- return _usersroles;
- }
-
- set
+ if (_hashGenerator == null)
{
- if (_usersroles != value)
- {
- _usersroles = value;
-
- OnUsersRolesChanged(value);
-
- }
+ _hashGenerator = new BasicHashGenerator();
}
- }
-
- /// <summary>
- /// Called when the Deleted has changed.
- /// </summary>
- protected virtual void OnDeletedChanged(Boolean deleted)
- {
- DeletedChanged?.Invoke(this, deleted);
- RaisePropertyChanged(nameof(Deleted));
- }
-
- /// <summary>
- /// Called when the Email has changed.
- /// </summary>
- protected virtual void OnEmailChanged(String email)
- {
- EmailChanged?.Invoke(this, email);
- RaisePropertyChanged(nameof(Email));
- }
-
- /// <summary>
- /// Called when the Password has changed.
- /// </summary>
- protected virtual void OnPasswordChanged(String password)
- {
- PasswordChanged?.Invoke(this, password);
- RaisePropertyChanged(nameof(Password));
- }
-
- /// <summary>
- /// Called when the LastLogin has changed.
- /// </summary>
- protected virtual void OnLastLoginChanged(Nullable<DateTime> lastlogin)
- {
- LastLoginChanged?.Invoke(this, lastlogin);
- RaisePropertyChanged(nameof(LastLogin));
- }
-
- /// <summary>
- /// Called when the Address has changed.
- /// </summary>
- protected virtual void OnAddressChanged(Address address)
- {
- AddressChanged?.Invoke(this, address);
- RaisePropertyChanged(nameof(Address));
- }
-
- /// <summary>
- /// Called when the Contact has changed.
- /// </summary>
- protected virtual void OnContactChanged(Contact contact)
- {
- ContactChanged?.Invoke(this, contact);
- RaisePropertyChanged(nameof(Contact));
- }
- /// <summary>
- /// Called when the Jobs has changed.
- /// </summary>
- protected virtual void OnJobsChanged(SynchronizedObservableCollection<Job> jobs)
- {
- JobsChanged?.Invoke(this, jobs);
- RaisePropertyChanged(nameof(Jobs));
- }
-
- /// <summary>
- /// Called when the MachineStudioVersions has changed.
- /// </summary>
- protected virtual void OnMachineStudioVersionsChanged(SynchronizedObservableCollection<MachineStudioVersion> machinestudioversions)
- {
- MachineStudioVersionsChanged?.Invoke(this, machinestudioversions);
- RaisePropertyChanged(nameof(MachineStudioVersions));
- }
-
- /// <summary>
- /// Called when the MachinesEvents has changed.
- /// </summary>
- protected virtual void OnMachinesEventsChanged(SynchronizedObservableCollection<MachinesEvent> machinesevents)
- {
- MachinesEventsChanged?.Invoke(this, machinesevents);
- RaisePropertyChanged(nameof(MachinesEvents));
- }
-
- /// <summary>
- /// Called when the Organization has changed.
- /// </summary>
- protected virtual void OnOrganizationChanged(Organization organization)
- {
- OrganizationChanged?.Invoke(this, organization);
- RaisePropertyChanged(nameof(Organization));
- }
-
- /// <summary>
- /// Called when the TangoVersions has changed.
- /// </summary>
- protected virtual void OnTangoVersionsChanged(SynchronizedObservableCollection<TangoVersion> tangoversions)
- {
- TangoVersionsChanged?.Invoke(this, tangoversions);
- RaisePropertyChanged(nameof(TangoVersions));
- }
-
- /// <summary>
- /// Called when the UsersRoles has changed.
- /// </summary>
- protected virtual void OnUsersRolesChanged(SynchronizedObservableCollection<UsersRole> usersroles)
- {
- UsersRolesChanged?.Invoke(this, usersroles);
- RaisePropertyChanged(nameof(UsersRoles));
+ return _hashGenerator;
}
/// <summary>
@@ -552,16 +141,6 @@ namespace Tango.BL.Entities
public User() : base()
{
- Jobs = new SynchronizedObservableCollection<Job>();
-
- MachineStudioVersions = new SynchronizedObservableCollection<MachineStudioVersion>();
-
- MachinesEvents = new SynchronizedObservableCollection<MachinesEvent>();
-
- TangoVersions = new SynchronizedObservableCollection<TangoVersion>();
-
- UsersRoles = new SynchronizedObservableCollection<UsersRole>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/UserBase.cs b/Software/Visual_Studio/Tango.BL/Entities/UserBase.cs
new file mode 100644
index 000000000..3872dbeee
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/UserBase.cs
@@ -0,0 +1,567 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("USERS")]
+ public abstract class UserBase : ObservableEntity<User>
+ {
+
+ public event EventHandler<Boolean> DeletedChanged;
+
+ public event EventHandler<String> EmailChanged;
+
+ public event EventHandler<String> PasswordChanged;
+
+ public event EventHandler<Nullable<DateTime>> LastLoginChanged;
+
+ public event EventHandler<Address> AddressChanged;
+
+ public event EventHandler<Contact> ContactChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Job>> JobsChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<MachineStudioVersion>> MachineStudioVersionsChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<MachinesEvent>> MachinesEventsChanged;
+
+ public event EventHandler<Organization> OrganizationChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<TangoVersion>> TangoVersionsChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<UsersRole>> UsersRolesChanged;
+
+ protected Boolean _deleted;
+
+ /// <summary>
+ /// Gets or sets the userbase deleted.
+ /// </summary>
+
+ [Column("DELETED")]
+
+ public Boolean Deleted
+ {
+ get
+ {
+ return _deleted;
+ }
+
+ set
+ {
+ if (_deleted != value)
+ {
+ _deleted = value;
+
+ OnDeletedChanged(value);
+
+ }
+ }
+ }
+
+ protected String _email;
+
+ /// <summary>
+ /// Gets or sets the userbase email.
+ /// </summary>
+
+ [Column("EMAIL")]
+
+ public String Email
+ {
+ get
+ {
+ return _email;
+ }
+
+ set
+ {
+ if (_email != value)
+ {
+ _email = value;
+
+ OnEmailChanged(value);
+
+ }
+ }
+ }
+
+ protected String _password;
+
+ /// <summary>
+ /// Gets or sets the userbase password.
+ /// </summary>
+
+ [Column("PASSWORD")]
+
+ public String Password
+ {
+ get
+ {
+ return _password;
+ }
+
+ set
+ {
+ if (_password != value)
+ {
+ _password = value;
+
+ OnPasswordChanged(value);
+
+ }
+ }
+ }
+
+ protected String _organizationguid;
+
+ /// <summary>
+ /// Gets or sets the userbase organization guid.
+ /// </summary>
+
+ [Column("ORGANIZATION_GUID")]
+ [ForeignKey("Organization")]
+
+ public String OrganizationGuid
+ {
+ get
+ {
+ return _organizationguid;
+ }
+
+ set
+ {
+ if (_organizationguid != value)
+ {
+ _organizationguid = value;
+ }
+ }
+ }
+
+ protected String _contactguid;
+
+ /// <summary>
+ /// Gets or sets the userbase contact guid.
+ /// </summary>
+
+ [Column("CONTACT_GUID")]
+ [ForeignKey("Contact")]
+
+ public String ContactGuid
+ {
+ get
+ {
+ return _contactguid;
+ }
+
+ set
+ {
+ if (_contactguid != value)
+ {
+ _contactguid = value;
+ }
+ }
+ }
+
+ protected String _addressguid;
+
+ /// <summary>
+ /// Gets or sets the userbase address guid.
+ /// </summary>
+
+ [Column("ADDRESS_GUID")]
+ [ForeignKey("Address")]
+
+ public String AddressGuid
+ {
+ get
+ {
+ return _addressguid;
+ }
+
+ set
+ {
+ if (_addressguid != value)
+ {
+ _addressguid = value;
+ }
+ }
+ }
+
+ protected Nullable<DateTime> _lastlogin;
+
+ /// <summary>
+ /// Gets or sets the userbase last login.
+ /// </summary>
+
+ [Column("LAST_LOGIN")]
+
+ public Nullable<DateTime> LastLogin
+ {
+ get
+ {
+ return _lastlogin;
+ }
+
+ set
+ {
+ if (_lastlogin != value)
+ {
+ _lastlogin = value;
+
+ OnLastLoginChanged(value);
+
+ }
+ }
+ }
+
+ protected Address _address;
+
+ /// <summary>
+ /// Gets or sets the userbase address.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual Address Address
+ {
+ get
+ {
+ return _address;
+ }
+
+ set
+ {
+ if (_address != value)
+ {
+ _address = value;
+
+ OnAddressChanged(value);
+
+ }
+ }
+ }
+
+ protected Contact _contact;
+
+ /// <summary>
+ /// Gets or sets the userbase contact.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual Contact Contact
+ {
+ get
+ {
+ return _contact;
+ }
+
+ set
+ {
+ if (_contact != value)
+ {
+ _contact = value;
+
+ OnContactChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Job> _jobs;
+
+ /// <summary>
+ /// Gets or sets the userbase jobs.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Job> Jobs
+ {
+ get
+ {
+ return _jobs;
+ }
+
+ set
+ {
+ if (_jobs != value)
+ {
+ _jobs = value;
+
+ OnJobsChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<MachineStudioVersion> _machinestudioversions;
+
+ /// <summary>
+ /// Gets or sets the userbase machine studio versions.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<MachineStudioVersion> MachineStudioVersions
+ {
+ get
+ {
+ return _machinestudioversions;
+ }
+
+ set
+ {
+ if (_machinestudioversions != value)
+ {
+ _machinestudioversions = value;
+
+ OnMachineStudioVersionsChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<MachinesEvent> _machinesevents;
+
+ /// <summary>
+ /// Gets or sets the userbase machines events.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<MachinesEvent> MachinesEvents
+ {
+ get
+ {
+ return _machinesevents;
+ }
+
+ set
+ {
+ if (_machinesevents != value)
+ {
+ _machinesevents = value;
+
+ OnMachinesEventsChanged(value);
+
+ }
+ }
+ }
+
+ protected Organization _organization;
+
+ /// <summary>
+ /// Gets or sets the userbase organization.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual Organization Organization
+ {
+ get
+ {
+ return _organization;
+ }
+
+ set
+ {
+ if (_organization != value)
+ {
+ _organization = value;
+
+ OnOrganizationChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<TangoVersion> _tangoversions;
+
+ /// <summary>
+ /// Gets or sets the userbase tango versions.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<TangoVersion> TangoVersions
+ {
+ get
+ {
+ return _tangoversions;
+ }
+
+ set
+ {
+ if (_tangoversions != value)
+ {
+ _tangoversions = value;
+
+ OnTangoVersionsChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<UsersRole> _usersroles;
+
+ /// <summary>
+ /// Gets or sets the userbase users roles.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<UsersRole> UsersRoles
+ {
+ get
+ {
+ return _usersroles;
+ }
+
+ set
+ {
+ if (_usersroles != value)
+ {
+ _usersroles = value;
+
+ OnUsersRolesChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Deleted has changed.
+ /// </summary>
+ protected virtual void OnDeletedChanged(Boolean deleted)
+ {
+ DeletedChanged?.Invoke(this, deleted);
+ RaisePropertyChanged(nameof(Deleted));
+ }
+
+ /// <summary>
+ /// Called when the Email has changed.
+ /// </summary>
+ protected virtual void OnEmailChanged(String email)
+ {
+ EmailChanged?.Invoke(this, email);
+ RaisePropertyChanged(nameof(Email));
+ }
+
+ /// <summary>
+ /// Called when the Password has changed.
+ /// </summary>
+ protected virtual void OnPasswordChanged(String password)
+ {
+ PasswordChanged?.Invoke(this, password);
+ RaisePropertyChanged(nameof(Password));
+ }
+
+ /// <summary>
+ /// Called when the LastLogin has changed.
+ /// </summary>
+ protected virtual void OnLastLoginChanged(Nullable<DateTime> lastlogin)
+ {
+ LastLoginChanged?.Invoke(this, lastlogin);
+ RaisePropertyChanged(nameof(LastLogin));
+ }
+
+ /// <summary>
+ /// Called when the Address has changed.
+ /// </summary>
+ protected virtual void OnAddressChanged(Address address)
+ {
+ AddressChanged?.Invoke(this, address);
+ RaisePropertyChanged(nameof(Address));
+ }
+
+ /// <summary>
+ /// Called when the Contact has changed.
+ /// </summary>
+ protected virtual void OnContactChanged(Contact contact)
+ {
+ ContactChanged?.Invoke(this, contact);
+ RaisePropertyChanged(nameof(Contact));
+ }
+
+ /// <summary>
+ /// Called when the Jobs has changed.
+ /// </summary>
+ protected virtual void OnJobsChanged(SynchronizedObservableCollection<Job> jobs)
+ {
+ JobsChanged?.Invoke(this, jobs);
+ RaisePropertyChanged(nameof(Jobs));
+ }
+
+ /// <summary>
+ /// Called when the MachineStudioVersions has changed.
+ /// </summary>
+ protected virtual void OnMachineStudioVersionsChanged(SynchronizedObservableCollection<MachineStudioVersion> machinestudioversions)
+ {
+ MachineStudioVersionsChanged?.Invoke(this, machinestudioversions);
+ RaisePropertyChanged(nameof(MachineStudioVersions));
+ }
+
+ /// <summary>
+ /// Called when the MachinesEvents has changed.
+ /// </summary>
+ protected virtual void OnMachinesEventsChanged(SynchronizedObservableCollection<MachinesEvent> machinesevents)
+ {
+ MachinesEventsChanged?.Invoke(this, machinesevents);
+ RaisePropertyChanged(nameof(MachinesEvents));
+ }
+
+ /// <summary>
+ /// Called when the Organization has changed.
+ /// </summary>
+ protected virtual void OnOrganizationChanged(Organization organization)
+ {
+ OrganizationChanged?.Invoke(this, organization);
+ RaisePropertyChanged(nameof(Organization));
+ }
+
+ /// <summary>
+ /// Called when the TangoVersions has changed.
+ /// </summary>
+ protected virtual void OnTangoVersionsChanged(SynchronizedObservableCollection<TangoVersion> tangoversions)
+ {
+ TangoVersionsChanged?.Invoke(this, tangoversions);
+ RaisePropertyChanged(nameof(TangoVersions));
+ }
+
+ /// <summary>
+ /// Called when the UsersRoles has changed.
+ /// </summary>
+ protected virtual void OnUsersRolesChanged(SynchronizedObservableCollection<UsersRole> usersroles)
+ {
+ UsersRolesChanged?.Invoke(this, usersroles);
+ RaisePropertyChanged(nameof(UsersRoles));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="UserBase" /> class.
+ /// </summary>
+ public UserBase() : base()
+ {
+
+ Jobs = new SynchronizedObservableCollection<Job>();
+
+ MachineStudioVersions = new SynchronizedObservableCollection<MachineStudioVersion>();
+
+ MachinesEvents = new SynchronizedObservableCollection<MachinesEvent>();
+
+ TangoVersions = new SynchronizedObservableCollection<TangoVersion>();
+
+ UsersRoles = new SynchronizedObservableCollection<UsersRole>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/UsersRole.cs b/Software/Visual_Studio/Tango.BL/Entities/UsersRole.cs
index ba8cd146c..97acd7756 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/UsersRole.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/UsersRole.cs
@@ -1,199 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("USERS_ROLES")]
- public partial class UsersRole : ObservableEntity<UsersRole>
+ public partial class UsersRole : UsersRoleBase
{
-
- public event EventHandler<Boolean> DeletedChanged;
-
- public event EventHandler<Role> RoleChanged;
-
- public event EventHandler<User> UserChanged;
-
- protected Boolean _deleted;
-
- /// <summary>
- /// Gets or sets the usersrole deleted.
- /// </summary>
-
- [Column("DELETED")]
-
- public Boolean Deleted
- {
- get
- {
- return _deleted;
- }
-
- set
- {
- if (_deleted != value)
- {
- _deleted = value;
-
- OnDeletedChanged(value);
-
- }
- }
- }
-
- protected String _userguid;
-
- /// <summary>
- /// Gets or sets the usersrole user guid.
- /// </summary>
-
- [Column("USER_GUID")]
- [ForeignKey("User")]
-
- public String UserGuid
- {
- get
- {
- return _userguid;
- }
-
- set
- {
- if (_userguid != value)
- {
- _userguid = value;
- }
- }
- }
-
- protected String _roleguid;
-
- /// <summary>
- /// Gets or sets the usersrole role guid.
- /// </summary>
-
- [Column("ROLE_GUID")]
- [ForeignKey("Role")]
-
- public String RoleGuid
- {
- get
- {
- return _roleguid;
- }
-
- set
- {
- if (_roleguid != value)
- {
- _roleguid = value;
- }
- }
- }
-
- protected Role _role;
-
- /// <summary>
- /// Gets or sets the usersrole role.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual Role Role
- {
- get
- {
- return _role;
- }
-
- set
- {
- if (_role != value)
- {
- _role = value;
-
- OnRoleChanged(value);
-
- }
- }
- }
-
- protected User _user;
-
- /// <summary>
- /// Gets or sets the usersrole user.
- /// </summary>
-
- [XmlIgnore]
- [JsonIgnore]
- public virtual User User
- {
- get
- {
- return _user;
- }
-
- set
- {
- if (_user != value)
- {
- _user = value;
-
- OnUserChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Deleted has changed.
- /// </summary>
- protected virtual void OnDeletedChanged(Boolean deleted)
- {
- DeletedChanged?.Invoke(this, deleted);
- RaisePropertyChanged(nameof(Deleted));
- }
-
- /// <summary>
- /// Called when the Role has changed.
- /// </summary>
- protected virtual void OnRoleChanged(Role role)
- {
- RoleChanged?.Invoke(this, role);
- RaisePropertyChanged(nameof(Role));
- }
-
- /// <summary>
- /// Called when the User has changed.
- /// </summary>
- protected virtual void OnUserChanged(User user)
- {
- UserChanged?.Invoke(this, user);
- RaisePropertyChanged(nameof(User));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="UsersRole" /> class.
/// </summary>
public UsersRole() : base()
{
+
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/UsersRoleBase.cs b/Software/Visual_Studio/Tango.BL/Entities/UsersRoleBase.cs
new file mode 100644
index 000000000..50248a7a2
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/UsersRoleBase.cs
@@ -0,0 +1,199 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("USERS_ROLES")]
+ public abstract class UsersRoleBase : ObservableEntity<UsersRole>
+ {
+
+ public event EventHandler<Boolean> DeletedChanged;
+
+ public event EventHandler<Role> RoleChanged;
+
+ public event EventHandler<User> UserChanged;
+
+ protected Boolean _deleted;
+
+ /// <summary>
+ /// Gets or sets the usersrolebase deleted.
+ /// </summary>
+
+ [Column("DELETED")]
+
+ public Boolean Deleted
+ {
+ get
+ {
+ return _deleted;
+ }
+
+ set
+ {
+ if (_deleted != value)
+ {
+ _deleted = value;
+
+ OnDeletedChanged(value);
+
+ }
+ }
+ }
+
+ protected String _userguid;
+
+ /// <summary>
+ /// Gets or sets the usersrolebase user guid.
+ /// </summary>
+
+ [Column("USER_GUID")]
+ [ForeignKey("User")]
+
+ public String UserGuid
+ {
+ get
+ {
+ return _userguid;
+ }
+
+ set
+ {
+ if (_userguid != value)
+ {
+ _userguid = value;
+ }
+ }
+ }
+
+ protected String _roleguid;
+
+ /// <summary>
+ /// Gets or sets the usersrolebase role guid.
+ /// </summary>
+
+ [Column("ROLE_GUID")]
+ [ForeignKey("Role")]
+
+ public String RoleGuid
+ {
+ get
+ {
+ return _roleguid;
+ }
+
+ set
+ {
+ if (_roleguid != value)
+ {
+ _roleguid = value;
+ }
+ }
+ }
+
+ protected Role _role;
+
+ /// <summary>
+ /// Gets or sets the usersrolebase role.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual Role Role
+ {
+ get
+ {
+ return _role;
+ }
+
+ set
+ {
+ if (_role != value)
+ {
+ _role = value;
+
+ OnRoleChanged(value);
+
+ }
+ }
+ }
+
+ protected User _user;
+
+ /// <summary>
+ /// Gets or sets the usersrolebase user.
+ /// </summary>
+
+ [XmlIgnore]
+ [JsonIgnore]
+ public virtual User User
+ {
+ get
+ {
+ return _user;
+ }
+
+ set
+ {
+ if (_user != value)
+ {
+ _user = value;
+
+ OnUserChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Deleted has changed.
+ /// </summary>
+ protected virtual void OnDeletedChanged(Boolean deleted)
+ {
+ DeletedChanged?.Invoke(this, deleted);
+ RaisePropertyChanged(nameof(Deleted));
+ }
+
+ /// <summary>
+ /// Called when the Role has changed.
+ /// </summary>
+ protected virtual void OnRoleChanged(Role role)
+ {
+ RoleChanged?.Invoke(this, role);
+ RaisePropertyChanged(nameof(Role));
+ }
+
+ /// <summary>
+ /// Called when the User has changed.
+ /// </summary>
+ protected virtual void OnUserChanged(User user)
+ {
+ UserChanged?.Invoke(this, user);
+ RaisePropertyChanged(nameof(User));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="UsersRoleBase" /> class.
+ /// </summary>
+ public UsersRoleBase() : base()
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/WindingMethod.cs b/Software/Visual_Studio/Tango.BL/Entities/WindingMethod.cs
index 0f261568b..0e09f7304 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/WindingMethod.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/WindingMethod.cs
@@ -1,188 +1,19 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Tango Observables Generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated. Do not modify!
-// </auto-generated>
-//------------------------------------------------------------------------------
-
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
using System.Linq;
-using Tango.DAL.Remote.DB;
-using Tango.Core;
+using System.Text;
+using System.Threading.Tasks;
namespace Tango.BL.Entities
{
- [Table("WINDING_METHODS")]
- public partial class WindingMethod : ObservableEntity<WindingMethod>
+ public partial class WindingMethod : WindingMethodBase
{
-
- public event EventHandler<Int32> CodeChanged;
-
- public event EventHandler<String> NameChanged;
-
- public event EventHandler<String> DescriptionChanged;
-
- public event EventHandler<SynchronizedObservableCollection<Job>> JobsChanged;
-
- protected Int32 _code;
-
- /// <summary>
- /// Gets or sets the windingmethod code.
- /// </summary>
-
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- if (_code != value)
- {
- _code = value;
-
- OnCodeChanged(value);
-
- }
- }
- }
-
- protected String _name;
-
- /// <summary>
- /// Gets or sets the windingmethod name.
- /// </summary>
-
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
-
- OnNameChanged(value);
-
- }
- }
- }
-
- protected String _description;
-
- /// <summary>
- /// Gets or sets the windingmethod description.
- /// </summary>
-
- [Column("DESCRIPTION")]
-
- public String Description
- {
- get
- {
- return _description;
- }
-
- set
- {
- if (_description != value)
- {
- _description = value;
-
- OnDescriptionChanged(value);
-
- }
- }
- }
-
- protected SynchronizedObservableCollection<Job> _jobs;
-
- /// <summary>
- /// Gets or sets the windingmethod jobs.
- /// </summary>
-
- public virtual SynchronizedObservableCollection<Job> Jobs
- {
- get
- {
- return _jobs;
- }
-
- set
- {
- if (_jobs != value)
- {
- _jobs = value;
-
- OnJobsChanged(value);
-
- }
- }
- }
-
- /// <summary>
- /// Called when the Code has changed.
- /// </summary>
- protected virtual void OnCodeChanged(Int32 code)
- {
- CodeChanged?.Invoke(this, code);
- RaisePropertyChanged(nameof(Code));
- }
-
- /// <summary>
- /// Called when the Name has changed.
- /// </summary>
- protected virtual void OnNameChanged(String name)
- {
- NameChanged?.Invoke(this, name);
- RaisePropertyChanged(nameof(Name));
- }
-
- /// <summary>
- /// Called when the Description has changed.
- /// </summary>
- protected virtual void OnDescriptionChanged(String description)
- {
- DescriptionChanged?.Invoke(this, description);
- RaisePropertyChanged(nameof(Description));
- }
-
- /// <summary>
- /// Called when the Jobs has changed.
- /// </summary>
- protected virtual void OnJobsChanged(SynchronizedObservableCollection<Job> jobs)
- {
- JobsChanged?.Invoke(this, jobs);
- RaisePropertyChanged(nameof(Jobs));
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="WindingMethod" /> class.
/// </summary>
public WindingMethod() : base()
{
- Jobs = new SynchronizedObservableCollection<Job>();
-
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/WindingMethodBase.cs b/Software/Visual_Studio/Tango.BL/Entities/WindingMethodBase.cs
new file mode 100644
index 000000000..4d6734b89
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/WindingMethodBase.cs
@@ -0,0 +1,188 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("WINDING_METHODS")]
+ public abstract class WindingMethodBase : ObservableEntity<WindingMethod>
+ {
+
+ public event EventHandler<Int32> CodeChanged;
+
+ public event EventHandler<String> NameChanged;
+
+ public event EventHandler<String> DescriptionChanged;
+
+ public event EventHandler<SynchronizedObservableCollection<Job>> JobsChanged;
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the windingmethodbase code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ if (_code != value)
+ {
+ _code = value;
+
+ OnCodeChanged(value);
+
+ }
+ }
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the windingmethodbase name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ if (_name != value)
+ {
+ _name = value;
+
+ OnNameChanged(value);
+
+ }
+ }
+ }
+
+ protected String _description;
+
+ /// <summary>
+ /// Gets or sets the windingmethodbase description.
+ /// </summary>
+
+ [Column("DESCRIPTION")]
+
+ public String Description
+ {
+ get
+ {
+ return _description;
+ }
+
+ set
+ {
+ if (_description != value)
+ {
+ _description = value;
+
+ OnDescriptionChanged(value);
+
+ }
+ }
+ }
+
+ protected SynchronizedObservableCollection<Job> _jobs;
+
+ /// <summary>
+ /// Gets or sets the windingmethodbase jobs.
+ /// </summary>
+
+ public virtual SynchronizedObservableCollection<Job> Jobs
+ {
+ get
+ {
+ return _jobs;
+ }
+
+ set
+ {
+ if (_jobs != value)
+ {
+ _jobs = value;
+
+ OnJobsChanged(value);
+
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the Code has changed.
+ /// </summary>
+ protected virtual void OnCodeChanged(Int32 code)
+ {
+ CodeChanged?.Invoke(this, code);
+ RaisePropertyChanged(nameof(Code));
+ }
+
+ /// <summary>
+ /// Called when the Name has changed.
+ /// </summary>
+ protected virtual void OnNameChanged(String name)
+ {
+ NameChanged?.Invoke(this, name);
+ RaisePropertyChanged(nameof(Name));
+ }
+
+ /// <summary>
+ /// Called when the Description has changed.
+ /// </summary>
+ protected virtual void OnDescriptionChanged(String description)
+ {
+ DescriptionChanged?.Invoke(this, description);
+ RaisePropertyChanged(nameof(Description));
+ }
+
+ /// <summary>
+ /// Called when the Jobs has changed.
+ /// </summary>
+ protected virtual void OnJobsChanged(SynchronizedObservableCollection<Job> jobs)
+ {
+ JobsChanged?.Invoke(this, jobs);
+ RaisePropertyChanged(nameof(Jobs));
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="WindingMethodBase" /> class.
+ /// </summary>
+ public WindingMethodBase() : base()
+ {
+
+ Jobs = new SynchronizedObservableCollection<Job>();
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/BrushStop.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/BrushStop.cs
deleted file mode 100644
index 781cb26a1..000000000
--- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/BrushStop.cs
+++ /dev/null
@@ -1,516 +0,0 @@
-using ColorMine.ColorSpaces;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Linq;
-using System.Reflection;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Media;
-using Tango.Core;
-using Tango.BL;
-using Tango.BL.Enumerations;
-using Tango.PMR.ColorLab;
-using Google.Protobuf;
-using System.Runtime.InteropServices;
-using Tango.PMR;
-using System.Diagnostics;
-using Tango.BL.ColorConversion;
-using System.Windows.Threading;
-using System.Timers;
-
-namespace Tango.BL.Entities
-{
- /// <summary>
- /// Extends the standard observable BrushStop class.
- /// </summary>
- /// <seealso cref="Tango.BL.Entities.ObservableEntity{Tango.BL.Entities.BrushStop}" />
- public partial class BrushStop
- {
- private Timer _timer;
-
- [NotMapped]
- private bool _ignorePropChanged;
-
- private static List<String> _colorPropertyNames;
-
- static BrushStop()
- {
- _colorPropertyNames = new List<string>();
-
- _colorPropertyNames.Add(nameof(Red));
- _colorPropertyNames.Add(nameof(Green));
- _colorPropertyNames.Add(nameof(Blue));
-
- _colorPropertyNames.Add(nameof(L));
- _colorPropertyNames.Add(nameof(A));
- _colorPropertyNames.Add(nameof(B));
-
- _colorPropertyNames.Add(nameof(Cyan));
- _colorPropertyNames.Add(nameof(Magenta));
- _colorPropertyNames.Add(nameof(Yellow));
- _colorPropertyNames.Add(nameof(Black));
-
- _colorPropertyNames.Add(nameof(Color));
- _colorPropertyNames.Add(nameof(ColorCatalog));
- }
-
- #region Properties
-
- /// <summary>
- /// Gets or sets a value indicating whether this instance is liquid volumes out of range.
- /// </summary>
- [NotMapped]
- [JsonIgnore]
- public bool IsLiquidVolumesOutOfRange
- {
- get
- {
- return LiquidVolumes != null ? LiquidVolumes.Where(x => x.IdsPack.IdsPackFormula.Code == IdsPackFormulas.StandardColor.ToInt32()).Sum(x => x.Volume) > 100 : false;
- }
- }
-
- private ObservableCollection<LiquidVolume> _liquidVolumes;
- /// <summary>
- /// Gets or sets the collection of this brush stop liquid volumes.
- /// </summary>
- [NotMapped]
- [JsonIgnore]
- public ObservableCollection<LiquidVolume> LiquidVolumes
- {
- get { return _liquidVolumes; }
- set { _liquidVolumes = value; RaisePropertyChangedAuto(); }
- }
-
- /// <summary>
- /// Gets or sets the brush stop color.
- /// </summary>
- [NotMapped]
- [JsonIgnore]
- public Color Color
- {
- get { return Color.FromRgb((byte)_red, (byte)_green, (byte)_blue); }
- set
- {
- Rgb rgb = new Rgb(value.R, value.G, value.B);
- _red = (byte)rgb.R;
- _green = (byte)rgb.G;
- _blue = (byte)rgb.B;
-
- Cmyk cmyk = rgb.To<Cmyk>();
- _cyan = cmyk.C;
- _magenta = cmyk.M;
- _yellow = cmyk.Y;
- _black = cmyk.K;
-
- Lab lab = rgb.To<Lab>();
- _l = lab.L;
- _a = lab.A;
- _b = lab.B;
-
- RaisePropertyChanged(nameof(Color));
- }
- }
-
- /// <summary>
- /// Gets the stop color brush.
- /// </summary>
- [NotMapped]
- [JsonIgnore]
- public SolidColorBrush Brush
- {
- get { return new SolidColorBrush(Color); }
- }
-
- /// <summary>
- /// Gets a value indicating whether this brush stop is the first one within its segment brush stops.
- /// </summary>
- [NotMapped]
- [JsonIgnore]
- public bool IsFirst
- {
- get
- {
- if (Segment != null && Segment.BrushStops.Count > 0)
- {
- return StopIndex == Segment.BrushStops.Min(x => x.StopIndex);
- }
- else
- {
- return true;
- }
- }
- }
-
- /// <summary>
- /// Gets a value indicating whether this brush stop is the last one within its segment brush stops.
- /// </summary>
- [NotMapped]
- [JsonIgnore]
- public bool IsLast
- {
- get
- {
- if (Segment != null && Segment.BrushStops.Count > 0)
- {
- return StopIndex == Segment.BrushStops.Max(x => x.StopIndex);
- }
- else
- {
- return true;
- }
- }
- }
-
- /// <summary>
- /// Gets a value indicating whether this brush stop is not the first nor last within its segment brush stops.
- /// </summary>
- [NotMapped]
- [JsonIgnore]
- public bool IsMiddle
- {
- get { return !IsFirst && !IsLast; }
- }
-
- /// <summary>
- /// Gets this brush stop offset in meters.
- /// </summary>
- [NotMapped]
- [JsonIgnore]
- public double OffsetMeters
- {
- get
- {
- if (Segment != null)
- {
- var a = Segment.Length * (OffsetPercent / 100d);
- return a;
- }
- else
- {
- return 0;
- }
- }
- set
- {
- if (Segment != null)
- {
- OffsetPercent = (value / Segment.Length) * 100d;
- RaisePropertyChangedAuto();
- }
- }
- }
-
- private bool _isOutOfGamut;
- /// <summary>
- /// Gets or sets a value indicating whether this instance is out of gamut.
- /// </summary>
- [NotMapped]
- public bool IsOutOfGamut
- {
- get { return _isOutOfGamut; }
- set
- {
- _isOutOfGamut = value; RaisePropertyChangedAuto();
-
- if (Segment != null)
- {
- Segment.RaiseHasOutOfGamutBrushStop();
- }
- }
- }
-
- private bool _outOfGamutChecked;
- /// <summary>
- /// Gets or sets a value indicating whether out of gamut has been checked.
- /// </summary>
- [NotMapped]
- public bool OutOfGamutChecked
- {
- get { return _outOfGamutChecked; }
- set { _outOfGamutChecked = value; RaisePropertyChangedAuto(); }
- }
-
- [NotMapped]
- public double TotalLiquidVolume
- {
- get
- {
- return LiquidVolumes != null ? LiquidVolumes.Where(x => x.IdsPack.IdsPackFormula.Code != IdsPackFormulas.Lubricant.ToInt32()).Sum(x => x.Volume) : 0;
- }
- }
-
- [NotMapped]
- public double TotalLiquidNanoliterPerCentimeter
- {
- get
- {
- return LiquidVolumes != null ? LiquidVolumes.Where(x => x.IdsPack.IdsPackFormula.Code != IdsPackFormulas.Lubricant.ToInt32()).Sum(x => x.NanoliterPerCentimeter) : 0;
- }
- }
-
- /// <summary>
- /// Gets the brush color space as enum.
- /// </summary>
- [NotMapped]
- public ColorSpaces BrushColorSpace
- {
- get { return (ColorSpaces)ColorSpace.Code; }
- }
-
- #endregion
-
- #region Public Methods
-
- /// <summary>
- /// Notifies about the offset percentage and offset meters changes.
- /// </summary>
- public void RaiseOffsetChanged()
- {
- RaisePropertyChanged(nameof(OffsetPercent));
- RaisePropertyChanged(nameof(OffsetMeters));
- RaisePropertyChanged(nameof(IsFirst));
- RaisePropertyChanged(nameof(IsLast));
- RaisePropertyChanged(nameof(IsMiddle));
- }
-
- /// <summary>
- /// Sets this brush stop liquid volumes.
- /// </summary>
- /// <param name="configuration">The configuration.</param>
- /// <param name="rml">The RML.</param>
- /// <param name="processParametersTable">The process parameters table.</param>
- public void SetLiquidVolumes(Configuration configuration, Rml rml, ProcessParametersTable processParametersTable)
- {
- LiquidVolumes = new ObservableCollection<LiquidVolume>();
-
- foreach (var idsPack in configuration.GetSupportedIdsPacks(rml))
- {
- var liquidVolume = new LiquidVolume(configuration, idsPack, rml, processParametersTable, this);
- liquidVolume.VolumeChanged += LiquidVolume_VolumeChanged;
- LiquidVolumes.Add(liquidVolume);
- }
-
- foreach (var volume in LiquidVolumes.ToList())
- {
- volume.Invalidate();
- }
- }
-
- private void LiquidVolume_VolumeChanged()
- {
- RaisePropertyChanged(nameof(IsLiquidVolumesOutOfRange));
- RaisePropertyChanged(nameof(TotalLiquidVolume));
- RaisePropertyChanged(nameof(TotalLiquidNanoliterPerCentimeter));
- }
-
- public double GetVolume(int packIndex)
- {
- return (double)typeof(BrushStop).GetProperty("V" + packIndex).GetValue(this);
- }
-
- public void SetVolume(int packIndex, double volume)
- {
- typeof(BrushStop).GetProperty("V" + packIndex).SetValue(this, volume);
- }
-
- public void SetVolume(LiquidTypes liquidType, double volume)
- {
- SetVolume(Segment.Job.Machine.Configuration.IdsPacks.SingleOrDefault(x => x.LiquidType.Code == liquidType.ToInt32()).PackIndex, volume);
- }
-
- public double GetVolume(LiquidTypes liquidType)
- {
- return GetVolume(Segment.Job.Machine.Configuration.IdsPacks.SingleOrDefault(x => x.LiquidType.Code == liquidType.ToInt32()).PackIndex);
- }
-
- public int GetDispensingDivision(int packIndex)
- {
- return (int)typeof(BrushStop).GetProperty("V" + packIndex + "Div").GetValue(this);
- }
-
- public void SetDispensingDivision(int packIndex, int division)
- {
- typeof(BrushStop).GetProperty("V" + packIndex + "Div").SetValue(this, division);
- }
-
- public void SetAllDispensingStepDivisions(Dispensing.DispenserStepDivisions division)
- {
- for (int i = 0; i < 8; i++)
- {
- typeof(BrushStop).GetProperty("V" + i + "Div").SetValue(this, (int)division);
- }
- }
-
- public void SetStopIndex(int index)
- {
- _stopindex = index;
- }
-
- public void RaiseStopIndex()
- {
- StopIndex = _stopindex;
- }
-
- #endregion
-
- #region Override Methods
-
- /// <summary>
- /// Raises the property changed event.
- /// </summary>
- /// <param name="propName">Name of the property.</param>
- protected override void RaisePropertyChanged(string propName)
- {
- base.RaisePropertyChanged(propName);
-
- if (!_ignorePropChanged && propName != nameof(ColorSpace) && ColorSpace != null)
- {
- if (_colorPropertyNames.Contains(propName))
- {
- if (_timer == null)
- {
- _timer = new Timer();
- _timer.Interval = 10;
- _timer.Elapsed += (x, y) =>
- {
- _timer.Stop();
-
- SynchronizeColorSpaces(() =>
- {
-
- _ignorePropChanged = true;
-
- foreach (var prop in _colorPropertyNames)
- {
- RaisePropertyChanged(prop);
- }
-
- if (Segment != null)
- {
- Segment.RaiseSegmentBrushChanged();
- }
-
- _ignorePropChanged = false;
-
- });
- };
- }
-
- _timer.Stop();
- _timer.Start();
- }
- }
- if (propName == nameof(OffsetPercent))
- {
- if (Segment != null)
- {
- Segment.RaiseSegmentBrushChanged();
- }
- }
- if (propName == nameof(ColorSpace))
- {
- if (ColorSpace != null && ColorSpace.Code == ColorSpaces.Twine.ToInt32())
- {
- Corrected = false;
- IsOutOfGamut = false;
- }
- }
- }
-
- public override BrushStop Clone()
- {
- BrushStop cloned = base.Clone();
- return cloned;
- }
-
- public BrushStop Clone(Segment segment)
- {
- BrushStop cloned = base.Clone();
- cloned.Segment = segment;
- cloned.ColorCatalog = ColorCatalog;
- cloned.ColorSpace = ColorSpace;
- cloned.SegmentGuid = segment.Guid;
-
- if (LiquidVolumes != null && LiquidVolumes.Count > 0)
- {
- cloned.LiquidVolumes = LiquidVolumes.Select(x => x.Clone(cloned)).ToObservableCollection();
- }
- return cloned;
- }
-
- #endregion
-
- #region Private Methods
-
- /// <summary>
- /// Synchronizes between the different brush stop color spaces.
- /// </summary>
- private void SynchronizeColorSpaces(Action onComplete = null)
- {
- Task.Factory.StartNew(() =>
- {
- Rgb rgb = new Rgb(Red, Green, Blue);
- Cmyk cmyk = new Cmyk(Cyan, Magenta, Yellow, Black);
- Lab lab = new Lab(L, A, B);
- Rgb rgb_twine = new Rgb(0, 0, 0);
-
- if (ColorCatalog != null)
- {
- rgb_twine = new Rgb(ColorCatalog.Red, ColorCatalog.Green, ColorCatalog.Blue);
- }
-
- switch ((ColorSpaces)ColorSpace.Code)
- {
- case ColorSpaces.RGB:
- cmyk = rgb.To<Cmyk>();
- lab = rgb.To<Lab>();
- break;
- case ColorSpaces.CMYK:
- rgb = cmyk.To<Rgb>();
- lab = cmyk.To<Lab>();
- break;
- case ColorSpaces.LAB:
- rgb = lab.To<Rgb>();
- cmyk = lab.To<Cmyk>();
- break;
- case ColorSpaces.Twine:
- cmyk = rgb_twine.To<Cmyk>();
- lab = rgb_twine.To<Lab>();
- rgb = rgb_twine;
- Validate(null);
- break;
- }
-
- _red = (int)rgb.R;
- _green = (int)rgb.G;
- _blue = (int)rgb.B;
-
- _cyan = cmyk.C;
- _magenta = cmyk.M;
- _yellow = cmyk.Y;
- _black = cmyk.K;
-
- _l = lab.L;
- _a = lab.A;
- _b = lab.B;
-
- onComplete?.Invoke();
- });
- }
-
- protected override void OnValidating(ObservablesContext context)
- {
- base.OnValidating(context);
-
- if (ColorSpace.Code == ColorSpaces.Twine.ToInt32() && ColorCatalog == null)
- {
- InsertError(nameof(ColorCatalog), "Please specify a color code.");
- }
- }
-
- #endregion
- }
-}
diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Cat.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Cat.cs
deleted file mode 100644
index 3c93d098d..000000000
--- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Cat.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Tango.PMR.ColorLab;
-
-namespace Tango.BL.Entities
-{
- public partial class Cat
- {
- public CalibrationData GetCalibrationData()
- {
- return CalibrationData.Parser.ParseFrom(Data);
- }
-
- public void PutCalibrationData(CalibrationData data)
- {
- Data = data.ToBytes();
- }
-
- public static CalibrationData CreateDemoCalibrationData(PMR.ColorLab.LiquidType liquidType)
- {
- CalibrationData data = new CalibrationData();
- data.LiquidType = liquidType;
-
- for (int i = 0; i < 101; i++)
- {
- data.CalibrationPoints.Add(new CalibrationPoint()
- {
- X = i,
- Y = i,
- });
- }
-
- return data;
- }
-
- public Cat Clone(Machine machine)
- {
- var cloned = base.Clone();
- cloned.Machine = machine;
- return cloned;
- }
-
- public override List<string> GetIgnoreProperties()
- {
- return base.GetIgnoreProperties().Concat(new List<String>()
- {
- nameof(this.LiquidType),
- nameof(this.Machine),
- nameof(this.Rml),
- }).ToList();
- }
- }
-}
diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/ColorCatalog.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/ColorCatalog.cs
deleted file mode 100644
index fe79c3362..000000000
--- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/ColorCatalog.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Media;
-
-namespace Tango.BL.Entities
-{
- public partial class ColorCatalog
- {
- private Color _color;
- /// <summary>
- /// Gets the color.
- /// </summary>
- public Color Color
- {
- get { return _color; }
- private set { _color = value; RaisePropertyChangedAuto(); }
- }
-
- protected override void RaisePropertyChanged(string propName)
- {
- base.RaisePropertyChanged(propName);
-
- if (propName == nameof(Red) || propName == nameof(Green) || propName == nameof(Blue))
- {
- Color = Color.FromRgb((byte)Red, (byte)Green, (byte)Blue);
- }
- }
- }
-}
diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Configuration.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Configuration.cs
deleted file mode 100644
index 4e7ec72bd..000000000
--- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Configuration.cs
+++ /dev/null
@@ -1,80 +0,0 @@
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Xml.Serialization;
-
-namespace Tango.BL.Entities
-{
- public partial class Configuration
- {
- [NotMapped]
- [XmlIgnore]
- [JsonIgnore]
- public IEnumerable<IdsPack> NoneEmptyIdsPacks
- {
- get { return IdsPacks.Where(x => !x.IsEmpty); }
- }
-
- public IEnumerable<IdsPack> GetSupportedIdsPacks(Rml rml)
- {
- if (rml == null)
- {
- throw new NullReferenceException("The specified RML cannot be null.");
- }
-
- return NoneEmptyIdsPacks.Where(x => rml.LiquidTypesRmls.ToList().Exists(y => y.LiquidType.Guid == x.LiquidType.Guid)).OrderBy(x => x.PackIndex).ToList();
- }
-
- public override void DefferedDelete(ObservablesContext context)
- {
- IdsPacks.ToList().ForEach(x => x.DefferedDelete(context));
- base.DefferedDelete(context);
- IdsPacks.Clear();
- }
-
- public override void Delete(ObservablesContext context)
- {
- IdsPacks.ToList().ForEach(x => x.DefferedDelete(context));
- base.Delete(context);
- IdsPacks.Clear();
- }
-
- public override Configuration Clone()
- {
- Configuration cloned = base.Clone();
-
- foreach (var idsPack in this.IdsPacks)
- {
- IdsPack clonedPack = idsPack.Clone();
- clonedPack.Configuration = cloned;
- clonedPack.CartridgeType = idsPack.CartridgeType;
- clonedPack.MidTankType = idsPack.MidTankType;
- clonedPack.IdsPackFormula = idsPack.IdsPackFormula;
- clonedPack.IsEmpty = idsPack.IsEmpty;
- clonedPack.Dispenser = null;
- clonedPack.DispenserGuid = null;
- cloned.IdsPacks.Add(clonedPack);
- }
-
- return cloned;
- }
-
- public override List<string> GetIgnoreProperties()
- {
- return base.GetIgnoreProperties().Concat(new List<String>()
- {
- nameof(this.ApplicationDisplayPanelVersion),
- nameof(this.ApplicationFirmwareVersion),
- nameof(this.ApplicationOsVersion),
- nameof(this.EmbeddedFirmwareVersion),
- nameof(this.Machines),
- nameof(this.NoneEmptyIdsPacks),
- nameof(this.HardwareVersion),
- }).ToList();
- }
- }
-}
diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Contact.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Contact.cs
deleted file mode 100644
index 8dcfda32d..000000000
--- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Contact.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using SimpleValidator.Extensions;
-
-namespace Tango.BL.Entities
-{
- public partial class Contact
- {
- protected override void RaisePropertyChanged(string propName)
- {
- base.RaisePropertyChanged(propName);
-
- if (propName == nameof(FirstName) || propName == nameof(LastName))
- {
- FixNames();
- }
- }
-
- private void FixNames()
- {
- if (_firstname != null)
- {
- _firstname = _firstname.Trim();
- }
-
- if (_lastname != null)
- {
- _lastname = _lastname.Trim();
- }
-
- FullName = FirstName + " " + LastName;
- }
-
- protected override void OnValidating(ObservablesContext context)
- {
- base.OnValidating(context);
-
- if (FirstName.IsNullOrWhiteSpace() || LastName.IsNullOrWhiteSpace())
- {
- InsertError(nameof(FirstName), "Contact first name and last name was not provided.");
- }
-
- if (!Email.IsEmail())
- {
- InsertError(nameof(Email), "Invalid contact email format.");
- }
- }
- }
-}
diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Dispenser.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Dispenser.cs
deleted file mode 100644
index 386d2896c..000000000
--- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Dispenser.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Data.Entity;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Tango.BL.Entities
-{
- public partial class Dispenser
- {
- [JsonIgnore]
- [NotMapped]
- public bool IsInstalled
- {
- get
- {
- return IdsPacks != null && IdsPacks.Count > 0;
- }
- }
-
- [JsonIgnore]
- [NotMapped]
- public Machine Machine { get; private set; }
-
- public async void InitMachine(ObservablesContext context)
- {
- if (IdsPacks != null && IdsPacks.Count > 0)
- {
- var config_guid = IdsPacks[0].ConfigurationGuid;
- Machine = await context.Machines.SingleOrDefaultAsync(x => x.ConfigurationGuid == config_guid);
- RaisePropertyChanged(nameof(Machine));
- }
- }
- }
-}
diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/EventType.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/EventType.cs
deleted file mode 100644
index d7d7bef1c..000000000
--- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/EventType.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Tango.BL.Enumerations;
-
-namespace Tango.BL.Entities
-{
- public partial class EventType
- {
- [NotMapped]
- [JsonIgnore]
- public EventTypes Type
- {
- get { return (EventTypes)Code; }
- set { Code = (int)value; }
- }
- }
-}
diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/HardwareVersion.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/HardwareVersion.cs
deleted file mode 100644
index d3a9baf9f..000000000
--- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/HardwareVersion.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Tango.BL.Entities
-{
- public partial class HardwareVersion
- {
- public override HardwareVersion Clone()
- {
- var cloned = base.Clone();
- cloned.HardwareMotors = HardwareMotors.Select(x => x.Clone(y => y.HardwareVersion = cloned)).ToSynchronizedObservableCollection();
- cloned.HardwareDancers = HardwareDancers.Select(x => x.Clone(y => y.HardwareVersion = cloned)).ToSynchronizedObservableCollection();
- cloned.HardwarePidControls = HardwarePidControls.Select(x => x.Clone(y => y.HardwareVersion = cloned)).ToSynchronizedObservableCollection();
- cloned.HardwareWinders = HardwareWinders.Select(x => x.Clone(y => y.HardwareVersion = cloned)).ToSynchronizedObservableCollection();
- cloned.HardwareSpeedSensors = HardwareSpeedSensors.Select(x => x.Clone(y => y.HardwareVersion = cloned)).ToSynchronizedObservableCollection();
- cloned.HardwareBlowers = HardwareBlowers.Select(x => x.Clone(y => y.HardwareVersion = cloned)).ToSynchronizedObservableCollection();
- cloned.HardwareBreakSensors = HardwareBreakSensors.Select(x => x.Clone(y => y.HardwareVersion = cloned)).ToSynchronizedObservableCollection();
- return cloned;
- }
-
- public override void Delete(ObservablesContext context)
- {
- HardwareDancers.ToList().ForEach(x => x.DefferedDelete(context));
- HardwareMotors.ToList().ForEach(x => x.DefferedDelete(context));
- HardwarePidControls.ToList().ForEach(x => x.DefferedDelete(context));
- HardwareWinders.ToList().ForEach(x => x.DefferedDelete(context));
- HardwareSpeedSensors.ToList().ForEach(x => x.DefferedDelete(context));
- HardwareBlowers.ToList().ForEach(x => x.DefferedDelete(context));
- HardwareBreakSensors.ToList().ForEach(x => x.DefferedDelete(context));
- base.Delete(context);
- }
-
- public override List<string> GetIgnoreProperties()
- {
- return base.GetIgnoreProperties().Concat(new List<String>()
- {
- nameof(this.Configurations),
- }).ToList();
- }
- }
-}
diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/IdsPack.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/IdsPack.cs
deleted file mode 100644
index eff0fee0c..000000000
--- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/IdsPack.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Tango.BL.Entities
-{
- public partial class IdsPack
- {
- public override List<string> GetIgnoreProperties()
- {
- return base.GetIgnoreProperties().Concat(new List<String>()
- {
- nameof(this.CartridgeType),
- nameof(this.Configuration),
- nameof(this.Dispenser),
- nameof(this.IdsPackFormula),
- nameof(this.LiquidType),
- nameof(this.MidTankType),
- }).ToList();
- }
- }
-}
diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Job.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Job.cs
deleted file mode 100644
index 62cb79c80..000000000
--- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Job.cs
+++ /dev/null
@@ -1,671 +0,0 @@
-using Google.Protobuf;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Drawing;
-using System.Linq;
-using System.Reflection;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Media.Imaging;
-using Tango.BL.Builders;
-using Tango.BL.Enumerations;
-using Tango.Core;
-using Tango.Logging;
-using Tango.PMR.Exports;
-
-namespace Tango.BL.Entities
-{
- /// <summary>
- /// Extends the standard observable Job class.
- /// </summary>
- /// <seealso cref="Tango.BL.Entities.ObservableEntity{Tango.BL.Entities.Job}" />
- public partial class Job
- {
- private double _lastLength;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="Job"/> class.
- /// </summary>
- public Job(DateTime creationDate)
- {
- CreationDate = creationDate;
- }
-
- #region Events
-
- /// <summary>
- /// Occurs when the job total segments length has changed.
- /// </summary>
- public event EventHandler LengthChanged;
-
- #endregion
-
- #region Properties
-
- /// <summary>
- /// Gets the total job segments length.
- /// </summary>
- [NotMapped]
- [JsonIgnore]
- public double Length
- {
- get
- {
- _lastLength = GetLength();
- return _lastLength;
- }
- }
-
- /// <summary>
- /// Gets the total job segments length multiplied by number of units if it is an embroidery job.
- /// </summary>
- [NotMapped]
- [JsonIgnore]
- public double LengthIncludingNumberOfUnits
- {
- get
- {
- _lastLength = GetLength();
- var l = _lastLength * NumberOfUnits;
-
- if (EnableInterSegment && NumberOfUnits > 1)
- {
- l += ((NumberOfUnits - 1) * InterSegmentLength);
- }
-
- return l;
- }
- }
-
- /// <summary>
- /// Gets or sets the job <see cref="Status"/> property as <see cref="JobStatus"/> enum instead of int.
- /// </summary>
- [NotMapped]
- [JsonIgnore]
- public JobStatuses JobStatus
- {
- get { return (JobStatuses)Status; }
- set { Status = value.ToInt32(); RaisePropertyChangedAuto(); }
- }
-
- /// <summary>
- /// Gets or sets the job <see cref="Type"/> property as <see cref="JobType"/> enum instead of int.
- /// </summary>
- [NotMapped]
- [JsonIgnore]
- public JobTypes JobType
- {
- get { return (JobTypes)Type; }
- set { Type = value.ToInt32(); RaisePropertyChangedAuto(); }
- }
-
- /// <summary>
- /// Gets or sets the job <see cref="SpoolsDistribution"/> property as a <see cref="Boolean"/> property.
- /// </summary>
- [NotMapped]
- [JsonIgnore]
- public bool IsAllSegmentsPerSpool
- {
- get { return ((SpoolsDistributions)SpoolsDistribution) == SpoolsDistributions.AllSegments; }
- set
- {
- SpoolsDistribution = value ? SpoolsDistributions.AllSegments.ToInt32() : SpoolsDistributions.SingleSegment.ToInt32();
- RaisePropertyChangedAuto();
- }
- }
-
- /// <summary>
- /// Gets or sets the effective segments.
- /// </summary>
- [NotMapped]
- [JsonIgnore]
- public ObservableCollection<Segment> EffectiveSegments
- {
- get
- {
- if (EnableInterSegment && IsAllSegmentsPerSpool)
- {
- int max = Segments.Max(x => x.SegmentIndex);
-
- ObservableCollection<Segment> effectiveSegments = new ObservableCollection<Segment>();
-
- foreach (var s in Segments.ToList().OrderBy(x => x.SegmentIndex))
- {
- effectiveSegments.Add(s);
-
- if (s.SegmentIndex != max)
- {
- effectiveSegments.Add(CreateInterSegment(InterSegmentLength));
- }
- }
-
- return effectiveSegments;
- }
- else
- {
- return Segments.OrderBy(x => x.SegmentIndex).ToObservableCollection();
- }
- }
- }
-
- /// <summary>
- /// Gets the ordered segments.
- /// </summary>
- [NotMapped]
- [JsonIgnore]
- public ObservableCollection<Segment> OrderedSegments
- {
- get
- {
- return Segments.OrderBy(x => x.SegmentIndex).ToObservableCollection();
- }
- }
-
- /// <summary>
- /// Gets or sets the job fine tuning status.
- /// </summary>
- [NotMapped]
- [JsonIgnore]
- public FineTuningStatuses JobFineTuningStatus
- {
- get { return (FineTuningStatuses)FineTuningStatus; }
- set { FineTuningStatus = value.ToInt32(); RaisePropertyChangedAuto(); }
- }
-
- /// <summary>
- /// Gets or sets the job sample dye status.
- /// </summary>
- [NotMapped]
- [JsonIgnore]
- public SampleDyeStatuses JobSampleDyeStatus
- {
- get { return (SampleDyeStatuses)SampleDyeStatus; }
- set { SampleDyeStatus = value.ToInt32(); RaisePropertyChangedAuto(); }
- }
-
- private JobDesignations _designation;
- [NotMapped]
- [JsonIgnore]
- public JobDesignations Designation
- {
- get { return _designation; }
- set { _designation = value; RaisePropertyChangedAuto(); }
- }
-
- [NotMapped]
- [JsonIgnore]
- public EditingStates JobEditingState
- {
- get { return (EditingStates)EditingState; }
- set { EditingState = value.ToInt32(); RaisePropertyChangedAuto(); }
- }
-
- #endregion
-
- #region Event Handlers
-
- /// <summary>
- /// Handles the CollectionChanged event of the Segments collection.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="System.Collections.Specialized.NotifyCollectionChangedEventArgs"/> instance containing the event data.</param>
- private void Segments_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
- {
- foreach (var segment in Segments.ToList())
- {
- segment.PropertyChanged -= Segment_PropertyChanged;
- segment.PropertyChanged += Segment_PropertyChanged;
- }
-
- OnLengthChanged();
- RaisePropertyChanged(nameof(EffectiveSegments));
- }
-
- /// <summary>
- /// Handles the PropertyChanged event of all job segments.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="System.ComponentModel.PropertyChangedEventArgs"/> instance containing the event data.</param>
- private void Segment_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
- {
- if (e.PropertyName == nameof(Segment.Length))
- {
- OnLengthChanged();
- }
- }
-
- #endregion
-
- #region Virtual Methods
-
- /// <summary>
- /// Called when the <see cref="Length"/> property has been changed
- /// </summary>
- protected virtual void OnLengthChanged()
- {
- if (_lastLength != GetLength())
- {
- RaisePropertyChanged(nameof(Length));
- RaisePropertyChanged(nameof(LengthIncludingNumberOfUnits));
- LengthChanged?.Invoke(this, new EventArgs());
- }
- }
-
- #endregion
-
- #region Override Methods
-
- /// <summary>
- /// Raises the property changed event.
- /// </summary>
- /// <param name="propName">Name of the property.</param>
- protected override void RaisePropertyChanged(string propName)
- {
- base.RaisePropertyChanged(propName);
-
- if (propName == nameof(Segments))
- {
- if (Segments != null)
- {
- Segments.CollectionChanged -= Segments_CollectionChanged;
- Segments.CollectionChanged += Segments_CollectionChanged;
-
- OnLengthChanged();
- RaisePropertyChanged(nameof(EffectiveSegments));
- }
- }
-
- if (propName == nameof(InterSegmentLength) || propName == nameof(EnableInterSegment) || propName == nameof(SpoolsDistribution))
- {
- OnLengthChanged();
- RaisePropertyChanged(nameof(EffectiveSegments));
- }
-
- if (propName == nameof(ColorSpace))
- {
- //Make all brush stops the same color space if job color space is not null!
- if (ColorSpace != null)
- {
- Segments.SelectMany(x => x.BrushStops).ToList().ForEach(x => x.ColorSpace = ColorSpace);
- }
- }
-
- if (propName == nameof(NumberOfUnits))
- {
- LengthChanged?.Invoke(this, new EventArgs());
- }
-
- if (propName == nameof(LengthPercentageFactor))
- {
- OnLengthChanged();
- Segments.ToList().ForEach(x => x.RaiseLengthWithFactorChanged());
- }
- }
-
- public override Job Clone()
- {
- Job cloned = base.Clone();
-
- cloned.Name = Name + " - Copy";
- cloned.CreationDate = DateTime.UtcNow;
- cloned.LastRun = null;
- cloned.ColorSpace = ColorSpace;
- cloned.Customer = Customer;
- cloned.Rml = Rml;
- cloned.SpoolType = SpoolType;
- cloned.WindingMethod = WindingMethod;
- cloned.JobStatus = JobStatuses.Draft;
- cloned.Segments = Segments.Select(x => x.Clone(cloned)).ToSynchronizedObservableCollection();
-
- foreach (var segment in cloned.Segments)
- {
- segment.JobGuid = cloned.Guid;
- segment.Job = cloned;
- }
-
- return cloned;
- }
-
- public override void DefferedDelete(ObservablesContext context)
- {
- Segments.ToList().ForEach(x => x.DefferedDelete(context));
- Segments.Clear();
- base.DefferedDelete(context);
- }
-
- #endregion
-
- #region Private Methods
-
- private double GetLength()
- {
- return Segments.Sum(x => x.LengthWithFactor) + ((EnableInterSegment && IsAllSegmentsPerSpool) ? (InterSegmentLength * (Segments.Count > 0 ? Segments.Count - 1 : Segments.Count)) : 0);
- }
-
- #endregion
-
- #region Public Methods
-
- public BitmapSource CreateSegmentsPie(double width, double height)
- {
- Bitmap bmp = new Bitmap((int)width, (int)height);
-
- using (Graphics g = Graphics.FromImage(bmp))
- {
- g.Clear(Color.Transparent);
- g.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
- g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.High;
- g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
-
- int fromAngle = -90;
- double totalLength = Segments.Sum(x => x.Length); //Excluding inter segment.
-
- foreach (var segment in OrderedSegments)
- {
- int toAngle = (int)((segment.Length / totalLength) * 360d);
- Rectangle rect = new Rectangle(0, 0, bmp.Width - 2, bmp.Height - 2);
- g.FillPie(segment.CreateGdiBrush(bmp.Width - 2, bmp.Height - 2), rect, fromAngle, toAngle);
-
- Pen pen = new Pen(Color.Gainsboro);
- g.DrawEllipse(pen, rect);
- pen.Dispose();
- fromAngle += toAngle;
- }
- }
-
- var source = bmp.ToBitmapSource();
- bmp.Dispose();
- return source;
- }
-
- /// <summary>
- /// Adds a new solid segment.
- /// </summary>
- public Segment AddSolidSegment()
- {
- return AddSolidSegment(System.Windows.Media.Colors.Black);
- }
-
- /// <summary>
- /// Adds a new solid segment.
- /// </summary>
- public Segment AddSolidSegment(System.Windows.Media.Color color)
- {
- return AddSolidSegment(color, 10);
- }
-
- /// <summary>
- /// Adds a new solid segment.
- /// </summary>
- public Segment AddSolidSegment(double length)
- {
- return AddSolidSegment(System.Windows.Media.Colors.White, length);
- }
-
- /// <summary>
- /// Adds a new solid segment.
- /// </summary>
- public Segment AddSolidSegment(System.Windows.Media.Color color, double length)
- {
- Segment segment = new Segment();
- segment.Name = "Standard Segment";
-
- if (Segments.Count > 0)
- {
- segment.SegmentIndex = Segments.Max(x => x.SegmentIndex) + 1;
- }
- else
- {
- segment.SegmentIndex = 1;
- }
-
- segment.Length = length;
-
- segment.Job = this;
-
- var stop = segment.AddBrushStop();
- stop.Color = color;
- Segments.Add(segment);
-
- return segment;
- }
-
- /// <summary>
- /// Adds a new gradient segment.
- /// </summary>
- public Segment AddGradientSegment()
- {
- return AddGradientSegment(10);
- }
-
- /// <summary>
- /// Adds a new gradient segment.
- /// </summary>
- public Segment AddGradientSegment(double length)
- {
- var segment = AddSolidSegment(length);
- segment.BrushStops.Last().Color = System.Windows.Media.Colors.Silver;
- segment.AddBrushStop();
- segment.BrushStops.Last().Color = System.Windows.Media.Colors.DimGray;
- return segment;
- }
-
- /// <summary>
- /// Gets the duration estimation for this job.
- /// </summary>
- /// <param name="processParameters">The process parameters.</param>
- /// <returns></returns>
- public TimeSpan GetEstimatedDuration(ProcessParametersTable processParameters)
- {
- if (processParameters.DyeingSpeed == 0)
- {
- throw new ArgumentException("Process parameters dying speed cannot be zero.");
- }
- return TimeSpan.FromSeconds((LengthIncludingNumberOfUnits + processParameters.DryerBufferLength) / (processParameters.DyeingSpeed / 100d));
- }
-
- /// <summary>
- /// Translates the job progress to time.
- /// </summary>
- /// <param name="progress">The progress.</param>
- /// <param name="processParameters">The process parameters.</param>
- /// <returns></returns>
- public static TimeSpan TranslateProgressToTime(double progress, ProcessParametersTable processParameters)
- {
- return TimeSpan.FromSeconds(progress / (processParameters.DyeingSpeed / 100d));
- }
-
- /// <summary>
- /// Creates an inter segment.
- /// </summary>
- /// <param name="length">The length.</param>
- /// <returns></returns>
- public static Segment CreateInterSegment(double length)
- {
- return new Segment()
- {
- IsInterSegment = true,
- Length = length,
- Name = "Inter Segment",
- BrushStops = new SynchronizedObservableCollection<BrushStop>()
- {
- new BrushStop()
- {
- ColorSpace = new ColorSpace(),
- Color = System.Windows.Media.Colors.White,
- }
- },
- };
- }
-
- public Task<JobFile> ToJobFile()
- {
- return Task.Factory.StartNew<JobFile>(() =>
- {
- using (ObservablesContext db = ObservablesContext.CreateDefault())
- {
- var job = new JobBuilder(db).Set(Guid).WithUser().WithRML().WithSegments().WithBrushStops().Build();
-
- var jobFile = new JobFile();
-
- jobFile.ColorSpaceGuid = job.ColorSpaceGuid.ToStringOrEmpty();
- jobFile.Customer = job.Customer != null ? job.Customer.Name : String.Empty;
- jobFile.Description = job.Description.ToStringOrEmpty();
-
- if (job.HasEmbroideryFile)
- {
- jobFile.HasEmbroideryFile = job.HasEmbroideryFile;
- jobFile.EmbroideryFileData = ByteString.CopyFrom(job.EmbroideryFileData);
- jobFile.EmbroideryFileName = job.EmbroideryFileName;
- jobFile.EmbroideryJpeg = ByteString.CopyFrom(job.EmbroideryJpeg);
- }
-
- jobFile.EnableInterSegment = job.EnableInterSegment;
- jobFile.EnableLubrication = job.EnableLubrication;
- jobFile.InterSegmentLength = job.InterSegmentLength;
- jobFile.LengthPercentageFactor = job.LengthPercentageFactor;
- jobFile.Name = job.Name.ToStringOrEmpty();
- jobFile.NumberOfUnits = job.NumberOfUnits;
- jobFile.RmlGuid = job.RmlGuid;
- jobFile.SampleUnitsOrMeters = job.SampleUnitsOrMeters;
- jobFile.SpoolsDistribution = job.SpoolsDistribution;
- jobFile.SpoolTypeGuid = job.SpoolTypeGuid;
- jobFile.Type = job.Type;
- jobFile.WindingMethodGuid = job.WindingMethodGuid;
-
- foreach (var segment in job.OrderedSegments)
- {
- JobFileSegment s = new JobFileSegment();
- s.Length = segment.Length;
- s.Name = segment.Name.ToStringOrEmpty();
- jobFile.Segments.Add(s);
-
- foreach (var stop in segment.BrushStops.OrderBy(x => x.StopIndex))
- {
- JobFileBrushStop st = new JobFileBrushStop();
- stop.MapPrimitivesWithStringsNoNullsTo(st);
- s.BrushStops.Add(st);
- }
- }
-
- return jobFile;
- }
- });
- }
-
- public static Task<Job> FromJobFile(JobFile jobFile, String machineGuid, String userGuid)
- {
- return Task.Factory.StartNew(() =>
- {
- using (ObservablesContext db = ObservablesContext.CreateDefault())
- {
- var job = new Job();
- job.MachineGuid = machineGuid;
- job.UserGuid = userGuid;
-
- var job_color_space = db.ColorSpaces.SingleOrDefault(x => x.Guid == jobFile.ColorSpaceGuid);
- if (job_color_space == null) throw new ArgumentException("Could not load the specified job file. Job color space could not be located on database.");
- job.ColorSpaceGuid = jobFile.ColorSpaceGuid;
-
-
- var job_customer = db.Customers.FirstOrDefault(x => x.Name == jobFile.Customer);
-
- if (job_customer != null)
- {
- job.CustomerGuid = job_customer.Guid;
- }
-
- job.Description = jobFile.Description.ToNullIfEmpty();
-
- if (jobFile.HasEmbroideryFile)
- {
- job.HasEmbroideryFile = jobFile.HasEmbroideryFile;
- job.EmbroideryFileData = jobFile.EmbroideryFileData.ToByteArray();
- job.EmbroideryFileName = jobFile.EmbroideryFileName;
- job.EmbroideryJpeg = jobFile.EmbroideryJpeg.ToByteArray();
- }
- job.EnableInterSegment = jobFile.EnableInterSegment;
- job.EnableLubrication = jobFile.EnableLubrication;
- job.InterSegmentLength = jobFile.InterSegmentLength;
- job.LengthPercentageFactor = jobFile.LengthPercentageFactor;
- job.Name = jobFile.Name.ToNullIfEmpty();
- job.NumberOfUnits = jobFile.NumberOfUnits;
-
- var job_rml = db.Rmls.SingleOrDefault(x => x.Guid == jobFile.RmlGuid);
-
- if (job_rml == null) throw new ArgumentException("Could not load the specified job file. Job media type could not be located on database.");
-
- job.RmlGuid = jobFile.RmlGuid;
- job.SampleUnitsOrMeters = jobFile.SampleUnitsOrMeters;
- job.SpoolsDistribution = jobFile.SpoolsDistribution;
-
- var job_spool_type = db.SpoolTypes.SingleOrDefault(x => x.Guid == jobFile.SpoolTypeGuid);
-
- if (job_spool_type == null) throw new ArgumentException("Could not load the specified job file. Job spool type could not be located on database.");
-
- job.SpoolTypeGuid = jobFile.SpoolTypeGuid;
- job.Type = jobFile.Type;
-
- var job_winding_method = db.WindingMethods.Single(x => x.Guid == jobFile.WindingMethodGuid);
-
- if (job_winding_method == null) throw new ArgumentException("Could not load the specified job file. Job winding method could not be located on database.");
-
- job.WindingMethodGuid = jobFile.WindingMethodGuid;
-
- for (int i = 0; i < jobFile.Segments.Count; i++)
- {
- var segment = jobFile.Segments[i];
- Segment s = new Segment();
- s.JobGuid = job.Guid;
- s.Name = segment.Name.ToNullIfEmpty();
- s.Length = segment.Length;
- s.SegmentIndex = i + 1;
- job.Segments.Add(s);
-
- for (int j = 0; j < segment.BrushStops.Count; j++)
- {
- var stop = segment.BrushStops[j];
-
- var stop_color_space = db.ColorSpaces.SingleOrDefault(x => x.Guid == stop.ColorSpaceGuid);
- if (stop_color_space == null) throw new ArgumentException("Could not load the specified job file. Job brush stop color space could not be located on database.");
-
- if (!String.IsNullOrWhiteSpace(stop.ColorCatalogGuid))
- {
- var stop_color_catalog = db.ColorCatalogs.SingleOrDefault(x => x.Guid == stop.ColorCatalogGuid);
- if (stop_color_catalog == null) throw new ArgumentException("Could not load the specified job file. Job brush stop catalog color could not be located on database.");
- }
-
- BrushStop st = new BrushStop();
- st.StopIndex = j + 1;
- st.SegmentGuid = s.Guid;
- stop.MapPrimitivesWithStringsNoNullsTo(st);
- s.BrushStops.Add(st);
- }
- }
-
- return job;
- }
- });
- }
-
- #endregion
-
- #region Validation
-
- protected override void OnValidating(ObservablesContext context)
- {
- base.OnValidating(context);
-
- if (String.IsNullOrWhiteSpace(Name))
- {
- InsertError(nameof(Name), "Job name is required");
- }
- }
-
- #endregion
- }
-}
-
diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/JobRun.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/JobRun.cs
deleted file mode 100644
index 555857f53..000000000
--- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/JobRun.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Tango.BL.Enumerations;
-
-namespace Tango.BL.Entities
-{
- public partial class JobRun
- {
- [NotMapped]
- [JsonIgnore]
- public JobRunStatus JobRunStatus
- {
- get { return (JobRunStatus)Status; }
- set { Status = (int)value; }
- }
-
- protected override void RaisePropertyChanged(string propName)
- {
- base.RaisePropertyChanged(propName);
-
- if (propName == nameof(Status))
- {
- RaisePropertyChanged(nameof(JobRunStatus));
- }
- }
- }
-}
diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/LiquidType.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/LiquidType.cs
deleted file mode 100644
index 9e350bf9d..000000000
--- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/LiquidType.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Tango.BL.Entities
-{
- public partial class LiquidType
- {
- public PMR.ColorLab.LiquidType ToColorLibLiquidType()
- {
- return (PMR.ColorLab.LiquidType)Code;
- }
- }
-}
diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/LiquidTypesRml.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/LiquidTypesRml.cs
deleted file mode 100644
index ef00cb5a8..000000000
--- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/LiquidTypesRml.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Tango.PMR.ColorLab;
-
-namespace Tango.BL.Entities
-{
- public partial class LiquidTypesRml
- {
- public CalibrationData GetCalibrationData()
- {
- if (DefaultCatData == null)
- {
- throw LogManager.Log(new NullReferenceException("The default RML calibration data is null."));
- }
- return CalibrationData.Parser.ParseFrom(DefaultCatData);
- }
-
- public void PutCalibrationData(CalibrationData data)
- {
- DefaultCatData = data.ToBytes();
- }
- }
-}
diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Machine.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Machine.cs
deleted file mode 100644
index 6f54640f5..000000000
--- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Machine.cs
+++ /dev/null
@@ -1,153 +0,0 @@
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Linq;
-using System.Reflection;
-using System.Text;
-using System.Threading.Tasks;
-using Tango.BL.Enumerations;
-
-namespace Tango.BL.Entities
-{
- public partial class Machine
- {
- #region Properties
-
- /// <summary>
- /// Gets or sets the <see cref="TargetJobTypes"/> property as a collection of <see cref="JobTypes"/>.
- /// </summary>
- [NotMapped]
- [JsonIgnore]
- public List<JobTypes> SupportedJobTypes
- {
- get
- {
- try
- {
- if (!String.IsNullOrWhiteSpace(TargetJobTypes))
- {
- return TargetJobTypes.Split(',').Select(x => (JobTypes)int.Parse(x)).ToList();
- }
- else
- {
- return new List<JobTypes>();
- }
- }
- catch (Exception ex)
- {
- LogManager.Log(ex, "Could not parse machine target job types!");
- return new List<JobTypes>();
- }
- }
- set
- {
- TargetJobTypes = String.Join(",", value.Select(x => x.ToInt32()));
- }
- }
-
- /// <summary>
- /// Gets or sets the <see cref="TargetColorSpaceCodes"/> property as a collection of <see cref="ColorSpaces"/>.
- /// </summary>
- [NotMapped]
- [JsonIgnore]
- public List<ColorSpaces> SupportedColorSpaces
- {
- get
- {
- try
- {
- if (!String.IsNullOrWhiteSpace(TargetColorSpaceCodes))
- {
- return TargetColorSpaceCodes.Split(',').Select(x => (ColorSpaces)int.Parse(x)).ToList();
- }
- else
- {
- return new List<ColorSpaces>();
- }
- }
- catch (Exception ex)
- {
- LogManager.Log(ex, "Could not parse machine target color space codes!");
- return new List<ColorSpaces>();
- }
- }
- set
- {
- TargetColorSpaceCodes = String.Join(",", value.Select(x => x.ToInt32()));
- }
- }
-
- #endregion
-
- protected override void RaisePropertyChanged(string propName)
- {
- base.RaisePropertyChanged(propName);
-
- if (propName == nameof(TargetJobTypes))
- {
- RaisePropertyChanged(nameof(SupportedJobTypes));
- }
- else if (propName == nameof(TargetColorSpaceCodes))
- {
- RaisePropertyChanged(nameof(SupportedColorSpaces));
- }
- }
-
- public override void Save(ObservablesContext context)
- {
- foreach (var job in Jobs)
- {
- job.JobIndex = Jobs.IndexOf(job);
-
- foreach (var segment in job.Segments)
- {
- //segment.SegmentIndex = job.Segments.IndexOf(segment);
-
- foreach (var stop in segment.BrushStops)
- {
- foreach (var prop in typeof(BrushStop).GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(x => x.PropertyType == typeof(double)))
- {
- double value = (double)prop.GetValue(stop);
-
- if (double.IsInfinity(value))
- {
- prop.SetValue(stop, 0d);
- }
- }
- }
- }
- }
-
- base.Save(context);
- }
-
- public override Machine Clone()
- {
- var cloned = base.Clone();
- cloned.Cats = Cats.Select(x => x.Clone(cloned)).ToSynchronizedObservableCollection();
- cloned.Configuration = Configuration.Clone();
- cloned.ConfigurationGuid = cloned.Configuration.Guid;
- cloned.Spools = Spools.Select(x => x.Clone(cloned)).ToSynchronizedObservableCollection();
-
- return cloned;
- }
-
- public override List<string> GetIgnoreProperties()
- {
- return base.GetIgnoreProperties().Concat(new List<string>()
- {
- nameof(this.Organization),
- nameof(this.DefaultRml),
- nameof(this.DefaultColorSpace),
- nameof(this.DefaultSpoolType),
- nameof(this.Jobs),
- nameof(this.MachinesEvents),
- nameof(this.MachineVersion),
- nameof(this.Name),
- nameof(this.SerialNumber),
- }).ToList();
- }
- }
-}
diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/MachineEvent.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/MachineEvent.cs
deleted file mode 100644
index 78e6a5904..000000000
--- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/MachineEvent.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Tango.BL.Enumerations;
-using Tango.PMR.Diagnostics;
-
-namespace Tango.BL.Entities
-{
- [Serializable]
- public partial class MachinesEvent
- {
- private static Dictionary<EventTypes, EventType> _eventTypesGuids;
- private static bool _eventFactoryInitialized;
-
- private void InitializeEventFactory()
- {
- if (!_eventFactoryInitialized)
- {
- _eventFactoryInitialized = true;
-
- _eventTypesGuids = new Dictionary<EventTypes, EventType>();
-
- foreach (var type in ObservablesStaticCollections.Instance.EventTypes)
- {
- _eventTypesGuids.Add((EventTypes)type.Code, type);
- }
- }
- }
-
- public MachinesEvent(Event pmrEvent) : this()
- {
- InitializeEventFactory();
-
- DateTime = DateTime.UtcNow;
- Description = pmrEvent.Message;
- EventType = _eventTypesGuids[(EventTypes)pmrEvent.Type];
- }
-
- [NotMapped]
- public int Code
- {
- get { return EventType.Code; }
- }
-
- [NotMapped]
- public String Name
- {
- get { return EventType.Name; }
- }
-
- [NotMapped]
- public EventTypesCategories Category
- {
- get { return (EventTypesCategories)EventType.EventTypesCategory.Code; }
- }
-
- [NotMapped]
- public EventTypesGroups Group
- {
- get { return (EventTypesGroups)EventType.EventTypesGroup.Code; }
- }
-
- [NotMapped]
- public EventTypes Type
- {
- get { return (EventTypes)EventType.Code; }
- }
-
- [NotMapped]
- public List<ActionTypes> ActionTypes
- {
- get { return EventType.EventTypesActions.Select(x => (ActionTypes)x.ActionType.Code).Distinct().ToList(); }
- }
- }
-}
diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/MachineVersion.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/MachineVersion.cs
deleted file mode 100644
index 1cd43dcf1..000000000
--- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/MachineVersion.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Data.Entity;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Tango.BL.Builders;
-
-namespace Tango.BL.Entities
-{
- public partial class MachineVersion
- {
- public async Task ApplyPrototypeMachine(Machine machine, ObservablesContext context)
- {
- machine = await new MachineBuilder(context)
- .Set(machine)
- .WithOrganization()
- .WithConfiguration()
- .WithSpools()
- .WithCats()
- .BuildAsync();
-
- PrototypeMachineData = machine.ToJson();
- }
-
- public Machine CreatePrototypeMachine(ObservablesContext context)
- {
- Machine machine = Machine.FromJson(PrototypeMachineData);
- machine.OrganizationGuid = null;
- machine.ConfigurationGuid = null;
- machine.ConfigurationGuid = machine.Configuration.Guid;
-
- foreach (var cat in machine.Cats)
- {
- cat.MachineGuid = machine.Guid;
- }
-
- machine.MachineVersionGuid = Guid;
- machine.ProductionDate = DateTime.UtcNow;
-
- foreach (var idsPack in machine.Configuration.IdsPacks)
- {
- idsPack.DispenserGuid = null;
- idsPack.ConfigurationGuid = machine.ConfigurationGuid;
- }
-
- foreach (var spool in machine.Spools)
- {
- spool.MachineGuid = machine.Guid;
- }
-
- return machine;
- }
- }
-}
diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/MediaColor.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/MediaColor.cs
deleted file mode 100644
index 13fa567e2..000000000
--- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/MediaColor.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using ColorMine.ColorSpaces;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Media;
-
-namespace Tango.BL.Entities
-{
- public partial class MediaColor
- {
- [NotMapped]
- [JsonIgnore]
- public Color Color
- {
- get
- {
- Lab lab = new Lab(L, A, B);
- var rgb = lab.To<Rgb>();
- return Color.FromRgb((byte)rgb.R, (byte)rgb.G, (byte)rgb.B);
- }
- }
-
- protected override void RaisePropertyChanged(string propName)
- {
- base.RaisePropertyChanged(propName);
-
- if (propName == nameof(L) || propName == nameof(A) || propName == nameof(B))
- {
- RaisePropertyChanged(nameof(Color));
- }
- }
- }
-}
diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/ProcessParametersTable.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/ProcessParametersTable.cs
deleted file mode 100644
index 0bb75120e..000000000
--- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/ProcessParametersTable.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Tango.BL.Entities
-{
- public partial class ProcessParametersTable
- {
- public event EventHandler DyeingSpeedMinInkUptakeChanged;
-
- protected override void RaisePropertyChanged(string propName)
- {
- base.RaisePropertyChanged(propName);
-
- if (propName == nameof(DyeingSpeed) || propName == nameof(MinInkUptake))
- {
- OnDyeingSpeedMinInkUptakeChanged();
- }
- }
-
- protected virtual void OnDyeingSpeedMinInkUptakeChanged()
- {
- DyeingSpeedMinInkUptakeChanged?.Invoke(this, new EventArgs());
- }
- }
-}
diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/ProcessParametersTablesGroup.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/ProcessParametersTablesGroup.cs
deleted file mode 100644
index 3ea5dbb45..000000000
--- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/ProcessParametersTablesGroup.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Tango.BL.Entities
-{
- public partial class ProcessParametersTablesGroup
- {
- public override ProcessParametersTablesGroup Clone()
- {
- ProcessParametersTablesGroup cloned = base.Clone();
-
- List<ProcessParametersTable> tables = new List<ProcessParametersTable>();
-
- foreach (var table in ProcessParametersTables)
- {
- var newTable = table.Clone();
- newTable.ProcessParametersTablesGroup = cloned;
- tables.Add(newTable);
- }
-
- cloned.ProcessParametersTables = tables.ToSynchronizedObservableCollection();
-
- return cloned;
- }
- }
-}
diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Segment.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Segment.cs
deleted file mode 100644
index 8737e0413..000000000
--- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Segment.cs
+++ /dev/null
@@ -1,324 +0,0 @@
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Collections.Specialized;
-using System.ComponentModel;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Media;
-
-namespace Tango.BL.Entities
-{
- public partial class Segment
- {
- private double _lastLength;
- private LinearGradientBrush _brush;
-
- public override void Save(ObservablesContext context)
- {
- for (int i = 0; i < BrushStops.Count; i++)
- {
- BrushStops[i].StopIndex = i;
- }
-
- base.Save(context);
- }
-
- protected override void RaisePropertyChanged(string propName)
- {
- base.RaisePropertyChanged(propName);
-
- if (propName == nameof(Length) && _lastLength != Length)
- {
- BrushStops.ToList().ForEach(x => x.RaiseOffsetChanged());
- _lastLength = Length;
- RaisePropertyChanged(nameof(LengthWithFactor));
- }
-
- if (propName == nameof(BrushStops))
- {
- if (BrushStops != null)
- {
- BrushStops.CollectionChanged -= BrushStops_CollectionChanged;
- BrushStops.CollectionChanged += BrushStops_CollectionChanged;
-
- foreach (var stop in BrushStops.ToList())
- {
- stop.RaiseOffsetChanged();
- }
-
- RaiseSegmentBrushChanged();
- }
- }
- }
-
- private void BrushStops_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
- {
- foreach (var stop in BrushStops.ToList())
- {
- stop.RaiseOffsetChanged();
- }
-
- if (BrushStops.Count > 0)
- {
- BrushStops.First().OffsetPercent = 0;
- }
- if (BrushStops.Count > 1)
- {
- BrushStops.Last().OffsetPercent = 100;
- }
-
- RaiseSegmentBrushChanged();
- }
-
- private TimeSpan _remainingTime;
- [NotMapped]
- [JsonIgnore]
- public TimeSpan RemainingTime
- {
- get { return _remainingTime; }
- set { _remainingTime = value; RaisePropertyChangedAuto(); }
- }
-
- private TimeSpan _estimatedDuration;
- [NotMapped]
- [JsonIgnore]
- public TimeSpan EstimatedDuration
- {
- get { return _estimatedDuration; }
- set { _estimatedDuration = value; }
- }
-
- private double _progress;
- [NotMapped]
- [JsonIgnore]
- public double Progress
- {
- get { return _progress; }
- set { _progress = value; RaisePropertyChangedAuto(); }
- }
-
- private bool _started;
- [NotMapped]
- [JsonIgnore]
- public bool Started
- {
- get { return _started; }
- set { _started = value; RaisePropertyChangedAuto(); }
- }
-
- private bool _completed;
- [NotMapped]
- [JsonIgnore]
- public bool Completed
- {
- get { return _completed; }
- set { _completed = value; RaisePropertyChangedAuto(); }
- }
-
- [NotMapped]
- [JsonIgnore]
- public Brush SegmentBrush
- {
- get
- {
- return GetSegmentBrush();
- }
- }
-
- private bool _isInterSegment;
- [NotMapped]
- [JsonIgnore]
- public bool IsInterSegment
- {
- get { return _isInterSegment; }
- set { _isInterSegment = value; RaisePropertyChangedAuto(); }
- }
-
- [NotMapped]
- public bool HasOutOfGamutBrushStop
- {
- get { return BrushStops.Any(x => x.IsOutOfGamut); }
- }
-
- [NotMapped]
- [JsonIgnore]
- public double LengthWithFactor
- {
- get { return Job != null && !IsInterSegment ? (Length + Length * (Job.LengthPercentageFactor / 100)) : Length; }
- }
-
- internal void RaiseHasOutOfGamutBrushStop()
- {
- RaisePropertyChanged(nameof(HasOutOfGamutBrushStop));
- }
-
- public override Segment Clone()
- {
- Segment cloned = base.Clone();
-
- cloned.BrushStops = BrushStops.Select(x => x.Clone()).ToSynchronizedObservableCollection();
-
- foreach (var stop in cloned.BrushStops)
- {
- stop.SegmentGuid = cloned.Guid;
- stop.Segment = cloned;
- }
-
- return cloned;
- }
-
- public Segment Clone(Job job)
- {
- Segment cloned = base.Clone();
-
- cloned.BrushStops = BrushStops.Select(x => x.Clone(cloned)).ToSynchronizedObservableCollection();
-
- cloned.Job = job;
- cloned.JobGuid = job.Guid;
-
- return cloned;
- }
-
- public override void DefferedDelete(ObservablesContext context)
- {
- BrushStops.ToList().ForEach(x => x.DefferedDelete(context));
- BrushStops.Clear();
- base.DefferedDelete(context);
- }
-
- public LinearGradientBrush GetSegmentBrush()
- {
- if (_brush == null || _brush.GradientStops.Count != BrushStops.Count)
- {
- GradientStopCollection stops = new GradientStopCollection();
-
- foreach (var stop in BrushStops.ToList().OrderBy(x => x.StopIndex).ToList())
- {
- stops.Add(new GradientStop(stop.Color, stop.OffsetPercent / 100d));
- }
-
- LinearGradientBrush brush = new LinearGradientBrush();
- brush.StartPoint = new Point(0, 0);
- brush.EndPoint = new Point(1, 0);
-
- brush.GradientStops = stops;
-
- _brush = brush;
- return brush;
- }
- else
- {
- for (int i = 0; i < BrushStops.Count; i++)
- {
- _brush.GradientStops[i].Color = BrushStops[i].Color;
- _brush.GradientStops[i].Offset = BrushStops[i].OffsetPercent / 100d;
- }
-
- return _brush;
- }
- }
-
- public System.Drawing.Brush CreateGdiBrush(int width, int height)
- {
- if (BrushStops.Count > 1)
- {
- System.Drawing.Drawing2D.LinearGradientBrush brush = new System.Drawing.Drawing2D.LinearGradientBrush(new System.Drawing.PointF(0, 0), new System.Drawing.Point(width, height), System.Drawing.Color.Black, System.Drawing.Color.Black);
-
- System.Drawing.Drawing2D.ColorBlend blend = new System.Drawing.Drawing2D.ColorBlend();
-
- List<System.Drawing.Color> colors = new List<System.Drawing.Color>();
- List<float> offsets = new List<float>();
-
- foreach (var stop in BrushStops.ToList().OrderBy(x => x.OffsetPercent))
- {
- colors.Add(stop.Color.ToGdiColor());
- offsets.Add((float)stop.OffsetPercent / 100f);
- }
-
- blend.Colors = colors.ToArray();
- blend.Positions = offsets.ToArray();
-
- brush.InterpolationColors = blend;
-
- return brush;
- }
- else if (BrushStops.Count == 1)
- {
- return new System.Drawing.SolidBrush(BrushStops.First().Color.ToGdiColor());
- }
- else
- {
- return System.Drawing.Brushes.Black;
- }
- }
-
- public void RaiseSegmentBrushChanged()
- {
- RaisePropertyChanged(nameof(SegmentBrush));
- }
-
- public void RaiseLengthWithFactorChanged()
- {
- RaisePropertyChanged(nameof(LengthWithFactor));
- }
-
- public BrushStop AddBrushStop()
- {
- BrushStop stop = new BrushStop();
-
- if (Job.ColorSpace != null)
- {
- stop.ColorSpace = Job.ColorSpace;
- }
- else
- {
- stop.ColorSpaceGuid = Job.ColorSpaceGuid;
- }
-
- if (BrushStops.Count > 0)
- {
- stop.StopIndex = BrushStops.Max(x => x.StopIndex) + 1;
- stop.OffsetPercent = 100;
- }
- else
- {
- stop.StopIndex = 1;
- }
-
- stop.Segment = this;
- stop.Color = Colors.Black;
-
- BrushStops.Add(stop);
-
- return stop;
- }
-
- public Segment GetNextSegment()
- {
- return Job.OrderedSegments.FirstOrDefault(x => x.SegmentIndex > SegmentIndex);
- }
-
- public Segment GetPreviousSegment()
- {
- return Job.OrderedSegments.LastOrDefault(x => x.SegmentIndex < SegmentIndex);
- }
-
- /// <summary>
- /// Gets the duration estimation for this job.
- /// </summary>
- /// <param name="processParameters">The process parameters.</param>
- /// <returns></returns>
- public TimeSpan GetEstimatedDuration(ProcessParametersTable processParameters)
- {
- if (processParameters.DyeingSpeed == 0)
- {
- throw new ArgumentException("Process parameters dying speed cannot be zero.");
- }
- return TimeSpan.FromSeconds(Length / (processParameters.DyeingSpeed / 100d));
- }
- }
-}
diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Spool.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Spool.cs
deleted file mode 100644
index f93e90d00..000000000
--- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Spool.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Tango.BL.Entities
-{
- public partial class Spool
- {
- public Spool Clone(Machine machine)
- {
- var cloned = base.Clone();
- cloned.Machine = machine;
- return cloned;
- }
-
- public override List<string> GetIgnoreProperties()
- {
- return base.GetIgnoreProperties().Concat(new List<String>()
- {
- nameof(this.Machine),
- nameof(this.SpoolType),
- }).ToList();
- }
- }
-}
diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/User.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/User.cs
deleted file mode 100644
index 6c1b03145..000000000
--- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/User.cs
+++ /dev/null
@@ -1,138 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Tango.BL.Enumerations;
-using SimpleValidator.Extensions;
-using Newtonsoft.Json;
-using System.Xml.Serialization;
-using Tango.Core.Cryptography;
-
-namespace Tango.BL.Entities
-{
- public partial class User
- {
- private static IHashGenerator _hashGenerator;
-
- private bool _passwordGatewayModified = false;
-
- /// <summary>
- /// Determines whether the user has the specified permission.
- /// </summary>
- /// <param name="permission">The permission.</param>
- /// <returns>
- /// <c>true</c> if the user has permission; otherwise, <c>false</c>.
- /// </returns>
- public bool HasPermission(Permissions permission)
- {
- return UsersRoles.Select(x => x.Role).ToList().SelectMany(x => x.RolesPermissions).ToList().Exists(x => x.Permission.Code == permission.ToInt32());
- }
-
- /// <summary>
- /// Gets the aggregated user roles as enumerations.
- /// </summary>
- [NotMapped]
- public List<Role> Roles
- {
- get { return UsersRoles.Select(x => x.Role).ToList(); }
- }
-
- /// <summary>
- /// Gets the aggregated user permissions as enumerations.
- /// </summary>
- [NotMapped]
- public List<Permission> Permissions
- {
- get
- {
- return UsersRoles.Select(x => x.Role).ToList().SelectMany(x => x.RolesPermissions).Select(x => x.Permission).ToList();
- }
- }
-
-
- private String _passwordGateway;
- /// <summary>
- /// Gets or sets the password gate way.
- /// </summary>
- [NotMapped]
- [JsonIgnore]
- [XmlIgnore]
- public String PasswordGateWay
- {
- get
- {
- return _passwordGateway;
- }
- set
- {
- _passwordGateway = value;
- Password = GetHashGenerator().Encrypt(_passwordGateway);
- RaisePropertyChangedAuto();
-
- _passwordGatewayModified = true;
- }
- }
-
- protected override void RaisePropertyChanged(string propName)
- {
- base.RaisePropertyChanged(propName);
-
- if (propName == nameof(Password))
- {
- RaisePropertyChanged(nameof(PasswordGateWay));
- }
- }
-
- public override bool Validate(ObservablesContext context)
- {
- return base.Validate(context) && Contact.Validate(context) && Address.Validate(context);
- }
-
- protected override void OnValidating(ObservablesContext context)
- {
- base.OnValidating(context);
-
- var users = context.Users.ToList();
-
- if (users.Exists(x => x.Guid != Guid && x.Email.ToLower() == Email.ToLower()))
- {
- InsertError(nameof(Email), "The specified email is already taken by another account.");
- }
-
- if (!Email.IsEmail())
- {
- InsertError(nameof(Email), "The specified email address is invalid.");
- }
-
- if (_passwordGatewayModified)
- {
- if (!PasswordGateWay.IsBetweenLength(4, 30))
- {
- InsertError(nameof(PasswordGateWay), "A user password must be at least 4 characters long and maximum 30.");
- }
- }
- }
-
- /// <summary>
- /// Gets the specified password hash.
- /// </summary>
- /// <param name="password">The password.</param>
- /// <returns></returns>
- public static String GetPasswordHash(String password)
- {
- return GetHashGenerator().Encrypt(password);
- }
-
- private static IHashGenerator GetHashGenerator()
- {
- if (_hashGenerator == null)
- {
- _hashGenerator = new BasicHashGenerator();
- }
-
- return _hashGenerator;
- }
- }
-}
diff --git a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj
index 78ab72db1..552aa3bc7 100644
--- a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj
+++ b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj
@@ -110,34 +110,100 @@
<Compile Include="Dispensing\LubricantDispensingCalc.cs" />
<Compile Include="Dispensing\StandardColorDispensingCalc.cs" />
<Compile Include="Dispensing\TransparentLiquidDispensingCalc.cs" />
- <Compile Include="EntitiesExtensions\ColorCatalog.cs" />
- <Compile Include="EntitiesExtensions\Contact.cs" />
- <Compile Include="EntitiesExtensions\Dispenser.cs" />
- <Compile Include="EntitiesExtensions\EventType.cs" />
- <Compile Include="EntitiesExtensions\IdsPack.cs" />
- <Compile Include="EntitiesExtensions\JobRun.cs" />
- <Compile Include="EntitiesExtensions\LiquidType.cs" />
- <Compile Include="EntitiesExtensions\LiquidTypesRml.cs" />
- <Compile Include="EntitiesExtensions\MachineEvent.cs" />
- <Compile Include="EntitiesExtensions\ProcessParametersTablesGroup.cs" />
- <Compile Include="EntitiesExtensions\Spool.cs" />
+ <Compile Include="Entities\ActionTypeBase.cs" />
+ <Compile Include="Entities\AddressBase.cs" />
+ <Compile Include="Entities\ApplicationDisplayPanelVersionBase.cs" />
+ <Compile Include="Entities\ApplicationFirmwareVersionBase.cs" />
+ <Compile Include="Entities\ApplicationOsVersionBase.cs" />
+ <Compile Include="Entities\BrushStopBase.cs" />
+ <Compile Include="Entities\CartridgeTypeBase.cs" />
+ <Compile Include="Entities\CatBase.cs" />
+ <Compile Include="Entities\CctBase.cs" />
+ <Compile Include="Entities\ColorCatalogBase.cs" />
+ <Compile Include="Entities\ColorSpaceBase.cs" />
+ <Compile Include="Entities\ConfigurationBase.cs" />
+ <Compile Include="Entities\ContactBase.cs" />
<Compile Include="Entities\Customer.cs" />
+ <Compile Include="Entities\CustomerBase.cs" />
<Compile Include="Entities\Dispenser.cs" />
+ <Compile Include="Entities\DispenserBase.cs" />
+ <Compile Include="Entities\DispenserTypeBase.cs" />
+ <Compile Include="Entities\EmbeddedFirmwareVersionBase.cs" />
+ <Compile Include="Entities\EventTypeBase.cs" />
+ <Compile Include="Entities\EventTypesActionBase.cs" />
<Compile Include="Entities\EventTypesCategory.cs" />
+ <Compile Include="Entities\EventTypesCategoryBase.cs" />
<Compile Include="Entities\EventTypesGroup.cs" />
+ <Compile Include="Entities\EventTypesGroupBase.cs" />
+ <Compile Include="Entities\FiberShapeBase.cs" />
+ <Compile Include="Entities\FiberSynthBase.cs" />
<Compile Include="Entities\HardwareBlower.cs" />
+ <Compile Include="Entities\HardwareBlowerBase.cs" />
<Compile Include="Entities\HardwareBlowerType.cs" />
+ <Compile Include="Entities\HardwareBlowerTypeBase.cs" />
<Compile Include="Entities\HardwareBreakSensor.cs" />
+ <Compile Include="Entities\HardwareBreakSensorBase.cs" />
<Compile Include="Entities\HardwareBreakSensorType.cs" />
+ <Compile Include="Entities\HardwareBreakSensorTypeBase.cs" />
+ <Compile Include="Entities\HardwareDancerBase.cs" />
+ <Compile Include="Entities\HardwareDancerTypeBase.cs" />
+ <Compile Include="Entities\HardwareMotorBase.cs" />
+ <Compile Include="Entities\HardwareMotorTypeBase.cs" />
+ <Compile Include="Entities\HardwarePidControlBase.cs" />
+ <Compile Include="Entities\HardwarePidControlTypeBase.cs" />
<Compile Include="Entities\HardwareSpeedSensor.cs" />
+ <Compile Include="Entities\HardwareSpeedSensorBase.cs" />
<Compile Include="Entities\HardwareSpeedSensorType.cs" />
+ <Compile Include="Entities\HardwareSpeedSensorTypeBase.cs" />
+ <Compile Include="Entities\HardwareVersionBase.cs" />
+ <Compile Include="Entities\HardwareWinderBase.cs" />
+ <Compile Include="Entities\HardwareWinderTypeBase.cs" />
<Compile Include="Entities\HtmlPage.cs" />
+ <Compile Include="Entities\HtmlPageBase.cs" />
+ <Compile Include="Entities\IdsPackBase.cs" />
+ <Compile Include="Entities\IdsPackFormulaBase.cs" />
+ <Compile Include="Entities\JobBase.cs" />
+ <Compile Include="Entities\JobRunBase.cs" />
+ <Compile Include="Entities\LinearMassDensityUnitBase.cs" />
+ <Compile Include="Entities\LiquidTypeBase.cs" />
+ <Compile Include="Entities\LiquidTypesRmlBase.cs" />
+ <Compile Include="Entities\MachineBase.cs" />
+ <Compile Include="Entities\MachinesEventBase.cs" />
+ <Compile Include="Entities\MachineStudioVersionBase.cs" />
+ <Compile Include="Entities\MachineVersionBase.cs" />
+ <Compile Include="Entities\MediaColorBase.cs" />
+ <Compile Include="Entities\MediaConditionBase.cs" />
+ <Compile Include="Entities\MediaMaterialBase.cs" />
+ <Compile Include="Entities\MediaPurposBase.cs" />
+ <Compile Include="Entities\MidTankTypeBase.cs" />
+ <Compile Include="Entities\OrganizationBase.cs" />
+ <Compile Include="Entities\PermissionBase.cs" />
+ <Compile Include="Entities\ProcessParametersTableBase.cs" />
+ <Compile Include="Entities\ProcessParametersTablesGroupBase.cs" />
+ <Compile Include="Entities\RmlBase.cs" />
+ <Compile Include="Entities\RoleBase.cs" />
+ <Compile Include="Entities\RolesPermissionBase.cs" />
+ <Compile Include="Entities\SegmentBase.cs" />
<Compile Include="Entities\Spool.cs" />
+ <Compile Include="Entities\SpoolBase.cs" />
+ <Compile Include="Entities\SpoolTypeBase.cs" />
+ <Compile Include="Entities\SyncConfigurationBase.cs" />
<Compile Include="Entities\Sysdiagram.cs" />
+ <Compile Include="Entities\SysdiagramBase.cs" />
<Compile Include="Entities\TangoVersion.cs" />
+ <Compile Include="Entities\TangoVersionBase.cs" />
<Compile Include="Entities\TechController.cs" />
+ <Compile Include="Entities\TechControllerBase.cs" />
+ <Compile Include="Entities\TechDispenserBase.cs" />
<Compile Include="Entities\TechHeater.cs" />
+ <Compile Include="Entities\TechHeaterBase.cs" />
+ <Compile Include="Entities\TechIoBase.cs" />
+ <Compile Include="Entities\TechMonitorBase.cs" />
<Compile Include="Entities\TechValve.cs" />
+ <Compile Include="Entities\TechValveBase.cs" />
+ <Compile Include="Entities\UserBase.cs" />
+ <Compile Include="Entities\UsersRoleBase.cs" />
+ <Compile Include="Entities\WindingMethodBase.cs" />
<Compile Include="Enumerations\ActionTypes.cs" />
<Compile Include="Enumerations\ColorCatalogs.cs" />
<Compile Include="Enumerations\DancerTypes.cs" />
@@ -145,7 +211,6 @@
<Compile Include="Enumerations\EventTypes.cs" />
<Compile Include="Enumerations\EventTypesCategories.cs" />
<Compile Include="Enumerations\EventTypesGroups.cs" />
- <Compile Include="EntitiesExtensions\MediaColor.cs" />
<Compile Include="Enumerations\FiberSynthes.cs" />
<Compile Include="Enumerations\FiberSynths.cs" />
<Compile Include="Enumerations\FineTuningStatuses.cs" />
@@ -266,16 +331,6 @@
<Compile Include="ObservablesContextExtension.cs" />
<Compile Include="ObservablesEntitiesAdapter.cs" />
<Compile Include="ObservablesEntitiesAdapterExtension.cs" />
- <Compile Include="EntitiesExtensions\BrushStop.cs" />
- <Compile Include="EntitiesExtensions\Cat.cs" />
- <Compile Include="EntitiesExtensions\Configuration.cs" />
- <Compile Include="EntitiesExtensions\HardwareVersion.cs" />
- <Compile Include="EntitiesExtensions\Job.cs" />
- <Compile Include="EntitiesExtensions\Machine.cs" />
- <Compile Include="EntitiesExtensions\MachineVersion.cs" />
- <Compile Include="EntitiesExtensions\ProcessParametersTable.cs" />
- <Compile Include="EntitiesExtensions\Segment.cs" />
- <Compile Include="EntitiesExtensions\User.cs" />
</ItemGroup>
<ItemGroup>
<Compile Include="ObservablesStaticCollections.cs" />
@@ -355,7 +410,7 @@
</Target>
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
+ <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
</VisualStudio>
</ProjectExtensions>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.CodeGeneration/EntityInheritedCodeFile.cs b/Software/Visual_Studio/Tango.CodeGeneration/EntityInheritedCodeFile.cs
new file mode 100644
index 000000000..e9c8ac717
--- /dev/null
+++ b/Software/Visual_Studio/Tango.CodeGeneration/EntityInheritedCodeFile.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tango.CodeGeneration
+{
+ public class EntityInheritedCodeFile : Class
+ {
+ public String BaseClass { get; set; }
+
+ public EntityInheritedCodeFile(String name, String baseClass)
+ {
+ Name = name;
+ BaseClass = baseClass;
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.CodeGeneration/Tango.CodeGeneration.csproj b/Software/Visual_Studio/Tango.CodeGeneration/Tango.CodeGeneration.csproj
index ef89bd682..436bfae33 100644
--- a/Software/Visual_Studio/Tango.CodeGeneration/Tango.CodeGeneration.csproj
+++ b/Software/Visual_Studio/Tango.CodeGeneration/Tango.CodeGeneration.csproj
@@ -68,6 +68,7 @@
<Compile Include="EntityCodeFileJavaExtension.cs" />
<Compile Include="EntityCodeFileJava.cs" />
<Compile Include="EntityCodeFile.cs" />
+ <Compile Include="EntityInheritedCodeFile.cs" />
<Compile Include="EnumerationField.cs" />
<Compile Include="ObservablesContextCodeFile.cs" />
<Compile Include="ObservablesStaticCollectionsFile.cs" />
@@ -116,11 +117,12 @@
<EmbeddedResource Include="Templates\ProtoEnumFile.cshtml" />
<EmbeddedResource Include="Templates\EntityCodeFileJavaExtension.cshtml" />
<EmbeddedResource Include="Templates\ObservablesStaticCollectionsFile.cshtml" />
+ <EmbeddedResource Include="Templates\EntityInheritedCodeFile.cshtml" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
+ <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
</VisualStudio>
</ProjectExtensions>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
diff --git a/Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFile.cshtml b/Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFile.cshtml
index dfcceb1dd..698a79b34 100644
--- a/Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFile.cshtml
+++ b/Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFile.cshtml
@@ -30,7 +30,7 @@ namespace Tango.BL.Entities
</div>
}
[Table("@(Model.TableName)")]
- public partial class @(Model.Name) : ObservableEntity<@(Model.Name)>
+ public abstract class @(Model.Name) : ObservableEntity<@(Model.Name.Replace("Base",""))>
{
@foreach (var prop in Model.Fields)
{
diff --git a/Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityInheritedCodeFile.cshtml b/Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityInheritedCodeFile.cshtml
new file mode 100644
index 000000000..2f54067a2
--- /dev/null
+++ b/Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityInheritedCodeFile.cshtml
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tango.BL.Entities
+{
+ public partial class @(Model.Name) : @(Model.BaseClass)
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="@(Model.Name)" /> class.
+ /// </summary>
+ public @(Model.Name)() : base()
+ {
+
+ }
+ }
+} \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.Transport/TransporterBase.cs b/Software/Visual_Studio/Tango.Transport/TransporterBase.cs
index 581e62cc7..58005a1e8 100644
--- a/Software/Visual_Studio/Tango.Transport/TransporterBase.cs
+++ b/Software/Visual_Studio/Tango.Transport/TransporterBase.cs
@@ -855,21 +855,6 @@ namespace Tango.Transport
{
TransportMessageBase message = _sendingQueue.BlockDequeue();
- if (_sendingQueue.Count > MaxMessageBufferCount)
- {
- var toDropItems = _sendingQueue.Where(x => x.Message.GetType() == message.GetType()).ToList();
-
- foreach (var item in toDropItems)
- {
- TransportMessageBase toDrop = _sendingQueue.BlockDequeue();
- }
-
- if (toDropItems.Count > 0)
- {
- LogManager.Log(String.Format("Dropped {0} outgoing messages of type {1}.", toDropItems.Count, message.Message.GetType()), LogCategory.Warning);
- }
- }
-
try
{
if (Adapter.State == TransportComponentState.Connected)
@@ -881,6 +866,15 @@ namespace Tango.Transport
}
LogManager.Log("Sending message on adapter: " + Adapter.Address + "...", LogCategory.Debug, message.Message);
+
+ if (message.Direction == TransportMessageDirection.Request)
+ {
+ lock (_pendingRequests)
+ {
+ _pendingRequests.Add(message);
+ }
+ }
+
Adapter.Write(message.Serialize());
LogManager.Log("Message sent on adapter: " + Adapter.Address + "...", LogCategory.Debug, message.Message);
}
@@ -889,14 +883,7 @@ namespace Tango.Transport
LogManager.Log("Could not send message " + message.Message.GetType().Name + ". Adapter is disconnected.", LogCategory.Warning);
}
- if (message.Direction == TransportMessageDirection.Request)
- {
- lock (_pendingRequests)
- {
- _pendingRequests.Add(message);
- }
- }
- else
+ if (message.Direction == TransportMessageDirection.Response)
{
message.SetResult(true, true);
}
diff --git a/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/ObservablesGenerator.cs b/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/ObservablesGenerator.cs
index 3a40dfd1f..2c58be781 100644
--- a/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/ObservablesGenerator.cs
+++ b/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/ObservablesGenerator.cs
@@ -57,7 +57,7 @@ namespace Tango.DBObservablesGenerator.CLI
table_description = db_des.TableDescription;
}
- EntityCodeFile codeFile = new EntityCodeFile(table.Name == "TECH_VALVES" ? "TechValve" : DalNameToStandardName(table.Name).SingularizeMVC())
+ EntityCodeFile codeFile = new EntityCodeFile((table.Name == "TECH_VALVES" ? "TechValve" : DalNameToStandardName(table.Name).SingularizeMVC()) + "Base")
{
EntityName = table.Name.SingularizeMVC(),
TableName = table.Name,
@@ -74,7 +74,7 @@ namespace Tango.DBObservablesGenerator.CLI
{
Console.ForegroundColor = ConsoleColor.Yellow;
- Console.WriteLine($"Specious entry at {table.Name}.");
+ Console.WriteLine($"Suspicious entry at {table.Name}.");
for (int i = 0; i < Math.Max(guessed_keys.Count, foreignKeys.Count); i++)
{
if (i < guessed_keys.Count)
@@ -166,6 +166,13 @@ namespace Tango.DBObservablesGenerator.CLI
String entitiesPath = Path.Combine(targetPath, "Entities");
Directory.CreateDirectory(entitiesPath);
File.WriteAllText(Path.Combine(entitiesPath, codeFile.Name + ".cs"), code);
+
+ if (!File.Exists(Path.Combine(entitiesPath, codeFile.Name + ".cs")))
+ {
+ EntityInheritedCodeFile inherited = new EntityInheritedCodeFile(codeFile.Name.Replace("Base", ""), codeFile.Name);
+ String inheritedCode = inherited.GenerateCode();
+ File.WriteAllText(Path.Combine(entitiesPath, inherited.Name + ".cs"), inheritedCode);
+ }
}
//Generate Entities...