vb@rchiv
VB Classic
VB.NET
ADO.NET
VBA
C#
vb@rchiv Offline-Reader - exklusiv auf der vb@rchiv CD Vol.4  
 vb@rchiv Quick-Search: Suche startenErweiterte Suche starten   Impressum  | Datenschutz  | vb@rchiv CD Vol.6  | Shop Copyright ©2000-2025
 
zurück

 Sie sind aktuell nicht angemeldet.Funktionen: Einloggen  |  Neu registrieren  |  Suchen

VB.NET - Ein- und Umsteiger
Re: Hilfe bei Klassenerstellung für Kurven (erstellen + bearbeiten) 
Autor: Chris7483
Datum: 23.08.10 10:32

Weiter:

Von der Struktur würde ich es evtl. so aufbauen:

Namespace LineClass
 
    Class Line
        Private _LineType As LineType
        Private _Basepoints As Basepoints
 
        Enum LineType
            Empty
            Line
            Spline
        End Enum
 
        Public Property Type As LineType
            Set(ByVal value As LineType)
                _LineType = value
            End Set
            Get
                Return _LineType
            End Get
        End Property
        Public Property Basepoints As Basepoints
            Set(ByVal value As Basepoints)
                _Basepoints = value
            End Set
            Get
                Return _Basepoints
            End Get
        End Property
 
        Public Sub New()
            _Basepoints = New Basepoints(Me)
        End Sub
        Public Sub New(ByVal Basepoints As Basepoints, ByVal LineType As _
          LineType)
            _Basepoints = New Basepoints(Me, Basepoints.Items)
            _LineType = LineType
        End Sub
 
        Public Sub draw()
            'Hier den Code zum zeichnen einfügen.
            'Darauf achten, dass angegeben wird wohin gezeichnet werden soll.
        End Sub
 
    End Class
 
 
    Class Basepoints
        Private _Parent As Line
        Private _Items As New List(Of Basepoint)
 
        Public Property Parent As Line
            Set(ByVal value As Line)
                _Parent = value
            End Set
            Get
                Return _Parent
            End Get
        End Property
        Public Property Items As List(Of Basepoint)
            Set(ByVal value As List(Of Basepoint))
                _Items = value
            End Set
            Get
                Return _Items
            End Get
        End Property
 
        Public Sub New()
        End Sub
        Public Sub New(ByVal Parent As Line)
            _Parent = Parent
        End Sub
        Public Sub New(ByVal Parent As Line, ByVal Items As List(Of Basepoint))
            _Items = Items
            _Parent = Parent
        End Sub
 
    End Class
 
 
    Class Basepoint
        Private _PointType As PointType
        Private _Location As Point
        Private _Parent As Basepoints
 
        Enum PointType
            corner
            tangential
            symetric
        End Enum
 
        Public Property Type As PointType
            Set(ByVal value As PointType)
                _PointType = value
            End Set
            Get
                Return _PointType
            End Get
        End Property
        Public Property Location As Point
            Set(ByVal value As Point)
                _Location = value
            End Set
            Get
                Return _Location
            End Get
        End Property
        Public Property Parent As Basepoints
            Set(ByVal value As Basepoints)
                _Parent = value
            End Set
            Get
                Return _Parent
            End Get
        End Property
 
        Public Sub New()
        End Sub
        Public Sub New(ByVal parent As Basepoints)
            _parent = parent
        End Sub
        Public Sub New(ByVal parent As Basepoints, ByVal Location As Point, _
          ByVal Pointtype As PointType)
            _parent = parent
            _Location = Location
            _PointType = Pointtype
        End Sub
 
    End Class
 
End Namespace
Soweit mal mein Vorschlag...
alle Nachrichten anzeigenGesamtübersicht  |  Zum Thema  |  Suchen

 ThemaViews  AutorDatum
Hilfe bei Klassenerstellung für Kurven (erstellen + bearbeit...2.775Majuz22.08.10 00:10
meine bisherige Realisierung....1.470Majuz22.08.10 00:11
Re: Hilfe bei Klassenerstellung für Kurven (erstellen + bear...1.343Majuz22.08.10 22:14
Re: Hilfe bei Klassenerstellung für Kurven (erstellen + bear...1.364Chris748323.08.10 10:32
Re: Hilfe bei Klassenerstellung für Kurven (erstellen + bear...1.382Chris748323.08.10 10:32
Re: Hilfe bei Klassenerstellung für Kurven (erstellen + bear...1.383Majuz24.08.10 00:48
Re: Hilfe bei Klassenerstellung für Kurven (erstellen + bear...1.330Majuz29.08.10 12:07
Re: Hilfe bei Klassenerstellung für Kurven (erstellen + bear...1.287Chris748329.08.10 15:30
Re: Hilfe bei Klassenerstellung für Kurven (erstellen + bear...1.345Majuz29.08.10 21:14
Re: Hilfe bei Klassenerstellung für Kurven (erstellen + bear...1.285Majuz30.08.10 00:15
Re: Hilfe bei Klassenerstellung für Kurven (erstellen + bear...1.348Chris748330.08.10 09:29

Sie sind nicht angemeldet!
Um auf diesen Beitrag zu antworten oder neue Beiträge schreiben zu können, müssen Sie sich zunächst anmelden.

Einloggen  |  Neu registrieren

Funktionen:  Zum Thema  |  GesamtübersichtSuchen 

nach obenzurück
 
   

Copyright ©2000-2025 vb@rchiv Dieter Otter
Alle Rechte vorbehalten.
Microsoft, Windows und Visual Basic sind entweder eingetragene Marken oder Marken der Microsoft Corporation in den USA und/oder anderen Ländern. Weitere auf dieser Homepage aufgeführten Produkt- und Firmennamen können geschützte Marken ihrer jeweiligen Inhaber sein.

Diese Seiten wurden optimiert für eine Bildschirmauflösung von mind. 1280x1024 Pixel