Пример #1
0
        private void MainForm_Paint(object sender, PaintEventArgs e)
        {
            g = e.Graphics;

            if (LoadMatrix)
            {
                DrawMatrixClass drawMatrixClass = new DrawMatrixClass();
                list = drawMatrixClass.DrawRectangles(g, 10, 10);
            }
        }
Пример #2
0
        private void EditMatrix_Paint(object sender, PaintEventArgs e)
        {
            g = e.Graphics;
            DrawMatrixClass drawMatrixClass = new DrawMatrixClass();

            if (IsEnabled)
            {
                list = drawMatrixClass.DrawRectangles(g, matrix.Width, matrix.Length);
            }
            if (IsChecked)
            {
                drawMatrixClass.ReDrawRectangles(g, list);
            }
            //if(DrawColorRed.X!=0 || DrawColorRed.Y!=0)
            //{
            //    Brush brush = new SolidBrush(Color.Black); // ініцалізація кісті
            //    g.FillRectangle(brush, DrawColorRed.X, DrawColorRed.Y, 30, 30); // заповнення кольорем елеметна матриці
            //    DrawColorRed.X = 0;
            //    DrawColorRed.Y = 0;
            //}
        }