, Visual C#


         

sw StreamWriter


For k As Integer = 1 To 3
i = i + 2
x1 = myArrayVB(i, 0)
y1 = myArrayVB(i, 1)
x2 = myArrayVB(i + 1, 0)
y2 = myArrayVB(i + 1, 1)
e.Graphics.DrawLine(myPen2, x1, y1, x2, y2)
Next
' myArrayVB(2000, 1) .
' sw StreamWriter
' D:\MyDocs\MyTest.txt.
' :
Dim sw As StreamWriter = _
New StreamWriter("D:\MyDocs\MyTest.txt")
' myArrayVB(i, j)
' WriteLine:
For i = 0 To N_x
For j = 0 To N_y
sw.WriteLine(myArrayVB(i, j))
Next
Next
sw.Close()
End Sub
(, ) , Class Name (Overrides), Method Name ProcessCmdKey. Form1.vb ( ProcessCmdKey), .
38.3. ProcessCmdKey .
' :
Protected Overrides Function ProcessCmdKey( _
ByRef msg As System.Windows.Forms.Message, _
ByVal keyData As System.Windows.Forms.Keys) As Boolean
' :
Const delta_theta As Double = PI / 32
Const delta_phi As Double = PI / 16
' (spherical coordinates)
' :
Dim theta As Double = Atan2(myEye.orig_coord(1), _
myEye.orig_coord(0))
Dim r1 As Double = Sqrt(myEye.orig_coord(0) * _
myEye.orig_coord(0) _
+ myEye.orig_coord(1) * myEye.orig_coord(1))
Dim r2 As Double = Sqrt(myEye.orig_coord(0) * _