From 734a2f2d51de9e18e26565f39269ae80d43412da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=91=D0=B0=D0=BA=D0=B0?= =?UTF-8?q?=D0=BB=D1=8C=D1=81=D0=BA=D0=B0=D1=8F?= Date: Thu, 16 May 2024 22:47:23 +0400 Subject: [PATCH] =?UTF-8?q?=D1=81=D0=BE=D0=B7=D0=B4=D0=B0=D0=BB=D0=B0=20?= =?UTF-8?q?=D0=B2=D0=B5=D1=82=D0=BA=D1=83=20=D0=B4=D0=BB=D1=8F=208=20?= =?UTF-8?q?=D0=BB=D0=B0=D0=B1=D1=8B,=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2?= =?UTF-8?q?=D0=B8=D0=BB=D0=B0=20=D0=BF=D0=B5=D1=80=D0=B5=D1=87=D0=B8=D1=81?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=81=D0=B2=D0=BE=D0=B9=D1=81?= =?UTF-8?q?=D1=82=D0=B2=20=D0=BA=D0=BE=D0=BB=D0=BE=D0=BD=D0=BE=D0=BA=20?= =?UTF-8?q?=D0=B8=20=D0=BA=D0=BB=D0=B0=D1=81=D1=81=20=D1=80=D0=B5=D0=B0?= =?UTF-8?q?=D0=BB=D0=B8=D0=B7=D0=B0=D1=86=D0=B8=D1=8E=20=D0=BA=D0=BB=D0=B0?= =?UTF-8?q?=D1=81=D1=81=D0=B0=20Attribute?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Attributes/ColumnAttribute.cs | 29 +++++++++++++++++++ .../Attributes/GridViewAutoSize.cs | 20 +++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 SushiBarContracts/Attributes/ColumnAttribute.cs create mode 100644 SushiBarContracts/Attributes/GridViewAutoSize.cs diff --git a/SushiBarContracts/Attributes/ColumnAttribute.cs b/SushiBarContracts/Attributes/ColumnAttribute.cs new file mode 100644 index 0000000..c893986 --- /dev/null +++ b/SushiBarContracts/Attributes/ColumnAttribute.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SushiBarContracts.Attributes +{ + [AttributeUsage(AttributeTargets.Property)] + public class ColumnAttribute : Attribute + { + public ColumnAttribute(string title = "", bool visible = true, int width + = 0, GridViewAutoSize gridViewAutoSize = GridViewAutoSize.None, bool + isUseAutoSize = false) + { + Title = title; + Visible = visible; + Width = width; + GridViewAutoSize = gridViewAutoSize; + IsUseAutoSize = isUseAutoSize; + } + 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; } + + } +} diff --git a/SushiBarContracts/Attributes/GridViewAutoSize.cs b/SushiBarContracts/Attributes/GridViewAutoSize.cs new file mode 100644 index 0000000..365650e --- /dev/null +++ b/SushiBarContracts/Attributes/GridViewAutoSize.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SushiBarContracts.Attributes +{ + public enum GridViewAutoSize + { + NotSet = 0, + None = 1, + ColumnHeader = 2, + AllCellsExceptHeader = 4, + AllCells = 6, + DisplayedCellsExceptHeader = 8, + DisplayedCells = 10, + Fill = 16 + } +}