예제 #1
0
        public void Update(string type)
        {
            SLAESource.GetSLAE(out matrix, type, out b, out x0);
            int n = matrix.Size;

            Location = Owner.Location;
            format   = type;

            DataGridView mat = new DataGridView();

            mat = MatrixVisualRepresentation.CoordinationalToGridView(MatrixExtensions.ConvertToCoordinationalMatrix(matrix), SLAESource.IsSymmetric);
            MatrixVisualRepresentation.CopyDataGridView(mat, ref A);

            width  = cellWidth * (n - 2);
            heigth = cellHeight * (n - 2);

            Size size = new Size(Width > 115 + width ? Width : 115 + width, 190 + heigth);

            MaximumSize = size;
            MinimumSize = size;
            Size        = size;
            A.ReadOnly  = true;
            MatrixVisualRepresentation.PaintPattern(ref A, Color.SteelBlue);
        }
예제 #2
0
 private void A_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     patternChanged = true;
     MatrixVisualRepresentation.InverseElementPatternStatus(ref A, e.RowIndex, e.ColumnIndex);
     MatrixVisualRepresentation.PaintPattern(ref A, Color.SteelBlue);
 }