Mutually exclusive thumbnail mode selection in UI

Implement mutually exclusive logic for thumbnail display modes in DataModel and MainForm. Add ThumbnailMode property for authoritative state. Replace radio button bindings with event handlers. Synchronize UI with model changes. Explicitly map thumbnail flags to PicSettings. Force WinForms startup, disabling WPF branch.
This commit is contained in:
MaddoScientisto 2026-02-16 18:58:15 +01:00
commit 214e540170
4 changed files with 229 additions and 16 deletions

View file

@ -79,24 +79,24 @@ static class Program
// the block below and comment out the WPF branch.
// -----------------------------------------------------------------------------
// // Force WinForms UI (uncomment to enable)
// var mainForm = serviceProvider.GetRequiredService<MainForm>();
// // If you want to set the DataModel explicitly on the WinForms form use the lines below
// // var mainViewModel = serviceProvider.GetRequiredService<DataModel>();
// // mainForm.Model = mainViewModel;
// Application.Run(mainForm);
var mainForm = serviceProvider.GetRequiredService<MainForm>();
// If you want to set the DataModel explicitly on the WinForms form use the lines below
// var mainViewModel = serviceProvider.GetRequiredService<DataModel>();
// mainForm.Model = mainViewModel;
Application.Run(mainForm);
// -----------------------------------------------------------------------------
if (serviceProvider.GetService(typeof(ImageCatalog_2.MainWindow)) is ImageCatalog_2.MainWindow wpfMain)
{
// Start WPF app
var app = new System.Windows.Application();
app.Run(wpfMain);
}
else
{
var mainForm = serviceProvider.GetRequiredService<MainForm>();
Application.Run(mainForm);
}
//if (serviceProvider.GetService(typeof(ImageCatalog_2.MainWindow)) is ImageCatalog_2.MainWindow wpfMain)
//{
// // Start WPF app
// var app = new System.Windows.Application();
// app.Run(wpfMain);
//}
//else
//{
// var mainForm = serviceProvider.GetRequiredService<MainForm>();
// Application.Run(mainForm);
//}
}
private static void ConfigureServices(ServiceCollection services)