Implemented Queues and folder monitors.
This commit is contained in:
33
BodyshopUploader/Models/DTO_Base.cs
Normal file
33
BodyshopUploader/Models/DTO_Base.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BodyshopUploader.Models
|
||||
{
|
||||
public abstract class DTO_Base : INotifyPropertyChanged
|
||||
{
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
protected bool SetProperty<T>(ref T storage, T value, [CallerMemberName] String propertyName = null)
|
||||
{
|
||||
if (object.Equals(storage, value)) return false;
|
||||
|
||||
storage = value;
|
||||
this.OnPropertyChanged(propertyName);
|
||||
return true;
|
||||
}
|
||||
protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
||||
{
|
||||
var eventHandler = this.PropertyChanged;
|
||||
if (eventHandler != null)
|
||||
{
|
||||
eventHandler(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
23
BodyshopUploader/Models/DTO_QueueItem.cs
Normal file
23
BodyshopUploader/Models/DTO_QueueItem.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BodyshopUploader.Models
|
||||
{
|
||||
public class DTO_QueueItem : DTO_Base
|
||||
{
|
||||
public DTO_QueueItem()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private string _filePath;
|
||||
public string FilePath
|
||||
{
|
||||
get { return _filePath; }
|
||||
set { SetProperty(ref _filePath, value); }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user