Uroci.net - !
Adobe Photoshop Adobe Illustrator Adobe Flash Adobe Fireworks DreamWeaver CSS HTML Corel Draw Image Ready PHP SEO CMS Microsoft Windows Microsoft Word Microsoft Excel PowerPoint Microsoft Access Microsoft Publisher Linux Visual basic
JavaScript Ajax 3ds Max Maya 3D C++ Sound Forge Gimp SWiSH

(Class Library)

bubust   :    : 1709



- (Methods)

VB6. Admit Uchenik, :

Public Function Admit() As Boolean

` Uchenik ..

Return True

End Function

, :

If Uchenik.Admit Then...

, . , (inheritance), .

- (Events)

, Event. , , . :

Event LabResult(ByVal LabType As String)

. , RaiseEvent. , UchenikID, . , :

Dim miUchenikID As Integer

Public Property UchenikID() As Integer

Get

Return miUchenikID

End Get

Set

miUchenikID = Value

` Uchenik

`

RaiseEvent LabResult("CBC")

End Set

End Property

, "CBC" , (database).


- (Client)

. WithEvents. AddHandler . WithEvents, WithEvents. WithEvents, (sub) (function). , "module" (client):

Dim WithEvents Uchenik As Uchenik

, Shkola. , New e . WithEvents , New , , . WithEvents , New :

Dim WithEvents Uchenik As Uchenik

...

Public Sub Foo()

Uchenik = New cUchenik()

...

End Sub

, , Uchenik . MethodName , LabResult. Uchenik_LabResult:

Public Sub Uchenik_LabResult(ByVal LabType As System.String)

Handles Uchenik.LabResult

...

End Sub

, AddHandler. (sub) (function), . AddHandler , , .

, , , LabHandler. (sub). , , LabResult. , LabResult lab string. , .

AddHandler, Uchenik , (LabResult), ; , LabHandler. LabHandler; LabHandler, AddressOf . AddHandler :

Protected Sub button1_Click(ByVal sender As Object, _

ByVal e As System.EventArgs) Handles button1.Click

Dim Uchenik As New Uchenik()

AddHandler Uchenik.LabResult, AddressOf Me.LabHandler

...

End Sub

Private Sub LabHandler(ByVal LabType As String)

...

End Sub

, AddHandler, (Uchenik) (LabResult) , Object.Event. , , . , (runtime). .



- "Finalen"

"Finalen", , . Shkola:

Public Class Uchenik

Dim msFirstName As String

Dim KlasDascaliList As New Collection()

Dim miUchenikID As Integer

Public Property FirstName() As String

Get

Return msFirstName

End Get

Set(ByVal Value As String)

msFirstName = Value

End Set

End Property

Default Public ReadOnly Property KlasDascali _

(ByVal iIndex As Integer) As KlasDascal

Get

Return CType(KlasDascaliList(iIndex), KlasDascal)

End Get

End Property

Public Function Admit() As Boolean

` Uchenik ..

Return True

End Function

Event LabResult(ByVal LabType As String)

Public Property UchenikID() As Integer

Get

Return miUchenikID

End Get

Set(ByVal Value As Integer)

miUchenikID = Value

` Uchenik

`

RaiseEvent LabResult("CBC")

End Set

End Property

End Class

Public Class KlasDascal

Dim miPhysID As Integer

Public Property KlasDascalID() As Integer

Get

Return miPhysID

End Get

Set(ByVal Value As Integer)

miPhysID = Value

End Set

End Property





Public ReadOnly Property Vuzrast() As Single

Get

`get Date of Birth (DOB)-

` Vuzrast DOB

` Vuzrast

End Get

End Property

End Class





67 Solutions Configuration .


: «1 2 3

,


© . 2006-2008. Created by: Site.bg
: IT | | . | Paparak.bg | | uchenik.com | TRAVEL | | AmAm.bg | . | | AnimeS-bg.com | | | | IT Light | Spodeli.net | - | IDG.BG | Teenproblem.net | - | Fresh-BG.com | Hanovete.com | Bulfleet.com | Mythlands.com | Ohoboho.com | .Com | News24 | Setcom.bg | Atol.bg | Elmaz.com | MobileBulgaria.com