feat: Add AI extraction service and related view models
- Introduced `IAiExtractionService` and its implementation `AiExtractionService` for processing images and extracting text. - Created `AiResultItem` model to hold results from AI extraction. - Added `ImageProcessingCoordinator` to manage image processing tasks and provide progress updates. - Implemented view models for AI settings, path settings, processing state, race upload settings, and visual settings to support UI binding. - Updated `Program.cs` to register new services and dependencies. - Modified project file to skip MinVer execution during local builds.
This commit is contained in:
parent
bdf503c627
commit
3c722a66df
16 changed files with 1462 additions and 628 deletions
82
imagecatalog/ViewModels/ProcessingStateViewModel.cs
Normal file
82
imagecatalog/ViewModels/ProcessingStateViewModel.cs
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
using System;
|
||||
|
||||
namespace ImageCatalog_2.ViewModels;
|
||||
|
||||
public class ProcessingStateViewModel : ViewModelBase
|
||||
{
|
||||
private string _processingStatus = string.Empty;
|
||||
public string ProcessingStatus
|
||||
{
|
||||
get => _processingStatus;
|
||||
set
|
||||
{
|
||||
_processingStatus = value;
|
||||
NotifyPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
private int _processedImagesCount;
|
||||
public int ProcessedImagesCount
|
||||
{
|
||||
get => _processedImagesCount;
|
||||
set
|
||||
{
|
||||
_processedImagesCount = value;
|
||||
NotifyPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
private int _totalImagesCount;
|
||||
public int TotalImagesCount
|
||||
{
|
||||
get => _totalImagesCount;
|
||||
set
|
||||
{
|
||||
_totalImagesCount = value;
|
||||
NotifyPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
private int _progressBarValue;
|
||||
public int ProgressBarValue
|
||||
{
|
||||
get => _progressBarValue;
|
||||
set
|
||||
{
|
||||
_progressBarValue = value;
|
||||
NotifyPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
private int _progressBarMaximum = 100;
|
||||
public int ProgressBarMaximum
|
||||
{
|
||||
get => _progressBarMaximum;
|
||||
set
|
||||
{
|
||||
_progressBarMaximum = value;
|
||||
NotifyPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
private string _speedCounter = "-";
|
||||
public string SpeedCounter
|
||||
{
|
||||
get => _speedCounter;
|
||||
set
|
||||
{
|
||||
_speedCounter = value;
|
||||
NotifyPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public void ResetForRun()
|
||||
{
|
||||
ProcessingStatus = "Elaborazione in corso...";
|
||||
TotalImagesCount = 0;
|
||||
ProcessedImagesCount = 0;
|
||||
SpeedCounter = "-f/s";
|
||||
ProgressBarValue = 0;
|
||||
ProgressBarMaximum = 100;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue