2023-04-22 21:40:26 +04:00
|
|
|
|
using System;
|
2023-04-23 12:20:37 +04:00
|
|
|
|
using System.Runtime.Serialization;
|
2023-04-22 21:40:26 +04:00
|
|
|
|
|
|
|
|
|
namespace FurnitureAssemblyContracts.Attributes
|
|
|
|
|
{
|
|
|
|
|
[AttributeUsage(AttributeTargets.Property)]
|
|
|
|
|
public class ColumnAttribute : Attribute
|
|
|
|
|
{
|
|
|
|
|
public ColumnAttribute(string title = "", bool visible = true, int width
|
|
|
|
|
= 0, GridViewAutoSize gridViewAutoSize = GridViewAutoSize.None, bool
|
2023-04-24 10:06:31 +04:00
|
|
|
|
isUseAutoSize = false, string formatter = "")
|
2023-04-22 21:40:26 +04:00
|
|
|
|
{
|
|
|
|
|
Title = title;
|
|
|
|
|
Visible = visible;
|
|
|
|
|
Width = width;
|
|
|
|
|
GridViewAutoSize = gridViewAutoSize;
|
2023-04-24 10:06:31 +04:00
|
|
|
|
IsUseAutoSize = isUseAutoSize;
|
2023-04-23 12:20:37 +04:00
|
|
|
|
Formatter = formatter;
|
|
|
|
|
|
2023-04-22 21:40:26 +04:00
|
|
|
|
}
|
|
|
|
|
public string Title { get; private set; }
|
|
|
|
|
public bool Visible { get; private set; }
|
|
|
|
|
public int Width { get; private set; }
|
|
|
|
|
public GridViewAutoSize GridViewAutoSize { get; private set; }
|
|
|
|
|
public bool IsUseAutoSize { get; private set; }
|
2023-04-24 10:06:31 +04:00
|
|
|
|
public bool IsFormatable => !string.IsNullOrEmpty(Formatter) ;
|
|
|
|
|
public string Formatter { get; private set; } = string.Empty;
|
2023-04-22 21:40:26 +04:00
|
|
|
|
}
|
|
|
|
|
}
|