2024-02-28 01:13:41 +04:00
|
|
|
|
using FurnitureAssemblyListImplement.Models;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace FurnitureAssemblyListImplement
|
|
|
|
|
{
|
2024-05-22 10:14:48 +04:00
|
|
|
|
// Класс для списков, в которых будет храниться информация при работе приложения
|
2024-02-28 01:13:41 +04:00
|
|
|
|
public class DataListSingleton
|
|
|
|
|
{
|
|
|
|
|
private static DataListSingleton? _instance;
|
2024-05-22 10:14:48 +04:00
|
|
|
|
|
|
|
|
|
// Список для хранения заготовок
|
2024-05-22 02:16:26 +04:00
|
|
|
|
public List<WorkPiece> WorkPiece { get; set; }
|
|
|
|
|
|
2024-05-22 10:14:48 +04:00
|
|
|
|
// Список для хранения изделий
|
2024-02-28 11:03:17 +04:00
|
|
|
|
public List<Furniture> Furnitures { get; set; }
|
2024-02-28 01:13:41 +04:00
|
|
|
|
|
2024-05-22 10:14:48 +04:00
|
|
|
|
// Список для хранения заказов
|
2024-05-22 02:16:26 +04:00
|
|
|
|
public List<Order> Orders { get; set; }
|
2024-02-28 01:13:41 +04:00
|
|
|
|
|
2024-05-22 10:14:48 +04:00
|
|
|
|
// Список для хранения клиентов
|
2024-05-22 02:16:26 +04:00
|
|
|
|
public List<Client> Clients { get; set; }
|
2024-02-28 01:13:41 +04:00
|
|
|
|
|
|
|
|
|
public DataListSingleton()
|
|
|
|
|
{
|
|
|
|
|
WorkPiece = new List<WorkPiece>();
|
|
|
|
|
Furnitures = new List<Furniture>();
|
|
|
|
|
Orders = new List<Order>();
|
2024-05-08 11:24:46 +04:00
|
|
|
|
Clients = new List<Client>();
|
2024-02-28 01:13:41 +04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static DataListSingleton GetInstance()
|
|
|
|
|
{
|
2024-05-22 10:14:48 +04:00
|
|
|
|
if(_instance == null)
|
2024-02-28 01:13:41 +04:00
|
|
|
|
{
|
|
|
|
|
_instance = new DataListSingleton();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return _instance;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|