Professional Documents
Culture Documents
Visual Studio Evolve Theme
Visual Studio Evolve Theme
Generic
Imports System.Drawing, System.Drawing.Drawing2D
Imports System.ComponentModel, System.Windows.Forms
Imports System.Runtime.InteropServices
Imports System.Drawing.Imaging
Imports System.Reflection
'########|CREDITS|##########
'# Theme: Mavamaarten #
'# Themebase: Aeonhack #
'###########################
#Region "Themebase"
'------------------
'Creator: aeonhack
'Site: elitevs.net
'Created: 08/02/2011
'Changed: 12/06/2011
'Version: 1.5.4
'------------------
Sub New()
SetStyle(DirectCast(139270, ControlStyles), True)
_ImageSize = Size.Empty
Font = New Font("Verdana", 8S)
InvalidateCustimization()
End Sub
InvalidateCustimization()
ColorHook()
If Not _LockWidth = 0 Then Width = _LockWidth
If Not _LockHeight = 0 Then Height = _LockHeight
If Not _ControlMode Then MyBase.Dock = DockStyle.Fill
Transparent = _Transparent
If _Transparent AndAlso _BackColor Then BackColor =
Color.Transparent
MyBase.OnHandleCreated(e)
End Sub
If _IsParentForm Then
ParentForm.FormBorderStyle = _BorderStyle
ParentForm.TransparencyKey = _TransparencyKey
Parent.BackColor = BackColor
End If
OnCreation()
DoneCreation = True
InvalidateTimer()
End Sub
#End Region
HasShown = True
End Sub
InvalidateBitmap()
Invalidate()
MyBase.OnSizeChanged(e)
End Sub
#End Region
MyBase.OnMouseMove(e)
End Sub
If GetChildAtPoint(PointToClient(MousePosition)) IsNot
Nothing Then
If _Sizable AndAlso Not _ControlMode Then
Cursor = Cursors.Default
Previous = 0
End If
End If
MyBase.OnMouseLeave(e)
End Sub
MyBase.OnMouseDown(e)
End Sub
SetState(MouseState.Over)
If Not _SmartBounds Then Return
If IsParentMdi Then
CorrectBounds(New Rectangle(Point.Empty,
Parent.Parent.Size))
Else
CorrectBounds(Screen.FromControl(Parent).WorkingArea)
End If
End If
End Sub
Previous = Current
Select Case Previous
Case 0
Cursor = Cursors.Default
Case 1, 2
Cursor = Cursors.SizeWE
Case 3, 6
Cursor = Cursors.SizeNS
Case 4, 8
Cursor = Cursors.SizeNWSE
Case 5, 7
Cursor = Cursors.SizeNESW
End Select
End Sub
#End Region
MyBase.BackColor = value
If Parent IsNot Nothing Then
If Not _ControlMode Then Parent.BackColor = value
ColorHook()
End If
End Set
End Property
<Browsable(False), EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidde
n)> _
Overrides Property ForeColor() As Color
Get
Return Color.Empty
End Get
Set(ByVal value As Color)
End Set
End Property
<Browsable(False), EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidde
n)> _
Overrides Property BackgroundImage() As Image
Get
Return Nothing
End Get
Set(ByVal value As Image)
End Set
End Property
<Browsable(False), EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidde
n)> _
Overrides Property BackgroundImageLayout() As ImageLayout
Get
Return ImageLayout.None
End Get
Set(ByVal value As ImageLayout)
End Set
End Property
#End Region
_Image = value
Invalidate()
End Set
End Property
While E.MoveNext
T.Add(New Bloom(E.Current.Key, E.Current.Value))
End While
Return T.ToArray
End Get
Set(ByVal value As Bloom())
For Each B As Bloom In value
If Items.ContainsKey(B.Name) Then Items(B.Name) =
B.Value
Next
InvalidateCustimization()
ColorHook()
Invalidate()
End Set
End Property
Try
Data = Convert.FromBase64String(value)
For I As Integer = 0 To Items.Length - 1
Items(I).Value =
Color.FromArgb(BitConverter.ToInt32(Data, I * 4))
Next
Catch
Return
End Try
_Customization = value
Colors = Items
ColorHook()
Invalidate()
End Set
End Property
InvalidateBitmap()
Invalidate()
End Set
End Property
#End Region
Transparent = _Transparent
If _Transparent AndAlso _BackColor Then BackColor =
Color.Transparent
InvalidateBitmap()
Invalidate()
End Set
End Property
#End Region
M.Close()
_Customization = Convert.ToBase64String(M.ToArray)
End Sub
If _IsAnimated Then
AddAnimationCallback(AddressOf DoAnimation)
Else
RemoveAnimationCallback(AddressOf DoAnimation)
End If
End Sub
#End Region
#End Region
#End Region
#End Region
#End Region
If _Transparent Then
B.SetPixel(x, y, c1)
B.SetPixel(x + (width - 1), y, c1)
B.SetPixel(x, y + (height - 1), c1)
B.SetPixel(x + (width - 1), y + (height - 1), c1)
Else
DrawCornersBrush = New SolidBrush(c1)
G.FillRectangle(DrawCornersBrush, x, y, 1, 1)
G.FillRectangle(DrawCornersBrush, x + (width - 1), y, 1,
1)
G.FillRectangle(DrawCornersBrush, x, y + (height - 1), 1,
1)
G.FillRectangle(DrawCornersBrush, x + (width - 1), y +
(height - 1), 1, 1)
End If
End Sub
#End Region
#Region " DrawBorders "
#End Region
DrawTextSize = Measure(text)
DrawTextPoint = New Point(Width \ 2 - DrawTextSize.Width \ 2,
Header \ 2 - DrawTextSize.Height \ 2)
Select Case a
Case HorizontalAlignment.Left
G.DrawString(text, Font, b1, x, DrawTextPoint.Y + y)
Case HorizontalAlignment.Center
G.DrawString(text, Font, b1, DrawTextPoint.X + x,
DrawTextPoint.Y + y)
Case HorizontalAlignment.Right
G.DrawString(text, Font, b1, Width -
DrawTextSize.Width - x, DrawTextPoint.Y + y)
End Select
End Sub
#End Region
Select Case a
Case HorizontalAlignment.Left
G.DrawImage(image, x, DrawImagePoint.Y + y,
image.Width, image.Height)
Case HorizontalAlignment.Center
G.DrawImage(image, DrawImagePoint.X + x,
DrawImagePoint.Y + y, image.Width, image.Height)
Case HorizontalAlignment.Right
G.DrawImage(image, Width - image.Width - x,
DrawImagePoint.Y + y, image.Width, image.Height)
End Select
End Sub
Protected Sub DrawImage(ByVal p1 As Point)
DrawImage(_Image, p1.X, p1.Y)
End Sub
Protected Sub DrawImage(ByVal x As Integer, ByVal y As Integer)
DrawImage(_Image, x, y)
End Sub
#End Region
#End Region
#End Region
#End Region
End Class
Sub New()
SetStyle(DirectCast(139270, ControlStyles), True)
_ImageSize = Size.Empty
Font = New Font("Verdana", 8S)
InvalidateCustimization() 'Remove?
End Sub
Transparent = _Transparent
If _Transparent AndAlso _BackColor Then BackColor =
Color.Transparent
MyBase.OnHandleCreated(e)
End Sub
MyBase.OnParentChanged(e)
End Sub
#End Region
If _Transparent Then
PaintHook()
e.Graphics.DrawImage(B, 0, 0)
Else
G = e.Graphics
PaintHook()
End If
End Sub
Invalidate()
MyBase.OnSizeChanged(e)
End Sub
#End Region
#End Region
<Browsable(False), EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidde
n)> _
Overrides Property ForeColor() As Color
Get
Return Color.Empty
End Get
Set(ByVal value As Color)
End Set
End Property
<Browsable(False), EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidde
n)> _
Overrides Property BackgroundImage() As Image
Get
Return Nothing
End Get
Set(ByVal value As Image)
End Set
End Property
<Browsable(False), EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidde
n)> _
Overrides Property BackgroundImageLayout() As ImageLayout
Get
Return ImageLayout.None
End Get
Set(ByVal value As ImageLayout)
End Set
End Property
MyBase.BackColor = value
If Parent IsNot Nothing Then ColorHook()
End Set
End Property
#End Region
_Image = value
Invalidate()
End Set
End Property
While E.MoveNext
T.Add(New Bloom(E.Current.Key, E.Current.Value))
End While
Return T.ToArray
End Get
Set(ByVal value As Bloom())
For Each B As Bloom In value
If Items.ContainsKey(B.Name) Then Items(B.Name) =
B.Value
Next
InvalidateCustimization()
ColorHook()
Invalidate()
End Set
End Property
Try
Data = Convert.FromBase64String(value)
For I As Integer = 0 To Items.Length - 1
Items(I).Value =
Color.FromArgb(BitConverter.ToInt32(Data, I * 4))
Next
Catch
Return
End Try
_Customization = value
Colors = Items
ColorHook()
Invalidate()
End Set
End Property
#End Region
#End Region
#Region " Property Helpers "
M.Close()
_Customization = Convert.ToBase64String(M.ToArray)
End Sub
If _IsAnimated Then
AddAnimationCallback(AddressOf DoAnimation)
Else
RemoveAnimationCallback(AddressOf DoAnimation)
End If
End Sub
#End Region
#End Region
#End Region
#End Region
#End Region
#End Region
If _Transparent Then
B.SetPixel(x, y, c1)
B.SetPixel(x + (width - 1), y, c1)
B.SetPixel(x, y + (height - 1), c1)
B.SetPixel(x + (width - 1), y + (height - 1), c1)
Else
DrawCornersBrush = New SolidBrush(c1)
G.FillRectangle(DrawCornersBrush, x, y, 1, 1)
G.FillRectangle(DrawCornersBrush, x + (width - 1), y, 1,
1)
G.FillRectangle(DrawCornersBrush, x, y + (height - 1), 1,
1)
G.FillRectangle(DrawCornersBrush, x + (width - 1), y +
(height - 1), 1, 1)
End If
End Sub
#End Region
#End Region
DrawTextSize = Measure(text)
DrawTextPoint = Center(DrawTextSize)
Select Case a
Case HorizontalAlignment.Left
G.DrawString(text, Font, b1, x, DrawTextPoint.Y + y)
Case HorizontalAlignment.Center
G.DrawString(text, Font, b1, DrawTextPoint.X + x,
DrawTextPoint.Y + y)
Case HorizontalAlignment.Right
G.DrawString(text, Font, b1, Width -
DrawTextSize.Width - x, DrawTextPoint.Y + y)
End Select
End Sub
Select Case a
Case HorizontalAlignment.Left
G.DrawImage(image, x, DrawImagePoint.Y + y,
image.Width, image.Height)
Case HorizontalAlignment.Center
G.DrawImage(image, DrawImagePoint.X + x,
DrawImagePoint.Y + y, image.Width, image.Height)
Case HorizontalAlignment.Right
G.DrawImage(image, Width - image.Width - x,
DrawImagePoint.Y + y, image.Width, image.Height)
End Select
End Sub
#End Region
#End Region
#End Region
#End Region
End Class
Module ThemeShare
SyncLock Callbacks
For I As Integer = 0 To Callbacks.Count - 1
Callbacks(I).Invoke(Invalidate)
Next
End SyncLock
Frames += Rate
End Sub
Callbacks.Add(callback)
InvalidateThemeTimer()
End SyncLock
End Sub
Callbacks.Remove(callback)
InvalidateThemeTimer()
End SyncLock
End Sub
#End Region
End Module
Structure Bloom
'------------------
'Creator: aeonhack
'Site: elitevs.net
'Created: 11/30/2011
'Changed: 11/30/2011
'Version: 1.0.0
'------------------
Class PrecisionTimer
Implements IDisposable
<DllImport("kernel32.dll", EntryPoint:="CreateTimerQueueTimer")>
_
Private Shared Function CreateTimerQueueTimer( _
ByRef handle As IntPtr, _
ByVal queue As IntPtr, _
ByVal callback As TimerDelegate, _
ByVal state As IntPtr, _
ByVal dueTime As UInteger, _
ByVal period As UInteger, _
ByVal flags As UInteger) As Boolean
End Function
<DllImport("kernel32.dll", EntryPoint:="DeleteTimerQueueTimer")>
_
Private Shared Function DeleteTimerQueueTimer( _
ByVal queue As IntPtr, _
ByVal handle As IntPtr, _
ByVal callback As IntPtr) As Boolean
End Function
TimerCallback = callback
Dim Success As Boolean = CreateTimerQueueTimer(Handle,
IntPtr.Zero, TimerCallback, IntPtr.Zero, dueTime, period, 0)
Sub Delete()
If Not _Enabled Then Return
Dim Success As Boolean = DeleteTimerQueueTimer(IntPtr.Zero,
Handle, IntPtr.Zero)
Class EvolveButton
Inherits ThemeControl154
Protected Overrides Sub ColorHook()
End Sub
Sub New()
Transparent = True
End Sub
End Sub
End Class
Class EvolveProgressBar
Inherits ThemeControl154
Sub New()
Transparent = True
End Sub
Class EvolveCheckBox
Inherits ThemeControl154
Private _Checked As Boolean
Private X As Integer
Sub New()
Me.BackColor = Color.FromArgb(47, 47, 47)
End Sub
Class EvolveRadiobutton
Inherits ThemeControl154
End Sub
Class EvolveThemeControl
Inherits ThemeContainer154
Protected Overrides Sub ColorHook()
End Sub
Sub New()
TransparencyKey = Color.Fuchsia
MinimumSize = New Size(80, 55)
Font = New Font("Segoe UI", 9)
End Sub
Class EvolveControlBox
Inherits ThemeControl154
Private _Min As Boolean = True
Private _Max As Boolean = True
Private X As Integer
Sub New()
Size = New Size(92, 16)
Location = New Point(50, 2)
End Sub