تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
مظهر أدوبي Adobe Style
#34
السلام عليكم

نظرت إلى الكود ووجدت أنك مبرمج جبار

خصوصاً في هذا الكود

PHP كود :
Private Sub SetDoubleBuffering(ByVal frm As FormByVal value As Boolean)
        
Dim p As System.Reflection.PropertyInfo frm.GetType.GetProperty("DoubleBuffered"Reflection.BindingFlags.Instance Or Reflection.BindingFlags.NonPublic)
        
p.SetValue(frmvalueNothing)
    
End Sub 

ما إن نظرت إلى كلمة DoubleBuffering قلت في نفسي كيف سيفعلها والخاصية Protected (فقط الفئات المشتقة تراها) ولكنك اقتحمتها واجبرتها



بالمناسبة بخصوص Round Rectangle (مستطيل مقوس الزوايا)

بما أنه شكل كثير التكرر بالإمكان استخدام هذا Structure

PHP كود :
Public Structure RoundRectangle

#Region "Fields"
        
Private rec As Rectangle
        
Private dd1d2d3d4 As Integer
#End Region

#Region "Properties"
        
Public Property Rect() As Rectangle
            Get
                
Return rec
            End Get
            Set
(ByVal value As Rectangle)
                
rec value
            End Set
        End Property
        
Public Property AllRadius() As Integer
            Get
                
Return d
            End Get
            Set
(ByVal value As Integer)
                If 
value 0 Then
                    d 
value
                    d1 
d
                    d2 
d
                    d3 
d
                    d4 
d
                
Else
                    Throw New 
Exception("Radius must be greator than zero 0.")
                
End If
            
End Set
        End Property
        
Public Property TopLeftRadius() As Integer

            Get
                
Return d1
            End Get
            Set
(ByVal value As Integer)
                If 
value 0 Then
                    d1 
value
                
Else
                    Throw New 
Exception("Radius must be greator than zero 0.")
                
End If
            
End Set

        End Property
        
Public Property TopRightRadius() As Integer
            Get
                
Return d2
            End Get
            Set
(ByVal value As Integer)
                If 
value 0 Then
                    d2 
value
                
Else
                    Throw New 
Exception("Radius must be greator than zero 0.")
                
End If
            
End Set
        End Property
        
Public Property BottomRightRadius() As Integer
            Get
                
Return d3
            End Get
            Set
(ByVal value As Integer)
                If 
value 0 Then
                    d1 
value
                
Else
                    Throw New 
Exception("Radius must be greator than zero 0.")
                
End If
            
End Set
        End Property
        
Public Property BottomLeftRadius() As Integer
            Get
                
Return d4
            End Get
            Set
(ByVal value As Integer)
                If 
value 0 Then
                    d1 
value
                
Else
                    Throw New 
Exception("Radius must be greator than zero 0.")
                
End If
            
End Set
        End Property
#End Region

#Region "Constructors"
        
Public Sub New(ByVal rect As RectangleByVal AllRad As Integer)
            If 
Not rect.IsEmpty Then
                rec 
rect
            
Else

                Throw New 
Exception("parameter rect is an empty rectangle .")
            
End If

            
AllRadius AllRad

        End Sub
        
Public Sub New(ByVal rect As RectangleByVal TopLeftRad As IntegerByVal TopRightRad As IntegerByVal BottomRightRad As IntegerByVal BottomLeftRad As Integer)
            If 
Not rect.IsEmpty Then
                rec 
rect
            
Else
                Throw New 
Exception("parameter rect is an empty rectangle .")
            
End If
            
Me.= -1
            
If TopLeftRad 0 AndAlso TopRightRad 0 AndAlso BottomRightRad 0 AndAlso BottomLeftRad 0 Then
                Me
.d1 TopLeftRad
                Me
.d2 TopRightRad
                Me
.d3 BottomRightRad
                Me
.d4 BottomLeftRad
            
Else
                Throw New 
Exception("Radius must be greator than zero 0.")
            
End If
        
End Sub
#End Region

#Region "Functions"
        
Public Function GetPath() As GraphicsPath
            Dim path 
As New GraphicsPath
            
If Me.AllRadius 1 Then
                path
.AddRectangle(Me.Rect)
            Else
                
Dim arcRect As Rectangle = New Rectangle(rec.Location, New Size(d1d1))
                
path.AddArc(arcRect18090)
                
arcRect.rec.Right d2
                arcRect
.Size = New Size(d2d2)
                
path.AddArc(arcRect27090)
                
arcRect.rec.Right d3
                arcRect
.rec.Bottom d3
                arcRect
.Size = New Size(d3d3)
                
path.AddArc(arcRect090)
                
arcRect.rec.Bottom d4
                arcRect
.rec.X
                arcRect
.Size = New Size(d4d4)
                
path.AddArc(arcRect9090)
            
End If
            
path.CloseFigure()
            Return 
path
        End 
Function
        Public Function 
IsTopNormal() As Boolean
            
Return (Me.TopLeftRadius Me.TopRightRadius) \ <= Me.rec.Width
        End 
Function
        Public Function 
IsLeftNormal() As Boolean
            
Return (Me.TopLeftRadius Me.BottomLeftRadius) \ <= Me.rec.Height
        End 
Function
        Public Function 
IsBottomNormal() As Boolean
            
Return (Me.BottomLeftRadius Me.BottomRightRadius) \ <= Me.rec.Width
        End 
Function
        Public Function 
IsRightNormal() As Boolean
            
Return (Me.BottomRightRadius Me.TopRightRadius) \ <= Me.rec.Height
        End 
Function
        Public Function 
IsNormal() As Boolean
            
Return Me.IsBottomNormal AndAlso Me.IsLeftNormal AndAlso Me.IsRightNormal AndAlso Me.IsTopNormal
        End 
Function
        Public Function 
GetMinimumNormalWidth() As Integer
            
Return Math.Max((Me.TopRightRadius Me.TopLeftRadius) \ 2, (Me.BottomRightRadius Me.BottomLeftRadius) \ 2)
        
End Function
        Public Function 
GetMinimumNormalHeight() As Integer
            
Return Math.Max((Me.TopRightRadius Me.BottomRightRadius) \ 2, (Me.TopLeftRadius Me.BottomLeftRadius) \ 2)

        
End Function
        Public Function 
GetMinimumNormalSize() As Size
            
Return New Size(Me.GetMinimumNormalWidthMe.GetMinimumNormalHeight)
        
End Function
#End Region


    
End Structure 
الرد }}}
تم الشكر بواسطة:


الردود في هذا الموضوع
RE: @@@ مظهر أدوبي Adobe Style @@@ - بواسطة CLARO - 28-05-16, 02:39 PM
@@@ مظهر أدوبي Adobe Style @@@ - بواسطة abidin - 21-07-13, 03:55 PM
@@@ مظهر أدوبي Adobe Style @@@ - بواسطة Sajad - 21-07-13, 04:17 PM
@@@ مظهر أدوبي Adobe Style @@@ - بواسطة Sajad - 21-07-13, 06:27 PM
@@@ مظهر أدوبي Adobe Style @@@ - بواسطة DreamsDotNet - 21-07-13, 06:44 PM
@@@ مظهر أدوبي Adobe Style @@@ - بواسطة 3booody - 21-07-13, 07:16 PM
@@@ مظهر أدوبي Adobe Style @@@ - بواسطة DreamsDotNet - 24-07-13, 12:06 AM
@@@ مظهر أدوبي Adobe Style @@@ - بواسطة sooriaty03 - 24-07-13, 01:24 AM
@@@ مظهر أدوبي Adobe Style @@@ - بواسطة sherif khalid - 24-07-13, 05:09 AM
@@@ مظهر أدوبي Adobe Style @@@ - بواسطة Abu Ehab - 24-07-13, 09:27 PM
@@@ مظهر أدوبي Adobe Style @@@ - بواسطة Abu Ehab - 24-07-13, 10:16 PM
@@@ مظهر أدوبي Adobe Style @@@ - بواسطة Sajad - 24-07-13, 10:56 PM
@@@ مظهر أدوبي Adobe Style @@@ - بواسطة 3booody - 24-07-13, 11:30 PM
@@@ مظهر أدوبي Adobe Style @@@ - بواسطة smss - 25-07-13, 05:12 AM
@@@ مظهر أدوبي Adobe Style @@@ - بواسطة DreamsDotNet - 25-07-13, 11:18 PM
@@@ مظهر أدوبي Adobe Style @@@ - بواسطة مالكـ - 26-07-13, 12:18 AM
@@@ مظهر أدوبي Adobe Style @@@ - بواسطة سعود - 26-07-13, 06:14 AM
@@@ مظهر أدوبي Adobe Style @@@ - بواسطة mostafa.vb - 26-07-13, 05:30 PM
@@@ مظهر أدوبي Adobe Style @@@ - بواسطة أبو يعقوب - 27-07-13, 06:18 PM
@@@ مظهر أدوبي Adobe Style @@@ - بواسطة mr_mgm - 03-08-13, 12:01 AM
@@@ مظهر أدوبي Adobe Style @@@ - بواسطة VBMaged - 05-08-13, 07:02 AM
@@@ مظهر أدوبي Adobe Style @@@ - بواسطة ali.alfoly - 12-08-13, 09:12 PM

التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم