43 lines
1.2 KiB
C#
43 lines
1.2 KiB
C#
|
using DesktopTools.Interfaces;
|
|||
|
using DesktopTools.Models;
|
|||
|
using ModuleTools.Enums;
|
|||
|
using System;
|
|||
|
using System.Windows.Forms;
|
|||
|
|
|||
|
namespace DesktopTools.Controls
|
|||
|
{
|
|||
|
public partial class MainControlViewEntityElement : UserControl, IControl, IControlChildEntity
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
/// Методы для реализации в generic-контроле
|
|||
|
/// </summary>
|
|||
|
protected IControlViewEntityElement _controlViewEntityElement;
|
|||
|
|
|||
|
#region IControlEntity
|
|||
|
public Guid ControlId { get; protected set; }
|
|||
|
|
|||
|
public string Title { get; protected set; }
|
|||
|
|
|||
|
public AccessOperation AccessOperation { get; protected set; }
|
|||
|
|
|||
|
public void Open(ControlOpenModel model) => _controlViewEntityElement?.OpenControl(model);
|
|||
|
|
|||
|
public IControl GetInstance() => _controlViewEntityElement?.GetInstanceControl();
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region IControlChildEntity
|
|||
|
public string ParentPropertyName { get; set; }
|
|||
|
|
|||
|
public Guid? ParentId { get; set; }
|
|||
|
|
|||
|
public object ParentObject { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
|||
|
#endregion
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Констркутор
|
|||
|
/// </summary>
|
|||
|
public MainControlViewEntityElement() => InitializeComponent();
|
|||
|
}
|
|||
|
}
|