Refactor thumbnail options to enum and ComboBox UI
Replaced multiple mutually-exclusive boolean properties for thumbnail text options with a single enum (`ThumbnailOption`) in the data model. Updated WinForms UI to use a ComboBox instead of radio buttons for selecting thumbnail mode. Adjusted designer, mapping profile, settings DTO, and settings service for enum support and backward compatibility. Simplified thumbnail generation logic and improved maintainability by ensuring only one mode can be selected at a time.
This commit is contained in:
parent
214e540170
commit
d13ec8abdf
7 changed files with 214 additions and 289 deletions
|
|
@ -10,6 +10,21 @@ namespace ImageCatalog_2.Models
|
|||
/// </summary>
|
||||
public class SettingsDto
|
||||
{
|
||||
// New enum to represent thumbnail mode in a single property.
|
||||
public enum ThumbnailOptionDto
|
||||
{
|
||||
None = 0,
|
||||
Text = 1,
|
||||
FileName = 2,
|
||||
Time = 3,
|
||||
FileNameAndTime = 4,
|
||||
RaceTime = 5
|
||||
}
|
||||
|
||||
[JsonPropertyName("ThumbnailOption")]
|
||||
[XmlElement("MiniatureModalita")]
|
||||
public ThumbnailOptionDto ThumbnailOption { get; set; } = ThumbnailOptionDto.None;
|
||||
|
||||
// Paths
|
||||
[JsonPropertyName("SourcePath")]
|
||||
[XmlElement("DirSorgente")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue