Exemplo n.º 1
0
 public EditText(TextLabel textLabel)
 {
     InitializeComponent();
     this.textLabel = textLabel;
     txtText.Text = textLabel.Text;
     this.Width = txtText.Width = TextRenderer.MeasureText(txtText.Text, new Font("Arial", 10)).Width;
 }
Exemplo n.º 2
0
 public void RemoveTextLabel(TextLabel txt)
 {
     Network.TextLabels.Remove(txt);
     drawingTextLabels.Remove(txt);
     UpdateField();
 }
Exemplo n.º 3
0
 public static void DrawTextLabel(TextLabel textLabel, Brush brush, PaintEventArgs e)
 {
     StringFormat stringFormat = new StringFormat();
     stringFormat.Alignment = StringAlignment.Center;
     e.Graphics.DrawString(textLabel.Text, new Font("Arial", 10), brush, new Point(textLabel.Location.X,
                                                                                   textLabel.Location.Y - textLabel.TextSize.Height / 2),
                                                                                   stringFormat);
 }
Exemplo n.º 4
0
 public TextLabel CreateTextLabel(String text, Point location)
 {
     TextLabel textLabel = new TextLabel(text, location);
     Network.TextLabels.Add(textLabel);
     drawingTextLabels.Add(textLabel);
     return textLabel;
 }