当前位置: 首页>>代码示例>>C#>>正文


C# Label.ResumeLayout方法代码示例

本文整理汇总了C#中System.Windows.Forms.Label.ResumeLayout方法的典型用法代码示例。如果您正苦于以下问题:C# Label.ResumeLayout方法的具体用法?C# Label.ResumeLayout怎么用?C# Label.ResumeLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Forms.Label的用法示例。


在下文中一共展示了Label.ResumeLayout方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AlterarTextoFonte

        protected void AlterarTextoFonte(Label label, string texto, int máximoCaracteresTexto)
        {
            if (texto.Length > máximoCaracteresTexto)
                texto = texto.Substring(0, máximoCaracteresTexto - 4) + " ...";

            label.SuspendLayout();
            label.Text = texto;
            AjustarTamanhoFonte(label);
            label.ResumeLayout();
        }
开发者ID:andrepontesmelo,项目名称:imjoias,代码行数:10,代码来源:ListaPessoasItemBusca.cs

示例2: AddProgressBarX

 public void AddProgressBarX(string title)
 {
     this.m_baseWnd.SuspendLayout();
     Label label = new Label();
     label.SuspendLayout();
     label.AutoSize = false;
     label.Text = title;
     using (Graphics graphics = Graphics.FromHwnd(label.Handle))
     {
         this.m_titleWidth = ((int) graphics.MeasureString(label.Text, this.m_Font).Width) + label.Margin.Size.Width;
     }
     label.Size = new Size(this.m_titleWidth, label.Font.Height);
     label.Location = new Point(this.m_baseWnd.Location.X + this.m_fromPt.X, (this.m_baseWnd.Location.Y + this.m_fromPt.Y) + (this.m_intervalBarH * this.m_ValuePair.Count));
     ProgressBarX rx = new ProgressBarX();
     rx.SuspendLayout();
     rx.Size = new Size(this.m_barWidth, 0x17);
     rx.Style = ProgressBarStyle.Continuous;
     rx.Location = new Point((label.Location.X + label.Width) + 10, label.Location.Y - ((rx.Height - label.Height) >> 1));
     Label label2 = new Label();
     label2.SuspendLayout();
     label2.AutoSize = true;
     label2.Size = new Size(50, label2.Font.Height);
     label2.Text = string.Empty;
     label2.Location = new Point((rx.Location.X + rx.Width) + 10, label.Location.Y);
     rx.TitleLable = label;
     rx.TextLable = label2;
     ValuePair item = new ValuePair();
     item.Key = title;
     item.Value = rx;
     this.m_ValuePair.Add(item);
     this.m_baseWnd.Controls.Add(rx);
     this.m_baseWnd.Controls.Add(label);
     this.m_baseWnd.Controls.Add(label2);
     this.AdjustWindow();
     label2.ResumeLayout();
     rx.ResumeLayout();
     label.ResumeLayout();
     this.m_baseWnd.ResumeLayout();
     this.m_baseWnd.PerformLayout();
 }
开发者ID:xiaoyj,项目名称:Space,代码行数:40,代码来源:ProgressBarXManager.cs

示例3: Label

        public static Label Label(IXsdPart part, ToolTip tooltip = null)
        {
            try
            {
                if (String.IsNullOrWhiteSpace(part.Name))
                {
                    throw new ArgumentNullException();
                }
                var label = new Label();
                label.SuspendLayout();
                label.ForeColor = System.Drawing.Color.Black;
                label.AutoSize = true;
                label.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
                label.Font = Methods.BaseFont;
                label.Size = new System.Drawing.Size(41, 13);
                label.Text = part.Name;
                label.Name = "l" + part.Name;

                if (tooltip != null)
                {
                    tooltip.SetToolTip(label, part.Documentation);
                }

                if (part.Name == "HeaderLabel")
                {
                    label.Visible = false;
                    label.Margin = new System.Windows.Forms.Padding(0, 0, 0, 10);
                }

                label.ResumeLayout();
                return label;
            }
            catch (Exception ex)
            {
                return null;
            }
        }
开发者ID:jaffinito,项目名称:dotnet_configuration,代码行数:37,代码来源:Controls.cs

示例4: InitializeComponents

        private void InitializeComponents()
        {
            nameLabel = new Label();
              pathLabel = new Label();
              nameTextBox = new TextBox();
              pathTextBox = new TextBox();
              okButton = new Button();
              cancelButton = new Button();

              this.SuspendLayout();
              nameLabel.SuspendLayout();
              pathLabel.SuspendLayout();
              nameTextBox.SuspendLayout();
              pathTextBox.SuspendLayout();
              okButton.SuspendLayout();
              cancelButton.SuspendLayout();

              nameLabel.Text = "Name";
              nameLabel.AutoSize = true;
              nameLabel.Location = new Point(3, 3);

              pathLabel.Text = "Path";
              pathLabel.AutoSize = true;
              pathLabel.Location = new Point(3, 30);

              nameTextBox.Size = new Size(250, 19);
              nameTextBox.Location = new Point(40, 2);
              nameTextBox.BorderStyle = BorderStyle.FixedSingle;

              pathTextBox.Size = new Size(250, 19);
              pathTextBox.Location = new Point(40, 29);
              pathTextBox.BorderStyle = BorderStyle.FixedSingle;

              okButton.Text = "OK";
              okButton.Size = new Size(75, 23);
              okButton.Location = new Point((300-75)/2, 60);
              okButton.FlatStyle = FlatStyle.Flat;
              okButton.Click += delegate {
            this.DialogResult = DialogResult.OK;
            this.Close();
              };

              cancelButton.Text = "Cancel";
              cancelButton.Size = new Size(75, 23);
              cancelButton.Location = new Point(215, 60);
              cancelButton.FlatStyle = FlatStyle.Flat;
              cancelButton.Click += delegate {
            this.DialogResult = DialogResult.Cancel;
            this.Close();
              };

              this.Size = new Size(300, 120);
              this.FormBorderStyle = FormBorderStyle.FixedSingle;
              this.Text = "Jump target";
              this.Controls.AddRange(new Control[]{
            nameLabel,
            pathLabel,
            nameTextBox,
            pathTextBox,
            okButton,
            cancelButton
              });

              nameLabel.ResumeLayout(false);
              pathLabel.ResumeLayout(false);
              nameTextBox.ResumeLayout(false);
              pathTextBox.ResumeLayout(false);
              okButton.ResumeLayout(false);
              cancelButton.ResumeLayout(false);
              this.ResumeLayout(false);
              this.PerformLayout();
        }
开发者ID:hazychill,项目名称:oog,代码行数:72,代码来源:AddJumpForm.cs

示例5: OccursLabel

 public static Label OccursLabel(decimal maxCount)
 {
     try
     {
         var label = new Label();
         label.SuspendLayout();
         label.ForeColor = System.Drawing.Color.Black;
         label.AutoSize = true;
         label.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
         label.Font = Methods.BaseFont;
         label.BackColor = System.Drawing.Color.FromArgb(255, 195, 194);
         label.Size = new System.Drawing.Size(41, 13);
         label.Text = "Maximum of entries " + maxCount + " allowed";
         label.Name = "OccursError";
         label.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0);
         label.Visible = true;
         label.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
         label.Location = new System.Drawing.Point(0, 0);
         label.ResumeLayout();
         return label;
     }
     catch (Exception ex)
     {
         return null;
     }
 }
开发者ID:jaffinito,项目名称:dotnet_configuration,代码行数:26,代码来源:Controls.cs

示例6: CreateLabel

        public Label CreateLabel(string text, int xLocation, int width = -1)
        {
            var label = new Label();
            label.SuspendLayout();
            label.AutoSize = false;
            label.AutoEllipsis = true;
            label.Text = text;
            label.Font = font;
            label.Size = new Size(width == -1 ? TextRenderer.MeasureText(label.Text, label.Font).Width : width, this.barHeight);
            label.Location = new Point(xLocation, 0);
            label.TextAlign = ContentAlignment.MiddleLeft; // TODO: this doesn't work when there are ellipsis
            label.ResumeLayout();

            return label;
        }
开发者ID:kocubinski,项目名称:windawesome,代码行数:15,代码来源:Bar.cs


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