, Visual C#


- 2


for (i = 0; i <= N_x - 1; i++)

for (j = 0; j <= N_y - 1; j++)

myArrayVC[i, j] =

Convert::ToSingle(sr->ReadLine());

sr->Close();

// z=f(x,y) .

// :

float x1, y1, x2, y2;

// myPen 0:

Pen^ myPen = gcnew Pen(Color::Black, 0);

// , xz:

i = -2;

for (int x = 0; x <= x_max; x++)

{

for (int y = 1; y <= y_max; y++)

{

i = i + 2;

x1 = myArrayVC[i, 0];

y1 = myArrayVC[i, 1];

x2 = myArrayVC[i + 1, 0];

y2 = myArrayVC[i + 1, 1];

e->Graphics->DrawLine(myPen, x1, y1, x2, y2);

}

}

N_1_myArray = i + 1; // .

 

// , yz:

i = N_1_myArray - 1;

for (int y = 0; y <= y_max; y++)

{

for (int x = 1; x <= x_max; x++)

{

i = i + 2;

x1 = myArrayVC[i, 0];

y1 = myArrayVC[i, 1];

x2 = myArrayVC[i + 1, 0];

y2 = myArrayVC[i + 1, 1];

e->Graphics->DrawLine(myPen, x1, y1, x2, y2);

}

}

N_2_myArray = i + 1; // .

// :

Pen^ myPen2 = gcnew Pen(Color::Red, 0);

i = N_2_myArray - 1;

for (int k = 1; k <= 3; k++)

{

i = i + 2;

x1 = myArrayVC[i, 0];

y1 = myArrayVC[i, 1];

x2 = myArrayVC[i + 1, 0];

y2 = myArrayVC[i + 1, 1];

e->Graphics->DrawLine(myPen2, x1, y1, x2, y2);

N_3_myArray = i + 1; // .

}

}

 

Visual C# Visual Basic, Visual C++ 2005 , Visual C#, Visual Basic, Visual C++ 2005 (, D:\MyDocs\MyTest.txt), .

.