Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/XxLunaxX29/ExploradorDeArchivos/llms.txt

Use this file to discover all available pages before exploring further.

Explorador de Archivos is a single-process WinForms application targeting .NET 8 (net8.0-windows). Form1 is the main window and acts as an orchestrator — it holds singleton references to each sub-tool form (_formMP3, _formMP4, _formDataBase, _formCorrector, _formEdit, _formGrabadora, _formEditarFotos) and routes user actions to them. All sub-forms are created lazily and kept alive for the duration of the session; closing Form1 triggers a coordinated shutdown that calls CerrarCompletamente() on the audio player before disposing it.

Forms (Windows)

Each window is a separate WinForms Form class. The table below lists every form in the project and its responsibility.
FormDescription
Form1Main file explorer — dual-pane DataGridView, quick-access sidebar, back/forward/drives toolbar
FormMP3Audio player with playlist management, playback controls, lyrics display, and album art
FormMP4Video player backed by LibVLCSharp
FormEditarFotosPhoto editor with drawing canvas, crop, color adjustments, and GPS metadata viewer
FormGrabadoraAudio and video recorder using NAudio and AForge/FFMpeg
FormDataBaseData Fusion Arena — multi-source import, interactive charts, and file export
FormCorrectorData Cleaner — automatic type inference, validation, and cell-level corrections
FormEditMulti-format file editor (text, CSV, JSON, XML, and more)
FormCorreoEnvioEmail sender for exporting and sharing files via SMTP
FrmEditarCancionID3 tag editor for reading and writing audio file metadata
ColumnTypesFormColumn type override dialog used within the Data Cleaner workflow

Shared Models

These classes are used across multiple forms and represent the core data structures of the application.

Cancion

Represents a single audio track in a playlist.
public class Cancion
{
    public string Nombre { get; set; }   // Display name (filename without extension)
    public string Ruta   { get; set; }   // Absolute path to the audio file
}

Reproduccion

Serialized playlist state saved to and loaded from playlist.json. This is the root object that persists between sessions.
public class Reproduccion
{
    public List<Cancion> PlayList    { get; set; }  // Ordered list of tracks
    public int           IndiceActual { get; set; } // Index of the currently selected track
    public double        TiempoActual { get; set; } // Playback position in seconds
}

DataItem

Universal data row used by both the Data Fusion Arena (FormDataBase) and the Data Cleaner (FormCorrector). Only the fields that correspond to the row’s Source are populated; all others remain at their default values.
public enum DataSource { CSV, JSON, XML, TXT, DB }

public class DataItem
{
    // Metadata
    public int        Id     { get; set; }
    public DataSource Source { get; set; }

    // CSV — Laptops
    public string Company  { get; set; }
    public string TypeName { get; set; }
    public string Cpu      { get; set; }
    public int    Ram      { get; set; }
    public double Price    { get; set; }

    // JSON — Video games
    public string Title    { get; set; }
    public string Genre    { get; set; }
    public double Sales    { get; set; }
    public string Platform { get; set; }

    // XML — Inventory
    public string Tipo   { get; set; }
    public string Modelo { get; set; }
    public int    Stock  { get; set; }

    // TXT — Performance log
    public int    Minuto      { get; set; }
    public double UsoCPU      { get; set; }
    public double Temperatura { get; set; }
    public double FPS         { get; set; }

    // DB — Users
    public string UserName { get; set; }
    public string Email    { get; set; }
    public string Region   { get; set; }

    // Unmapped columns from imported files
    public Dictionary<string, string> ExtraFields { get; set; }

    // Computed summary label based on Source
    public string Label { get; }
}
A computed Label property returns a human-readable summary of the row (Company TypeName for CSV rows, Title for JSON rows, Tipo - Modelo for XML rows, Min XX for TXT rows, and UserName for DB rows).

EmailSettings

Static helper that persists the sender’s email address between sessions. Settings are stored as JSON at %AppData%\<AppVersion>\email_settings.json (resolved via Application.UserAppDataPath).
internal static class EmailSettings
{
    public static string CargarRemitente();          // Loads saved sender address
    public static void   GuardarRemitente(string);  // Persists sender address
}

Utility Classes

PlaylistGlobal

A static singleton that manages the shared List<Cancion> playlist, allowing Form1 and FormMP3 to exchange track information without direct coupling.
MethodDescription
ObtenerPlaylist()Returns the full playlist list
AgregarCancion(string ruta)Adds a track if it is not already present (case-insensitive path check)
EstablecerCancionActual(string ruta)Sets _indiceActual to the matching track
ObtenerCancionActual()Returns the Cancion at the current index, or null
ObtenerIndiceActual()Returns the current index (-1 when empty)
EstablecerIndiceActual(int)Sets the current index directly
ObtenerCantidad()Returns the number of tracks in the playlist
Limpiar()Clears the playlist and resets the index to -1

Desordenador

Implements a Fisher-Yates shuffle for generating random playlist orders.
var d = new Desordenador(total);   // Allocates int[total]
d.Fill();                          // Fills vector with 1, 2, … total
d.Shuffle();                       // Randomizes in-place (Fisher-Yates)
int[] randomOrder = d.Vector;      // The shuffled 1-based index array
  • Fill() populates the internal array with 1-based sequential integers.
  • Shuffle() performs an in-place Fisher-Yates shuffle using System.Random.
  • Vector exposes the resulting shuffled array.
  • A default constructor creates a 100-element array; the parameterized constructor accepts any size.

ImageProcessor

A static class that applies combined brightness, contrast, and saturation adjustments to a Bitmap using a ColorMatrix.
Bitmap result = ImageProcessor.Adjust(
    source,
    brightness: 10,    // -100 to +100
    contrast:   5,     // -100 to +100
    saturation: 0      // -100 to +100
);

MusicMetadataFetcher

An asynchronous API client that retrieves song lyrics from the Genius API and album art from the Spotify API.
var fetcher = new MusicMetadataFetcher(geniusToken, spotifyClientId, spotifyClientSecret);
string lyrics   = await fetcher.GetLyricsAsync(artist, title);
Image  albumArt = await fetcher.GetAlbumArtAsync(artist, title);

DoubleBufferedPictureBox

A PictureBox subclass with DoubleBuffered = true set in the constructor. Used in the photo editor and audio player to eliminate flicker during animated redraws.

Data Pipeline

The data pipeline lives under Processing/ and powers both the Data Fusion Arena and the Data Cleaner. The classes below handle the full lifecycle of an imported data file.
ClassRole
IFileReaderCommon interface implemented by all file readers; exposes a single Read(path) method
CsvFileReaderReads delimited text files via CsvHelper
ExcelFileReaderReads .xlsx workbooks via the Open XML SDK
JsonFileReaderDeserializes JSON arrays via Newtonsoft.Json
XmlFileReaderReads XML documents into DataItem lists
WordFileReaderExtracts tabular data from .docx files
DataPipelineOrchestrates reading → FluentValidation → ordering; returns a List<DataItem>
DataProcessorFiltering, grouping, duplicate detection, Insertion Sort / Bubble Sort, and automatic chart-pair detection — all without LINQ .OrderBy
ColumnTypeInferrerInfers the dominant type of each column and flags individual cells that do not match
DynamicRowValidatorFluentValidation-based row validator; rules are generated dynamically from inferred column types
DataCleanerApplies automatic corrections to cells flagged by DynamicRowValidator
DataExporterWrites the cleaned List<DataItem> back to CSV, Excel, JSON, or XML
CellErrorValue object representing a single validation failure: { int RowIndex, string ColumnName, CellErrorKind ErrorKind }

Key Third-Party Libraries

LibraryNuGet PackagePurpose
NAudioNAudioAudio playback and recording
LibVLCSharpLibVLCSharp.WinFormsVideo playback via native VLC
TagLibSharpTagLibSharpMP3 / ID3 tag read and write
AForgeAForge.Video.DirectShowWebcam capture for the recorder
FFMpegCoreFFMpegCoreAudio-video muxing after recording
CsvHelperCsvHelperCSV parsing with header mapping
Open XML SDKDocumentFormat.OpenXmlExcel (.xlsx) and Word (.docx) read-write
NpgsqlNpgsqlPostgreSQL database connectivity
MySqlConnectorMySqlConnectorMariaDB / MySQL database connectivity
SqlClientMicrosoft.Data.SqlClientSQL Server database connectivity
SpotifyAPI.WebSpotifyAPI.WebSpotify album art retrieval
Genius.NETGenius.NETGenius lyrics API client
MailKitMailKitSMTP email sending
MetadataExtractorMetadataExtractorEXIF / GPS extraction from images
FluentValidationFluentValidationRow-level validation rules in the data pipeline
HtmlAgilityPackHtmlAgilityPackHTML scraping fallback for lyrics

Build docs developers (and LLMs) love