• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Align类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Align的典型用法代码示例。如果您正苦于以下问题:C# Align类的具体用法?C# Align怎么用?C# Align使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Align类属于命名空间,在下文中一共展示了Align类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: MarkdownTableBlockToken

 public MarkdownTableBlockToken(IMarkdownRule rule, string[] header, Align[] align, string[][] cells)
 {
     Rule = rule;
     Header = header;
     Align = align;
     Cells = cells;
 }
开发者ID:yonglehou,项目名称:docfx,代码行数:7,代码来源:MarkdownTableBlockToken.cs


示例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);
				}
			}
		}
开发者ID:Karousos,项目名称:EYE_Sampling,代码行数:30,代码来源:RtfTable.cs


示例3: AlignContainer

 public AlignContainer(Control Client, Point ClientSize, Align HorizontalAlign, Align VerticalAlign)
 {
     this._Client = Client;
     this._ClientSize = ClientSize;
     this._VerticalAlign = VerticalAlign;
     this._HorizontalAlign = HorizontalAlign;
 }
开发者ID:alexcmd,项目名称:OpenTKGUI,代码行数:7,代码来源:AlignContainer.cs


示例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;
                }
            }
        }
开发者ID:blacker-cz,项目名称:SimpleConverter,代码行数:30,代码来源:SlideSettings.cs


示例5: Start

	void Start()
	{
		ResetVelocities ();
		alignScript = GetComponent<Align> ();
		behaviour = GetComponents<SteeringBehavior> ();
		creature = GetComponent<Creature> ();
//		defaultY = transform.position.y;
	}
开发者ID:Emmanuel-Tsapekis,项目名称:PetFactory,代码行数:8,代码来源:SteeringAgent.cs


示例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;
 }
开发者ID:maesse,项目名称:CubeHags,代码行数:8,代码来源:Label.cs


示例7: Clear

		public override void Clear()
		{
			_memoized_size = _b0 = 0;
			_id = 0;
			_name = null;
			_align = Align.Left;
			_weights.Clear();
		}
开发者ID:Dataflow-Software,项目名称:Dataflow.NET,代码行数:8,代码来源:MapTest.pb.cs


示例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;
 }
开发者ID:Aaron-Durant,项目名称:Asteroids2,代码行数:16,代码来源:Text.cs


示例9: Header

 public Header(string name, Align alignment, Align cellAlignment, int minimumLength, int maximumLength)
 {
     Name = name;
     Alignment = alignment;
     CellAlignment = cellAlignment;
     MinimumLength = minimumLength;
     MaximumLength = maximumLength;
 }
开发者ID:txdv,项目名称:sharpmod,代码行数:8,代码来源:Header.cs


示例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;
 }
开发者ID:Layoric,项目名称:xWinFormsLib,代码行数:10,代码来源:Label.cs


示例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;
        }
开发者ID:Fedorm,项目名称:core-master,代码行数:9,代码来源:HorizontalAlign.cs


示例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;
 }
开发者ID:BGCX261,项目名称:ziliao-svn-to-git,代码行数:9,代码来源:LogicText.cs


示例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();
		}
开发者ID:Karousos,项目名称:EYE_Sampling,代码行数:10,代码来源:RtfSection.cs


示例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;
		}
开发者ID:Andrea,项目名称:duality-withsvn-history,代码行数:11,代码来源:RtfTableCell.cs


示例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;
        }
开发者ID:Fedorm,项目名称:core-master,代码行数:11,代码来源:TextAlign.cs


示例16: StringBlock

 /// <summary>Creates a new StringBlock</summary>
 /// <param name="text">Text to render</param>
 /// <param name="textBox">Text box to constrain text</param>
 /// <param name="alignment">Font alignment</param>
 /// <param name="size">Font size in pixels(max height of line)</param>
 /// <param name="color">Color</param>
 /// <param name="kerning">true to use kerning, false otherwise.</param>
 public StringBlock(string text, RectangleF textRect, Align alignment,
     float size, ColorValue color, bool kerning)
 {
     Text = text;
     TextRect = textRect;
     ViewportRect = textRect;
     Alignment = alignment;
     Size = size;
     Color = color;
     Kerning = kerning;
 }
开发者ID:kensniper,项目名称:castle-butcher,代码行数:18,代码来源:BitmapFont.cs


示例17: Menu

 /// <summary>
 /// Creates a new Menu Object
 /// </summary>
 /// <param name="position"> The postion of the first item in the menu </param>
 /// <param name="spacing"> The spacing betweeen each item in the menu </param>
 /// <param name="isVerticle"> Set to true for Verticle menu, false for Horizontal menu </param>
 /// <param name="font"> The font to be used in the menu </param>
 /// <param name="menuColor"> The default color of the menu items </param>
 /// <param name="scale"> The default scale of the menu items </param>
 /// <param name="alignment"> The alignment of items in the menu </param>
 /// <param name="onBack"> The delegate to call when going back from this menu </param>
 public Menu(Vector2 position, int spacing, bool isVerticle, SpriteFont font, Color menuColor, Vector2 scale, Align alignment, TextSelect onBack)
 {
     MenuItems = new List<Text>();
     StartPosition = position;
     Spacing = spacing;
     VerticalMenu = isVerticle;
     Font = font;
     MenuColor = menuColor;
     Alignment = alignment;
     Scale = scale;
     OnBack = onBack;
 }
开发者ID:Aaron-Durant,项目名称:Asteroids2,代码行数:23,代码来源:Menu.cs


示例18: attr

        /// <summary>Assigns all needed attributes to the tag</summary>
        /// <returns>This instance downcasted to base class</returns>
        public virtual IndexedTag attr(
            int? span = null,
            MultiLength width = null,
            string id = null,
            string @class = null,
            string style = null,
            string title = null,
            LangCode lang = null,
            string xmllang = null,
            Dir? dir = null,
            string onclick = null,
            string ondblclick = null,
            string onmousedown = null,
            string onmouseup = null,
            string onmouseover = null,
            string onmousemove = null,
            string onmouseout = null,
            string onkeypress = null,
            string onkeydown = null,
            string onkeyup = null,
            Align? align = null,
            char? @char = null,
            Length charoff = null,
            Valign? valign = null
        )
        {
            Span = span;
            Width = width;
            Id = id;
            Class = @class;
            Style = style;
            Title = title;
            Lang = lang;
            XmlLang = xmllang;
            Dir = dir;
            OnClick = onclick;
            OnDblClick = ondblclick;
            OnMouseDown = onmousedown;
            OnMouseUp = onmouseup;
            OnMouseOver = onmouseover;
            OnMouseMove = onmousemove;
            OnMouseOut = onmouseout;
            OnKeyPress = onkeypress;
            OnKeyDown = onkeydown;
            OnKeyUp = onkeyup;
            Align = align;
            Char = @char;
            CharOff = charoff;
            Valign = valign;

            return this;
        }
开发者ID:bzure,项目名称:BSA.Net,代码行数:54,代码来源:TagCol.cs


示例19: RtfTableCell

		internal RtfTableCell(float width, int rowIndex, int colIndex, RtfTable parentTable)
			: base(true, false)
		{
			_width = width;
			_halign = Align.None;
			_valign = AlignVertical.Top;
			_borders = new Borders();
			_mergeInfo = null;
			_rowIndex = rowIndex;
			_colIndex = colIndex;
			BackgroundColour = null;
			ParentTable = parentTable;
		}
开发者ID:peterson1,项目名称:ErrH,代码行数:13,代码来源:RtfTableCell.cs


示例20: Renderer

	public Renderer(float size,
		float width,
		float height,
		Style style,
		Align align = Align.LEFT,
		VerticalAlign verticalAlign = VerticalAlign.TOP,
		float lineSpacing = 1.0f,
		float letterSpacing = 0.0f,
		float leftMargin = 0.0f,
		float rightMargin = 0.0f)
	{
		Init(size, width, height, style, align, verticalAlign,
			lineSpacing, letterSpacing, leftMargin, rightMargin);
	}
开发者ID:gree,项目名称:unity-systemfontrenderer,代码行数:14,代码来源:systemfont_renderer.cs



注:本文中的Align类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# AlignH类代码示例发布时间:2022-05-24
下一篇:
C# AliasSymbol类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap