diff options
| author | Roy <Roy.mail.net@gmail.com> | 2022-11-02 04:49:10 +0200 |
|---|---|---|
| committer | Roy <Roy.mail.net@gmail.com> | 2022-11-02 04:49:10 +0200 |
| commit | 992208add11db73cb1ffb48c5ccedb0c883aafd0 (patch) | |
| tree | e8b753bca8f341c105b8b1cb7761e2282a13881e /Software/Visual_Studio/Tango.BL | |
| parent | 5ab455fb09c659e92ad4de41ec7472e2b8e48499 (diff) | |
| download | Tango-992208add11db73cb1ffb48c5ccedb0c883aafd0.tar.gz Tango-992208add11db73cb1ffb48c5ccedb0c883aafd0.zip | |
PPC multi version support completed on PPC,FSE,MS,DB.
Diffstat (limited to 'Software/Visual_Studio/Tango.BL')
6 files changed, 90 insertions, 3 deletions
diff --git a/Software/Visual_Studio/Tango.BL/DTO/TangoUpdateDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/TangoUpdateDTOBase.cs index 8e87df812..352cd37b2 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/TangoUpdateDTOBase.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/TangoUpdateDTOBase.cs @@ -38,6 +38,14 @@ namespace Tango.BL.DTO } /// <summary> + /// application version tag + /// </summary> + public String ApplicationVersionTag + { + get; set; + } + + /// <summary> /// machine guid /// </summary> public String MachineGuid diff --git a/Software/Visual_Studio/Tango.BL/Entities/Machine.cs b/Software/Visual_Studio/Tango.BL/Entities/Machine.cs index 2070c68b3..b82738db8 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/Machine.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/Machine.cs @@ -145,6 +145,16 @@ namespace Tango.BL.Entities return cloned; } + protected override void OnVersionTagChanged(string versiontag) + { + if (versiontag == String.Empty) + { + _versiontag = null; + } + + base.OnVersionTagChanged(versiontag); + } + /// <summary> /// Initializes a new instance of the <see cref="Machine" /> class. /// </summary> diff --git a/Software/Visual_Studio/Tango.BL/Entities/TangoUpdate.cs b/Software/Visual_Studio/Tango.BL/Entities/TangoUpdate.cs index d5b10ee45..867665f89 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/TangoUpdate.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/TangoUpdate.cs @@ -1,4 +1,5 @@ -using Newtonsoft.Json; +using LiteDB; +using Newtonsoft.Json; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; @@ -152,6 +153,14 @@ namespace Tango.BL.Entities } } + [NotMapped] + [JsonIgnore] + [BsonIgnore] + public String VersionAndTag + { + get { return ApplicationVersion + (ApplicationVersionTag.IsNotNullOrEmpty() ? $" [{ApplicationVersionTag}]" : String.Empty); } + } + protected override void OnStatusChanged(int status) { base.OnStatusChanged(status); diff --git a/Software/Visual_Studio/Tango.BL/Entities/TangoUpdateBase.cs b/Software/Visual_Studio/Tango.BL/Entities/TangoUpdateBase.cs index 677886b47..7baa8f9e6 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/TangoUpdateBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/TangoUpdateBase.cs @@ -31,6 +31,8 @@ namespace Tango.BL.Entities public event EventHandler<String> FirmwareVersionChanged; + public event EventHandler<String> ApplicationVersionTagChanged; + public event EventHandler<Int32> StatusChanged; public event EventHandler<String> FailedReasonChanged; @@ -97,6 +99,33 @@ namespace Tango.BL.Entities } } + protected String _applicationversiontag; + + /// <summary> + /// Gets or sets the tangoupdatebase application version tag. + /// </summary> + + [Column("APPLICATION_VERSION_TAG")] + + public String ApplicationVersionTag + { + get + { + return _applicationversiontag; + } + + set + { + if (_applicationversiontag != value) + { + _applicationversiontag = value; + + OnApplicationVersionTagChanged(value); + + } + } + } + protected String _machineguid; /// <summary> @@ -303,6 +332,15 @@ namespace Tango.BL.Entities } /// <summary> + /// Called when the ApplicationVersionTag has changed. + /// </summary> + protected virtual void OnApplicationVersionTagChanged(String applicationversiontag) + { + ApplicationVersionTagChanged?.Invoke(this, applicationversiontag); + RaisePropertyChanged(nameof(ApplicationVersionTag)); + } + + /// <summary> /// Called when the Status has changed. /// </summary> protected virtual void OnStatusChanged(Int32 status) diff --git a/Software/Visual_Studio/Tango.BL/Entities/TangoVersion.cs b/Software/Visual_Studio/Tango.BL/Entities/TangoVersion.cs index d8c0625a5..b84bb0682 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/TangoVersion.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/TangoVersion.cs @@ -1,5 +1,8 @@ +using LiteDB; +using Newtonsoft.Json; using System; using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -15,5 +18,24 @@ namespace Tango.BL.Entities { } + + [NotMapped] + [JsonIgnore] + [BsonIgnore] + public String VersionAndTag + { + get { return Version + (Tag.IsNotNullOrEmpty() ? $" [{Tag}]" : String.Empty); } + } + + + protected override void OnTagChanged(string tag) + { + if (tag == String.Empty) + { + _tag = null; + } + + base.OnTagChanged(tag); + } } } diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/Roles.cs b/Software/Visual_Studio/Tango.BL/Enumerations/Roles.cs index 8b1ad1293..bb5356e95 100644 --- a/Software/Visual_Studio/Tango.BL/Enumerations/Roles.cs +++ b/Software/Visual_Studio/Tango.BL/Enumerations/Roles.cs @@ -152,9 +152,9 @@ namespace Tango.BL.Enumerations MachineManager = 17, /// <summary> - /// (Standard User) + /// (Twine Studio User) /// </summary> - [Description("Standard User")] + [Description("Twine Studio User")] TwineStudioUser = 2000, /// <summary> |
