Example #1
0
 //Load del formulario
 private void FrmCompiler_Load(object sender, EventArgs e)
 {
     PanelCodigo.Focus();
     Code();
     Unabled(true, false, false);
     timer1.Interval = 10;
     timer1.Start();
     for (int i = 0; i < port.Length; i++)
     {
         cmbPuertos.Items.Add(port[i].ToString());
     }
 }
Example #2
0
        //Picture para mostrar una linea de nĂºmeros por renglon
        private void PicCodigo_Paint(object sender, PaintEventArgs e)
        {
            caracter = 0;

            int altura = PanelCodigo.GetPositionFromCharIndex(0).Y;

            if (PanelCodigo.Lines.Length > 0)
            {
                for (int i = 0; i < PanelCodigo.Lines.Length; i++)
                {
                    e.Graphics.DrawString((i + 1).ToString(), PanelCodigo.Font, Brushes.LightCyan, PicCodigo.Width -
                                          (e.Graphics.MeasureString((i + 1).ToString(), PanelCodigo.Font).Width + 10), altura);
                    caracter += PanelCodigo.Lines[i].Length + 1;
                    altura    = PanelCodigo.GetPositionFromCharIndex(caracter).Y;
                }
            }
            else
            {
                e.Graphics.DrawString("1", PanelCodigo.Font, Brushes.LightCyan, PicCodigo.Width -
                                      (e.Graphics.MeasureString((1).ToString(), PanelCodigo.Font).Width + 10), altura);
            }
        }
Example #3
0
 private void PicClear_Click(object sender, EventArgs e)
 {
     PanelCodigo.Clear();
     dtgTokens.Columns.Clear();
 }