本文整理汇总了C#中Align类的典型用法代码示例。如果您正苦于以下问题:C# Align类的具体用法?C# Align怎么用?C# Align使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Align类属于命名空间,在下文中一共展示了Align类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MarkdownTableBlockToken
public MarkdownTableBlockToken(IMarkdownRule rule, string[] header, Align[] align, string[][] cells)
{
Rule = rule;
Header = header;
Align = align;
Cells = cells;
}
示例2: RtfTable
public RtfTable(int rowCount, int colCount, float horizontalWidth, float fontSize)
{
_fontSize = fontSize;
_alignment = Align.None;
_margins = new Margins();
_rowCount = rowCount;
_colCount = colCount;
_representativeList = new List<RtfTableCell>();
_startNewPage = false;
_titleRowCount = 0;
_cellPadding = new Margins[_rowCount];
if (_rowCount < 1 || _colCount < 1) {
throw new Exception("The number of rows or columns is less than 1.");
}
// Set cell default width according to paper width
_defaultCellWidth = horizontalWidth / (float)colCount;
_cells = new RtfTableCell[_rowCount][];
_rowHeight = new float[_rowCount];
_rowKeepInSamePage = new bool[_rowCount];
for (int i = 0; i < _rowCount; i++) {
_cells[i] = new RtfTableCell[_colCount];
_rowHeight[i] = 0F;
_rowKeepInSamePage[i] = false;
_cellPadding[i] = new Margins();
for (int j = 0; j < _colCount; j++) {
_cells[i][j] = new RtfTableCell(_defaultCellWidth, i, j, this);
}
}
}
示例3: AlignContainer
public AlignContainer(Control Client, Point ClientSize, Align HorizontalAlign, Align VerticalAlign)
{
this._Client = Client;
this._ClientSize = ClientSize;
this._VerticalAlign = VerticalAlign;
this._HorizontalAlign = HorizontalAlign;
}
示例4: ParseParams
/// <summary>
/// Parse slide parameters
/// </summary>
/// <param name="parameters"></param>
private void ParseParams(string parameters)
{
if (parameters == null || parameters.Trim().Length == 0)
return;
// "shrink,squeeze,c" -> ["shrink","squeeze","c"]
string[] parts = parameters.Replace(" ", "").Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
foreach (string part in parts)
{
switch (part)
{
case "t":
ContentAlign = Align.TOP;
break;
case "c":
ContentAlign = Align.CENTER;
break;
case "b":
ContentAlign = Align.BOTTOM;
break;
default:
break;
}
}
}
示例5: Start
void Start()
{
ResetVelocities ();
alignScript = GetComponent<Align> ();
behaviour = GetComponents<SteeringBehavior> ();
creature = GetComponent<Creature> ();
// defaultY = transform.position.y;
}
示例6: Label
public Label(string text, float fontSize, System.Drawing.Color fontColor, Window window)
: base(window)
{
this.Name = "Label";
Text = text;
Alignment = Align.LEFT;
Color = fontColor;
}
示例7: Clear
public override void Clear()
{
_memoized_size = _b0 = 0;
_id = 0;
_name = null;
_align = Align.Left;
_weights.Clear();
}
示例8: Text
/// <summary>
/// Creates a new Text object
/// </summary>
/// <param name="font"> The font to use for the Text </param>
/// <param name="text"> The text to display </param>
/// <param name="position"> The position of the Text </param>
/// <param name="color"> The color of the Text </param>
/// <param name="alignment"> The alignment of the Text </param>
public Text(SpriteFont font, String text, Vector2 position, Color color, Align alignment)
{
Font = font;
this.text = text;
Position = position;
TextColor = color;
Alignment = alignment;
}
示例9: Header
public Header(string name, Align alignment, Align cellAlignment, int minimumLength, int maximumLength)
{
Name = name;
Alignment = alignment;
CellAlignment = cellAlignment;
MinimumLength = minimumLength;
MaximumLength = maximumLength;
}
示例10: Label
//bool wordwrap = false;
public Label(string name, Vector2 position, string text, Color backColor, Color foreColor, int width, Align alignment)
: base(name, position)
{
this.Text = text;
this.BackColor = backColor;
this.ForeColor = foreColor;
this.alignment = alignment;
this.Width = width;
}
示例11: FromString
public override Style FromString(string s)
{
Align result;
if (!Enum.TryParse<Align>(s, true, out result))
throw new Exception("Invalid horizontal-align value");
this.Value = result;
return this;
}
示例12: LogicText
public LogicText(string text, float fontSize, PointF location, SizeF size, Align alignment, Color color)
{
this.text = text;
this.font = new Font(DefaultFamily, fontSize);
this.Location = location;
this.Size = size;
this.alignment = alignment;
this.ForeColor = color;
}
示例13: RtfSection
internal RtfSection(SectionStartEnd startEnd, RtfDocument doc)
{
ParentDocument = doc;
_align = Align.None;
PageOrientation = PaperOrientation.Portrait;
StartEnd = startEnd;
FooterPositionFromPageBottom = 720;
_sectionFooter = null;
_margins = new Margins();
}
示例14: RtfTableCell
internal RtfTableCell(float width, int rowIndex, int colIndex)
: base(true, true, false, true, false)
{
_width = width;
_halign = Align.None;
_valign = AlignVertical.Top;
_borders = new Borders();
_mergeInfo = null;
_rowIndex = rowIndex;
_colIndex = colIndex;
}
示例15: FromString
public override Style FromString(string s)
{
s = s.Trim();
Align result;
if (!Enum.TryParse<Align>(s, true, out result))
throw new Exception("Invalid text-align value: " + s);
this.Value = result;
return this;
}