diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-12-31 14:15:49 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-12-31 14:15:49 +0200 |
| commit | 650af0554b902837f8e146d690aca24e4f60ec29 (patch) | |
| tree | 30f3795d9579129395fd987c3e790ce33181c0e5 /Software/Visual_Studio | |
| parent | cfe28eaf0adcd54776c0a369210e6f7b4bca9558 (diff) | |
| download | Tango-650af0554b902837f8e146d690aca24e4f60ec29.tar.gz Tango-650af0554b902837f8e146d690aca24e4f60ec29.zip | |
Removed Default configuration from machine version.
Implemented custom ToJson for observables.
Implemented Apply & Create prototype machine for machine version.
Diffstat (limited to 'Software/Visual_Studio')
21 files changed, 367 insertions, 200 deletions
diff --git a/Software/Visual_Studio/Tango.BL/Builders/MachineBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/MachineBuilder.cs index dd27d94f0..2f1ad47b5 100644 --- a/Software/Visual_Studio/Tango.BL/Builders/MachineBuilder.cs +++ b/Software/Visual_Studio/Tango.BL/Builders/MachineBuilder.cs @@ -52,5 +52,13 @@ namespace Tango.BL.Builders Context.Spools.Where(x => x.MachineGuid == Entity.Guid).Include(x => x.SpoolType).ToList(); }); } + + public virtual MachineBuilder WithCats() + { + return AddStep(5, () => + { + Context.Cats.Where(x => x.MachineGuid == Entity.Guid).Include(x => x.LiquidType).ToList(); + }); + } } } diff --git a/Software/Visual_Studio/Tango.BL/Entities/Configuration.cs b/Software/Visual_Studio/Tango.BL/Entities/Configuration.cs index 1217701b5..2aafe59ef 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/Configuration.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/Configuration.cs @@ -37,8 +37,6 @@ namespace Tango.BL.Entities public event EventHandler<SynchronizedObservableCollection<IdsPack>> IdsPacksChanged; - public event EventHandler<SynchronizedObservableCollection<MachineVersion>> MachineVersionsChanged; - public event EventHandler<SynchronizedObservableCollection<Machine>> MachinesChanged; protected String _applicationosversionguid; @@ -326,31 +324,6 @@ namespace Tango.BL.Entities } } - protected SynchronizedObservableCollection<MachineVersion> _machineversions; - - /// <summary> - /// Gets or sets the configuration machine versions. - /// </summary> - - public virtual SynchronizedObservableCollection<MachineVersion> MachineVersions - { - get - { - return _machineversions; - } - - set - { - if (_machineversions != value) - { - _machineversions = value; - - OnMachineVersionsChanged(value); - - } - } - } - protected SynchronizedObservableCollection<Machine> _machines; /// <summary> @@ -431,15 +404,6 @@ namespace Tango.BL.Entities } /// <summary> - /// Called when the MachineVersions has changed. - /// </summary> - protected virtual void OnMachineVersionsChanged(SynchronizedObservableCollection<MachineVersion> machineversions) - { - MachineVersionsChanged?.Invoke(this, machineversions); - RaisePropertyChanged(nameof(MachineVersions)); - } - - /// <summary> /// Called when the Machines has changed. /// </summary> protected virtual void OnMachinesChanged(SynchronizedObservableCollection<Machine> machines) @@ -456,8 +420,6 @@ namespace Tango.BL.Entities IdsPacks = new SynchronizedObservableCollection<IdsPack>(); - MachineVersions = new SynchronizedObservableCollection<MachineVersion>(); - Machines = new SynchronizedObservableCollection<Machine>(); } diff --git a/Software/Visual_Studio/Tango.BL/Entities/MachineVersion.cs b/Software/Visual_Studio/Tango.BL/Entities/MachineVersion.cs index 87eaa61a4..3380f9b90 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/MachineVersion.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/MachineVersion.cs @@ -29,7 +29,7 @@ namespace Tango.BL.Entities public event EventHandler<String> NameChanged; - public event EventHandler<Configuration> DefaultConfigurationChanged; + public event EventHandler<String> PrototypeMachineDataChanged; public event EventHandler<SynchronizedObservableCollection<Machine>> MachinesChanged; @@ -89,53 +89,28 @@ namespace Tango.BL.Entities } } - protected String _defaultconfigurationguid; + protected String _prototypemachinedata; /// <summary> - /// Gets or sets the machineversion default configuration guid. + /// Gets or sets the machineversion prototype machine data. /// </summary> - [Column("DEFAULT_CONFIGURATION_GUID")] - [ForeignKey("DefaultConfiguration")] + [Column("PROTOTYPE_MACHINE_DATA")] - public String DefaultConfigurationGuid + public String PrototypeMachineData { get { - return _defaultconfigurationguid; + return _prototypemachinedata; } set { - if (_defaultconfigurationguid != value) + if (_prototypemachinedata != value) { - _defaultconfigurationguid = value; - } - } - } - - protected Configuration _defaultconfiguration; - - /// <summary> - /// Gets or sets the machineversion configuration. - /// </summary> - - [XmlIgnore] - [JsonIgnore] - public virtual Configuration DefaultConfiguration - { - get - { - return _defaultconfiguration; - } - - set - { - if (_defaultconfiguration != value) - { - _defaultconfiguration = value; + _prototypemachinedata = value; - OnDefaultConfigurationChanged(value); + OnPrototypeMachineDataChanged(value); } } @@ -210,12 +185,12 @@ namespace Tango.BL.Entities } /// <summary> - /// Called when the DefaultConfiguration has changed. + /// Called when the PrototypeMachineData has changed. /// </summary> - protected virtual void OnDefaultConfigurationChanged(Configuration defaultconfiguration) + protected virtual void OnPrototypeMachineDataChanged(String prototypemachinedata) { - DefaultConfigurationChanged?.Invoke(this, defaultconfiguration); - RaisePropertyChanged(nameof(DefaultConfiguration)); + PrototypeMachineDataChanged?.Invoke(this, prototypemachinedata); + RaisePropertyChanged(nameof(PrototypeMachineData)); } /// <summary> diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Cat.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Cat.cs index 6f92de80a..3c93d098d 100644 --- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Cat.cs +++ b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Cat.cs @@ -42,5 +42,15 @@ namespace Tango.BL.Entities 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/Configuration.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Configuration.cs index 6ed1627cd..4e7ec72bd 100644 --- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Configuration.cs +++ b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Configuration.cs @@ -62,5 +62,19 @@ namespace Tango.BL.Entities 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/HardwareVersion.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/HardwareVersion.cs index 7a09f9f65..d3a9baf9f 100644 --- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/HardwareVersion.cs +++ b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/HardwareVersion.cs @@ -32,5 +32,13 @@ namespace Tango.BL.Entities 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 new file mode 100644 index 000000000..eff0fee0c --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/IdsPack.cs @@ -0,0 +1,24 @@ +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/Machine.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Machine.cs index 11f86a403..6f54640f5 100644 --- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Machine.cs +++ b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Machine.cs @@ -133,5 +133,21 @@ namespace Tango.BL.Entities 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/MachineVersion.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/MachineVersion.cs index aeec23b33..2b8d99652 100644 --- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/MachineVersion.cs +++ b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/MachineVersion.cs @@ -1,17 +1,76 @@ 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 override void Delete(ObservablesContext context) + public async Task ApplyPrototypeMachine(Machine machine, ObservablesContext context) { - this.DefaultConfiguration.Delete(context); - base.Delete(context); + machine = await new MachineBuilder(context) + .Set(machine) + .WithOrganization() + .WithConfiguration() + .WithSpools() + .WithCats() + .BuildAsync(); + + PrototypeMachineData = machine.ToJson(); + } + + public async Task<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.LiquidType = await context.LiquidTypes.SingleOrDefaultAsync(x => x.Guid == cat.LiquidTypeGuid); + cat.MachineGuid = machine.Guid; + cat.Machine = machine; + cat.Rml = await context.Rmls.SingleOrDefaultAsync(x => x.Guid == cat.RmlGuid); + } + + machine.DefaultColorSpace = await context.ColorSpaces.SingleOrDefaultAsync(x => x.Guid == machine.Guid); + machine.ConfigurationGuid = machine.Configuration.Guid; + machine.MachineVersion = this; + machine.MachineVersionGuid = this.Guid; + machine.ProductionDate = DateTime.UtcNow; + + machine.Configuration.ApplicationDisplayPanelVersion = await context.ApplicationDisplayPanelVersions.SingleOrDefaultAsync(x => x.Guid == machine.Configuration.ApplicationDisplayPanelVersionGuid); + machine.Configuration.ApplicationFirmwareVersion = await context.ApplicationFirmwareVersions.SingleOrDefaultAsync(x => x.Guid == machine.Configuration.ApplicationFirmwareVersionGuid); + machine.Configuration.ApplicationOsVersion = await context.ApplicationOsVersions.SingleOrDefaultAsync(x => x.Guid == machine.Configuration.ApplicationOsVersionGuid); + machine.Configuration.EmbeddedFirmwareVersion = await context.EmbeddedFirmwareVersions.SingleOrDefaultAsync(x => x.Guid == machine.Configuration.EmbeddedFirmwareVersionGuid); + machine.Configuration.HardwareVersion = await context.HardwareVersions.SingleOrDefaultAsync(x => x.Guid == machine.Configuration.HardwareVersionGuid); + + foreach (var idsPack in machine.Configuration.IdsPacks) + { + idsPack.CartridgeType = await context.CartridgeTypes.SingleOrDefaultAsync(x => x.Guid == idsPack.CartridgeTypeGuid); + idsPack.CartridgeType = await context.CartridgeTypes.SingleOrDefaultAsync(x => x.Guid == idsPack.CartridgeTypeGuid); + idsPack.LiquidType = await context.LiquidTypes.SingleOrDefaultAsync(x => x.Guid == idsPack.LiquidTypeGuid); + idsPack.IdsPackFormula = await context.IdsPackFormulas.SingleOrDefaultAsync(x => x.Guid == idsPack.IdsPackFormulaGuid); + idsPack.MidTankType = await context.MidTankTypes.SingleOrDefaultAsync(x => x.Guid == idsPack.MidTankTypeGuid); + + idsPack.DispenserGuid = null; + idsPack.Configuration = machine.Configuration; + idsPack.ConfigurationGuid = machine.ConfigurationGuid; + } + + foreach (var spool in machine.Spools) + { + spool.Machine = machine; + spool.MachineGuid = machine.Guid; + spool.SpoolType = await context.SpoolTypes.SingleOrDefaultAsync(x => x.Guid == spool.SpoolTypeGuid); + } + + return machine; } } } diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Spool.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Spool.cs index d4efcdf14..f93e90d00 100644 --- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Spool.cs +++ b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Spool.cs @@ -14,5 +14,14 @@ namespace Tango.BL.Entities 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/IObservableEntity.cs b/Software/Visual_Studio/Tango.BL/IObservableEntity.cs index ad112c4a1..e4ed48134 100644 --- a/Software/Visual_Studio/Tango.BL/IObservableEntity.cs +++ b/Software/Visual_Studio/Tango.BL/IObservableEntity.cs @@ -8,13 +8,14 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Tango.Core; +using Tango.Core.Json; namespace Tango.BL { /// <summary> /// Represents an observable database entity. /// </summary> - public interface IObservableEntity : INotifyDataErrorInfo, IParameterized + public interface IObservableEntity : INotifyDataErrorInfo, IParameterized , IJsonSerializationController { /// <summary> /// Occurs after this observable has been modified and saved by this entity context or another. diff --git a/Software/Visual_Studio/Tango.BL/ObservableEntity.cs b/Software/Visual_Studio/Tango.BL/ObservableEntity.cs index 52ecbbbc5..8ec0b30d6 100644 --- a/Software/Visual_Studio/Tango.BL/ObservableEntity.cs +++ b/Software/Visual_Studio/Tango.BL/ObservableEntity.cs @@ -23,6 +23,8 @@ using System.Xml.Serialization; using Newtonsoft.Json; using Tango.Logging; using System.ComponentModel; +using Tango.Core.Json; +using Newtonsoft.Json.Converters; namespace Tango.BL { @@ -376,6 +378,47 @@ Maybe you have deleted an entity that was no yet inserted into database?", LogCa { return GetDbContextFromEntity(this); } + + public virtual List<string> GetIgnoreProperties() + { + return new List<string>() + { + nameof(this.HasErrors), + nameof(this.Parameters), + nameof(this.DesignMode), + nameof(this.LogManager), + nameof(this.ObjectType), + nameof(this.TemporaryManager), + nameof(this.ValidateOnPropertyChanged), + nameof(this.ValidationErrors), + nameof(this.LastUpdated), + nameof(this.ID), + nameof(this.Guid), + "_entityWrapper", + }; + } + + public static T FromJson(String json) + { + var settings = new JsonSerializerSettings() + { + ContractResolver = new SerializationControllerContractResolver(), + }; + settings.Converters.Add(new StringEnumConverter { CamelCaseText = false }); + return JsonConvert.DeserializeObject<T>(json, settings); + } + + public String ToJson() + { + var settings = new JsonSerializerSettings() + { + ContractResolver = new SerializationControllerContractResolver(), + }; + settings.Converters.Add(new StringEnumConverter { CamelCaseText = false }); + String json = JsonConvert.SerializeObject(this, Formatting.Indented, settings); + return json; + } + #endregion #region Private Methods diff --git a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj index 72e7fe332..78ab72db1 100644 --- a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj +++ b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj @@ -114,6 +114,7 @@ <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" /> diff --git a/Software/Visual_Studio/Tango.Core/Json/IJsonSerializationController.cs b/Software/Visual_Studio/Tango.Core/Json/IJsonSerializationController.cs new file mode 100644 index 000000000..f703a8863 --- /dev/null +++ b/Software/Visual_Studio/Tango.Core/Json/IJsonSerializationController.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.Core.Json +{ + /// <summary> + /// Represents an object that defines which properties should not be serialized with the Json serializer. + /// </summary> + public interface IJsonSerializationController + { + /// <summary> + /// Gets the properties to ignore. + /// </summary> + /// <returns></returns> + List<String> GetIgnoreProperties(); + } +} diff --git a/Software/Visual_Studio/Tango.Core/Json/SerializationControllerContractResolver.cs b/Software/Visual_Studio/Tango.Core/Json/SerializationControllerContractResolver.cs new file mode 100644 index 000000000..702d51ddf --- /dev/null +++ b/Software/Visual_Studio/Tango.Core/Json/SerializationControllerContractResolver.cs @@ -0,0 +1,36 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Serialization; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.Core.Json +{ + public class SerializationControllerContractResolver : DefaultContractResolver + { + private List<String> _ignoreProperties = new List<string>(); + + protected override JsonObjectContract CreateObjectContract(Type objectType) + { + _ignoreProperties = new List<string>(); + + if (typeof(IJsonSerializationController).IsAssignableFrom(objectType)) + { + _ignoreProperties = (Activator.CreateInstance(objectType) as IJsonSerializationController).GetIgnoreProperties(); + } + return base.CreateObjectContract(objectType); + } + + protected override JsonProperty CreateProperty(MemberInfo member, MemberSerialization memberSerialization) + { + var props = _ignoreProperties.ToList(); + JsonProperty property = base.CreateProperty(member, memberSerialization); + property.Ignored = false; + property.ShouldSerialize = (x) => !props.Contains(property.PropertyName); + return property; + } + } +} diff --git a/Software/Visual_Studio/Tango.Core/Tango.Core.csproj b/Software/Visual_Studio/Tango.Core/Tango.Core.csproj index 8ed2c695b..5bfe3ab79 100644 --- a/Software/Visual_Studio/Tango.Core/Tango.Core.csproj +++ b/Software/Visual_Studio/Tango.Core/Tango.Core.csproj @@ -86,7 +86,9 @@ <Link>GlobalVersionInfo.cs</Link> </Compile> <Compile Include="IO\KnownFolders.cs" /> + <Compile Include="Json\IJsonSerializationController.cs" /> <Compile Include="Json\ProtobufContractResolver.cs" /> + <Compile Include="Json\SerializationControllerContractResolver.cs" /> <Compile Include="Threading\TaskSequencer.cs" /> <Compile Include="Threading\ThreadFactory.cs" /> <Compile Include="Threading\TimeoutTask.cs" /> @@ -193,7 +195,7 @@ <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> <Import Project="..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets')" /> diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/CONFIGURATION.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/CONFIGURATION.cs index f27a05ae2..3fcfc908d 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/CONFIGURATION.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/CONFIGURATION.cs @@ -18,7 +18,6 @@ namespace Tango.DAL.Remote.DB public CONFIGURATION() { this.IDS_PACKS = new HashSet<IDS_PACKS>(); - this.MACHINE_VERSIONS = new HashSet<MACHINE_VERSIONS>(); this.MACHINES = new HashSet<MACHINE>(); } @@ -39,8 +38,6 @@ namespace Tango.DAL.Remote.DB [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection<IDS_PACKS> IDS_PACKS { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] - public virtual ICollection<MACHINE_VERSIONS> MACHINE_VERSIONS { get; set; } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection<MACHINE> MACHINES { get; set; } } } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE_VERSIONS.cs index df1d48673..8ddd77597 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE_VERSIONS.cs @@ -26,9 +26,8 @@ namespace Tango.DAL.Remote.DB public System.DateTime LAST_UPDATED { get; set; } public double VERSION { get; set; } public string NAME { get; set; } - public string DEFAULT_CONFIGURATION_GUID { get; set; } + public string PROTOTYPE_MACHINE_DATA { get; set; } - public virtual CONFIGURATION CONFIGURATION { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection<MACHINE> MACHINES { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx index eecb142ee..1f5e0b4fe 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx @@ -694,7 +694,7 @@ <Property Name="LAST_UPDATED" Type="datetime2" Precision="3" Nullable="false" /> <Property Name="VERSION" Type="float" Nullable="false" /> <Property Name="NAME" Type="nvarchar" MaxLength="50" Nullable="false" /> - <Property Name="DEFAULT_CONFIGURATION_GUID" Type="varchar" MaxLength="36" Nullable="false" /> + <Property Name="PROTOTYPE_MACHINE_DATA" Type="nvarchar(max)" /> </EntityType> <EntityType Name="MACHINES"> <Key> @@ -1762,18 +1762,6 @@ </Dependent> </ReferentialConstraint> </Association> - <Association Name="FK_MACHINE_VERSIONS_CONFIGURATIONS"> - <End Role="CONFIGURATIONS" Type="Self.CONFIGURATIONS" Multiplicity="1" /> - <End Role="MACHINE_VERSIONS" Type="Self.MACHINE_VERSIONS" Multiplicity="*" /> - <ReferentialConstraint> - <Principal Role="CONFIGURATIONS"> - <PropertyRef Name="GUID" /> - </Principal> - <Dependent Role="MACHINE_VERSIONS"> - <PropertyRef Name="DEFAULT_CONFIGURATION_GUID" /> - </Dependent> - </ReferentialConstraint> - </Association> <Association Name="FK_MACHINES_COLOR_SPACES"> <End Role="COLOR_SPACES" Type="Self.COLOR_SPACES" Multiplicity="0..1" /> <End Role="MACHINES" Type="Self.MACHINES" Multiplicity="*" /> @@ -2470,10 +2458,6 @@ <End Role="USERS" EntitySet="USERS" /> <End Role="MACHINE_STUDIO_VERSIONS" EntitySet="MACHINE_STUDIO_VERSIONS" /> </AssociationSet> - <AssociationSet Name="FK_MACHINE_VERSIONS_CONFIGURATIONS" Association="Self.FK_MACHINE_VERSIONS_CONFIGURATIONS"> - <End Role="CONFIGURATIONS" EntitySet="CONFIGURATIONS" /> - <End Role="MACHINE_VERSIONS" EntitySet="MACHINE_VERSIONS" /> - </AssociationSet> <AssociationSet Name="FK_MACHINES_COLOR_SPACES" Association="Self.FK_MACHINES_COLOR_SPACES"> <End Role="COLOR_SPACES" EntitySet="COLOR_SPACES" /> <End Role="MACHINES" EntitySet="MACHINES" /> @@ -2765,10 +2749,6 @@ <End Role="CONFIGURATION" EntitySet="CONFIGURATIONS" /> <End Role="IDS_PACKS" EntitySet="IDS_PACKS" /> </AssociationSet> - <AssociationSet Name="FK_MACHINE_VERSIONS_CONFIGURATIONS" Association="RemoteModel.FK_MACHINE_VERSIONS_CONFIGURATIONS"> - <End Role="CONFIGURATION" EntitySet="CONFIGURATIONS" /> - <End Role="MACHINE_VERSIONS" EntitySet="MACHINE_VERSIONS" /> - </AssociationSet> <AssociationSet Name="FK_MACHINES_CONFIGURATIONS" Association="RemoteModel.FK_MACHINES_CONFIGURATIONS"> <End Role="CONFIGURATION" EntitySet="CONFIGURATIONS" /> <End Role="MACHINE" EntitySet="MACHINES" /> @@ -3241,7 +3221,6 @@ <NavigationProperty Name="EMBEDDED_FIRMWARE_VERSIONS" Relationship="RemoteModel.FK_CONFIGURATIONS_EMBEDDED_FIRMWARE_VERSIONS" FromRole="CONFIGURATION" ToRole="EMBEDDED_FIRMWARE_VERSIONS" /> <NavigationProperty Name="HARDWARE_VERSIONS" Relationship="RemoteModel.FK_CONFIGURATIONS_HARDWARE_VERSIONS" FromRole="CONFIGURATION" ToRole="HARDWARE_VERSIONS" /> <NavigationProperty Name="IDS_PACKS" Relationship="RemoteModel.FK_IDS_PACKS_CONFIGURATIONS" FromRole="CONFIGURATION" ToRole="IDS_PACKS" /> - <NavigationProperty Name="MACHINE_VERSIONS" Relationship="RemoteModel.FK_MACHINE_VERSIONS_CONFIGURATIONS" FromRole="CONFIGURATION" ToRole="MACHINE_VERSIONS" /> <NavigationProperty Name="MACHINES" Relationship="RemoteModel.FK_MACHINES_CONFIGURATIONS" FromRole="CONFIGURATION" ToRole="MACHINE" /> </EntityType> <EntityType Name="CONTACT"> @@ -3820,8 +3799,7 @@ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" Precision="3" /> <Property Name="VERSION" Type="Double" Nullable="false" /> <Property Name="NAME" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" /> - <Property Name="DEFAULT_CONFIGURATION_GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" /> - <NavigationProperty Name="CONFIGURATION" Relationship="RemoteModel.FK_MACHINE_VERSIONS_CONFIGURATIONS" FromRole="MACHINE_VERSIONS" ToRole="CONFIGURATION" /> + <Property Name="PROTOTYPE_MACHINE_DATA" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" /> <NavigationProperty Name="MACHINES" Relationship="RemoteModel.FK_MACHINES_MACHINE_VERSIONS" FromRole="MACHINE_VERSIONS" ToRole="MACHINE" /> <NavigationProperty Name="TANGO_VERSIONS" Relationship="RemoteModel.FK_TANGO_VERSIONS_MACHINE_VERSIONS" FromRole="MACHINE_VERSIONS" ToRole="TANGO_VERSIONS" /> </EntityType> @@ -4545,18 +4523,6 @@ </Dependent> </ReferentialConstraint> </Association> - <Association Name="FK_MACHINE_VERSIONS_CONFIGURATIONS"> - <End Type="RemoteModel.CONFIGURATION" Role="CONFIGURATION" Multiplicity="1" /> - <End Type="RemoteModel.MACHINE_VERSIONS" Role="MACHINE_VERSIONS" Multiplicity="*" /> - <ReferentialConstraint> - <Principal Role="CONFIGURATION"> - <PropertyRef Name="GUID" /> - </Principal> - <Dependent Role="MACHINE_VERSIONS"> - <PropertyRef Name="DEFAULT_CONFIGURATION_GUID" /> - </Dependent> - </ReferentialConstraint> - </Association> <Association Name="FK_MACHINES_CONFIGURATIONS"> <End Type="RemoteModel.CONFIGURATION" Role="CONFIGURATION" Multiplicity="1"> <OnDelete Action="Cascade" /> @@ -6118,7 +6084,7 @@ <EntitySetMapping Name="MACHINE_VERSIONS"> <EntityTypeMapping TypeName="RemoteModel.MACHINE_VERSIONS"> <MappingFragment StoreEntitySet="MACHINE_VERSIONS"> - <ScalarProperty Name="DEFAULT_CONFIGURATION_GUID" ColumnName="DEFAULT_CONFIGURATION_GUID" /> + <ScalarProperty Name="PROTOTYPE_MACHINE_DATA" ColumnName="PROTOTYPE_MACHINE_DATA" /> <ScalarProperty Name="NAME" ColumnName="NAME" /> <ScalarProperty Name="VERSION" ColumnName="VERSION" /> <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" /> diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram index dc1208fee..68bdf4f21 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram @@ -5,82 +5,82 @@ <!-- Diagram content (shape and connector positions) --> <edmx:Diagrams> <Diagram DiagramId="f9ae01d708754bbd997add25a4bacc79" Name="Diagram1"> - <EntityTypeShape EntityType="RemoteModel.ACTION_TYPES" Width="1.5" PointX="5.25" PointY="71.5" /> - <EntityTypeShape EntityType="RemoteModel.ADDRESS" Width="1.5" PointX="0.75" PointY="55.75" /> - <EntityTypeShape EntityType="RemoteModel.APPLICATION_DISPLAY_PANEL_VERSIONS" Width="1.5" PointX="0.75" PointY="50.125" /> - <EntityTypeShape EntityType="RemoteModel.APPLICATION_FIRMWARE_VERSIONS" Width="1.5" PointX="0.75" PointY="40" /> - <EntityTypeShape EntityType="RemoteModel.APPLICATION_OS_VERSIONS" Width="1.5" PointX="0.75" PointY="42.875" /> - <EntityTypeShape EntityType="RemoteModel.BRUSH_STOPS" Width="1.5" PointX="15.75" PointY="19.875" /> - <EntityTypeShape EntityType="RemoteModel.CARTRIDGE_TYPES" Width="1.5" PointX="6" PointY="0.875" /> - <EntityTypeShape EntityType="RemoteModel.CAT" Width="1.5" PointX="8.25" PointY="20.625" /> - <EntityTypeShape EntityType="RemoteModel.CCT" Width="1.5" PointX="5.25" PointY="50.125" /> - <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS" Width="1.5" PointX="13.5" PointY="26.625" /> - <EntityTypeShape EntityType="RemoteModel.COLOR_SPACES" Width="1.5" PointX="3" PointY="37" /> - <EntityTypeShape EntityType="RemoteModel.CONFIGURATION" Width="1.5" PointX="3" PointY="42.625" /> - <EntityTypeShape EntityType="RemoteModel.CONTACT" Width="1.5" PointX="0.75" PointY="60" /> - <EntityTypeShape EntityType="RemoteModel.CUSTOMER" Width="1.5" PointX="9" PointY="25.5" /> - <EntityTypeShape EntityType="RemoteModel.DISPENSER_TYPES" Width="1.5" PointX="3.75" PointY="67.25" /> - <EntityTypeShape EntityType="RemoteModel.DISPENSER" Width="1.5" PointX="6" PointY="67" /> - <EntityTypeShape EntityType="RemoteModel.EMBEDDED_FIRMWARE_VERSIONS" Width="1.5" PointX="0.75" PointY="37.125" /> - <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES" Width="1.5" PointX="5.25" PointY="4.625" /> - <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_ACTIONS" Width="1.5" PointX="7.5" PointY="5.5" /> - <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_CATEGORIES" Width="1.5" PointX="3" PointY="8.625" /> - <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_GROUPS" Width="1.5" PointX="3" PointY="2.25" /> - <EntityTypeShape EntityType="RemoteModel.FIBER_SHAPES" Width="1.5" PointX="0.75" PointY="27.75" /> - <EntityTypeShape EntityType="RemoteModel.FIBER_SYNTHS" Width="1.5" PointX="0.75" PointY="24.875" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_BLOWER_TYPES" Width="1.5" PointX="5.75" PointY="75.375" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_BLOWERS" Width="1.5" PointX="8" PointY="50" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_BREAK_SENSOR_TYPES" Width="1.5" PointX="7.75" PointY="71.375" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_BREAK_SENSORS" Width="1.5" PointX="10" PointY="46.125" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCER_TYPES" Width="1.5" PointX="3.75" PointY="62.375" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCERS" Width="1.5" PointX="6" PointY="54.375" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTOR_TYPES" Width="1.5" PointX="8.75" PointY="54.375" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTORS" Width="1.5" PointX="11" PointY="50" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROL_TYPES" Width="1.5" PointX="7.75" PointY="60.375" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROLS" Width="1.5" PointX="10" PointY="38.5" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_SPEED_SENSOR_TYPES" Width="1.5" PointX="3.75" PointY="33.375" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_SPEED_SENSORS" Width="1.5" PointX="6" PointY="39.125" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_VERSIONS" Width="1.5" PointX="0.75" PointY="45.875" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDER_TYPES" Width="1.5" PointX="10.75" PointY="58.375" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDERS" Width="1.5" PointX="13" PointY="46.25" /> - <EntityTypeShape EntityType="RemoteModel.HTML_PAGES" Width="1.5" PointX="3" PointY="5.375" /> - <EntityTypeShape EntityType="RemoteModel.IDS_PACK_FORMULAS" Width="1.5" PointX="6" PointY="63.75" /> - <EntityTypeShape EntityType="RemoteModel.IDS_PACKS" Width="1.5" PointX="8.25" PointY="32.625" /> - <EntityTypeShape EntityType="RemoteModel.JOB_RUNS" Width="1.5" PointX="13.5" PointY="19" /> - <EntityTypeShape EntityType="RemoteModel.JOB" Width="1.5" PointX="11.25" PointY="17.5" /> - <EntityTypeShape EntityType="RemoteModel.LINEAR_MASS_DENSITY_UNITS" Width="1.5" PointX="0.75" PointY="30.75" /> - <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES" Width="1.5" PointX="6" PointY="30.75" /> - <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES_RMLS" Width="1.5" PointX="5.25" PointY="20.875" /> - <EntityTypeShape EntityType="RemoteModel.MACHINE_STUDIO_VERSIONS" Width="1.5" PointX="7.5" PointY="10.875" /> - <EntityTypeShape EntityType="RemoteModel.MACHINE_VERSIONS" Width="1.5" PointX="3" PointY="48.125" /> - <EntityTypeShape EntityType="RemoteModel.MACHINE" Width="1.5" PointX="5.25" PointY="12.375" /> - <EntityTypeShape EntityType="RemoteModel.MACHINES_EVENTS" Width="1.5" PointX="7.5" PointY="14.625" /> - <EntityTypeShape EntityType="RemoteModel.MEDIA_COLORS" Width="1.5" PointX="0.75" PointY="16.625" /> - <EntityTypeShape EntityType="RemoteModel.MEDIA_CONDITIONS" Width="1.5" PointX="0.75" PointY="13.625" /> - <EntityTypeShape EntityType="RemoteModel.MEDIA_MATERIALS" Width="1.5" PointX="0.75" PointY="21.125" /> - <EntityTypeShape EntityType="RemoteModel.MEDIA_PURPOSES" Width="1.5" PointX="0.75" PointY="33.625" /> - <EntityTypeShape EntityType="RemoteModel.MID_TANK_TYPES" Width="1.5" PointX="6" PointY="34.75" /> - <EntityTypeShape EntityType="RemoteModel.ORGANIZATION" Width="1.5" PointX="3" PointY="57.875" /> - <EntityTypeShape EntityType="RemoteModel.PERMISSION" Width="1.5" PointX="14.25" PointY="36.875" /> - <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES" Width="1.5" PointX="7.5" PointY="43.25" /> - <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES_GROUPS" Width="1.5" PointX="5.25" PointY="45" /> - <EntityTypeShape EntityType="RemoteModel.RML" Width="1.5" PointX="3" PointY="18.125" /> - <EntityTypeShape EntityType="RemoteModel.ROLE" Width="1.5" PointX="11.25" PointY="30.75" /> - <EntityTypeShape EntityType="RemoteModel.ROLES_PERMISSIONS" Width="1.5" PointX="16.5" PointY="30.875" /> - <EntityTypeShape EntityType="RemoteModel.SEGMENT" Width="1.5" PointX="13.5" PointY="22.75" /> - <EntityTypeShape EntityType="RemoteModel.SPOOL_TYPES" Width="1.5" PointX="3" PointY="51.625" /> - <EntityTypeShape EntityType="RemoteModel.SPOOL" Width="1.5" PointX="10.5" PointY="12.625" /> - <EntityTypeShape EntityType="RemoteModel.sysdiagram" Width="1.5" PointX="8.75" PointY="0.75" /> - <EntityTypeShape EntityType="RemoteModel.TANGO_VERSIONS" Width="1.5" PointX="10.5" PointY="34.375" /> - <EntityTypeShape EntityType="RemoteModel.TECH_CONTROLLERS" Width="1.5" PointX="9.75" PointY="3.75" /> - <EntityTypeShape EntityType="RemoteModel.TECH_DISPENSERS" Width="1.5" PointX="9.75" PointY="7.75" /> - <EntityTypeShape EntityType="RemoteModel.TECH_HEATERS" Width="1.5" PointX="10.75" PointY="0.75" /> - <EntityTypeShape EntityType="RemoteModel.TECH_IOS" Width="1.5" PointX="11.75" PointY="3.75" /> - <EntityTypeShape EntityType="RemoteModel.TECH_MONITORS" Width="1.5" PointX="12.75" PointY="8.75" /> - <EntityTypeShape EntityType="RemoteModel.TECH_VALVES" Width="1.5" PointX="13.75" PointY="0.75" /> - <EntityTypeShape EntityType="RemoteModel.USER" Width="1.5" PointX="5.25" PointY="24.75" /> - <EntityTypeShape EntityType="RemoteModel.USERS_ROLES" Width="1.5" PointX="13.5" PointY="32.75" /> - <EntityTypeShape EntityType="RemoteModel.WINDING_METHODS" Width="1.5" PointX="9" PointY="28.625" /> + <EntityTypeShape EntityType="RemoteModel.ACTION_TYPES" Width="1.5" PointX="11.25" PointY="12" /> + <EntityTypeShape EntityType="RemoteModel.ADDRESS" Width="1.5" PointX="1.5" PointY="61.125" /> + <EntityTypeShape EntityType="RemoteModel.APPLICATION_DISPLAY_PANEL_VERSIONS" Width="1.5" PointX="0.75" PointY="52.375" /> + <EntityTypeShape EntityType="RemoteModel.APPLICATION_FIRMWARE_VERSIONS" Width="1.5" PointX="0.75" PointY="45.125" /> + <EntityTypeShape EntityType="RemoteModel.APPLICATION_OS_VERSIONS" Width="1.5" PointX="0.75" PointY="42.25" /> + <EntityTypeShape EntityType="RemoteModel.BRUSH_STOPS" Width="1.5" PointX="12.75" PointY="28.75" /> + <EntityTypeShape EntityType="RemoteModel.CARTRIDGE_TYPES" Width="1.5" PointX="13" PointY="15.625" /> + <EntityTypeShape EntityType="RemoteModel.CAT" Width="1.5" PointX="10.5" PointY="27" /> + <EntityTypeShape EntityType="RemoteModel.CCT" Width="1.5" PointX="5.25" PointY="19.125" /> + <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS" Width="1.5" PointX="10.5" PointY="35.625" /> + <EntityTypeShape EntityType="RemoteModel.COLOR_SPACES" Width="1.5" PointX="6" PointY="34.75" /> + <EntityTypeShape EntityType="RemoteModel.CONFIGURATION" Width="1.5" PointX="3" PointY="45" /> + <EntityTypeShape EntityType="RemoteModel.CONTACT" Width="1.5" PointX="1.5" PointY="57" /> + <EntityTypeShape EntityType="RemoteModel.CUSTOMER" Width="1.5" PointX="6" PointY="59.625" /> + <EntityTypeShape EntityType="RemoteModel.DISPENSER_TYPES" Width="1.5" PointX="10.75" PointY="1.25" /> + <EntityTypeShape EntityType="RemoteModel.DISPENSER" Width="1.5" PointX="13" PointY="0.75" /> + <EntityTypeShape EntityType="RemoteModel.EMBEDDED_FIRMWARE_VERSIONS" Width="1.5" PointX="0.75" PointY="39.25" /> + <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES" Width="1.5" PointX="11.25" PointY="7.125" /> + <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_ACTIONS" Width="1.5" PointX="13.5" PointY="8" /> + <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_CATEGORIES" Width="1.5" PointX="9" PointY="7.875" /> + <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_GROUPS" Width="1.5" PointX="9" PointY="4.875" /> + <EntityTypeShape EntityType="RemoteModel.FIBER_SHAPES" Width="1.5" PointX="0.75" PointY="29.75" /> + <EntityTypeShape EntityType="RemoteModel.FIBER_SYNTHS" Width="1.5" PointX="0.75" PointY="23.125" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_BLOWER_TYPES" Width="1.5" PointX="0.75" PointY="69.625" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_BLOWERS" Width="1.5" PointX="3" PointY="50.25" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_BREAK_SENSOR_TYPES" Width="1.5" PointX="6.75" PointY="63.625" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_BREAK_SENSORS" Width="1.5" PointX="9" PointY="45.375" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCER_TYPES" Width="1.5" PointX="9.75" PointY="41.625" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCERS" Width="1.5" PointX="12" PointY="43.625" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTOR_TYPES" Width="1.5" PointX="10.75" PointY="57.5" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTORS" Width="1.5" PointX="13" PointY="49.25" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROL_TYPES" Width="1.5" PointX="7.75" PointY="67.625" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROLS" Width="1.5" PointX="10" PointY="49.75" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_SPEED_SENSOR_TYPES" Width="1.5" PointX="1.75" PointY="73.625" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_SPEED_SENSORS" Width="1.5" PointX="4" PointY="55.375" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_VERSIONS" Width="1.5" PointX="0.75" PointY="48.125" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDER_TYPES" Width="1.5" PointX="0.75" PointY="65.625" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDERS" Width="1.5" PointX="3" PointY="41.5" /> + <EntityTypeShape EntityType="RemoteModel.HTML_PAGES" Width="1.5" PointX="9" PointY="11" /> + <EntityTypeShape EntityType="RemoteModel.IDS_PACK_FORMULAS" Width="1.5" PointX="13" PointY="19.375" /> + <EntityTypeShape EntityType="RemoteModel.IDS_PACKS" Width="1.5" PointX="15.25" PointY="29.625" /> + <EntityTypeShape EntityType="RemoteModel.JOB_RUNS" Width="1.5" PointX="10.5" PointY="19" /> + <EntityTypeShape EntityType="RemoteModel.JOB" Width="1.5" PointX="8.25" PointY="19.5" /> + <EntityTypeShape EntityType="RemoteModel.LINEAR_MASS_DENSITY_UNITS" Width="1.5" PointX="0.75" PointY="15.625" /> + <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES" Width="1.5" PointX="9" PointY="14.75" /> + <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES_RMLS" Width="1.5" PointX="11.25" PointY="22.875" /> + <EntityTypeShape EntityType="RemoteModel.MACHINE_STUDIO_VERSIONS" Width="1.5" PointX="8.25" PointY="37.5" /> + <EntityTypeShape EntityType="RemoteModel.MACHINE_VERSIONS" Width="1.5" PointX="3" PointY="12" /> + <EntityTypeShape EntityType="RemoteModel.MACHINE" Width="1.5" PointX="5.25" PointY="23.375" /> + <EntityTypeShape EntityType="RemoteModel.MACHINES_EVENTS" Width="1.5" PointX="13.5" PointY="24.5" /> + <EntityTypeShape EntityType="RemoteModel.MEDIA_COLORS" Width="1.5" PointX="0.75" PointY="26.5" /> + <EntityTypeShape EntityType="RemoteModel.MEDIA_CONDITIONS" Width="1.5" PointX="0.75" PointY="35.625" /> + <EntityTypeShape EntityType="RemoteModel.MEDIA_MATERIALS" Width="1.5" PointX="0.75" PointY="18.5" /> + <EntityTypeShape EntityType="RemoteModel.MEDIA_PURPOSES" Width="1.5" PointX="0.75" PointY="32.75" /> + <EntityTypeShape EntityType="RemoteModel.MID_TANK_TYPES" Width="1.5" PointX="13" PointY="38.25" /> + <EntityTypeShape EntityType="RemoteModel.ORGANIZATION" Width="1.5" PointX="3.75" PointY="59.25" /> + <EntityTypeShape EntityType="RemoteModel.PERMISSION" Width="1.5" PointX="12" PointY="65.875" /> + <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES" Width="1.5" PointX="7.5" PointY="49.375" /> + <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES_GROUPS" Width="1.5" PointX="5.25" PointY="51" /> + <EntityTypeShape EntityType="RemoteModel.RML" Width="1.5" PointX="3" PointY="20" /> + <EntityTypeShape EntityType="RemoteModel.ROLE" Width="1.5" PointX="12" PointY="61.75" /> + <EntityTypeShape EntityType="RemoteModel.ROLES_PERMISSIONS" Width="1.5" PointX="14.25" PointY="61.875" /> + <EntityTypeShape EntityType="RemoteModel.SEGMENT" Width="1.5" PointX="10.5" PointY="31.625" /> + <EntityTypeShape EntityType="RemoteModel.SPOOL_TYPES" Width="1.5" PointX="3" PointY="15.875" /> + <EntityTypeShape EntityType="RemoteModel.SPOOL" Width="1.5" PointX="7.5" PointY="30.625" /> + <EntityTypeShape EntityType="RemoteModel.sysdiagram" Width="1.5" PointX="0.75" PointY="2.75" /> + <EntityTypeShape EntityType="RemoteModel.TANGO_VERSIONS" Width="1.5" PointX="15.25" PointY="20.125" /> + <EntityTypeShape EntityType="RemoteModel.TECH_CONTROLLERS" Width="1.5" PointX="2.75" PointY="2.75" /> + <EntityTypeShape EntityType="RemoteModel.TECH_DISPENSERS" Width="1.5" PointX="4.75" PointY="2.75" /> + <EntityTypeShape EntityType="RemoteModel.TECH_HEATERS" Width="1.5" PointX="0.75" PointY="6.75" /> + <EntityTypeShape EntityType="RemoteModel.TECH_IOS" Width="1.5" PointX="2.75" PointY="6.75" /> + <EntityTypeShape EntityType="RemoteModel.TECH_MONITORS" Width="1.5" PointX="4.75" PointY="5.75" /> + <EntityTypeShape EntityType="RemoteModel.TECH_VALVES" Width="1.5" PointX="5.75" PointY="10.75" /> + <EntityTypeShape EntityType="RemoteModel.USER" Width="1.5" PointX="6" PointY="38.75" /> + <EntityTypeShape EntityType="RemoteModel.USERS_ROLES" Width="1.5" PointX="14.25" PointY="41.75" /> + <EntityTypeShape EntityType="RemoteModel.WINDING_METHODS" Width="1.5" PointX="6" PointY="45.375" /> <AssociationConnector Association="RemoteModel.FK_EVENTS_ACTIONS_ACTIONS" /> <AssociationConnector Association="RemoteModel.FK_ORGANIZATIONS_ADDRESSES" /> <AssociationConnector Association="RemoteModel.FK_USERS_ADDRESSES" /> @@ -101,7 +101,6 @@ <AssociationConnector Association="RemoteModel.FK_CONFIGURATIONS_EMBEDDED_FIRMWARE_VERSIONS" /> <AssociationConnector Association="RemoteModel.FK_CONFIGURATIONS_HARDWARE_VERSIONS" /> <AssociationConnector Association="RemoteModel.FK_IDS_PACKS_CONFIGURATIONS" /> - <AssociationConnector Association="RemoteModel.FK_MACHINE_VERSIONS_CONFIGURATIONS" /> <AssociationConnector Association="RemoteModel.FK_MACHINES_CONFIGURATIONS" /> <AssociationConnector Association="RemoteModel.FK_ORGANIZATIONS_CONTACTS" /> <AssociationConnector Association="RemoteModel.FK_USERS_CONTACTS" /> diff --git a/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml.cs b/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml.cs index 0ff703178..673136df9 100644 --- a/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml.cs +++ b/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml.cs @@ -15,7 +15,9 @@ using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; using Tango.BL; +using Tango.BL.Builders; using Tango.BL.Catalogs; +using Tango.BL.Entities; using Tango.Core; using Tango.Core.Commands; using Tango.DragAndDrop; @@ -30,9 +32,25 @@ namespace Tango.UITests { public MainWindow() { + + Start(); InitializeComponent(); } + private async void Start() + { + using (ObservablesContext db = ObservablesContext.CreateDefault()) + { + var machine = new MachineBuilder(db).Set(x => x.SerialNumber == "1111").WithConfiguration().WithOrganization().WithJobs().WithSpools().WithCats().Build(); + MachineVersion version = db.MachineVersions.First(); + await version.ApplyPrototypeMachine(machine, db); + + Machine m = await version.CreatePrototypeMachine(db); + } + } + + + public String CurrentPath { get { return (String)GetValue(CurrentPathProperty); } |
