Catalog/imagecatalog/DataModel.cs
2024-10-14 23:25:35 +02:00

64 lines
1.4 KiB
C#

using ImageCatalog_2.Commands;
using ImageCatalog_2.Services;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
namespace ImageCatalog_2
{
public class DataModel : ViewModelBase
{
public ICommand TestCommand { get; }
public ICommand AsyncTestCommand { get; }
private readonly ITestService _service;
public DataModel(ITestService testService)
{
_service = testService;
TestCommand = new RelayCommand(Test);
AsyncTestCommand = new AsyncCommand(TestAsync);
}
private string _sourcePath;
public string SourcePath
{
get => _sourcePath;
set
{
_sourcePath = value;
NotifyPropertyChanged();
}
}
private string _destinationPath;
public string DestinationPath
{
get => _destinationPath;
set
{
_destinationPath = value;
NotifyPropertyChanged();
}
}
private void Test(object parameter)
{
Debug.WriteLine("Yep");
}
private async Task TestAsync()
{
Debug.WriteLine("Yep c");
}
}
}