示例#1
0
        public void CrearTabla()
        {
            string [] cad = entrada.Split('x');
            bool      ok  = true;

            try
            {
                Convert.ToInt32(cad[0]);
                Convert.ToInt32(cad[1]);
            }
            catch (FormatException)
            {
                ok = false;
                MessageBox.Show("Debe ser formato FILASxCOLUMNAS");
            }

            if (ok)
            {
                tab_ = new Cuadricula(Convert.ToInt32(cad[0]), Convert.ToInt32(cad[1]), this);
                for (int i = 0; i < tab_.get_rows(); i++)
                {
                    for (int j = 0; j < tab_.get_columns(); j++)
                    {
                        this.Controls.Add(this.tab_.get_Celda(i, j));
                        this.tab_.get_Celda(i, j).Click += new System.EventHandler(this.tab_.get_Celda(i, j).Celda_Click);
                    }
                }
            }
        }
示例#2
0
        public Form1()
        {
            entrada   = null;
            selected_ = -1;
            // _C = new System.Windows.Forms.Label(); ;
            tab_ = new Cuadricula(0, 0, this);
            InitializeComponent();
            //this.Opacity = .75;
            this.WindowState = FormWindowState.Maximized;
            Paleta a = new Paleta();

            a.Show();
        }