1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/lunarsf-Lunar-Markdown-Editor

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Это зеркальный репозиторий, синхронизируется ежедневно с исходного репозитория.
Клонировать/Скачать
TableColumnDefinition.cs 1.9 КБ
Копировать Редактировать Исходные данные Просмотреть построчно История
LunarSF Отправлено 9 лет назад ab5a981
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LunarSF.SHomeWorkshop.LunarMarkdownEditor;
namespace LunarSF.SHomeWorkshop.LunarMarkdownEditor
{
/// <summary>
/// 二维文字表的列的定义。
/// </summary>
public class TableColumnDefinition
{
/// <summary>
/// 列的对齐方式。
/// </summary>
public ColumnAlignment Align { get; set; }
private int maxTextWidth = 3;
/// <summary>
/// 表示此列中各单元格文本最长的文本长度。
/// 格式化二维文字表时,其它单元格长度不及此单元格文本长度时,
/// 需要根据对齐方式用半角空格补齐。
/// </summary>
public int MaxTextWidth
{
get
{
switch (Align)
{
case ColumnAlignment.LEFT:
case ColumnAlignment.RIGHT:
{
return Math.Max(this.maxTextWidth, 2);
//考虑到列定义的需要,每个单元格最小也需要2或3的宽度。:-或者-:
}
default:
{
return Math.Max(this.maxTextWidth, 3);
//考虑到列定义的需要,每个单元格最小也需要2或3的宽度。:-:
}
}
}
set
{
this.maxTextWidth = value;
}
}
private int? startNumber = null;
/// <summary>
/// 对列进行自动编号时,从哪个数字开始。
/// </summary>
public int? StartNumber
{
get { return startNumber; }
set { startNumber = value; }
}
}
}

Комментарий ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://gitlife.ru/oschina-mirror/lunarsf-Lunar-Markdown-Editor.git
git@gitlife.ru:oschina-mirror/lunarsf-Lunar-Markdown-Editor.git
oschina-mirror
lunarsf-Lunar-Markdown-Editor
lunarsf-Lunar-Markdown-Editor
v0.4-beta8