Kaynağa Gözat

Added extra properties to GPSTrackerType

frankvandenbos 4 ay önce
ebeveyn
işleme
ac2f4c9a71

+ 1 - 1
prs.classes/Entities/GPSTracker/GPSTrackerLink.cs

@@ -6,7 +6,7 @@ namespace Comal.Classes
     public class GPSTrackerLink : EntityLink<GPSTracker>
     {
         [EditorSequence(1)]
-        [LookupEditor(typeof(GPSTracker))]
+        [CodePopupEditor(typeof(GPSTracker), CanAdd=true)]
         public override Guid ID { get; set; }
 
         [EditorSequence(2)]

+ 87 - 2
prs.classes/Entities/GPSTracker/GPSTrackerType.cs

@@ -1,24 +1,109 @@
-using InABox.Core;
+using System;
+using InABox.Core;
 
 namespace Comal.Classes
 {
+
+
+    public class GPSTrackerPowerType : Entity, IRemotable, IPersistent, IMergeable, ILicense<GPSTrackerLicense>
+    {
+        
+        [EditorSequence(1)]
+        [UniqueCodeEditor(Visible = Visible.Default, Editable = Editable.Enabled)]
+        public string Code { get; set; }
+        
+        [EditorSequence(2)]
+        public string Description { get; set; }
+    }
+
+    public class GPSTrackerPowerTypeLink : EntityLink<GPSTrackerPowerType>
+    {
+        [CodePopupEditor(typeof(GPSTrackerPowerType), CanAdd=true)]
+        public override Guid ID { get; set; }
+        
+        [CodeEditor(Visible = Visible.Default)]
+        public string Code { get; set; }
+        
+        [TextBoxEditor(Visible = Visible.Optional)]
+        public string Description { get; set; }
+    }
+    
+    
+    public class GPSTrackerConnectivityType : Entity, IRemotable, IPersistent, IMergeable, ILicense<GPSTrackerLicense>
+    {
+        [EditorSequence(1)]
+        [UniqueCodeEditor(Visible = Visible.Default, Editable = Editable.Enabled)]
+        public string Code { get; set; }
+        
+        [EditorSequence(2)]
+        public string Description { get; set; }
+    }
+
+    public class GPSTrackerConnectivityTypeLink : EntityLink<GPSTrackerConnectivityType>
+    {
+        [CodePopupEditor(typeof(GPSTrackerConnectivityType), CanAdd=true)]
+        public override Guid ID { get; set; }
+        
+        [CodeEditor(Visible = Visible.Default)]
+        public string Code { get; set; }
+        
+        [TextBoxEditor(Visible = Visible.Optional)]
+        public string Description { get; set; }
+    }
+    
+        
+    public class GPSTrackerLocationType : Entity, IRemotable, IPersistent, IMergeable, ILicense<GPSTrackerLicense>
+    {
+        [EditorSequence(1)]
+        [UniqueCodeEditor(Visible = Visible.Default, Editable = Editable.Enabled)]
+        public string Code { get; set; }
+        
+        [EditorSequence(2)]
+        public string Description { get; set; }
+    }
+
+    public class GPSTrackerLocationTypeLink : EntityLink<GPSTrackerLocationType>
+    {
+        [CodePopupEditor(typeof(GPSTrackerLocationType), CanAdd=true)]
+        public override Guid ID { get; set; }
+        
+        [CodeEditor(Visible = Visible.Default)]
+        public string Code { get; set; }
+        
+        [TextBoxEditor(Visible = Visible.Optional)]
+        public string Description { get; set; }
+    }
+    
     public class GPSBatteryFormulaModel : IExpressionModel<double>
     {
         public double BatteryLevel { get; set; }
     }
 
     [UserTracking(typeof(GPSTracker))]
-    public class GPSTrackerType : Entity, IGPSTrackerType, IRemotable, IPersistent, ILicense<GPSTrackerLicense>, IExportable, IImportable
+    public class GPSTrackerType : Entity, IGPSTrackerType, IRemotable, IPersistent, ILicense<GPSTrackerLicense>, IExportable, IImportable, IMergeable
     {
+        [EditorSequence(1)]
         [TextBoxEditor(Visible = Visible.Default, Editable = Editable.Enabled)]
         public string Description { get; set; }
 
+        [EditorSequence(2)]
+        public GPSTrackerPowerTypeLink Power { get; set; } 
+        
         /// <summary>
         /// An expression (see <see cref="CoreExpression"/>) that should always return a percentage battery level remaining.
         /// <br/><br/>
         /// If null, fills the battery level on GPS Tracker Location with either a voltage or a battery level - whatever OEM returns.
         /// </summary>
+        [EditorSequence(3)]
         [ExpressionEditor(typeof(GPSBatteryFormulaModel), Visible = Visible.Optional)]
         public string? BatteryFormula { get; set; }
+        
+        [EditorSequence(4)]
+        public GPSTrackerConnectivityTypeLink Connectivity { get; set; }
+        
+        [EditorSequence(5)]
+        public GPSTrackerLocationTypeLink LocationType { get; set; }
+
+        public override string ToString() => Description;
     }
 }

+ 10 - 4
prs.classes/Entities/GPSTracker/GPSTrackerTypeLink.cs

@@ -5,13 +5,19 @@ namespace Comal.Classes
 {
     public class GPSTrackerTypeLink : EntityLink<GPSTrackerType>, IGPSTrackerType
     {
-        [LookupEditor(typeof(GPSTrackerType))]
+        [PopupEditor(typeof(GPSTrackerType), CanAdd = true)]
         public override Guid ID { get; set; }
-
+        
         [TextBoxEditor(Visible = Visible.Default, Editable = Editable.Hidden)]
         public string Description { get; set; }
-
-        [ExpressionEditor(typeof(GPSBatteryFormulaModel), Visible = Visible.Optional, Editable = Editable.Hidden)]
+        
+        public GPSTrackerPowerTypeLink Power { get; set; } 
+        
         public string? BatteryFormula { get; set; }
+        
+        public GPSTrackerConnectivityTypeLink Connectivity { get; set; }
+        
+        public GPSTrackerLocationTypeLink LocationType { get; set; }
+
     }
 }

+ 7 - 1
prs.classes/Entities/GPSTracker/IGPSTrackerType.cs

@@ -5,7 +5,13 @@ namespace Comal.Classes
     public interface IGPSTrackerType : IEntity
     {
         string Description { get; set; }
-
+        
+        GPSTrackerPowerTypeLink Power { get; set; } 
+        
         string? BatteryFormula { get; set; }
+        
+        GPSTrackerConnectivityTypeLink Connectivity { get; set; }
+        
+        GPSTrackerLocationTypeLink LocationType { get; set; }
     }
 }

+ 2 - 1
prs.desktop/MainWindow.xaml.cs

@@ -657,7 +657,8 @@ public partial class MainWindow : IPanelHostControl
         DynamicGridUtils.SelectionBackground = ThemeManager.SelectionBackgroundBrush;
         DynamicGridUtils.SelectionForeground = ThemeManager.SelectionForegroundBrush;
         DynamicGridUtils.FilterBackground = ThemeManager.FilterBackgroundBrush;
-
+        DynamicGridUtils.FilterForeground = ThemeManager.FilterForegroundBrush;
+        
         //_ribbon.Background =  new SolidColorBrush(Colors.White);
         //_ribbon.BackStageColor = ThemeConverter.GetBrush(ElementType.Ribbon, BrushType.Background);
         ////_ribbon.BackStage.Background = ThemeConverter.GetBrush(ElementType.Ribbon, BrushType.Background);

+ 1 - 1
prs.desktop/prsdesktop.iss

@@ -8,7 +8,7 @@
 #define public Dependency_Path_NetCoreCheck "dependencies\"
 
 #define MyAppName "PRS Desktop"
-#define MyAppVersion "8.34b"
+#define MyAppVersion "8.35"
 #define MyAppPublisher "PRS Digital"
 #define MyAppURL "https://www.prs-software.com.au"
 #define MyAppExeName "PRSDesktop.exe"

+ 1 - 1
prs.licensing/PRSLicensing.iss

@@ -8,7 +8,7 @@
 #define public Dependency_Path_NetCoreCheck "dependencies\"
 
 #define MyAppName "PRS Licensing"
-#define MyAppVersion "8.34b"
+#define MyAppVersion "8.35"
 #define MyAppPublisher "PRS Digital"
 #define MyAppURL "https://www.prs-software.com.au"
 #define MyAppExeName "PRSLicensing.exe"

+ 1 - 1
prs.server/PRSServer.iss

@@ -8,7 +8,7 @@
 #define public Dependency_Path_NetCoreCheck "dependencies\"
 
 #define MyAppName "PRS Server"
-#define MyAppVersion "8.34b"
+#define MyAppVersion "8.35"
 #define MyAppPublisher "PRS Digital"
 #define MyAppURL "https://www.prs-software.com.au"
 #define MyAppExeName "PRSServer.exe"