Merge branch 'Release/StatTaskAndNumrecFix_01'

This commit is contained in:
Samuele Locatelli
2025-07-16 11:54:13 +02:00
13 changed files with 57 additions and 22 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP.SPEC</RootNamespace>
<Version>6.16.2507.1015</Version>
<Version>6.16.2507.1610</Version>
<UserSecretsId>1800a78a-6ff1-40f9-b490-87fb8bfc1394</UserSecretsId>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
</PropertyGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOSPEC </i>
<h4>Versione: 6.16.2507.1015</h4>
<h4>Versione: 6.16.2507.1610</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
6.16.2507.1015
6.16.2507.1610
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2507.1015</version>
<version>6.16.2507.1610</version>
<url>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+2 -2
View File
@@ -4,8 +4,8 @@
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>MP.Stats</RootNamespace>
<UserSecretsId>826e877c-ba70-4253-84cb-d0b1cafd4440</UserSecretsId>
<Version>6.16.2507.0818</Version>
<Version>6.16.2507.0818</Version>
<Version>6.16.2507.1611</Version>
<Version>6.16.2507.1611</Version>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
+39 -4
View File
@@ -109,7 +109,24 @@ namespace MP.Stats.Pages
{
SelCount = TotalCount * numSel / NumMacc;
}
int scale = 256;
switch (value)
{
case ResolutionLevel.Low:
MaxPoints = NumPoint(SelCount, numSel , 32 , 32);
break;
case ResolutionLevel.Med:
MaxPoints = NumPoint(SelCount, numSel, 8, 128);
break;
case ResolutionLevel.High:
MaxPoints = NumPoint(SelCount, numSel, 1, 512);
break;
default:
break;
}
#if false
switch (value)
{
case ResolutionLevel.Low:
@@ -126,14 +143,32 @@ namespace MP.Stats.Pages
default:
break;
}
}
#endif
}
}
#if false
// limite minimo 256...
MaxPoints = MaxPoints < 256 ? 256 : MaxPoints;
MaxPoints = MaxPoints < 256 ? 256 : MaxPoints;
#endif
}
}
/// <summary>
/// Calcola num punti dato
/// </summary>
/// <param name="selCount">Numero totale valori</param>
/// <param name="numSel">Numero partizioni (oggetti da disegnare insieme)</param>
/// <param name="factor">Fattore di scala richiesto</param>
/// <param name="scale">Fattore di scala (=valore minimo garantito)</param>
/// <returns></returns>
private int NumPoint(int selCount, int numSel, int factor, double scale)
{
int calcVal = (int)Math.Round((double)(selCount * scale) / numSel / factor / (double)scale);
return calcVal > scale ? calcVal : (int)scale;
}
[Inject]
protected MpStatsService StatService { get; set; }
@@ -206,7 +241,7 @@ namespace MP.Stats.Pages
#region Private Fields
private int _maxPoints = 256;
private ResolutionLevel _reqRes = ResolutionLevel.Low;
private ResolutionLevel _reqRes = ResolutionLevel.Med;
private List<ConfigModel> ConfigList;
private int MaxDisplay = 10;
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo statistiche MAPO</i>
<h4>Versione: 6.16.2507.0818</h4>
<h4>Versione: 6.16.2507.1611</h4>
<br />
Note di rilascio:
<ul>
+1 -1
View File
@@ -1 +1 @@
6.16.2507.0818
6.16.2507.1611
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2507.0818</version>
<version>6.16.2507.1611</version>
<url>https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/MP.Stats.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+2 -2
View File
@@ -355,7 +355,7 @@ namespace MP.TaskMan.Controllers
{
otherRec = dbCtx
.DbSetTaskList
.Where(x => x.Ordinal < currData.Ordinal)
.Where(x => x.Ordinal < currData.Ordinal && x.Group==currData.Group)
.OrderByDescending(x => x.Ordinal)
.FirstOrDefault();
}
@@ -363,7 +363,7 @@ namespace MP.TaskMan.Controllers
{
otherRec = dbCtx
.DbSetTaskList
.Where(x => x.Ordinal > currData.Ordinal)
.Where(x => x.Ordinal > currData.Ordinal && x.Group == currData.Group)
.OrderBy(x => x.Ordinal)
.FirstOrDefault();
}
+2 -2
View File
@@ -325,11 +325,11 @@ namespace MP.TaskMan.Services
/// </summary>
/// <param name="codGroup"></param>
/// <returns></returns>
public bool TaskListReorder(int codGroup)
public async Task<bool> TaskListReorder(int codGroup)
{
bool dbResult = MLController.TaskListReorder(codGroup);
// svuoto cache!
FlushCache();
await FlushCacheAsync();
return dbResult;
}
+2 -2
View File
@@ -89,10 +89,10 @@ else
</div>
</div>
<div class="col-md-1 pt-2">
<button class="btn btn-lg w-100 btn-success" @onclick="() => doSave()" title="Save"><i class="far fa-save"></i> Save</button>
<button class="btn btn-lg w-100 btn-success text-nowrap" @onclick="() => doSave()" title="Save"><i class="far fa-save"></i> Save</button>
</div>
<div class="col-md-1 pt-2">
<button class="btn btn-lg w-100 btn-warning" @onclick="() => doCancel()" title="Cancel"><i class="fas fa-ban"></i> Cancel</button>
<button class="btn btn-lg w-100 btn-warning text-nowrap" @onclick="() => doCancel()" title="Cancel"><i class="fas fa-ban"></i> Cancel</button>
</div>
</div>
+3 -3
View File
@@ -48,8 +48,8 @@ namespace MP.TaskMan
// se cambiato gruppo chiamo reorg gruppo old/new...
if (CurrRecord.Group != oldGroup)
{
TService.TaskListReorder(oldGroup);
TService.TaskListReorder(CurrRecord.Group);
await TService.TaskListReorder(oldGroup);
await TService.TaskListReorder(CurrRecord.Group);
oldGroup = CurrRecord.Group;
}
}
@@ -59,6 +59,6 @@ namespace MP.TaskMan
#endregion Protected Methods
private bool isProcessing= false;
private bool isProcessing = false;
}
}