, Visual C#


Visual C++ - 2


x2 = myArrayVC[i + 1, 0];

y2 = myArrayVC[i + 1, 1];

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

}

// 2- myArrayVC_2(i, j):

int N_x_2 = 201; int N_y_2 = 2;

// 2- myArrayVC_2(i, j) - float,

// i = 0,1,2,3,...,(N_x_2 - 1);

// j = 0,1,2,3,...,(N_y_2 - 1):

array<float,2>^ myArrayVC_2 =

gcnew array<float,2>(N_x_2, N_y_2);

//

// D:\\MyDocs\\MyTest3D_Graphics_2.txt

// myArrayVC_2(201, 2)

// sr_2 StreamReader:

StreamReader^ sr_2 = gcnew StreamReader(

"D:\\MyDocs\\MyTest3D_Graphics_2.txt");

// MyTest3D_Graphics_2.txt

// myArrayVC_2(201, 2)

// ReadLine:

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

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

myArrayVC_2[i, j] =

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

sr_2->Close();

// .

// myPen 1:

Pen^ myPen_2 = gcnew Pen(Color::Black, 1);

// N_first_line

// N_last_line :

int N_first_line_2, N_last_line_2;

//

// myArrayVC:

N_first_line_2 = Convert::ToInt32(myArrayVC_2[0, 0]);

N_last_line_2 = Convert::ToInt32(myArrayVC_2[0, 1]);

// , (1,0; 1,1):

i = -1;

for (k = N_first_line_2; k <= N_last_line_2; k++)

{

i = i + 2;

x1 = myArrayVC_2[i, 0]; y1 = myArrayVC_2[i, 1];

x2 = myArrayVC_2[i + 1, 0];y2 = myArrayVC_2[i + 1, 1];

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

}

}

.