Browse Source

Merge remote-tracking branch 'origin/kenric' into frank

frankvandenbos 9 months ago
parent
commit
a2af014ad9

+ 1 - 1
prs.classes/Entities/Job/JobScopes/JobScope.cs

@@ -95,7 +95,7 @@ namespace Comal.Classes
                     new Filter<JobScope>(x=>x.Job.ID).IsEqualTo(items.First().Job.ID),
                     Columns.None<JobScope>().Add(x => x.ID).Add(x => x.Parent.ID));
 
-                var nodes = new CoreTreeNodes();
+                var nodes = new CoreTreeNodes<Guid>(Guid.Empty);
                 nodes.Load<JobScope>(data, x => x.ID, x => x.Parent.ID);
 
                 var exclusions = items.SelectMany(x => nodes.GetChildren(x.ID)).ToArray();

+ 1 - 1
prs.classes/Entities/Product/ProductGroup/ProductGroup.cs

@@ -30,7 +30,7 @@ namespace Comal.Classes
                     null,
                     Columns.None<ProductGroup>().Add(x => x.ID).Add(x => x.Parent.ID));
 
-                var nodes = new CoreTreeNodes();
+                var nodes = new CoreTreeNodes<Guid>(Guid.Empty);
                 nodes.Load<ProductGroup>(data, x => x.ID, x => x.Parent.ID);
 
                 var exclusions = items.SelectMany(x => nodes.GetChildren(x.ID)).ToArray();

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

@@ -292,9 +292,9 @@ public partial class MainWindow : IPanelHostControl
                     CoreUtils.RegisterClasses();
                     ComalUtils.RegisterClasses();
                     PRSSharedUtils.RegisterClasses();
+                    WPFUtils.RegisterClasses();
                     ReportUtils.RegisterClasses();
                     ConfigurationUtils.RegisterClasses();
-                    DynamicGridUtils.RegisterClasses();
                 }),
                 Task.Run(() =>
                 {

+ 5 - 4
prs.desktop/Panels/Invoices/ProgressClaim/ProgressClaimGrid.cs

@@ -447,19 +447,20 @@ public class ProgressClaimGrid : DynamicItemsListGrid<ProgressClaim>
         return columns;
     }
     
-    private DynamicGridTreeUIComponent<ProgressClaim>? _uiComponent;
+    private DynamicGridTreeUIComponent<ProgressClaim, Guid>? _uiComponent;
     
 
 
-    private DynamicGridTreeUIComponent<ProgressClaim> UIComponent
+    private DynamicGridTreeUIComponent<ProgressClaim, Guid> UIComponent
     {
         get
         {
             if(_uiComponent is null)
             {
-                _uiComponent = new DynamicGridTreeUIComponent<ProgressClaim>(
+                _uiComponent = new DynamicGridTreeUIComponent<ProgressClaim, Guid>(
                     x => x.JobScope.ID,
-                    x => x.JobScope.Parent.ID)
+                    x => x.JobScope.Parent.ID,
+                    Guid.Empty)
                 {
                     Parent = this,
                     MaxRowHeight = 30,

+ 1 - 1
prs.desktop/Panels/Jobs/DocumentSets/JobDocumentSetFolderSelectionDialog.xaml.cs

@@ -63,7 +63,7 @@ public partial class JobDocumentSetFolderSelectionDialog : Window
         Folders.Refresh(true, true);
     }
     
-    private void Folders_OnSelectItem(InABox.Core.CoreTreeNode node)
+    private void Folders_OnSelectItem(InABox.Core.CoreTreeNode<Guid> node)
     {
         SelectedFolder = node.ID;
         OKButton.IsEnabled = SelectedFolder != Guid.Empty;

+ 6 - 5
prs.desktop/Panels/Jobs/DocumentSets/JobDocumentSetFolderTree.cs

@@ -30,16 +30,17 @@ public class JobDocumentSetFolderTree : DynamicDataGrid<JobDocumentSetFolder>, I
         HiddenColumns.Add(x => x.Documents);
     }
     
-    private DynamicGridTreeUIComponent<JobDocumentSetFolder>? _uiComponent;
-    private DynamicGridTreeUIComponent<JobDocumentSetFolder> UIComponent
+    private DynamicGridTreeUIComponent<JobDocumentSetFolder, Guid>? _uiComponent;
+    private DynamicGridTreeUIComponent<JobDocumentSetFolder, Guid> UIComponent
     {
         get
         {
             if(_uiComponent is null)
             {
-                _uiComponent = new DynamicGridTreeUIComponent<JobDocumentSetFolder>(
+                _uiComponent = new DynamicGridTreeUIComponent<JobDocumentSetFolder, Guid>(
                     x => x.ID,
-                    x => x.Parent.ID)
+                    x => x.Parent.ID,
+                    Guid.Empty)
                 {
                     Parent = this,
                     MaxRowHeight = 30,
@@ -68,7 +69,7 @@ public class JobDocumentSetFolderTree : DynamicDataGrid<JobDocumentSetFolder>, I
         return UIComponent.GetChildren(folderID);
     }
 
-    private void JobDocumentSetFolderTree_OnContextMenuOpening(CoreTreeNode? node, ContextMenu menu)
+    private void JobDocumentSetFolderTree_OnContextMenuOpening(CoreTreeNode<Guid>? node, ContextMenu menu)
     {
         if(node is not null && node.ID != CoreUtils.FullGuid && Options.AddRows)
         {

+ 3 - 3
prs.desktop/Panels/Jobs/DocumentSets/JobDocumentSetTree.xaml.cs

@@ -908,7 +908,7 @@ namespace PRSDesktop
             if (!data.Rows.Any())
                 return false;
 
-            var folders = new CoreTreeNodes();
+            var folders = new CoreTreeNodes<Guid>(Guid.Empty);
             folders.Load<JobDocumentSetFolder>(data, x => x.ID, x => x.Parent.ID);
 
             foreach (var folder in folders.Nodes)
@@ -917,14 +917,14 @@ namespace PRSDesktop
             return true;
         }
 
-        private void DoPopulateFolder(MenuItem header, CoreTreeNode folder, IEnumerable<DocumentSetNode> documents)
+        private void DoPopulateFolder(MenuItem header, CoreTreeNode<Guid> folder, IEnumerable<DocumentSetNode> documents)
         {
             var menu = header.AddItem(folder.Row.Get<JobDocumentSetFolder, string>(x => x.Name), null, () => MoveToFolder(documents, folder));
             foreach (var childfolder in folder.Children)
                 DoPopulateFolder(menu, childfolder, documents);
         }
 
-        private void MoveToFolder(IEnumerable<DocumentSetNode> documents, CoreTreeNode folder)
+        private void MoveToFolder(IEnumerable<DocumentSetNode> documents, CoreTreeNode<Guid> folder)
         {
             using (new WaitCursor())
             {

+ 5 - 4
prs.desktop/Panels/Jobs/JobScopes/JobScopeGrid.cs

@@ -110,16 +110,17 @@ namespace PRSDesktop
             base.Reload(criteria, columns, ref sort, token, action);
         }
         
-        private DynamicGridTreeUIComponent<JobScope>? _uiComponent;
-        private DynamicGridTreeUIComponent<JobScope> UIComponent
+        private DynamicGridTreeUIComponent<JobScope, Guid>? _uiComponent;
+        private DynamicGridTreeUIComponent<JobScope, Guid> UIComponent
         {
             get
             {
                 if(_uiComponent is null)
                 {
-                    _uiComponent = new DynamicGridTreeUIComponent<JobScope>(
+                    _uiComponent = new DynamicGridTreeUIComponent<JobScope, Guid>(
                         x => x.ID,
-                        x => x.Parent.ID)
+                        x => x.Parent.ID,
+                        Guid.Empty)
                     {
                         Parent = this,
                         MaxRowHeight = 30,

+ 4 - 3
prs.desktop/Panels/Meeting/MeetingTreeView.cs

@@ -18,9 +18,10 @@ public class MeetingItemTree : DynamicDataGrid<MeetingItem>
 {
     protected override IDynamicGridUIComponent<MeetingItem> CreateUIComponent()
     {
-        var component = new DynamicGridTreeUIComponent<MeetingItem>(
+        var component = new DynamicGridTreeUIComponent<MeetingItem, Guid>(
             x => x.ID,
-            x => x.Parent.ID)
+            x => x.Parent.ID,
+            Guid.Empty)
         {
             Parent = this,
             ShowHeader = false,
@@ -42,7 +43,7 @@ public class MeetingItemTree : DynamicDataGrid<MeetingItem>
 
     public MeetingModel? Model { get; set; }
     
-    private void MeetingItemTree_OnContextMenuOpening(CoreTreeNode? node, ContextMenu menu)
+    private void MeetingItemTree_OnContextMenuOpening(CoreTreeNode<Guid>? node, ContextMenu menu)
     {
         if(node is not null && node.ID != CoreUtils.FullGuid && Options.AddRows)
         {

+ 5 - 4
prs.desktop/Panels/Products/Master List/ProductGroupTree.cs

@@ -39,14 +39,15 @@ public class ProductGroupTree : DynamicDataGrid<ProductGroup>
         return columns;
     }
 
-    private DynamicGridTreeUIComponent<ProductGroup>? _uiComponent;
-    private DynamicGridTreeUIComponent<ProductGroup> UIComponent
+    private DynamicGridTreeUIComponent<ProductGroup, Guid>? _uiComponent;
+    private DynamicGridTreeUIComponent<ProductGroup, Guid> UIComponent
     {
         get
         {
-            return _uiComponent ??= new DynamicGridTreeUIComponent<ProductGroup>(
+            return _uiComponent ??= new DynamicGridTreeUIComponent<ProductGroup, Guid>(
                 x => x.ID,
-                x => x.Parent.ID)
+                x => x.Parent.ID,
+                Guid.Empty)
             {
                 Parent = this,
                 MaxRowHeight = 30D,

+ 5 - 4
prs.desktop/Panels/Stock Forecast/StockForecastProductGroupTree.cs

@@ -45,16 +45,17 @@ public class StockForecastProductGroupTree : DynamicSelectorGrid<ProductGroup>,
         return result.Intersect(FilteredGuids).ToArray();
     }
 
-    private DynamicGridTreeUIComponent<ProductGroup>? _uiComponent;
-    private DynamicGridTreeUIComponent<ProductGroup> UIComponent
+    private DynamicGridTreeUIComponent<ProductGroup, Guid>? _uiComponent;
+    private DynamicGridTreeUIComponent<ProductGroup, Guid> UIComponent
     {
         get
         {
             if(_uiComponent is null)
             {
-                _uiComponent = new DynamicGridTreeUIComponent<ProductGroup>(
+                _uiComponent = new DynamicGridTreeUIComponent<ProductGroup, Guid>(
                     x => x.ID,
-                    x => x.Parent.ID)
+                    x => x.Parent.ID,
+                    Guid.Empty)
                 {
                     Parent = this,
                     ExpandMode = DynamicTreeGridExpandMode.All

+ 5 - 4
prs.desktop/Utils/LogikalUtils/Grids/LogikalProjectCentreGrid.cs

@@ -31,17 +31,18 @@ public class LogikalProjectCentreGrid : LogikalGrid<LogikalProjectCentre>
     //    Refresh(false, true);
     //}
 
-    private DynamicGridTreeUIComponent<LogikalProjectCentre>? _uiComponent;
+    private DynamicGridTreeUIComponent<LogikalProjectCentre, Guid>? _uiComponent;
     
-    private DynamicGridTreeUIComponent<LogikalProjectCentre> UIComponent
+    private DynamicGridTreeUIComponent<LogikalProjectCentre, Guid> UIComponent
     {
         get
         {
             if(_uiComponent is null)
             {
-                _uiComponent = new DynamicGridTreeUIComponent<LogikalProjectCentre>(
+                _uiComponent = new DynamicGridTreeUIComponent<LogikalProjectCentre, Guid>(
                     x => x.ID,
-                    x => x.ParentID)
+                    x => x.ParentID,
+                    Guid.Empty)
                 {
                     Parent = this,
                     MaxRowHeight = 30,

+ 2 - 0
prs.licensing/Engine/LicensingEngine.cs

@@ -5,6 +5,7 @@ using InABox.Configuration;
 using InABox.Core;
 using InABox.Rpc;
 using InABox.Wpf.Reports;
+using InABox.WPF;
 using PRS.Shared;
 using PRSServer;
 using PRSServices;
@@ -37,6 +38,7 @@ public class LicensingEngine : Engine<LicensingEngineProperties>
         ComalUtils.RegisterClasses();
         PRSSharedUtils.RegisterClasses();
         ReportUtils.RegisterClasses();
+        WPFUtils.RegisterClasses();
         ConfigurationUtils.RegisterClasses();
 
         Logger.Send(LogType.Information, "", "Starting Web Listener on port " + Properties.ListenPort);

+ 1 - 0
prs.server/Forms/Configuration.xaml.cs

@@ -59,6 +59,7 @@ public partial class Configuration : ThemableWindow
             ComalUtils.RegisterClasses();
             PRSSharedUtils.RegisterClasses();
             ReportUtils.RegisterClasses();
+            WPFUtils.RegisterClasses();
             ConfigurationUtils.RegisterClasses();
             CoreUtils.RegisterClasses(typeof(Configuration).Assembly);