Add wizard UI, general-assembly resolution, and test suite
Restructure Form1 into a sequential wizard (database -> import -> raw -> recursive component resolution -> completeness/STEP report), fix case-sensitivity bugs in codice/tipo_file lookups and a word-boundary gap in the assembly scanner that missed _D100-style sub-assembly references, and treat the distinta's general assembly as an ordinary CSV row (derived from the DBP_<codice>_<timestamp> filename) instead of special-casing it throughout. Also adds CadSearchGui.Tests (xUnit) covering the scanner, filename parsing, and the case-insensitive DB lookup behavior. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
146ce78eae
commit
52483177f0
16 files changed
+1144
-249
No files matched your search
@@ -6,7 +6,7 @@ namespace CadSearchGui;
|
||||
/// sotto-assiemi trovati nell'indice e già copiati in "raw" a partire dagli assiemi iniziali.</summary>
|
||||
public class PrtMancantiForm : Form
|
||||
{
|
||||
public PrtMancantiForm(List<(string Codice, string Tipo, string Percorso)> righe, int codiciNonTrovati, string cartellaRaw)
|
||||
public PrtMancantiForm(List<(string Codice, string Tipo, string Percorso)> righe, List<string> codiciNonTrovati, string cartellaRaw)
|
||||
{
|
||||
int numPrt = righe.Count(r => r.Tipo == "prt");
|
||||
int numAsm = righe.Count(r => r.Tipo == "asm");
|
||||
@@ -23,9 +23,10 @@ public class PrtMancantiForm : Form
|
||||
Height = 44,
|
||||
Padding = new Padding(12, 8, 12, 8),
|
||||
Text = $"Copiati in \"{cartellaRaw}\": {numPrt} PRT e {numAsm} sotto-assiemi trovati nell'indice."
|
||||
+ (codiciNonTrovati > 0
|
||||
? $" {codiciNonTrovati} codici referenziati non corrispondono a nessun file indicizzato "
|
||||
+ "(probabilmente disegni, o falsi positivi della scansione)."
|
||||
+ (codiciNonTrovati.Count > 0
|
||||
? $" {codiciNonTrovati.Count} codici referenziati non corrispondono a nessun file indicizzato "
|
||||
+ "(righe 'non trovato' sotto: possono essere disegni, componenti davvero mancanti, "
|
||||
+ "o falsi positivi della scansione)."
|
||||
: ""),
|
||||
};
|
||||
|
||||
@@ -49,6 +50,11 @@ public class PrtMancantiForm : Form
|
||||
{
|
||||
grid.Rows.Add(codice, tipo, percorso);
|
||||
}
|
||||
foreach (var codice in codiciNonTrovati.OrderBy(c => c))
|
||||
{
|
||||
int i = grid.Rows.Add(codice, "non trovato", "");
|
||||
grid.Rows[i].DefaultCellStyle.ForeColor = Color.DarkRed;
|
||||
}
|
||||
|
||||
var btnApriCartella = new Button { Text = "Apri cartella raw", Dock = DockStyle.Bottom, Height = 34 };
|
||||
btnApriCartella.Click += (_, _) =>
|
||||
|
||||
Reference in new issue
Block a user