private void translacaoy2_Click(object sender, EventArgs e) { try { float[,] matriz = Matriz.SalvarMatriz(Geometrypanel, geometryLine, geometryCol); float[,] initialmatriz = matriz; matriz = Matriz.SomarMatriz(matriz, 0, float.Parse(translaçaoybox.Text)); if (matriz.GetLength(0) * matriz.GetLength(1) < 6) { throw new NoMatrixException(); } //Geometria.DrawInChart(grafico, matriz, "Matriz"); matrizinitial = initialmatriz; matrizfinal = matriz; startanimation = true; Matriz.DesenhaMatrixText(Geometrypanel, matriz); } catch (NoMatrixException ex) { MessageBox.Show("Entre uma matriz para gerar a forma", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error); } catch (MultiplyException ex) { MessageBox.Show("Entre uma matriz para gerar a forma", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void translacaoy_Click(object sender, EventArgs e) { float[,] matriz = Matriz.SalvarMatriz(Geometrypanel, geometryLine, geometryCol); matriz = Matriz.SomarMatriz(matriz, 0, float.Parse(translaçaoybox.Text)); Geometria.DrawInChart(grafico, matriz, "Matriz"); Matriz.DesenhaMatrixText(Geometrypanel, matriz); Geometria.DrawInPanel(DrawPanel, matriz); }