69 lines
1.6 KiB
C#
69 lines
1.6 KiB
C#
|
using ModelTools.Enums;
|
|||
|
using System;
|
|||
|
using System.Windows.Forms;
|
|||
|
|
|||
|
namespace DesktopTools.Controls
|
|||
|
{
|
|||
|
public partial class ControlViewEntityList : UserControl
|
|||
|
{
|
|||
|
/// <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>
|
|||
|
public virtual ControlViewEntityList Clone() { return null; }
|
|||
|
|
|||
|
/// <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>
|
|||
|
public ControlViewEntityList()
|
|||
|
{
|
|||
|
InitializeComponent();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|