2021-03-28 19:15:55 +04:00
|
|
|
|
using ModuleTools.Enums;
|
2021-03-27 23:50:29 +04:00
|
|
|
|
using System;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
|
|
|
|
namespace DesktopTools.Controls
|
|
|
|
|
{
|
2021-03-29 12:13:47 +04:00
|
|
|
|
public partial class BaseControlViewEntityList : UserControl
|
2021-03-27 23:50:29 +04:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Событие, вызываемое при закрытии контрола
|
|
|
|
|
/// </summary>
|
|
|
|
|
protected event Action<Guid> CloseEvent;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Событие, вызываемое при закрытии контрола
|
|
|
|
|
/// </summary>
|
|
|
|
|
public event Action<Guid> CloseEventAdd { add { CloseEvent += value; } remove { CloseEvent -= value; } }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Открытие формы
|
|
|
|
|
/// </summary>
|
|
|
|
|
public virtual void Open() { }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Закрытие формы
|
|
|
|
|
/// </summary>
|
|
|
|
|
public virtual void Close()
|
|
|
|
|
{
|
|
|
|
|
CloseEvent?.Invoke(Id);
|
|
|
|
|
Dispose();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Дубликат контрола
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
2021-03-29 12:13:47 +04:00
|
|
|
|
public virtual BaseControlViewEntityList Clone() { return null; }
|
2021-03-27 23:50:29 +04:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Идентификатор контрола
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Guid Id { get; protected set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Заголовок контрола
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string Title { get; protected set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Порядок контрола в меню
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int Order { get; protected set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Операция в системе
|
|
|
|
|
/// </summary>
|
|
|
|
|
public AccessOperation AccessOperation { get; protected set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Констркутор
|
|
|
|
|
/// </summary>
|
2021-03-29 12:13:47 +04:00
|
|
|
|
public BaseControlViewEntityList()
|
2021-03-27 23:50:29 +04:00
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|